Do you have adblock enabled?
 
If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.

(Boing Boing)   Is_dead($who) { return(strcmp($who, 'Dennis Ritchie')); }   (boingboing.net ) divider line
    More: Sad, Bell Labs, programming languages, Unix  
•       •       •

12885 clicks; posted to Geek » on 13 Oct 2011 at 4:52 AM (4 years ago)   |   Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



144 Comments     (+0 »)
 


Oldest | « | 1 | 2 | 3 | » | Newest | Show all

 
2011-10-12 11:47:04 PM  
Ok, can I submit this headline over? I just realized I completely blew the function declaration. I've been programming PHP for the last 6 years and haven't touched C/C++ in earnest since around 2004. Let's try that again:

bool is_dead(const char* who) { return(strcmp(who, 'Dennis Ritchie')); }
 
2011-10-13 12:07:40 AM  
I C what you did there subby
 
2011-10-13 12:23:54 AM  
still think there is a syntax issue there. single quotes only work on a char. with char[] you'll need the double quotes
 
2011-10-13 12:39:49 AM  

king_nacho: still think there is a syntax issue there. single quotes only work on a char. with char[] you'll need the double quotes


I believe you're right. I give up. PHP makes shroom get sloppy.
 
2011-10-13 12:46:19 AM  

shroom: king_nacho: still think there is a syntax issue there. single quotes only work on a char. with char[] you'll need the double quotes

I believe you're right. I give up. PHP makes shroom get sloppy.


also:
- C has no "bool" type, unless you say typedef enum {false, true} bool
- strcmp() returns zero when strings match, so the function will return the opposite of what you expect
- The original K&R C does not support function prototypes.


int
is_dead(who)
const char* who;
{
return !strcmp(who, "Dennis Ritchie");
}
 
2011-10-13 12:54:07 AM  
www.myremoteradio.com
 
2011-10-13 01:06:39 AM  

$ echo > sad.c
#include <stdio.h>
#include <string.h>
#define DMR "Dennis Ritchie"
int main(int argc, char **argv) {
  if(argc && !strncmp(argv[0], DMR, strlen(DMR))) {
     printf("goodbye world :-(\n");
   } else {
     printf("hello world\n");
   }
}
^D
$ cc -o is alive sad.c && ./isalive "Dennis Ritchie"
goodbye world :-(
$ logout
 
2011-10-13 01:09:58 AM  
This thread really is the most appropriate tribute to the man.
 
2011-10-13 01:10:38 AM  

usernameguy: This thread really is the most appropriate tribute to the man.


its too bad the headline is a god damn travesty towards the man.
 
2011-10-13 01:10:59 AM  
Let's say I wanted to learn a bit about UNIX having had no previous programming experience aside from making quiz games in BASIC when I was like 7.

I don't have the resources to take a class, but I might have the resources to buy a book. I have a Macbook Pro and a desktop PC running Windows 7.

I want to learn enough that I want to learn more. Since I've always been curious about this, maybe I should do it now in tribute.
 
2011-10-13 01:14:10 AM  
Are you there God its me Sex Panther
http://cygwin.com/ (new window)
 
2011-10-13 01:17:40 AM  

Are you there God its me Sex Panther: I have a Macbook Pro


You realize that is running a variant of BSD unix right? Go to Applications > Utilities > Terminal and voila. If you want to get pre-packaged unix apps, ala linux distros: http://www.macports.org/.
 
2011-10-13 01:17:59 AM  

king_nacho: Are you there God its me Sex Panther
http://cygwin.com/ (new window)

What is it?

A DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality. The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the POSIX system calls and environment these programs expect.


Who shot who in the what now?
 
2011-10-13 01:20:11 AM  

cruci fiction: Are you there God its me Sex Panther: I have a Macbook Pro

You realize that is running a variant of BSD unix right? Go to Applications > Utilities > Terminal and voila. If you want to get pre-packaged unix apps, ala linux distros: http://www.macports.org/.


Yeah, I know OSX is built on a UNIX framework (if that's even the right way to say it), and that I can fark with that via the Terminal. I'm just not sure what that means to me, it just seems like learning about it might be interesting. I've sorta got a lot of free time, and I like futzing around with anything that's packed with fine details.
 
2011-10-13 01:41:51 AM  
Man, am I glad I don't have to program anything in C.
 
2011-10-13 02:12:57 AM  
printf("Goodbye world.\n");

/Stolen, but it had the proper sentiment...
 
2011-10-13 02:38:32 AM  
Thank you, sir, for helping make the modern world work.
 
2011-10-13 02:39:16 AM  
Dennis Ritchie had a far more profound and wide-reaching impact on computers and technology becoming ubiquitous in our modern world than did Steve Jobs, but it was all in the background and "under the hood."
 
2011-10-13 04:03:36 AM  

TheCheese: Dennis Ritchie had a far more profound and wide-reaching impact on computers and technology becoming ubiquitous in our modern world than did Steve Jobs, but it was all in the background and "under the hood."


iOS could be considered "under the hood" as well.
 
2011-10-13 05:11:50 AM  

TheCheese: Dennis Ritchie had a far more profound and wide-reaching impact on computers and technology becoming ubiquitous in our modern world than did Steve Jobs, but it was all in the background and "under the hood."


This.
 
2011-10-13 05:12:06 AM  
int isdead(const char* who)
{
const char c = "Denis Ritchie";
while(c && who && (*c++==*who++));
return *(--c) - *(--who);
}

// usage
int happy = isdead("DenisRitchie");
 
2011-10-13 05:15:43 AM  
FlameDuck you are such a moron

int isdead(const char* who)
{
const char c = "Denis Ritchie";
while(c && who && (*c==*who))
*c++ == *who++;
return *(c) - *(who);
}

// usage
int happy = isdead("Denis Ritchie");

// learned C from the original K&R
 
2011-10-13 05:17:11 AM  
imgs.xkcd.com

/rest well geeky dude
 
2011-10-13 05:17:14 AM  
of course forgot pointer declaration :)
 
2011-10-13 05:34:16 AM  
0xdeadbeef

/Got void
 
2011-10-13 05:58:32 AM  

#include < stdio.h >
main()
{
/*
K&R, 1st edition
*/
printf("Goodnight, genius\n");
}

 
2011-10-13 06:02:47 AM  
Damn. C & Pascal were the two languages we were taught at college, I still occasionally bash out some code just to see if I can. When it's all said and done this guy was a genius.
 
2011-10-13 06:48:55 AM  
int main(void) { printf("%s sad.\n", "that's too"); return -1; }
 
ZAZ [TotalFark]
2011-10-13 06:53:29 AM  
Is_dead($who) { return(strcmp($who, 'Dennis Ritchie')); }

You are not expected to understand this.
 
2011-10-13 07:00:08 AM  
Fail headline fails.

// rip
 
ZAZ [TotalFark]
2011-10-13 07:02:44 AM  
shroom

You missed a keyword in your C version.

is_dead(who)
const char *noalias who;
{
return !strcmp(who, "dmr");
}
 
2011-10-13 07:06:22 AM  
ZAZ

Ritchie is actually on record as being not a huge fan of 'noalias'.
 
2011-10-13 07:07:31 AM  
bool is_dead(const std::string& who) { return(bool)who == "Dennis Ritchie"; }
 
ZAZ [TotalFark]
2011-10-13 07:12:29 AM  
AEton

That was my point. Noalias is now negotiable.
 
2011-10-13 07:22:24 AM  

ZAZ: AEton

That was my point. Noalias is now negotiable.


Oops. That was the joke. Sorry!
 
2011-10-13 07:48:54 AM  
I learned Unix from people who learned it from the Man himself. He was truly a shaker.
 
2011-10-13 08:14:22 AM  

DjangoStonereaver: I learned Unix from people who learned it from the Man himself. He was truly a shaker.


I learned C from a little white and blue covered book. Walked into a bookstore, bought the book, sat down and started reading. Didn't even have a compiler or a PC to run it on at the time.
 
2011-10-13 08:18:03 AM  
C--
 
2011-10-13 08:20:30 AM  
But Kernighan is OK, right?

/sad day.
 
2011-10-13 08:34:57 AM  

RatOmeter: DjangoStonereaver: I learned Unix from people who learned it from the Man himself. He was truly a shaker.

I learned C from a little white and blue covered book. Walked into a bookstore, bought the book, sat down and started reading. Didn't even have a compiler or a PC to run it on at the time.


I can barely spell C...

At the time, I was working for AT&T in NJ, and I worked with a lot of veterans of the old
pre-breakup days who had all done time at Bell Labs. It was a great way to learn, and
a lot of those lessons have served me well regardless of the OS, though I am pretty
impressed on how much of it is applicable to the Debian-based distros I favor.
 
2011-10-13 08:44:09 AM  
dev/null.
:(
 
2011-10-13 08:57:03 AM  

Uncle Wiggly: Thank you, sir, for helping make the modern world work.


Indeed. This guy made a much mor important contribution than Steve Jobs, but got much less attention for it.
 
2011-10-13 08:57:36 AM  

TheCheese: Dennis Ritchie had a far more profound and wide-reaching impact on computers and technology becoming ubiquitous in our modern world than did Steve Jobs, but it was all in the background and "under the hood."


Are you fark'n kidding me? Have you ever worked with any variant of Unix from 20 or 30 years ago? It was insanely complicated and a pain to use and was never intended for your grandmother to use. I'm incredibly amazed that the underpinnings of an iPhone or an Android is based on variants of Unix (or in Androids case - "unix-like"). But it took the genius's AFTER Ritchie to accomplish that. That includes Jobs and Linus.

/its like saying Apple would of NEVER of existed without the TELEPHONE! Why aren't we thanking the TELEPHONE!
//good grief - the two have nothing to do with each other - lets celebrate the man and his accomplishments and stop with the Apple hate already
 
2011-10-13 08:57:43 AM  

RatOmeter: C--

int var = 1;
++var;
 
2011-10-13 09:09:38 AM  

yogaFLAME: Man, am I glad I don't have to program anything in C.


Try Cobol sometime.
 
2011-10-13 09:20:58 AM  
/*

bravian: TheCheese: Dennis Ritchie had a far more profound and wide-reaching impact on computers and technology becoming ubiquitous in our modern world than did Steve Jobs, but it was all in the background and "under the hood."

Are you fark'n kidding me?


No, we're not fark'n kidding you. The vast majority of modern programming traces its roots to what the late Mr. Ritchie did. Here is the analogy: Steve Jobs led the design of an awesome car. Dennis Ritchie invented the internal combustion engine and the transmission.

It seems appropriate to comment this way
*/
 
2011-10-13 09:25:09 AM  
Working at a bookstore in the early 90s, one of the go-to books we always had on the computer shelves was K&R C.

/Pours out some of his 40
 
2011-10-13 09:33:12 AM  
My coding days are long over, I even forgot the C that I had learned since I haven't used it since 2001 and used it for video screen mapping on DOS. Didn't bother learning C++. Never knew who was responsible for writing it.
 
2011-10-13 09:37:51 AM  

bravian: Are you fark'n kidding me? Have you ever worked with any variant of Unix from 20 or 30 years ago? It was insanely complicated and a pain to use and was never intended for your grandmother to use.


I take it you've never used punch cards to run a computer. 40 years ago, when Unix was developed, Unix was easy to use compared to the alternatives.

bravian: I'm incredibly amazed that the underpinnings of an iPhone or an Android is based on variants of Unix (or in Androids case - "unix-like").


Why? A shell is just an interface to the OS.
 
2011-10-13 09:39:49 AM  

bravian:
/its like saying Apple would of NEVER of existed without the TELEPHONE! Why aren't we thanking the TELEPHONE!


Actually, if you knew anything about the history of Apple, Jobs and Woz, they probably would have never started Apple without the telephone. The two of them made a good chunk of money in the early to mid 70s selling blue boxes (new window) (not the TARDIS variety), which led to them getting started in business together (Woz built em, Steve sold them around Berkeley if memory serves me correctly). Plus, without the telephone, a blue box and a good knowledge of hacking the phone system, Woz would have never been able to prank call the pope.

i.imgur.com
Pic of Jobs and Woz with a blue box..

Anyhow, I'd tend to agree that Dennis Ritchie did more for the as a relative unknown in the world world than Steve Jobs did, but honestly he was probably ok with that. Every one of the three major operating systems is based off his programming language...thats a bit of a bigger deal compared to selling 200 million iOS devices in my book. Without Ritchie and C, you lose a great influence on later programming languages, the big 3 operating systems, and everything else that relies on those things. Now tell me again, who had a bigger influence on the world?

It would be nice if the Nobel committee started recognizing some of the great pioneers in computer science before its too late. Also, I really like CrossEyedAtNite's analogy between the designer of an awesome car (Jobs) and the designer of the internal combustion engine (Ritchie).
 
Displayed 50 of 144 comments


Oldest | « | 1 | 2 | 3 | » | Newest | Show all



This thread is archived, and closed to new comments.

Continue Farking
Submit a Link »
On Twitter






In Other Media


  1. Links are submitted by members of the Fark community.

  2. When community members submit a link, they also write a custom headline for the story.

  3. Other Farkers comment on the links. This is the number of comments. Click here to read them.

  4. Click here to submit a link.

Report