5 ms·
Computer Algebra is criminally underused - it has the potential to make math-heavy critical-path code a lot more clear, testable, observable and bug-free by des
by hcarvalhoalves 6y ago
Computer Algebra is criminally underused - it has the potential to make math-heavy critical-path code a lot more clear, testable, observable and bug-free by design.
I feel I need to mention "Structure and Interpretation of Classical Mechanics" by Wisdom and Sussman, and the accompanying "scmutils" library, which first implemented in Scheme many of the same features, although this Julia library seems to be more complete.
There's also a great one-to-one port to Clojure by Colin Smith [2] in case you want to use it on a more production-friendly environment. The Strange Loop talk [3] is a good showcase of the power and simplicity of these kind of systems.
[1] https://groups.csail.mit.edu/mac/users/gjs/6946/ https://groups.csail.mit.edu/mac/users/gjs/6946/
[2] https://github.com/sicmutils/sicmutils https://github.com/sicmutils/sicmutils
[3] https://www.youtube.com/watch?v=7PoajCqNKpg&ab_channel=ClojureTV https://www.youtube.com/watch?v=7PoajCqNKpg&ab_channel=Cloju...
- linspace 6y agoI was amazed the first time I used Mathematica. I have used later professionally Maxima to compute some Taylor series and also simpy for some hobby projects. I found simpy less powerful than Maxima (not to mention Mathematica) but the ability to integrate it with the rest of the program is wonderful.
- tonyarkles 6y agoUsing Maxima in my day-to-day work has been a complete game changer. I use it via org-mode and use the `tex()` command to have it output TeXified results. These automatically get formatted into beautiful readable equations.
- hcarvalhoalves 6y agoCool! I managed to do something similar with org-mode + sicmutils, works quite well. Render (pt_BR): https://github.com/hcarvalhoalves/math-fin-training/blob/master/book.pdf https://github.com/hcarvalhoalves/math-fin-training/blob/mas... Source: https://raw.githubusercontent.com/hcarvalhoalves/math-fin-training/master/book.org https://raw.githubusercontent.com/hcarvalhoalves/math-fin-tr... I would love to see how you're using org-mode for that if possible :)
- sritchie 6y agoSICMUtils co-author here, if anyone has any questions on the Clojure port. One beautiful thing about a Clojure computer algebra system is that it can run completely in the browser. This includes automatic differentiation, numerical integration, all of the hardcore Lagrangian and Hamiltonian mechanics work, differential geometry... it is startling stuff. For example, here's a(n interactive!) derivation of Kepler's Third Law in the browser (thanks to Nextjournal's lovely integration), if anyone wants to play: https://nextjournal.com/try/sicm/ex-1-11 https://nextjournal.com/try/sicm/ex-1-11 Many more exercises live here: https://nextjournal.com/sicm/ https://nextjournal.com/sicm/
- ChrisRackauckas 6y agoYes, we found these and this (along with Mathematica) was the impetus for building automated Latexification into Symbolics.jl. Here for example is a teaching notebook used in Alan Edelman's MIT Computational Thinking course where Symbolics.jl is used to visualize the numerical methods as they iterate, and all of the outputs convert to LaTeX: https://computationalthinking.mit.edu/Spring21/newton_method/ https://computationalthinking.mit.edu/Spring21/newton_method... Thanks for the ideas!
- philzook 6y agoThose are gorgeous. How were they done? Using Julia packages?
- ChrisRackauckas 6y agoThis is a Pluto notebook over Symbolics.jl and ForwardDiff. All of the packages used are at the top of the page. You can click the edit button on the top right to open it up.
- ChrisRackauckas 6y agoForgot to mention: Shashi cites SICMUtils as a big influence for the rewrite system SymbolicUtils.jl, which is the rewrite system underneath Symbolics.jl. https://discourse.julialang.org/t/ann-symbolicutils-jl-groundwork-for-a-symbolic-ecosystem-in-julia/38455 https://discourse.julialang.org/t/ann-symbolicutils-jl-groun... He took Sussman's course and became interested in the field from that! Great work.
- benrbray 6y ago> "Structure and Interpretation of Classical Mechanics" by Wisdom and Sussman I come across this book every so often and find it really tough to read due to the complete lack of "types" in any of the code. Math, especially physics, relies heavily on units and function signatures to be understood.