From mboxrd@z Thu Jan 1 00:00:00 1970 From: toby@telegraphics.com.au (Toby Thain) Date: Thu, 22 Mar 2018 13:07:36 -0400 Subject: [TUHS] Literate Programming (was Comments in early Unix systems) In-Reply-To: <201803221630.w2MGU5Aw016397@freefriends.org> References: <201803221349.w2MDn23w100793@tahoe.cs.Dartmouth.EDU> <201803221630.w2MGU5Aw016397@freefriends.org> Message-ID: On 2018-03-22 12:30 PM, arnold at skeeve.com wrote: > Doug McIlroy wrote: > >> Knuth offered the remedy of "literate programming", which >> might help in academic circles. In business, probably not. > > IMHO this is too bad. Code I've written using LP is generally > more correct earlier on than otherwise. And it's very enjoyable > to write code and explanation at the same time; I feel like I'm > talking out loud directly to my reader, a person, and not just > coding for myself or the compiler. > > Significant proofs by example are Knuth's TeX and MetaFont, > and the lcc compiler by Dave Hanson and . Chris Fraser (AT&T Bell Labs at the time). As you say, the whole book is a literate program: https://www.pearson.com/us/higher-education/program/Hanson-Retargetable-C-Compiler-A-Design-and-Implementation/PGM166351.html > > Shameless plug: I have written a small LP system in gawk designed > for use with the Texinfo markup language. ... > Thanks, > > Arnold >