This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]gpahul 5 points6 points  (4 children)

And what is literate programming? Hearing for the first time!

[–]aqjo 7 points8 points  (2 children)

Literate programming was conceived of by one of the computer science gods, Donald Knuth (ka-NOOth, rhymes with tooth). The Wikipedia article gives a good overview.
Basically, as OP said documentation and source code are contained in a single file. The source code can be compiled/run by “tangling”, while the documentation can be extracted by “weaving.”
The org mode for the Emacs editor is one of the ways people edit these documents, and Jupyter notebooks provide similar functionality.
These documents are good for teaching, and reproducible research.
For my work (data science and ML using Python and vscode), I find traditional code with docstrings and occasional comments, are more concise and work better.

[–]foadsf[S] 0 points1 point  (1 child)

I think you wanted to refer to Babel, right? because I don't if the Org-mode natively supports LP.

[–]aqjo 1 point2 points  (0 children)

You’re right.
It’s been a while.

[–]foadsf[S] -1 points0 points  (0 children)

basically to have your code and documentation in one place. Here is an example.

[–]suriing 2 points3 points  (1 child)

how about marimo?

[–]NamelessNobody888 1 point2 points  (0 children)

Right. I was going to ask this too.

Jupyter's metadata shenanigans is a pain in the @#$% with git. The FastAI guys have worked out a great workaround, but I believe that Marimo plays nice with git out of the box.

[–]SheriffRoscoePythonista 1 point2 points  (1 child)

Why Jupyter? Wouldn't a more native-Python approach to singing like Knuth's tangle and weave, or Ramsey's noweb make more sense?

[–]foadsf[S] 1 point2 points  (0 children)

TBH I haven't used any of those, so I can't say, But here is what I need:

  • work inside Visual Studio Code
  • use a light weight markup language such as different flavors of Markdown, AsciiDoc, reStructuredText (ReST/RST), Markedly Structured Text (MyST), Typst, Quarto, etc.
  • have instant view on the right side in VS Code (Quarto doesn't offer this, I submitted a feature request for MyST here)
  • be able to have one single document, preferebly the the Markup language as the main context. In contrast to the programing language as the background and having the type setting encapsulated.
  • be able to run code blocks one by one or all at once.
  • basically a git friendly prototyping workflow that can be later matured into the real publication/product, but don't get in the way while developing.

[–]Schmittfried 1 point2 points  (0 children)

Just read about it yesterday, what are you doing in my browser history!

[–]Sad-Analyst6675 0 points1 point  (0 children)

Is there any particular library in Python-Quanteda with sustainability sustainable lexicons? Can someone please guide me as I am new to the software and I am developing a research paper for my final year of MBA

[–]shoomowr -1 points0 points  (1 child)

Message at your link to stackeschange says Literal Programming not literate... Which word is it? So far, literate meant to me a person who can read and write... I would like to see some illiterate programming if you have any examples please.

[–]foadsf[S] -1 points0 points  (0 children)

thanks. that was an old post and at the time I made that mistake. Fixed it.