Hacker News new | ask | show | jobs
by colemannugent 2556 days ago
I really wish tools like this or Jupyter Notebooks were around when I first started studying CS in school. Mixing notes and code is such an interesting use-case.
4 comments

Knuth has been doing literate programming for 35+ years https://en.wikipedia.org/wiki/Literate_programming

I have really enjoyed Observable as a literate programming platform though. Being able to mix text, diagrams, data tables, multimedia output, interactive inputs, easily modified subroutine implementations, imports of external data and subroutine libraries, ... makes for a very expressive and reader-friendly (albeit with a bit of reading learning curve) platform for writing interactive documents and for doing research.

For example, here’s a recent relatively literate-programming style notebook of mine (this one was mostly done in an afternoon for fun as a way of procrastinating from other work, not as a research project), https://observablehq.com/@jrus/munsell-spin

It’s very low-friction to set up a new notebook and just start writing, or to open an existing draft notebook and work on it. I have found this to be extremely helpful in the past year or two trying to work during my 2-year-old’s nap time.

Pen and paper and Observable notebooks are the two most important tools of my recent research efforts.

>Knuth has been doing literate programming for 35 years

I shouldn't be surprised, that man had a lot going on. Just TeX and Big-O notation alone would be enough to permanently enshrine him in the CS heap of fame, but the hits don't stop there!

Kinda funny how much just one guy could affect research.

That's not true, big-O notation (also called Landau symbols) was used as early as 1894 by Paul Bachmann (https://en.wikipedia.org/wiki/Big_O_notation)
According to that Wikipedia article, Knuth popularized the notation in computer science, which might be what the comment to which you replied is referencing.
I see it as sort of an extension of Knuth's 'literate programming' concept [1], which has existed in some form or another in many languages. Haskell has .lhs ('literate haskell') files where comments are the default and to have the compiler actually pay attention to a line you need to specifically preface it. Nice in the modern age to have the addition of graphs, charts, etc, without having to resort to TeX or ps or something.

1 https://en.wikipedia.org/wiki/Literate_programming

Org Mode in Emacs has been around for quite a while now, and it has full literate programming features. You can use it essentially as a supercharged Jupyter Notebook.
All the old-line science tools are in the interactive notebook or logbook style. Think of Maple or Mathematica.