Structure and Interpretation of Classic Mechanics – A Physics Book with Code

Maybe nobody is suprised that the book “Structure and Interpretation of Classic Mechanics” by Sussman & Wisdom contains code that you can put in any old Scheme/Lisp environment to actually represent mechanical equations.

Like this expression:

q(t)=x(t),y(t),z(t)

Turned into this code:

(define q
  (up (literal-function x)
      (literal-function y)
      (literal-function z)))
(q t)
;; =>  (up (x t) (y t) (z t))

Imagine if it was interactive on the web!

It should not be a surprise because the book title is so similar to “The Wizard Book”, “Structure and Interpretation of Computer Programs”. Which is a very, very interesting read, both to get to know their didactics for hands-on “how to learn to program” course, and to see how you can actually express weird concepts in a functional language.

Both books are super fascinating, and both links here point to the MIT Press pages where you can read the books for free, online. That’s right: With copy & pasting of the code.

Receive new .