News for hackers. Stuff that matters.
Re:Stitch – A small Python library for writing reproducible ... by todd8 on Thursday September 01, 2016 @12:13AM (#12403064)
Yes, the iPython notebooks are great for reproducible reports. Literate programming, as practiced by Knuth, is a little bit different. The program's output, graphs, tables, etc. isn't intermixed with the text as it is in a Jupyer notebook. A literate program is actually documentation and source mixed together in a web file. Two different programs (tangle and weave) can be run over this literate code. One extracts a (LaTeX) document suitable for publication and the other extracts a program (with all of the documentation stripped out) to be fed into a compiler. The best example I know of is Computers & Typesetting, Volume B: TeX: The Program [1], a 624 page book that is a complete exposition on the TeX program, generated by weave; the same web source run through tangle generates the TeX program itself (the typesetting program upon which LaTeX is built out of TeX macros).

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...

There are no comments on this comment yet.