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. Sam Ritchie (@sritchie) re:Clojure 2020
    Functional Physics
    & the
    Preservation of Society

    View 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 Slide

  3. View Slide

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

    View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. 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 Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. View Slide

  20. View Slide

  21. View Slide

  22. View Slide

  23. !!!

    View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. Code as Communication

    View Slide

  29. ?

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. Dynamic Notebooks

    View Slide

  34. View Slide

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

    View Slide