News for hackers. Stuff that matters.
Re:Literate programming: Knuth is doing it wrong (2014) by wiz21c on Monday January 13, 2025 @10:31AM (#42684488)
I like your comment.

But let's take for example JupyterNoteBook. It's nice but not as good Knuth's stuff. Why ? Because the notebook forces you to follow the evaluation order whereas Knuth allows you follow your ideas order. Now for the rest, Jupyter is simply much better. But fundamentally, JNB can't match Knuth's LP flexibility.

So I'd say that JupyterNotebooks are really nice to explain a recipe but LP is better at explaining ideas (more like algorithms).

However, usually algorithms presentations have more to do with ideas, concepts. And thus, one may wonder if even bothering writing an LP document is necessary since the core ideas don't actually need code to be explained).

So-so... :-)

Re:Literate programming: Knuth is doing it wrong (2014) by fanf2 on Monday January 13, 2025 @11:28AM (#42685209)
WRT modern tooling, I was thinking more in terms of languages like Haskell that don’t constrain the order of presentation so much, or tools like rustdoc that embrace hypertext and allow the reader to choose their own adventure.
Re:Literate programming: Knuth is doing it wrong (2014) by leephillips on Monday January 13, 2025 @12:06PM (#42685715)
This is solved by the Pluto notebook, which makes presentation order independent of execution order. Only works for Julia, but shows that such a notebook is possible.

https://lwn.net/Articles/835930/

Re:Literate programming: Knuth is doing it wrong (2014) by snops on Monday January 13, 2025 @02:51PM (#42688080)
Marimo does this for python, by tracking dependencies.

https://marimo.io/

Re:Literate programming: Knuth is doing it wrong (2014) by wiz21c on Tuesday January 14, 2025 @07:01AM (#42696230)
Thanks, didn't know about that tool. Will try !
Re:Literate programming: Knuth is doing it wrong (2014) by wiz21c on Tuesday January 14, 2025 @07:01AM (#42696227)
Thx! didn't notice that pluto had this feature (I used it like a Jupyter notebook, shame on me :-) )
Re:Literate programming: Knuth is doing it wrong (2014) by zelphirkalt on Tuesday January 14, 2025 @08:15AM (#42696763)
Do you happen to have any example that shows LP in Pluto? The site you linked does not show it, at least looking at the screenshots, I don't see anything like I would have in org-mode using org-babel.
Re:Literate programming: Knuth is doing it wrong (2014) by leephillips on Tuesday January 14, 2025 @02:27PM (#42702465)
No, not specifically. But I think it’s pretty obvious how to put it to that purpose.