3 ms·
Golang comes to mind when I read this: "He is known for introducing the notion of “literate programming,” emphasizing the importance of writing code that is re
by johnvega 8y ago
Golang comes to mind when I read this:
"He is known for introducing the notion of “literate programming,” emphasizing the importance of writing code that is readable by humans ... "
- IfOnlyYouKnew 8y agoI believe he was thinking far more of something like Jupyter Notebook. I’m waiting for VSCode to implement a bit of API that would allow me to start on an extension turning comments into first-class citizen, with, for example, diagrams, links, or images.
- currymj 8y agoBut it's not really literate programming as Knuth envisioned it. A very important point was that you could write things in any order, and then use tangle to produce source code in the correct order for execution. Jupyter notebooks don't enable this, and in practice evaluating cells in the wrong order is a common mistake if you aren't careful (I've often just given up and restarted the kernel). Imagine if they did, though. You could do something like put all your imports and preprocessing in an appendix. Or even more complicated: something like writing the inner loop of a function first, discussing it, and only afterwards writing the rest of the function and all the scaffolding. This would be great, but I've yet to see a true literate programming tool that would actually be usable for my day to day tasks.
- zaarn 8y agoTempleOS has this, sort of. The normal fileformat for code on TempleOS allows embedding images into the code and directly referencing it. The documentation also automatically generates links to the correct functions and you can generally find all relevant code bits to some piece of documentation. The terminal in TOS also natively supports images.
- andrewbinstock 8y agoGolang is not what Knuth has in mind. Literate programming is primarily long explanatory comments written around code snippets in a narrative form. Such that you could sit down and read a whole listing as you would a book. When I interviewed Knuth in 2008 [1], we discussed the failure of literate programming. As you'd expect, he was realistic about the reasons. (About half way down the page) [1] http://www.informit.com/articles/article.aspx?p=1193856 http://www.informit.com/articles/article.aspx?p=1193856