A Clojure(script) implementation of the
scmutils system for math and physics investigations in the Clojure and Clojurescript languages.
1. To install Clojure in Ubuntu, just this command is enough:
sudo apt-get install elpa-cider
Although the Clojure version you get is probably not the most updated one, that is not important, because you can specify which version you want in the config file of each project.
2. Then use this command to generate a new project named
lein new app my-stuff
Emacs to open the file:
4. Replace the existing
:dependencies line with this one
:dependencies [[org.clojure/clojure "1.11.1"]
And make sure that both
sicmutils have the most updated version numbers.
Emacs, type the command
6. In the
clojure window (cider-repl), type
enter at the end.
(require '[sicmutils.env :as env])
((D cube) 'x)
(+ (* x x) (* x (+ x x)))
10. Type the
to access the last input. Then modify it into
(simplify ((D cube) 'x))
It will result
(* 3 (expt x 2))
(->TeX (simplify ((D cube) 'x)))
will give the code
12. You can exit by the
For the time being,
SICMUtils is not suitable for the book SICM (Structure and Interpretation of Classical Mechanics). In other words,
SICMUtils cannot replace the
scmutils library yet, because:
a. You would have to do the translation manually, from the
scmutils code in the book to
b. Although it can generate source code, it does NOT do the rendering.
c. It cannot plot graphs.
SICMUtils has one advantage over
scmutils. It can generate source of an expression, but
scmutils cannot. So I am planning to use both
Also, I will learn how to use
SICMUtils with other Clojure libraries and the Jupyter Notebook. That would get rendering and graph plotting running.
— Me@2022-07-26 11:03:51 AM
2022.07.26 Tuesday (c) All rights reserved by ACHK