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
Tweet

More Decks by Sam Ritchie

Other Decks in Programming

Transcript

  1. Sam Ritchie (@sritchie) re:Clojure 2020
    Functional Physics
    & the
    Preservation of Society

    View full-size slide

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

    View full-size slide

  3. Hal Abelson, Structure and Interpretation of Computer Programs
    “Programs must be written for people to read,
    and only incidentally for machines to execute.”

    View full-size slide

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

    View full-size slide

  5. Code as Communication

    View full-size slide

  6. Dynamic Notebooks

    View full-size slide

  7. Thanks!
    Sam Ritchie (@sritchie) re:Clojure 2020

    View full-size slide