logoalt Hacker News

em500yesterday at 9:33 AM5 repliesview on HN

This essay seems to be missing the main primary references for literate programming:

https://www.cs.tufts.edu/~nr/cs257/archive/literate-programm...

https://www-cs-faculty.stanford.edu/~knuth/lp.html

Knuths intention seems clear enough in his own writing:

Literate programming is a methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language. The main idea is to treat a program as a piece of literature, addressed to human beings rather than to a computer.

and

Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.


Replies

zahlmanyesterday at 12:05 PM

> I chose the name WEB partly because it was one of the few three-letter words of English that hadn’t already been applied to computers.

Heh.

show 1 reply
rhdunnyesterday at 12:18 PM

In a way this is what notebooks are for Python and other languages. They mix documentation and code such that you can run that code and inspect the output. See for example the pytorch tutorials.

show 2 replies
d-lispyesterday at 11:54 AM

I dream of a world where the Knuth idea of programming and mathematics are naturally embedded in our cultures, like novels are.

I find it weird to not be able to find linux source code and commentaries or even math/physics/science masterpieces in libraries where you can find Finnegan's Wake easily (at least where do I live), and not be able to talk about the GHC in between two discussion about romance or the weather at the bakery.

show 1 reply
smusamashahyesterday at 10:20 PM

If a program has very detailed comments will it fall under literate programming pattern?