News for hackers. Stuff that matters.
Re:Ask HN: What's the best source code you've read? by fzil on Sunday September 11, 2022 @01:19AM (#32797044)
> although sadly, literate programming seems all but dead now

It seems alive and well in the data-science community to me. Look at jupyter notebooks if you aren't aware of what I am talking about.

Re:Ask HN: What's the best source code you've read? by mellavora on Sunday September 11, 2022 @05:01AM (#32798021)
You mean a system with heavy dependence on global state yet allowing for arbitrary command/code chunk execution order?

Where significant parts of the display remain out of sync with said global state?

Re:Ask HN: What's the best source code you've read? by nesarkvechnep on Sunday September 11, 2022 @01:34AM (#32797083)
It’s not really literate programming. It’s just editable/executable code intertwined with text. There’s no tangle and weave, or code reuse.
Re:Ask HN: What's the best source code you've read? by tlarkworthy on Sunday September 11, 2022 @01:47AM (#32797144)
Re:Ask HN: What's the best source code you've read? by nesarkvechnep on Sunday September 11, 2022 @02:54AM (#32797411)
The same thing. I don’t see chunk reuse, nor the ability to generate standalone documentation or export the code to files.

Have you seen actual literate programming documents? The Noweb tool’s page has examples.

Re:Ask HN: What's the best source code you've read? by tlarkworthy on Sunday September 11, 2022 @06:45AM (#32798526)
The imports are chunk reuse. Each notebook is an es6 module you can import from any npm package.json You don't need to export it as documentation, it is executable documentation which is better, though you can print it if you want. The footer backs up the source to github

Your stuck on Knuth's definition of literate programming but this is better than that

Re:Ask HN: What's the best source code you've read? by aljungberg on Sunday September 11, 2022 @03:45AM (#32797620)
Sounds like nbdev which indeed exports code and documentation from a single notebook, plus unit tests for external execution.