4 ms·
Official version: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/9579/sicm_edition_2.zip/book.html https://mitp-content-server.mit.edu/
by tobinfricke 3y ago
Official version: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/9579/sicm_edition_2.zip/book.html 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-differential-geometry/ https://mitpress.mit.edu/9780262019347/functional-differenti...
as seen in HN: https://news.ycombinator.com/item?id=7884551 https://news.ycombinator.com/item?id=7884551 )
- lrc 3y agoHave a look at Emmy: https://emmy.mentat.org https://emmy.mentat.org
- lvk 3y agoAre there any other systems that can render programmatic equations to LaTeX?
- nequo 3y agoSymPy[1] and Mathematica[2] can both render expressions in LaTeX, if this is what you mean. [1] https://docs.sympy.org/latest/tutorials/intro-tutorial/printing.html https://docs.sympy.org/latest/tutorials/intro-tutorial/print... [2] https://reference.wolfram.com/language/ref/TeXForm.html https://reference.wolfram.com/language/ref/TeXForm.html
- lying4fun 3y agoI’m not the parent but do you know if there is a system/language that renders programmatic equations in-line in the editor? The closest thing I know of is the usage of Unicode symbols and Greek letters in Lean. I’m imagining a vscode extension that would interpret scientific code/equations and render those in-line or in a preview line above/below. Not sure about the utility of such a thing but it sure seems fun
- heisenzombie 3y agoIt’s a bit of a stretch but if you write your equations in sympy in a Jupyter notebook, you can display nice LaTeX renders of the expressions and then either do math with them or just evaluate them as if you’d written them as a normal python function.
- farhanhubble 3y agoWonder what it would take to implement a neural network in Emmy.
- chunsj 3y agoIf it has an implementation of reverse mode automatic differentiation, then it might be possible.
- sritchie 3y agoI have reverse-mode (purely functional reverse mode at that!) sitting in a branch, and will get this going at some point soon. Even more fun will be compilation down to XLA, like JAX does in Python.
- Y_Y 3y agoReally we need somehow to rejuvenate scmutils, either with a faithful port to a modern language, or a spiritual successor of similar calibre.
- sritchie 3y agoIt's fully rejuvenated in Clojure as "Emmy", with Sussman's support and a bunch of 2D and 3D graphing extensions. See Emmy-Viewers: https://emmy-viewers.mentat.org/ https://emmy-viewers.mentat.org/ and Emmy: https://emmy.mentat.org/ https://emmy.mentat.org/ Thanks to https://2.maria.cloud https://2.maria.cloud, everything in SICM and FDG works in the browser as well: https://2.maria.cloud/gist/d3c76ee5e9eaf6b3367949f43873e8b2 https://2.maria.cloud/gist/d3c76ee5e9eaf6b3367949f43873e8b2
- tobinfricke 3y agoWow, thanks for this!
- sritchie 3y agoOf course! And referencing your other comment, during the ~2 year period I've been working on Emmy (on top of work by Colin Smith), I was keen to make the implementation more accessible and well-documented than the original. There's still not a great map of the project (from primitives to general relativity), but many of the namespaces are written as literate programming explorations: https://emmy.mentat.org/#explore-the-project https://emmy.mentat.org/#explore-the-project Here's the automatic differentiation implementation/essay, for example: https://sritchie.github.io/emmy/src/emmy/differential.html https://sritchie.github.io/emmy/src/emmy/differential.html A rough sketch of the tower is: - `emmy.value` and `emmy.generic` implement the extensible generic operations - `emmy.ratio`, `emmy.complex` and `emmy.numbers` fleshes out the numeric tower - `emmy.expression` and `emmy.abstract.number` add support for symbolic literals Next we need an algebraic simplifier... - `emmy.pattern.{match,rule,syntax} give us a pattern matching language - `emmy.simplify.rules` adds a ton of simplification rules, out of which - `emmy.simplify` builds a simplification engine Actually the simplifier has three parts... the first two start in `emmy.rational-function` and `emmy.polynomial` and involve converting an expression into either a polynomial or a rational function and then back out, putting them into "canonical form" in the process. That will send you down the rabbit hole of polynomial GCD etc... And on and on! I'm happy to facilitate any code reading journey you go on or chat about Emmy or the original scmutils, feel free to write at sam [at] mentat.org, or else visit the Discord I run for the project at https://discord.gg/hsRBqGEeQ4 https://discord.gg/hsRBqGEeQ4.
- marshallward 3y agoI 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.
- tobinfricke 3y agoIt's not for everyone. I cut my teeth on SICP before going into physics, so I was perhaps the exact target audience. I also see Scheme as an improvement over its successor languages.
- 3abiton 3y agoWhat is the appeal of functional programming for physicists?
- ogjdrjvf 3y agoI don't think the MIT guys have the same motivations as the author of this book. He (Walck) discusses the suitability of (a subset of) Haskell in this article: https://arxiv.org/abs/1412.4880 https://arxiv.org/abs/1412.4880 Maybe someone else can shed light on the MIT mindset. Certainly some of Walck's points apply to Scheme as much as to Haskell, but Scheme lacks the type system, syntax and syntactical "convenience" of curried functions. The basic strength of functional programming is the lack of complex imperative book-keeping: your code looks more like math. My impression is that SICP and SICM are eccentric.
- tobinfricke 3y ago> Scheme lacks the type system, syntax and syntactical "convenience" of curried functions. The argument is that all of that syntax is a distraction.
- leppr 3y agoYes, and that's like arguing that spaces between words is syntactic distraction. It's clearly not, more syntax rules can make a language simpler to understand (for both humans and computers).
- sritchie 3y agoWhat 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.
- tobinfricke 3y agoI would love to explore statistical mechanics, quantum field theory, and/or general relativity through a similar lens. But I am also quite interested in learning more about the "under the hood" workings and software craftsmanship of scmutils. The textbook _uses_ scmutils to explore classical mechanics. But it does not delve into the implementation details of scmutils itself, which interest me.