Posted on 10/13/2011 9:00:58 PM PDT by budj
"Dennis Ritchie, an internationally renowned computer scientist who created the C programming language, has died at age 70. ..."
(Excerpt) Read more at news.cnet.com ...
GREP is still a very powerful tool. I used it extensively in my last scripted publishing job. I used PDFtk to open a finish .pdf and extracted the final item sequence and item page number using GREP. Had to precondition the opened .pdf with a text editor to allow that. The weird syntax for proportional spacing between repeating numeral 1’s caused that.
I never used a Unix system (used DOS, Windows, Linux, AS400), but have used Linux for 15 years. It is NOT Unix, but many of the commands are identical. And it is a lot more friendly.
Thanks for clarification. I showed my ignorance by not knowing the diff.
Just pray that your frail, withered body isn't plugged into a medical device running some of that old decrepit code when it wraps! ;^)
Spohen by someone who must have made a lot of mistakes. ;-D
I have used 'c' in everything from operating systems to applications. It is a wonderful language that "enables" everything one does. The more restrictive languages are reserved for those with less talent.
rm -r /
Than be told that I wasn't allowed by the compiler or OS.
While this has nothing to do with this thread, it does remind me of a hilarious service call I had many years ago at a beverage company... The night shift data guy at a soda bottling plant began to get a message that the root file system was running out of space. He had heard other IT people talk about how they could free up disk space by deleting the development system. So he logged on to the console as root, changed to development system directory, /dev , and then did an "rm *" .
Mark
I worked on PDP-11 based testers while in college. You knew it was going to be a bad day when the tape reader ate your diagnostics tape.
8^)
> const char s[] = Goodbye, World!;
const char s[] = "Goodbye, World!\n"; /* I waited all night - no one caught it :-D */
Actually, since the original example used puts()
to emit the output, the newline isn't needed since that standard library function "... writes the string s and a trailing newline to stdout".
Since quite a few of us following this thread are hoary C pushers from way, way back, here's another take on the program. I've got K&R2 on my desk (of course) and will be faithful to Brian and Dennis in terms of case and punctuation of the classic and beloved string. So here goes...pick it to shreds!
#include <stdio.h> #include <stdlib.h> int main(void) { static const char s[] = "goodbye, world"; (void)puts(s); return EXIT_SUCCESS; }lint(1) doesn't yelp and when compiled with these flags, the compiler emits no warnings (and Sun's "cc" is also quite content):
gcc -Wall -W -ansi -pedantic dmr_goodbye.cI do believe that FR has taken the place of comp.lang.c. Henceforth, I'll be posting all my code here for peer review! :-) * 10e6
That would be some kind of cosmic justice, wouldn't it? If I was hooked up to something I'd written I'd probably die of sleep deprivation from 'running' the code over and over in my head....and trying to remember exactly which compiler warnings I'd ignored!
Beautiful! It would be a hoot if Dennis had that as an epitaph.
Payback’s a bitch a’int it!
“I have used ‘c’ in everything from operating systems to applications. It is a wonderful language that “enables” everything one does. The more restrictive languages are reserved for those with less talent.”
I’ll assume you’re kidding. If so, I’m kidding too:
All I can say is that I hope programmers like you stick with video games and stay away from anything safety critical.
SEBOL uses #include statements. That and Visual Basic are the only languages I use now.
I'll try to stay above the fray here but since a mini-version of language wars is breaking out here on FR (of all places :)), those of you following this thread may enjoy this classic from Brian Kernighan, the 'K' of K&R:
Why Pascal is Not My Favorite Programming Language
Enjoy...and fight amongst yourselves! :-)
There is no argument or fight here. Anyone who seriously proposes using standard C for safety-critical software is simply naive and uninformed. (Yes, there is something called “MISRA C,” which is a severely restricted subset of C that is approved for some safety-critical use, but it is a far cry from standard C.)
The standard language for flight-critical systems on airliners is Ada. I have never used Ada, nor do I have any particular desire to use it, but there is no controversy about its superiority over C for flight-critical and other safety-critical systems.
Oooh, you are "new school". I became a "programmer for hire" in 1968. I had code in the Skylab project (FORTRAN), a life safety system for the rocket engine test facility in Hunstville (C), and a prison security system (C). All of those are "life critical" and perfomed flawlessly. I have done many criticals systems in 'c' over the years right up to the present time; and, these have all worked very well.
I've never done a video game. I never will. My forte at this time is severe environment data loggers. No complaints from the field. It is a matter of practice and inspection along with good testing technique. Bloatware would never fit in the devices I build.
Well, then you must be d*mn good. But language options were obviously much more limited back then, and I’ll bet that applications were considerably simpler too. I still say that anyone who voluntarily chooses C for a large application today, let alone a safety-critical one, must be unaware of superior options. I work on a research prototype for an ATC system, and I am using Scala. Take a look at Scala. You might like it.
I shall indeed.
I'm a stale old fart. I like 'c' a great deal; and, I've always wondered why people didn't accumulate applications specific libraries so that they could rely on a perfected code base. We see a lot of "standard" libraries, but few application specific ones. I do build applications libraries; and, those help a great deal with reliability issues within a vertical project base.
From this old fart's point of view, it seems software has become a lot more complicated than it really needs to be. The "bells and whistles" are where most of the failures appear to be exhibited, and certainly where the security vulnerabilities are rooted. Today's machines are blindingly fast compared to what existed a few years ago; however, you really wouldn't know that because of the bloat.
I tend to design for simplicity and use proven hardware/software building blocks.
Once you've programmed for so many years you actually do tend to create few errors ... but they are spectacular when you do. (Who wrote this code! I did? Shoot!)
I've written burglar & fire alarm communicators, cardiac flow monitors, fluids systems controls, water treatment controls, and many other 'critical' apps in C. I program in C, C++, ASM, PASCAL, various flavors of BASIC, JAVA, Perl, Python, PHP, and would trust my life with C over and above any other language out there. Well written C code is the most stable game in town, hands down.
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.