From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnold@skeeve.com (arnold@skeeve.com) Date: Thu, 22 Mar 2018 10:30:05 -0600 Subject: [TUHS] Literate Programming (was Comments in early Unix systems) In-Reply-To: <201803221349.w2MDn23w100793@tahoe.cs.Dartmouth.EDU> References: <201803221349.w2MDn23w100793@tahoe.cs.Dartmouth.EDU> Message-ID: <201803221630.w2MGU5Aw016397@freefriends.org> 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 . Shameless plug: I have written a small LP system in gawk designed for use with the Texinfo markup language. It is written using itself. I have written two other good size awk scripts using it as well. I think it will scale well to larger stuff in C or C++ but simply have not had an opportunity to use it for anything like that yet. See https://github.com/arnoldrobbins/texiwebjr if interested; and feel free to follow up privately instead of on the list to keep things on topic. Thanks, Arnold