3 ms·
Those aren’t necessarily written as people would do it today, but Knuth’s literate sources for TeX[1] and METAFONT[2] are explicitly meant for reading. The lite
by mananaysiempre 3y ago
Those aren’t necessarily written as people would do it today, but Knuth’s literate sources for TeX[1] and METAFONT[2] are explicitly meant for reading. The literate program family also includes LCC[3], but A retargetable C compiler is a book that you’d need to buy; and PBRT[4], but Physically based rendering is more exposition than program (even if the program is a perfectly good one). The source for Unix V6[5] with the accompanying commentary by Lions is probably as much of a classic as it’s possible to get. And as an eccentric choice in a similar format, may I suggest cmForth[6], perhaps paired with Footsteps in an empty valley[7]?
Also, though this is not precisely what you’re asking for, The architecture of open-source applications and its sequels[8] have the original designers’ reflections on some well-known codebases.
[1] http://mirrors.ctan.org/info/knuth-pdf/tex/tex.pdf http://mirrors.ctan.org/info/knuth-pdf/tex/tex.pdf
[2] http://mirrors.ctan.org/info/knuth-pdf/mf/mf.pdf http://mirrors.ctan.org/info/knuth-pdf/mf/mf.pdf
[3] https://github.com/drh/lcc https://github.com/drh/lcc
[4] https://pbr-book.org/ https://pbr-book.org/
[5] http://v6.cuzuco.com/ http://v6.cuzuco.com/
[6] https://github.com/ForthHub/cmFORTH/blob/combined/cmforth.fth https://github.com/ForthHub/cmFORTH/blob/combined/cmforth.ft...
[7] http://forth.org/OffeteStore/4001-footstepsFinal.pdf http://forth.org/OffeteStore/4001-footstepsFinal.pdf
[8] https://aosabook.org/ https://aosabook.org/
- bear8642 3y ago> may I suggest cmForth[6] Hmm, not a forth I've come across before - enjoyed reading JonesForth though.
- johndoe0815 3y agoI can also recommend Niklaus Wirth's "Project Oberon" - not quite literate programming, but extremely well explained code examples and data structures of the Oberon OS/language/UI system: http://www.projectoberon.net http://www.projectoberon.net Wirth's "Compiler Construction" is very concise and written in a similar way: https://people.inf.ethz.ch/wirth/CompilerConstruction/ https://people.inf.ethz.ch/wirth/CompilerConstruction/ - he manages to describe a complete compiler for an Oberon subset (earlier versions of the book used PASCAL) in a bit more than 100 pages.