Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dynamic Notebooks & Literate Programming

Sam Ritchie
February 13, 2021

Dynamic Notebooks & Literate Programming

Slides from the [London Clojurians Meetup](https://clojureverse.org/t/london-clojurians-talk-dynamic-notebooks-and-literate-programming-by-sam-ritchie/6846) in January 2021.

This talk will introduce Sam’s current effort to create a networked, stateful, literate programming system in Clojure. We’ll discuss the history of literate programming and the creation of “microworlds”, and how Clojure has a special edge in the search for humane computing interfaces.

Sam Ritchie

February 13, 2021
Tweet

More Decks by Sam Ritchie

Other Decks in Programming

Transcript

  1. Literate Programming Wh a t’s Here, Wh a t’s Next

    S a m Ritchie (@sritchie) London Clojuri a ns Meetup, J a nu a ry 2021
  2. • Code writer! • Code READER! • Currently at (Google)

    X, leaving on Friday for the Mentat Collective • Sucker for even the phrase Literate Programming! Sam Ritchie
  3. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  4. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  5. Don a ld Knuth, Liter a teProgr a mming.com I

    believe that the time is ripe for signi fi cantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature. Hence, my title: "Literate Programming.” 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.
  6. Doug McIlroy: “ Progr a mming Pe a rls: A

    Liter a te Progr a m", CACM, June 1986, pg. 478-479 The presentation is engaging and clear. In WEB one deliberately writes a paper, not just comments, along with code. This of course helps readers. I am sure that it also helps writers: re fl ecting upon design choices su ff i ciently to make them explainable must help clarify and re fi ne one's thinking. Moreover, because an explanation in WEB is intimately combined with the hard reality of implementation, it is qualitatively di ff erent from, and far more useful than, an ordinary "speci fi cation" or "design" document. It can't gloss over the tough places.
  7. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  8. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  9. The Philosophy of Tools • Tools come with an embedded

    philosophy! • The UNIX philosophy is COMPOSABILITY of focused tools • Knuth’s focus was on NARRATIVE, Presentation • Clojure’s Philosophy?
  10. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  11. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  12. H a l Abelson, Structure a nd Interpret a tion

    of Computer Progr a ms “Programs must be written for people to read, and only incidentally for machines to execute.”
  13. Goal: • Do ALL the exercises! • SHARE them in

    a format that is easy and simple to execute for… my non-coding parents. • Make a wonderful environment for students in the SICM class at MIT… • At ANY COST. Just to see.
  14. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  15. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  16. Philosophy of a Code Zettelkasten • Produce the composable, executable

    thing; DON’T cut its ties back into the graph! • True for components • Also true for “projects”, puzzles, games, essays, Katas. • Sharing, accretion and “Additive” development are the prime directives! • Roam comes with all the words :) I need a Mathematica-lite sort of standard library.
  17. SICMUtils • Generic core of extensible functions • Numerics +

    Symbolic arithmetic, and great renderers for the whole bunch. • Essays: • Functional Numerical Methods • Power Series, Power Serious • Automatic Di ff erentiation • Extensible Renderers
  18. The Plan • WHAT is Literate Programming? • Why aren’t

    we all doing this? • The Philosophy of Tools • The Menu of Tools for Literate Programming • My Stake in All This • How to Take Smart Notes • The Dynamic Notebook
  19. What’s Next for Us? • Follow along at roadtoreality.substack.com •

    Hang out in #sicmutils on Clojurians Slack or Zulip • Write me ([email protected]) if this is exciting! • If you want to pair or work on anything in SICMUtils I’ll pair and teach. • The barrier to entry will drop once the SICMUtils Standard Library lives in more environments.
  20. Thanks! S a m Ritchie (@sritchie) London Clojuri a ns

    Meetup, J a nu a ry 2021 roadtoreality.substack.com https://github.com/sponsors/sritchie