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 8278 times)

0 Members and 1 Guest are viewing this topic.

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
C language 50th anniversary
« on: July 22, 2022, 07:22:48 am »
The first version of the C language (the C compiler and some utilities made with it) appeared in 1972. I have not been able to find out in which month exactly. In any case I am very happy for the 50th anniversary.

At the time it took me a little bit of a big effort to learn C. In those years the fashionable language was Pascal and its implementation by Borland, TurboPascal. TurboPascal had many libraries and was much more productive than C in the MS-DOS based PC environment.
But in the long run, C has served me much better for programming embedded systems and today it has nothing to envy to Pascal.

Happy C anniversary!!!


Edit: Better said

Code: (c) [Select]
#include <stdio.h>
int main(void) {
    printf("Happy 50th anniversary C!!!");
    return 0;
}
« Last Edit: July 22, 2022, 07:32:59 am by Picuino »
 
The following users thanked this post: daqq, bsfeechannel, fourtytwo42

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2275
  • Country: 00
Re: C language 50th anniversary
« Reply #1 on: July 22, 2022, 08:25:42 am »
Happy anniversary  ;D On to another 50 years of (quasi) domination  :)

My all time favorite programming language, simple, reliable and best supported everywhere  :-+

And no, this is not an invite to C haters and Rust zealots to start to explain why they believe C should be replaced  >:D
 
The following users thanked this post: Siwastaja

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #2 on: July 22, 2022, 09:35:25 am »
C haters?
It certainly seems that there must be people for everything. XD
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: cn
Re: C language 50th anniversary
« Reply #3 on: July 22, 2022, 10:19:20 am »
Edit: Better said

Code: (c) [Select]
#include <stdio.h>
int main(void) {
    printf("Happy 50th anniversary C!!!");
    return 0;
}

To be more historically accurate.

Code: (c) [Select]
main()
{
printf("Happy 50th anniversary C!!!");
}

In pre-ANSI C (K&R C, as found in the 1st ed. K&R), all functions without a specified return type are implied to be int, the main() function without a return type is implied to be 0 in practice, and printf's definition was provided by the compiler by default.

Here's a PDP-11 simulation run on the original UNIX v6 system.


PDP-11 simulator V3.11-0
Disabling XQ
Listening on port 1106 (socket 7)
SR:   
@unix

login: root
#
# ls
bin
core
dev
etc
lib
mnt
rkunix
tmp
unix
usr
# ed
a
main()
{
   printf("Happy 50th anniversary C!\n");
}
w 50th.c
51
q
# cc 50th.c
# ./a.out
Happy 50th anniversary C!


Not to say it's a good style in 2022. By modern standard it's sloppy - but it was what the original C was - a quick-and-dirty experimental design to test ideas, just like UNIX was also a quick-and-dirty experimental operating system for the same purpose. Both are probably the most productive experiment in computing history.
« Last Edit: July 22, 2022, 10:59:58 am by niconiconi »
 
The following users thanked this post: tom66, edavid, Picuino

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #4 on: July 22, 2022, 10:41:08 am »
Both are probably the most productive experiment in computing history.
Only in a broken window sense.

Lack of runtime bounds checking, null in general and null delimited strings in particular (and escape codes in general). So many fundamentally wrong approaches cemented during the Unix days, with most of the disastrous and unnecessary stupidity still mostly unrecognized (people will still defend SQL!).
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: cn
Re: C language 50th anniversary
« Reply #5 on: July 22, 2022, 10:54:35 am »
Both are probably the most productive experiment in computing history.
Only in a broken window sense.

Lack of runtime bounds checking, null in general and null delimited strings in particular (and escape codes in general). So many fundamentally wrong approaches cemented during the Unix days, with most of the disastrous and unnecessary stupidity still mostly unrecognized (people will still defend SQL!).

Okay, the flamewar just arrived as expected, time to leave the thread.  :-DD :-DD

I think we can all agree that the original experiment itself was productive within its original scope. Minicomputers were 70s equivalent of microcomputers, they made computing available to individual researchers for the first time. Unix started out as a hack and experiment on what you could do with the new power.

However, by a series of historical coincidences, it was later adopted and used on almost all computers in existence, and eventually used as even an industrial-grade production system, this is well beyond its intentions. I think saying it's counterproductive or harmful at this point is a reasonable opinion (Disclaimer: I'm just saying it's reasonable, but I'm not necessarily advocating this position, I have no motivation to start yet another flamewar - I've already seen all kinds of arguments since a long time ago...) :horse:
« Last Edit: July 22, 2022, 10:58:38 am by niconiconi »
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #6 on: July 22, 2022, 12:56:29 pm »
I think we can all agree that the original experiment itself was productive within its original scope.
The scope died almost immediately, by the 90s the writing was on the wall for the horrific results of buffer overflows, null and SQL. Yet somehow it took 3 decades more for the hyperscalers to finally start bringing some sanity to IT.

UNIX somehow managed to be the perfect storm of extremely seductive concepts fundamentally wrong for modernity. They couldn't have known it at the time, but Unix and C likely railroaded IT into trillion dollar level of lost productivity, which could have been saved had other contemporary concepts won out.

Just because the mistakes could not realistically be recognized at the time is no reason to celebrate instead of mourn the mistakes of the past.
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #7 on: July 22, 2022, 01:35:29 pm »
The C language was a replacement for assembly language, used at the time to write operating systems such as Unix. In that sense, it has been a complete success. In microcontrollers there are still people (including university professors) who prefer to program in assembler instead of C. And I don't mean a few lines to speed up the program, use special instructions for multitasking or something like that, I mean that the convenience of programming the whole program in assembler is still defended. There is not much to comment on this... each one with their decisions.

Lately there is news about the use of Rust in the Linux kernel. Welcome a new language if it improves security. But the fact is that the millions of lines of GNU/Linux code are written in C and no serious contender for C has appeared in 50 years.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #8 on: July 22, 2022, 01:45:51 pm »
As I said, they stumbled on the perfectly wrong set of seductive yet disastrous.

The lack of necessity and danger of allowing buffer overflows and use after free 99% of the time, have been only very recently barely recognised. Till two years or so ago C defenders would shout you off every forum. The lack of necessity for null and its danger is rarely recognized. The lack of necessity for escape codes outside wire protocols and their danger virtually unrecognised as of yet.

The perfection of C/Unix to blind people to its flaws is impressive all in and of itself, they pioneered so many ways to do things exactly wrong while blinding people to how.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: C language 50th anniversary
« Reply #9 on: July 22, 2022, 02:57:42 pm »
What do you mean by SQL and what does it have to do with C? :P
 
The following users thanked this post: Siwastaja

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7334
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: C language 50th anniversary
« Reply #10 on: July 22, 2022, 03:24:17 pm »
It's not as if non-C approaches investigated at the same time are flawless.

Pascal-style strings prefixed with length are also problematic because the length has to be tracked by all operations to that string, so you can still cause buffer overflows by triggering a bug in that logic, and you need to pre-estimate the string size range to know whether a byte or word is appropriate for length, or use some variable integer type.  And don't get me started about the hodge-podge that C++ strings are with SSO and reallocated/pooled buffers.

Use after free() can is a consequence of a lack of garbage collection and memory management built into the language.  This was probably not a conscious decision, there was just no need for it when Unix systems typically had under a megabyte of memory.  Besides, even if it was considered at the time, you couldn't just rely on your interpreter or language to handle memory for you, you had to do it properly, else you'll just run out.

The biggest issue I have with modern languages is the level of bloat they add to remove errors that could be avoided by conscious security design and audits.  The reality is that security is only seemingly a concern when things go wrong, so these checks only get done on the most essential software.  I mean, come on, things like the printf() BMW bug are just showing embarrassingly poor practices that signal overall bad practice in the organisation, rather than a failure of the language itself. 
« Last Edit: July 22, 2022, 03:26:37 pm by tom66 »
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #11 on: July 22, 2022, 03:28:00 pm »
The whole concept of in line escape sequences is a C/Unix'ism and the cause of SQL's disastrous economic damage. The Null in a way is the grand daddy of escape sequences and on top for damage caused.

Escape sequences are only acceptable for truly harmless markup and interactive use, for non interactive use all parameters should have length with color coding in IDE translating the parameter/length pair into something user friendly (that includes shell programming, which takes adverserial input almost as often as SQL with the same predictable results).
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: C language 50th anniversary
« Reply #12 on: July 22, 2022, 05:01:50 pm »
Edit: Better said

Code: (c) [Select]
#include <stdio.h>
int main(void) {
    printf("Happy 50th anniversary C!!!");
    return 0;
}

To be more historically accurate.

Code: (c) [Select]
main()
{
printf("Happy 50th anniversary C!!!");
}

In pre-ANSI C (K&R C, as found in the 1st ed. K&R), all functions without a specified return type are implied to be int, the main() function without a return type is implied to be 0 in practice, and printf's definition was provided by the compiler by default.

Here's a PDP-11 simulation run on the original UNIX v6 system.


PDP-11 simulator V3.11-0
Disabling XQ
Listening on port 1106 (socket 7)
SR:   
@unix

login: root
#
# ls
bin
core
dev
etc
lib
mnt
rkunix
tmp
unix
usr
# ed
a
main()
{
   printf("Happy 50th anniversary C!\n");
}
w 50th.c
51
q
# cc 50th.c
# ./a.out
Happy 50th anniversary C!


Not to say it's a good style in 2022. By modern standard it's sloppy - but it was what the original C was - a quick-and-dirty experimental design to test ideas, just like UNIX was also a quick-and-dirty experimental operating system for the same purpose. Both are probably the most productive experiment in computing history.
all that ? pfff .. no thanks

click power button on commodore 64 (or any home computer or even an original ibm pc with no bootable disk in it so it falls to rom basic )

print "piss off c!"
piss off c!

10 ? "piss off c!" : goto 10
run

piss off c!
piss off c!
piss off c!
piss off c!
piss off c!
piss off c!
piss off c!
at infintem ...
« Last Edit: July 22, 2022, 05:05:13 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline bsfeechannel

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: 00
Re: C language 50th anniversary
« Reply #13 on: July 22, 2022, 05:17:17 pm »
Bashing C is like bashing the soldering iron just because today we have pick-and-place machines.
 
The following users thanked this post: tom66, rsjsouza, edavid, PlainName, Andy Watson, langwadt, Siwastaja, Fgrir, BrianHG, Picuino

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #14 on: July 22, 2022, 05:27:33 pm »
There are people who amuse themselves by contradicting others with theories that can be very absurd.
The brain is like a fertile ground where all kinds of ideas can grow.
I think that's good for humanity. That there are all kinds of memes (as Richard Dawkins means it) keeping in our heads makes us a less homogeneous and more varied society and, therefore, more resistant to environmental changes.
The problem lies with those who end up believing that they "should not look up". Or any other conspiracy theory such as that the earth is flat.
I repeat, I think that is good for society as a whole, but bad for the poor person who believes it.
 

Offline bsfeechannel

  • Super Contributor
  • ***
  • Posts: 1668
  • Country: 00
Re: C language 50th anniversary
« Reply #15 on: July 22, 2022, 05:57:32 pm »
To be more historically accurate.

Code: (c) [Select]
main()
{
printf("Happy 50th anniversary C!!!");
}

In pre-ANSI C (K&R C, as found in the 1st ed. K&R), all functions without a specified return type are implied to be int, the main() function without a return type is implied to be 0 in practice, and printf's definition was provided by the compiler by default.

Here's a PDP-11 simulation run on the original UNIX v6 system.


PDP-11 simulator V3.11-0
Disabling XQ
Listening on port 1106 (socket 7)
SR:   
@unix

login: root
#
# ls
bin
core
dev
etc
lib
mnt
rkunix
tmp
unix
usr
# ed
a
main()
{
   printf("Happy 50th anniversary C!\n");
}
w 50th.c
51
q
# cc 50th.c
# ./a.out
Happy 50th anniversary C!


Not to say it's a good style in 2022. By modern standard it's sloppy - but it was what the original C was - a quick-and-dirty experimental design to test ideas, just like UNIX was also a quick-and-dirty experimental operating system for the same purpose. Both are probably the most productive experiment in computing history.

I tried to replicate that in Linux, but the ed version I have demands the insertion of a single period (".") on a line to terminate the input mode. Did the ed of old dispense with the period?
 

Offline PaulAm

  • Frequent Contributor
  • **
  • Posts: 939
  • Country: us
Re: C language 50th anniversary
« Reply #16 on: July 22, 2022, 06:13:17 pm »
No, ed always used a single period to terminate input mode (how else are you going to tell the program to start taking commands again?).  The poster missed it.
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: cn
Re: C language 50th anniversary
« Reply #17 on: July 22, 2022, 07:02:14 pm »
No, ed always used a single period to terminate input mode (how else are you going to tell the program to start taking commands again?).  The poster missed it.

I actually used an EOF (Control-D) to terminate the input, which unfortunately is invisible and didn't appear in the text log. It was a real simulation run.
« Last Edit: July 22, 2022, 07:07:44 pm by niconiconi »
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 7044
  • Country: nl
Re: C language 50th anniversary
« Reply #18 on: July 22, 2022, 07:16:07 pm »
Bashing C is like bashing the soldering iron just because today we have pick-and-place machines.

IT is like a world persistently manufacturing electronics by soldering irons when there's pick and place machines and reflow.
 
The following users thanked this post: free_electron

Online coppice

  • Super Contributor
  • ***
  • Posts: 10034
  • Country: gb
Re: C language 50th anniversary
« Reply #19 on: July 22, 2022, 08:49:43 pm »
The first version of the C language (the C compiler and some utilities made with it) appeared in 1972. I have not been able to find out in which month exactly. In any case I am very happy for the 50th anniversary.

At the time it took me a little bit of a big effort to learn C. In those years the fashionable language was Pascal and its implementation by Borland, TurboPascal. TurboPascal had many libraries and was much more productive than C in the MS-DOS based PC environment.
Your timing is a bit off. Pascal was loved by academics in the early 70s, but had little presence elsewhere until the 1980s and TurboPascal. Several C compilers, notably Lattice C, appeared about the same time as TurboPascal, but were more expensive. TurboPascal's low price gained it a strong following. Cheap C compilers were a bit late.

I've been writing C for 45 years.
 

Offline PicuinoTopic starter

  • Super Contributor
  • ***
  • Posts: 1072
  • Country: es
    • Picuino web
Re: C language 50th anniversary
« Reply #20 on: July 22, 2022, 09:07:13 pm »
I started programming with a serious language (not BASIC) with TurboPascal 6.0, which already included object-oriented programming in 1990. It also had a built-in assembler, debugger and helper, as well as an extensive library system that made programming text-mode user interfaces much easier.

On the other hand, Microsoft Quick-C 2.5 had much less capabilities (from my point of view) and was not as well regarded then as TurboPascal.

I've been writing C for 45 years.
Congratulations, I have been programming in C for much less time.

Edit: In my case, 25 years of C coding.
« Last Edit: July 22, 2022, 09:28:47 pm by Picuino »
 

Online rsjsouza

  • Super Contributor
  • ***
  • Posts: 6106
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: C language 50th anniversary
« Reply #21 on: July 22, 2022, 09:11:44 pm »
Man, reply #4 to start the BS finger wagging context...  :palm:

At any rate, happy 50th! I hope many more to come (C coder for 25+ years).

The first version of the C language (the C compiler and some utilities made with it) appeared in 1972. I have not been able to find out in which month exactly. In any case I am very happy for the 50th anniversary.

At the time it took me a little bit of a big effort to learn C. In those years the fashionable language was Pascal and its implementation by Borland, TurboPascal. TurboPascal had many libraries and was much more productive than C in the MS-DOS based PC environment.
Your timing is a bit off. Pascal was loved by academics in the early 70s, but had little presence elsewhere until the 1980s and TurboPascal. Several C compilers, notably Lattice C, appeared about the same time as TurboPascal, but were more expensive. TurboPascal's low price gained it a strong following. Cheap C compilers were a bit late.
Indeed. I remember how Borland's "Turbo" IDEs were exceptional development platforms - I started with Turbo Basic, having a quick stint on Turbo Pascal and landing on Turbo C. In my life all that came after I was actually building my PC programs in Tasm (Turbo Assembler).

I've been writing C for 45 years.
:clap: :clap: :clap:
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 
The following users thanked this post: Karel

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: C language 50th anniversary
« Reply #22 on: July 22, 2022, 09:16:17 pm »
And then there was Delphi. And it's still being used. Definitely never died.
 

Offline mclute0

  • Regular Contributor
  • *
  • Posts: 68
  • Country: us
  • Somnium aut moriar!
Re: C language 50th anniversary
« Reply #23 on: July 22, 2022, 09:34:22 pm »
I will have to dig out my original book, The C Programming language by Brian W. Kernighan & Dennis M. Ritchie and read it all again. True heroes the modern world. Salute!
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8275
  • Country: ca
    • LinkedIn
Re: C language 50th anniversary
« Reply #24 on: July 22, 2022, 09:46:26 pm »
I tried C on my firs Amiga with a 68000 processor, 2.5mb ram and a super slow HD.
No way, too long to compile. (1989ish)

I tried again when I got my 25MHz 68030 Amiga 3000 with 10mb ram and a top performance 7200 RPM SCSI HD. (1993ish)
Ok, now I was hooked as compiling time was actually good.
Though a lot of code was copy & paste modified examples from existing source code with my algorithms in-between.

I didn't delve deeper into a modern C compiler until I had access to a C compiler for Microchip MCUs and had to do a DSPIC project for my exercise bike controller.  Then it was more fun as compile times were only around 2 seconds.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf