Runnable Textbooks
Open-source textbooks translated into runnable code and diagrams.
How to read these: are you new to programming languages?
Every page has runnable code. If you're new to the languages used on this site, start here.
Mathematics
| โซ | Calculus | Active Calculus |
| โ | Real Analysis | Jiลรญ Lebl |
| ๐ | Linear Algebra | Jim Hefferon |
| ๐ | Abstract Algebra | Tom Judson |
| ๐ข | Discrete Math | Oscar Levin |
| # | Number Theory | Jim Hefferon |
| โณ | Geometry | Wikipedia + june.kim |
| ๐ | Logic | Craig DeLancey |
| โ | Proofs | Jim Hefferon |
| ๐ฑ | Category Theory | Bartosz Milewski |
Computer Science
| ๐ช | Programming | Abelson & Sussman (SICP) |
| โ | Algorithms | Nievergelt & Hinrichs |
| ๐ | Theory of Computation | Maheshwari & Smid |
| ๐ฅ | Operating Systems | Wikipedia |
| ๐ | Databases | Wikipedia |
| ๐ | Distributed Systems | Wikipedia + Cambridge CS |
| ๐ | Cryptography | Wikipedia |
| ๐ค | Machine Learning | MML + Dive into Deep Learning |
Science & Engineering
| โ | Physics | Benjamin Crowell |
| ๐ | Control Theory | Wikipedia |
| ๐ฐ | Probability | Grinstead & Snell |
| ๐ | Statistics | OpenIntro |
| ๐ก | Information Theory | Shannon 1948 + Wikipedia |
Social Science
| ๐ฒ | Game Theory | Jennifer Nordstrom |
| ๐ฐ | Economics | Smith, Ricardo, Marshall + Wikipedia |
| ๐ | Finance | OpenStax + MIT OCW (Andrew Lo) |
| ๐ | Finance II | MIT OCW 18.S096 + 15.450 |
| ๐ง | Cognitive Science | Lovelace textbook |
Papers
| ๐ | Natural Breadcrumbs | Applied category theory papers: probability, program logics, and games โ made runnable |
| โ๏ธ | Natural Framework Proof | The Natural Framework proof, file by file — plain English + Lean 4 |
| ๐ | Vector Space Proof | VCG on Gaussian embeddings is welfare-optimal and DSIC — Lean 4 |
| ๐ฌ | The Scientific Method | Bacon to Mayo and beyond: four centuries of arguing about what counts as knowledge |
| ๐๏ธ | Cognitive Architecture | Minsky to Soar to transformers to LLM agents |
| ๐ | Auction Theory | Papers behind the Vector Space ad auction series |
| โ๏ธ | Prose Writing | Aristotle to Google: learn to write clearly, with interactive practice |
| โ | The Commons | Who owns knowledge, and what happens when the answers stop working |
Further reading (external)
Permissive-licensed sources worth reading directly.
Logic & Foundations
- forall x: Calgary โ propositional and predicate logic (CC BY 4.0)
- Open Logic Project โ formal proof systems, model theory (CC BY 4.0)
- Logic and Proof โ induction, Lean-flavored proofs (Apache 2.0)
- Software Foundations vol. 2 โ Hoare logic, weakest preconditions (MIT)
Mathematics
- Notes on Diffy Qs โ differential equations (CC BY-SA 4.0)
- pi-Base โ searchable database of topological spaces (MIT)
- A First Course in Linear Algebra โ Beezer, more computational than Hefferon (GFDL)
Computer Science
- Crafting Interpreters โ compilers, from tree-walk to bytecode (MIT)
- Operating Systems: Three Easy Pieces โ virtualization, concurrency, persistence (free)
- Beej's Guide to Network Programming โ sockets from scratch (CC BY-SA 4.0)
- Nand2Tetris โ build a computer from logic gates to OS (CC BY-SA 3.0)
Optimization
- Convex Optimization โ Boyd & Vandenberghe (free PDF)
Science
- OpenStax Sciences โ biology, chemistry, astronomy (CC BY 4.0)
- Feynman Lectures on Physics โ the classic, free online
Book notes (52 posts, 2012-2023) ยท
Poetry โ the same ideas as Natural Breadcrumbs, before the math
This site is licensed CC BY-SA 4.0. Fork it, build on it, keep it open.