Save 37% off PRO during our Black Friday Sale! »

Dynamic Notebooks & Literate Programming

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.

Cd378611a91eb7852ae19cd582de718a?s=128

Sam Ritchie

February 13, 2021
Tweet

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. None
  6. 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.
  7. None
  8. None
  9. None
  10. None
  11. 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.
  12. None
  13. ~Doug McIlroy

  14. Power Series, Power Serious

  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. We SORT of are…

  17. None
  18. None
  19. None
  20. 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
  21. 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?
  22. The Philosophy of Tools PRESENTATION vs Discovery [[Path Through the

    Graph]] vs [[Building the Graph]]
  23. None
  24. None
  25. 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
  26. None
  27. None
  28. None
  29. Tools

  30. Query Optimizer

  31. th.ing Geometry

  32. None
  33. None
  34. Marginalia

  35. None
  36. 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
  37. None
  38. None
  39. 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.”
  40. 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.
  41. 🤯

  42. None
  43. None
  44. None
  45. None
  46. 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
  47. None
  48. None
  49. None
  50. None
  51. (Roam Tour)

  52. Roam is NOT good (yet) for Interactive, Scienti fi c

    Notes
  53. None
  54. None
  55. 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
  56. 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.
  57. None
  58. None
  59. 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
  60. None
  61. None
  62. NextJournal Embedding

  63. Maria.Cloud

  64. 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
  65. What’s Next for Us? • Follow along at roadtoreality.substack.com •

    Hang out in #sicmutils on Clojurians Slack or Zulip • Write me (sritchie09@gmail.com) 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.
  66. 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