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

Functional Physics and the Preservation of Society

Sam Ritchie
December 04, 2020

Functional Physics and the Preservation of Society

This talk (from re:Clojure 2020) makes the case for why Clojure and Clojurescript might be the perfect tool to construct life support systems for our society's scientific discoveries.

I present the detective work I had go through while implementing "numerical methods" routines in Clojure (for taking integrals, derivatives, and finding zeros and minima of functions). People usually imagine that this sort of scientific computing has to be implemented in confusing, obfuscated black-box programs, preferably written in FORTRAN. This is NOT true, and that, in fact, writing these algorithms in functional, immutable style makes them much easier to understand, and easier to modify and experiment with.

This work is part of a larger effort to turn Gerald Sussman's "Structure and Interpretation of Classical Mechanics" into a world-class interactive textbook that runs in the browser via Clojurescript.

Sam Ritchie

December 04, 2020

More Decks by Sam Ritchie

Other Decks in Programming


  1. The Trouble with Physics • All is not well in

    Scientific Communication! • Code for the Serialization of Ideas • Lisp as a Life Support System for Science
  2. Hal Abelson, Structure and Interpretation of Computer Programs “Programs must

    be written for people to read, and only incidentally for machines to execute.”
  3. SCMUtils refman.txt “We personally like Brent's algorithm for univariate minimization,

    as found on pages 79-80 of his book "Algorithms for Minimization Without "Derivatives". It is pretty reliable and pretty fast, but we cannot explain how it works.”
  4. !!!

  5. ?