I learned a ridiculous amount from reading the source code to TeX (https://www.amazon.com/Computers-Typesetting-B-TeX-Program/d...) but it is written in a very 1970s style.
https://www.amazon.com/Computers-Typesetting-B-TeX-Program/d...
Knuth is a fan of this method of program construction. Of course, he is not only a phenomenal programmer; he is a great writer skilled at explaining complex algorithms and code. I can see why literate programming suits him.
[1] https://www.amazon.com/Computers-Typesetting-B-TeX-Program/d...
https://www.amazon.com/Computers-Typesetting-B-TeX-Program/d...