back
100 comments
Sounds similar to https://tgvaughan.github.io/sicm/toc.html Should be fun if you're physics inclined.
Official version: https://mitp-content-server.mit.edu/books/content/sectbyfn/b...

I'd really like to see a "spiritual successor" to Structure and Interpretation of Classical Mechanics--something that can take off and achieve a life of its own.

SICM is open-source, and many people have implemented their own versions of parts of it, but I would love to see a vibrant and active community develop around such a beautiful computer algebra / computer-physics system.

SICM goes far beyond simple Newtonian mechanics, implementing calculus, Lagrangian and Hamiltonian mechanics, and differential geometry, and probably a whole lot more that you just have to spelunk into the source code to discover.

(Here's a book about the differential geometry implementation in scmutils: https://mitpress.mit.edu/9780262019347/functional-differenti... as seen in HN: https://news.ycombinator.com/item?id=7884551 )

Have a look at Emmy: https://emmy.mentat.org
Are there any other systems that can render programmatic equations to LaTeX?
Wonder what it would take to implement a neural network in Emmy.
I know someone who took that course. They did not have fond memories of it.

My impression is that it can be a very frustrating way to learn mechanics if you don't have much interest in functional programming.

Really we need somehow to rejuvenate scmutils, either with a faithful port to a modern language, or a spiritual successor of similar calibre.
What would you build / create / write if you had a web-enabled build of SICM (well, scmutils I guess) in hand? I'd love to hear more about your thoughts on how to build a community around these tools and ideas.
SICM Is more like a 2nd physics course as it uses the Lagrangian interpretation of classical mechanics and starts with it whereas OP seems to start from the basics.
Expressing physics with more rigorous mathematical or computational formalism might be good: For instance, a force is a triple (sending object, receiving object, force vector). Newton's third law says that whenever there is a force (S,R,F), then there is another force (R,S,-F). Also, this makes clear that Newton's 2nd law is not a definition of force, because it misses out on two of the three components of a force triple (-- by the way, is there a formal term for what I'm calling a force triple?)
Yes and it could help with a shortcoming of traditional representations of physical phenomena: defining cause and effect.
Calculus makes a lot more sense to me as code so this seems promising :D
Julia might have been more practical - also has a type system, symbolic computing, automatic differentiation, etc. And maybe just functional enough.
What's impractical about Haskell?
moonads
except its not 0 index!
For translating mathematics to code, in most (but not all cases) more relevant to have 1-indexing.
Structure and Interpretation of Classical Mechanics published in 2001 uses Scheme (There is a second edition released more recently)
I would like to see Learn Physics with APL.
Absolutely!

I did find this.

"Working with APL for Physics Research - Kostas Blekos - Dyalog '17" https://www.youtube.com/watch?v=pWtvRlCdX00

Would be interested in reading a more detailed account.

This is an incredibly cool concept and I would have loved to have this book when I was in undergrad (for Physics).
I am actually studying special relativity and found Jupyter Notebook plus some simple plot helps a lot. I did search Common Lisp as reading python code is hard. A mess for the one doing Lorentz trnasformation. End up I have to do it myself. This is different I suspect if it is in common lisp as it usually can be read, understood and use.

Sadly for simple realization for example the twin paradox without acceleration (3 astronauts handing over clock info instead of using acelearation). It is not there. And doing graphic … and simple wedge. Sadly.

May be someone here can highlight some sites for this and that.

For chapter 14 I wonder whether a Jupiter notebook (which can do Tex if using Matplotlib … have not tested it as I used texshop and screen capture from Matplotlib instead).

Is there an effective way of dealing with anti-commutative algebras like the geometric product in a functional model?

Obviously total functional programming is a problem.

But the GP greatly simplifies electrodynamics and removing the need to track handedness in your basis is very helpful in my experience.

I feel like the screenshots don’t make the book seem particularly novel or interesting
I have been looking for a excuse to try again to learn Haskell. Also looking for some interesting book to learn material in order to try to get my son interested in science. Thanks for this.
I'd love a book like this written in Python. Just feedback. I clicked the link and was about to purchase this. The idea of learning physics sounds great. The idea of spending time learning a new programming language that I'm unlikely to use for anything else sounds terrible.
I had the opposite reaction. I already know physics, but I want to learn Haskell.
Maybe I will take the plunge. Is there any real value to learning Haskell? There are so many different things I’d love to study.
I'd be willing to bet there are already books like this for python. Or at least online tutorials. I know for a fact there are python books dedicated to scientific programming, but they probably assume some knowledge of science and focus more on the codding aspect.
I’m working my way through a German book that explores Physics with Python: https://pyph.de/1/2/index.php?name=intro
learning another programming language that you will never use still has value. it makes you a better python programmer.
Another win if Python was used will be showing how functional programming is done in Python. That said I'm fine with it being based on Haskell. Presenting a specific programming language doesn't seem to be the main point. Also someone can follow book with Python and typing/mypy as exercise.
You can learn Scheme in two hours. Haskell, not so much. Stick to SICM.
Does it really teach physics or does it teach Haskell through the way of physics equations?
Funny, I was thinking of doing just this exact thing to learn haskell.
How much of either do I need to know to find value out of this book?
It appears to be an elementary introduction to both. It appears that no prior physics knowledge is needed.
Does this implement symbolic algebra/calculus, or is it entirely numerical?
No idea if this book does it, but this seems like a perfect fit for automatic differentiation. You can get a simple implementation of automatic differentiation for one dimension in a small amount of surprisingly clear code, without needing to pull in any dependencies or extraneous concepts.
That is along the lines of the motivation for my question. Automatic differentiation is such a natural fit with Haskell...
> this seems like a perfect fit for automatic differentiation.

Why?

After learning Physics with FP, you can help with Modelica!
Ordered from Amazon, thx.
I wish the title said "Haskell" instead of "Function Programming". I mean the two aren't interchangeable. Was actually hoping for Clojure personally.