Beautiful code

Slashdot is an endless source of entertainment.  Today somebody posted a question looking for examples of “beautiful” free code.  The resulting discussions were mostly off topic, as usual, but resulted in some interesting links:

Polyglots:  a program that compiles (and runs) unmodified in at least 7 different languages.
The Story of Mel
:  an account of how real programmers used to do things.
Real Programmers Don’t Use Pascal
:  Nice rant here.
There’s always the International Obfuscated C Code Contest at www.ioccc.org.
The Tao of Programming:  I bought a copy of this in book form about 15 years ago, but lost it or gave it away at some point.  It was nice to find it again.

By all reports, the TeX code is among the best ever written.  Whenever somebody tells me that bug-free code is impossible, I point them to www.tug.org.