4 ms·
Some of Knuth's early programming exploits (from his undergraduate days) are described in “Stories about the B5000 And People Who Were There” by Richard Waychof
by svat 9y ago
Some of Knuth's early programming exploits (from his undergraduate days) are described in “Stories about the B5000 And People Who Were There” by Richard Waychoff (see section III, “The Summer Of 1960 (Time Spent with don knuth)”): http://ed-thelen.org/comp-hist/B5000-AlgolRWaychoff.html#7 http://ed-thelen.org/comp-hist/B5000-AlgolRWaychoff.html#7
At the other end, he said recently that he still writes two or three programs a week, mostly in CWEB. (If you're not familiar with CWEB, it is his own invention: it's basically C, with preprocessors (ctangle and cweave) that enable literate programming.)
Some of his programs he puts up here: https://cs.stanford.edu/~knuth/programs.html https://cs.stanford.edu/~knuth/programs.html — the most recent is from December 2017. (They are in .w format; if you don't have the patience to install CWEB and run cweave+tex on them, I've typeset them here: https://github.com/shreevatsa/knuth-literate-programs/tree/master/programs https://github.com/shreevatsa/knuth-literate-programs/tree/m... — last updated September; needs another update.)
- glandium 9y agoI knew of WEB, which was pascal-derived. I guess CWEB is the C-derived equivalent?
- svat 9y agoYes. WEB is Pascal+TeX, CWEB is C+TeX. CWEB is actually somewhat simpler, because for example the C language has preprocessor macros (#define) so the literate-programming system doesn't need to have its own macro system. It just has to rearrange (“tangle”) the input into the right order.
- dancek 9y agoThanks for typesetting the pdfs for other people to read! I was going to claim that I've packaged CWEB for Homebrew so it's easy to get for MacOS users. I went to see if it still works and isn't moved to boneyard, and yes, it's there, but git log didn't show me in the commit history. Just to make sure I wasn't nuts I had to check my notes and found the original commit: https://github.com/Homebrew/homebrew-core/commit/77aa909188bcb604bbb98b584bd0c3af283a38c2 https://github.com/Homebrew/homebrew-core/commit/77aa909188b... . Apparently there's been some history rewriting that I don't quite understand.
- svat 9y agoOh great, I was just able to install CWEB with `brew install cweb`. Thanks for your work! And actually `ctangle` and `cweave` already come with a TeX distribution like MacTeX. So the reason for providing a pre-typeset version is not so much that CWEB is too hard to install; it's just that people tend to not use it properly and either try to read the .w file directly, or (even worse) the generated .c file. :-)
- dllthomas 9y ago> that enable literate programming And if you've not actually dug into primary sources, you probably don't know what Knuth means by "literate programming" - what it's come to mean is a pretty small sliver of what was intended.