Hello World, 1978
artsy.net
artsy.net
Also it is quite amusing how many people love this trick when I tell them after they have spent a decade or more struggling.
https://code.google.com/p/go/source/browse/src/pkg/debug/mac...
Random reddit comment saying $8,500: https://www.reddit.com/r/programming/comments/2zluh1/brian_k...
Not that I'm an expert. I learned C but I don't think we used his book. Or if we did, I wish the instructor would have emphasized the opening statement a lot more:
> "The only way to learn a new programming language is by writing programs in it. The first program to write is the same for all languages:
> Print the words
hello, world
> This is the basic hurdle; to leap over it you have to be able to create the program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy."What a beautiful and complete way to put it. I do hello world out of grudging habit (aka this better f--king work or I'm going to scream)...but I don't think ever appreciated its implications. I imagine it's even harder to do so today as people are more and more removed from basic computing.
I also love his addendum in the wrist statement https://www.artsy.net/article/ruse-laboratories-brian-kernig...
> In hindsight, life is rather more complicated, but this is still a good first step, and "hello world" has taken on a life of its own as the standard first example for programming textboo
For a fragment shorter than a tweet. It's a stretch IMO.
C was... different then.
The existence of B always makes me laugh when someone claims Python is typeless. No, Python knows the difference between a string and a float, it just knows it at runtime. B, where everything is a machine word, and integers, floats, and pointers are all the same thing at the language level, is typeless.
Even now, prototypes are optional in C (as opposed to C++), so this program is still valid, although it's likely to trigger some compiler warnings.
It's been illegal in standard C since 1999.
Too bad it's private. It would suck to have to rethink that algorithm from scratch...