←back to thread

88 points joecobb | 4 comments | | HN request time: 0.797s | source
Show context
em500 ◴[] No.46180399[source]
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(5): >>46181093 #>>46181151 #>>46181215 #>>46184360 #>>46185842 #
1. rhdunn ◴[] No.46181215[source]
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.
replies(2): >>46181278 #>>46181329 #
2. electroglyph ◴[] No.46181278[source]
or all the unsloth notebooks
3. d-lisp ◴[] No.46181329[source]
Yes, notebooks are a restrictive type of litterate programming, interactive and browser bound.

TeX was "proven" as a text/typography tool by the fact that the source code written in WEB (interleaving pascal and TeX (this is meta (metacircular))) allows for you to "render" the program as a typographed work explaining how TeX is made+ run the program as a mean to create typographic work.

I'm lacking the words for a better explanation of how do I feel sbout the distinction, but in a sense I would say that notebooks are litterate scrips, while TeX is a litterate program ? (The difference is aesthetical)

replies(1): >>46181852 #
4. d0mine ◴[] No.46181852[source]
There is Org Babel in Emacs that can be an alternative to jupyter notebooks for literate programming (research/devopsy tasks). It is more powerful in some aspects and weaker in others.