Hacker News new | past | comments | ask | show | jobs | submit login

Incidentally, Donald Knuth (whose literate programming idea has never quite taken off, mostly because of a lack of good tools and examples IMO) was doing this even before coming up with the idea of literate programming. He wrote basically a TeX manual (or one could at least call it a design doc), completely describing what TeX "does" (he wrote it in the present tense), how it works, etc., months before writing a single line of code. (See TEXDR.AFT and TEX.ONE, published in Digital Typography.)

Even later, when TeX completely changed between its earlier version (the one written in SAIL, aka TeX78) and the current version (written in WEB, aka TeX82), the program has completely changed, but the manual he wrote for TeX78 is still very similar to the latest version of The TeXBook. Since declaring TeX "done", he's generally been willing to make only changes that don't change The TeXbook much.




The tools are great if you’re Don Knuth!

Yeah I never got in gear with CWEB either.


I get the impression that is supposed to be somewhat derisive. That said, I think the tools are more usable than people give them credit. They are just slower to get started with.

In particular, I've been picking up The Stanford Graphbase book recently and finding that after I have gotten used to reading more parts, the programs are getting a bit easier to understand. In ways that don't litter my mental model with tons of surface complexity.

What I mean by that is that if you look at the javadoc or "function/method" base of a complete system, it is easy to lose site of the whole. Granted, getting started with the larger texts of some other documents can have similar problems in reverse. It is hard to really get a handle on where in the system you are to start.


You got almost the exact wrong impression. You're correct that my comment was a bit derisive, but the derision was aimed at myself. Don Knuth is a giant in our field.

Also thanks for the reference.


My apologies on reading it wrong.

If you pick up a copy, have fun reading it! :)

I also recommend reading some of the programs he has posted to his site. I have not picked up the rendering book done in a literate style. Is on my ambitions list.


For anyone who wants to try writing (Javascript) code in a literate style, give Observable notebooks a shot, https://beta.observablehq.com


Have you tried using emacs org mode? It has built-in support for literate programming, and source blocks are annotated with the language so you get language-specific behavior (syntax highlighting, structural editing, etc).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: