{"id":13792515,"url":"https://github.com/hnarayanan/sicm","last_synced_at":"2026-01-06T06:10:21.343Z","repository":{"id":19998752,"uuid":"23266152","full_name":"hnarayanan/sicm","owner":"hnarayanan","description":"Working through Structure and Interpretation of Classical Mechanics.","archived":false,"fork":false,"pushed_at":"2024-07-08T17:56:37.000Z","size":1203,"stargazers_count":123,"open_issues_count":0,"forks_count":21,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-01-30T22:19:19.159Z","etag":null,"topics":["educational","mechanics","scheme","simulation"],"latest_commit_sha":null,"homepage":"http://mitpress.mit.edu/books/structure-and-interpretation-classical-mechanics","language":"TeX","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hnarayanan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-23T20:58:52.000Z","updated_at":"2025-01-24T20:16:44.000Z","dependencies_parsed_at":"2024-07-06T22:02:35.069Z","dependency_job_id":null,"html_url":"https://github.com/hnarayanan/sicm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnarayanan%2Fsicm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnarayanan%2Fsicm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnarayanan%2Fsicm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnarayanan%2Fsicm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnarayanan","download_url":"https://codeload.github.com/hnarayanan/sicm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245568868,"owners_count":20636852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["educational","mechanics","scheme","simulation"],"created_at":"2024-08-03T22:01:13.136Z","updated_at":"2026-01-06T06:10:21.337Z","avatar_url":"https://github.com/hnarayanan.png","language":"TeX","funding_links":[],"categories":["Scheme"],"sub_categories":["course"],"readme":"# Working Through Structure and Interpretation of Classical Mechanics\n\nThis repository contains some notes on my progress through [Structure\nand Interpretation of Classical Mechanics][sicm] (Second Edition).\nThis book lies at the intersection of things that matter very much to\nme: mechanics, mathematics and computation.\n\nThe crew behind this book (and the corresponding code) are a curious\nbunch and they have fun exploring their curiosities. They are slowly\nbecoming my spiritual guides.\n\nThese are mostly notes for myself, but it's great if you want to\nfollow along with:\n\n- [My console logs as I work through the book][gh-sicm-working]\n- [My solutions to the exercises in the book][gh-sicm-exercises]\n\nFeel free to [get in touch][hn-email] if you'd like to talk about this\ntopic or study together.\n\n## Background Material\n\nThere are a handful of ways you can access the book:\n\n- You can buy a physical copy of this book [at its official store\npage][sicm],\n- Read [the freely-available official HTML version][sicm-html], or\n- Read [a beautiful unofficial version][sicm-unofficial-html] online.\n\nThere is also an MIT OCW course corresponding to it:\n\n- [Classical Mechanics: A Computational Approach by Prof. Gerald\n  Sussman and Jack Wisdom][cm-course-sussman-wisdom]\n\nThe material in this course, and hence the numbering used in the\nassignments, corresponds to the first edition of the book.\n\nThe programming language used in this book and the accompanying\nlibrary ([Scheme Mechanics or Scmutils][scmutils]) is called\n[Scheme][mit-scheme]. If you are interested in learning about it, the\nfollowing course (and [related book][sicp]) is excellent:\n\n- [Structure And Interpretation Of Computer Programs by Hal Abelson\n   and Gerald Jay Sussman][programming-course-abelson-sussman]\n\nIn addition to this, the following courses are also really\ninteresting:\n\n- [Classical Mechanics by Leonard Susskind][cm-course-susskind]\n- [Classical Physics by Venkataraman Balakrishnan][physics-course-balakrishnan]\n- [Fundamentals of Physics with Ramamurti Shankar][physics-course-shankar]\n- [Nonlinear Dynamics and Chaos by Steven Strogatz][physics-course-strogatz]\n\n## Following Along\n\n### Base setup for macOS on Apple Silicon\n\nI happen to work on an Apple Silicon Mac, and part of this repository\nis a collection of notes and hacks needed to get [MIT\nScheme][mit-scheme] and [Scmutils][scmutils] working nicely on it.\n\n1. Install [XQuartz][xquartz]. This used to come bundled with Macs\n   previously, but now needs to be installed by hand. You will need\n   this for graphical output.\n\n   Simply [download the installer][xquartz-installer] (2.8.5 at the\n   time of writing) and run it to install.\n\n2. Fetch, unpack and patch recent source code for MIT Scheme. At the\n   time of writing, this is version 12.1. For some technical reasons,\n   there is no native-code support for Apple Silicon, and you need to\n   fetch the SVM1 binaries which work (albeit a little slowly).\n\n   ````\n   curl -O https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/12.1/mit-scheme-12.1-svm1-64le.tar.gz\n   tar -xzf mit-scheme-12.1-svm1-64le.tar.gz\n   cd mit-scheme-12.1\n   curl -O https://raw.githubusercontent.com/hnarayanan/sicm/main/patches/mit-scheme-12.1.patch\n   patch -p1 \u003c mit-scheme-12.1.patch\n   ````\n\n3. Build and install this patched MIT Scheme. You will want to change\n   `/path/to/install/scheme/` below to something that makes sense for\n   you. Just keep it in mind in subsequent steps.\n\n   ````\n   ./configure --prefix=/path/to/install/scheme/\n   make\n   make install\n   ````\n4. Adjust some environment variables in `~/.profile` to let your shell\n   know about this installation.\n\n   ````\n   export DISPLAY=:0\n   export PATH=/path/to/install/scheme/bin:${PATH}\n   export MITSCHEME_LIBRARY_PATH=/path/to/install/scheme/lib/mit-scheme-svm1-64le-12.1\n   ````\n\n   You can open a new shell and test your installation out. Hooray!\n\n   ````\n   mit-scheme\n   ````\n\n5. The final step is to fetch and install a recent\n   [Scmutils][scmutils] (20230902 at the time of writing).\n\n   ````\n   curl -O https://groups.csail.mit.edu/mac/users/gjs/6946/mechanics-system-installation/svm/scmutils-20230902.tar.gz\n   tar -xzf scmutils-20230902.tar.gz\n   cd scmutils-20230902\n   ./install.sh\n   ````\n\n   This ends up installing a script (called `mechanics.sh`) that\n   starts Scheme and loads Scmutils as it does so. Since it is put in\n   the same path that the `mit-scheme` binary was installed in, you\n   can just run it from your shell.\n\n   ````\n   mechanics.sh\n   ````\n\n   This greets you with the following: *Notice the modules loaded on\n   the last line.* If you see these, it means you have it all working.\n\n   ````\n   MIT/GNU Scheme running under OS X\n   Type `^C' (control-C) followed by `H' to obtain information about interrupts.\n\n   Copyright (C) 2022 Massachusetts Institute of Technology\n   This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or\n   FITNESS FOR A PARTICULAR PURPOSE.\n\n   Image saved on Saturday September 2, 2023 at 2:29:59 AM\n     Release 12.1 || SF || CREF || LIAR/svm1 || SOS || XML || Edwin || X11 || X11-Screen || ScmUtils\n   ````\n\n### Integration with GNU Emacs\n\nI also happen to use [GNU Emacs][gnu-emacs], so here is some bonus\nmaterial.\n\nIf you add the following blocks to your Emacs configuration, they\ninstall and configure a package called [Geiser][emacs-geiser] that\nprovides a nicer [REPL][wiki-repl] for Scheme with scmutils working\nwithin Emacs. This makes hacking along with this book even more fun.\n\n````\n(use-package geiser\n  :ensure t\n  :defer t\n  :custom\n  (geiser-active-implementations '(mit))\n  :config\n  (setenv \"DISPLAY\" \":0\"))\n\n(use-package geiser-mit\n  :ensure t\n  :defer t\n  :custom\n  (geiser-mit-binary \"/path/to/install/scheme/bin/mit-scheme\")\n  :config\n  (setenv \"MITSCHEME_HEAP_SIZE\" \"100000\")\n  (setenv \"MITSCHEME_BAND\" \"mechanics.com\")\n  (setenv \"MITSCHEME_LIBRARY_PATH\" \"/path/to/install/scheme/lib/mit-scheme-svm1-64le-12.1\"))\n````\n\nOnce you've adjusted the paths and added this to your setup, running\n`M-x geiser` loads the REPL.\n\nIf you are interested in more of my Emacs environment, I [share my\nentire configuration online][hn-dotemacs].\n\n## License\n\nThis learning repository is licensed under the [Creative Commons\nAttribution 4.0 International License][license-cc-by].\n\n[cm-course-susskind]: http://theoreticalminimum.com/courses/classical-mechanics/2011/fall\n[cm-course-sussman-wisdom]: https://ocw.mit.edu/courses/12-620j-classical-mechanics-a-computational-approach-fall-2008/\n[emacs-geiser]: https://www.nongnu.org/geiser/\n[gh-sicm-exercises]: https://github.com/hnarayanan/sicm/tree/main/exercises\n[gh-sicm-working]: https://github.com/hnarayanan/sicm/tree/main/working\n[gnu-emacs]: https://www.gnu.org/software/emacs/\n[hn-dotemacs]: https://github.com/hnarayanan/dotemacs\n[hn-email]: mailto:mail@harishnarayanan.org\n[license-cc-by]: https://creativecommons.org/licenses/by/4.0/\n[mit-scheme]: https://www.gnu.org/software/mit-scheme/\n[physics-course-balakrishnan]: https://www.youtube.com/playlist?list=PL5E4E56893588CBA8\n[physics-course-shankar]: https://www.youtube.com/playlist?list=PLFE3074A4CB751B2B\n[physics-course-strogatz]: https://www.youtube.com/playlist?list=PLbN57C5Zdl6j_qJA-pARJnKsmROzPnO9V\n[programming-course-abelson-sussman]: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/\n[scmutils]: https://groups.csail.mit.edu/mac/users/gjs/6946/installation.html\n[sicm-html]: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/9579/sicm_edition_2.zip/book.html\n[sicm-unofficial-html]: https://tgvaughan.github.io/sicm/\n[sicm]: https://mitpress.mit.edu/9780262028967/structure-and-interpretation-of-classical-mechanics/\n[sicp]: https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html\n[wiki-repl]: https://en.wikipedia.org/wiki/Read–eval–print_loop\n[xquartz-installer]: https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.5/XQuartz-2.8.5.pkg\n[xquartz]: https://www.xquartz.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnarayanan%2Fsicm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnarayanan%2Fsicm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnarayanan%2Fsicm/lists"}