Tex Source Code
tug.org
tug.org
It's more like a book with extensive description containing all the source code.. without much structuring.
Somehow it hurts.
.. then again, maybe the dvi/pdf version I saw just missed that. Not very experienced with TeX, but I guess the output can be rendered nicely. Why did you post the TeX source edition of a book?
I just thought it was pretty interesting while reading Coders at Work since a lot of people refer to it.
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.
One interesting program for the causal reader, found only online at his site, is Knuth's version of Adventure.
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!)
weave tex.web
tex tex.tex
dvips tex.dvi -o tex.psDoes anyone know of a way to generate similar output but with some nice color-coding, or (even better) hyperlinks from functions and other symbols to their definitions?
Although, as a veteran Knuth code reader, I would say that his code is intended to be read linearly, like a book, rather than in bits and pieces. (Think of it like dynamic programming: it's more efficient to start from the little functions and work your way up, than to start from the big functions and recurse your way down.)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.6...
They rewrote the formula layout into purely (?) functional SML, and made it fairly easy to understand along the way.