Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

• Code writer! • Code READER! • Currently at (Google) X, leaving on Friday for the Mentat Collective • Sucker for even the phrase Literate Programming! Sam Ritchie

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

~Doug McIlroy

Slide 14

Slide 14 text

Power Series, Power Serious

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

We SORT of are…

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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?

Slide 22

Slide 22 text

The Philosophy of Tools PRESENTATION vs Discovery [[Path Through the Graph]] vs [[Building the Graph]]

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Tools

Slide 30

Slide 30 text

Query Optimizer

Slide 31

Slide 31 text

th.ing Geometry

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Marginalia

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

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.”

Slide 40

Slide 40 text

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.

Slide 41

Slide 41 text

🤯

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

(Roam Tour)

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

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.

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

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

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

NextJournal Embedding

Slide 63

Slide 63 text

Maria.Cloud

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

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.

Slide 66

Slide 66 text

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