Re:Tex Source Code
by michael_dorfman on Sunday January 10, 2010 @10:54AM
(#1043195)
It's available in book form, as well, as are many of Knuth's literate programs.
One interesting program for the causal reader, found only online at his site, is Knuth's version of Adventure.
Wow, thank you very much! I'd missed that the last time(s) I'd checked his programs page (or feared it was still written in FORTRAN for some inexplicable reason (that code is hideous)). I had much fun learning the Colossal Cave in the same summer I learned UNIX, it'll be fun reviewing this.
Ah, I should go a bit further:
I got introduced to Adventure during Harvard Summer School in 1978, where they had a mostly idle much hacked UNIX V6 system on their single PDP-11/70 for all the undergraduates (HRSTS). It had a file system full of goodies and learning to navigate the Colossal Cave and an hierarchical file system really went well together.
(Prior to that was punched card FORTRAN IV (really more like a II) on an IBM 1130 ... so that was quite a step up!)
Many of the people interviewed cite this as a great example of clean code. In addition, it is written in the Literate Programming style so I wanted to take a look and see what it was all about.