Poll

How long have you been writing C?

More than 40 years
9 (14.3%)
More than 30 years
19 (30.2%)
More than 20 years
15 (23.8%)
More than 10 years
13 (20.6%)
More than 5 years
5 (7.9%)
Less than 5 years
2 (3.2%)
I have never programmed in C
0 (0%)
Don't know / no answer
0 (0%)

Total Members Voted: 63

Author Topic: C language 50th anniversary  (Read 8271 times)

0 Members and 1 Guest are viewing this topic.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: C language 50th anniversary
« Reply #50 on: July 25, 2022, 08:07:26 pm »
That's funny. I had a Mac Plus at some point with 2.5MB RAM and Think C, and it was perfectly usable.
What was the build time of a complete project with a full GUI libraries in the source code?

- I don't remember fully and our expectations back then were certainly different from those we have now. But as I remember, it took like a few seconds per source file and a few additional seconds for linking.
- I'm not sure what you mean by 'full GUI libraries' - back then we were not using bloated libraries all over, GUIs on the Mac were implemented using the Mac OS API most often (at least that's what we were doing) and wouldn't take all that much source code.
- Full build times were mostly irrelevant during development (as they should be these days, although it's not uncommon to see people not setting up projects properly or making a mess of dependencies that will trigger a full build every time you change a single source file). Certainly separate compilation was of utmost importance back then, so we were making the most of it. A few changes in a couple source files would then only require a few seconds for rebuilding the full project.

Again, I don't remember the details, so by "a few seconds", I can't tell for sure whether it was closer to 2 s or 30 s, but what I remember is that it was largely usable.

I did use Turbo Pascal on Mac OS at the time before switching to C. (The first and only version of TP for Mac OS was actually pretty nice. It supported units and features that TP for DOS or CPM didn't support yet at the time.) TP was fast. When I switched to C (with again Think C), I didn't notice a huge slowdown in compile times. It was slower, but certainly not unbearably so. Just to get an idea.

Think C was also supporting a subset of C++, and the C++ compiler was much slower though. But very few people used C++ with Think C that I know of - it was mostly used for learning purposes. I did some C++ with Think C to learn C++ basically, but anything serious was only done with pure C at the time.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20358
  • Country: gb
  • 0999
Re: C language 50th anniversary
« Reply #51 on: July 25, 2022, 08:50:43 pm »
if C had never been invented to this date someone would invent it now.  Look a dangerous but highly efficient language to do low level coding.  It will out  perform anything we have now.

Just learn how to use it !!!
Something else comparable would have been invented instead. It would have been superior in some respects and inferior in others.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2275
  • Country: 00
Re: C language 50th anniversary
« Reply #52 on: July 26, 2022, 07:38:16 am »
I believe it's the companies that prefer more "modern" and "safer" languages, not the programmers.
For most companies, it's cheaper to invest in more powerful hardware (to deal with the overhead) instead of investing in more powerful programmers.
Hardware can easily be added and/or replaced, good employees not so much...
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #53 on: July 26, 2022, 08:35:13 am »
I believe it's the companies that prefer more "modern" and "safer" languages, not the programmers.
It's like LOTO, you need beancounters and annoying people with sticks up their ass to get it done right.

Laziness, misplaced sense of urgency and illusion of control are very hard to overcome. To the point small companies can very rarely manage it with any level of consistency.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 4367
  • Country: gb
Re: C language 50th anniversary
« Reply #54 on: July 26, 2022, 10:37:16 am »
You can talk as long as you like about how beautifully fast and coherent the C is, there are a number of fake celebrity Cameos these day, especially on RADs and those hipster rapid development toys.

Too beautiful (or ugly?) actors like Massimo Banzi want us to believe that we are the last heroes ever through infamous promotional sentences like "Arduino, the C power under your finger tips"

They can talk as long as they like, Cowboys on the console can dare to challenge a piece of wild hardware like a MIPS4 R18200 prototype. Try to dare to challenge C to see how much power you can control under your finger tips when you try to ride a kicking bull in a rodeo.

Sure, you cannot be wrong, real C is a wild bull which, sooner or later,  will throw you on the ground, pouring some misery on you, bleeding and battered, but proud to be a real cowboy on the console

Why? well ...
  • MIPS4 is vaguely supported, but MIPS4 R18200 is supported neither by Gcc nor by Clang/LLvm, there is no support from any C-compiler except experimental ones
  • you have two cores, each core has two thread, each thread has its pipeline and registers
  • it doesn't issue OoO things, but in the Load/Store stage writes go into a FIFO, while reads can bypass the circuit
  • the Cop0, Cop1, and some memory mapped peripherals are sensitive to the order of operations
  • semaphores and mutex are also sensitive, and you need them when the cores have to talk on the internal shared ram
  • oh, and don't forget TLB and cache, which both bite hard
  • hence, in order to assure the correct order, since the C compiler is experimental and lacks all the support, you manually have to put asm("sync, isync, eieio") (yes, pretty like PowerPC assembly) here and there as "defensive code", plus tons of other tricks

 ... do you think the R18200 is too rare? Do you want an alternative kicking bull? Try with the PPC64/Cell (Playstation3)

Still after 50 years, C for wild hardware manages a shaky laugh, it can't wait to throw you on the ground  ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #55 on: July 26, 2022, 02:41:38 pm »
One of the advantages of the existence of C is that many microprocessor designers have taken into account that C was the de facto standard language, for designing their cores.
Perhaps the most notable exception is the 8-bit PIC cores, which seem to be designed so that no one, except Microchip, wants to make a decent C compiler for them.
 
The following users thanked this post: tom66

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7334
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: C language 50th anniversary
« Reply #56 on: July 26, 2022, 02:44:33 pm »
One of the advantages of the existence of C is that many microprocessor designers have taken into account that C was the de facto standard language, for designing their cores.
Perhaps the most notable exception is the 8-bit PIC cores, which seem to be designed so that no one, except Microchip, wants to make a decent C compiler for them.

Yes, the PIC18 with its bizarre file-pointer registers that increment themselves when you read from them.  It's a fun, and *horrid*, architecture.

 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6586
  • Country: nl
Re: C language 50th anniversary
« Reply #57 on: July 26, 2022, 03:24:30 pm »
One of the advantages of the existence of C is that many microprocessor designers have taken into account that C was the de facto standard language, for designing their cores.
Interesting statement, so you are saying that the opcodes of the microcontroller were designed for C ?
I don't get that. Can you give an example of what you mean with this?
Because simple example C does not have a carry (bit) with multiplications, however no microcontroller manufacturer would be so stupid to drop the carry bit in the registers  ;)
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: C language 50th anniversary
« Reply #58 on: July 26, 2022, 05:33:05 pm »
.
« Last Edit: August 19, 2022, 05:40:35 pm by emece67 »
 
The following users thanked this post: Kjelt

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6586
  • Country: nl
Re: C language 50th anniversary
« Reply #59 on: July 26, 2022, 05:39:16 pm »
RISC-V does not have carry bit. Neither Zero, oVerflow nor Sign.
That is indeed a very Reduced Instruction Set  :)
But I think they did not drop it because of the c-compiler?  ::)
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #60 on: July 26, 2022, 11:32:34 pm »
Is very frequent read "C optimized" in microcontroller descriptions.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6586
  • Country: nl
Re: C language 50th anniversary
« Reply #61 on: July 27, 2022, 06:23:52 am »
You mean like cache and branch prediction ?
No just simple processor evolution IMO.

Control flow eg conditional constructs/loops etc., are the logical basis of any software design even used in the earliest 1940s computers.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf