from Hacker News

MIT Scheme on Apple Silicon

by kennethfriedman on 12/27/21, 10:28 PM with 82 comments

  • by sritchie on 12/28/21, 2:48 PM

    I've been engaged in a 1.5 year long (so far) project to port the entirety of GJS's "scmutils" package over to Clojure, and the erratic behavior of MIT Scheme over Rosetta has been a pain I've consigned myself to for months. I keep an old machine handy when I need to test functions that can't work on the M1.

    I am SO HAPPY to see this work! Major timesaver for me and anyone looking to run the executable versions of Functional Differential Geometry[1] and Structure and Interpretation of Classical Mechanics[2] in the original language.

    [0] https://github.com/sicmutils/sicmutils [1] https://github.com/sicmutils/fdg-book [2] https://github.com/sicmutils/sicm-book

  • by nneonneo on 12/28/21, 5:46 PM

    Both of the compilation errors identified in this article were just fixed in the master branch of MIT/GNU Scheme five hours ago: https://git.savannah.gnu.org/cgit/mit-scheme.git/commit/?id=..., https://git.savannah.gnu.org/cgit/mit-scheme.git/commit/?id=.... So, if you grab the current master branch, it should just build for x86 without any fixes needed.
  • by jeroenhd on 12/28/21, 2:58 PM

    What's stopping people from just compiling Scheme for ARM? The website has a separate aarch64 download it seems, so why not patch that instead of relying on Rosetta2?

    The vfork/fork issue and the compiler upgrade issue don't seem to be too problematic to work around, so there must be some kind of ARM limitation that's preventing Scheme from working, but what?

  • by carreau on 12/28/21, 2:40 PM

    I find it a bit disingenuous to say that it runs on apple silicon if you need to modify source code. Also it's not because it compiles and starts that it's fully functional.

    The main MIT Scheme page say that it's not possible and need significant efforts, so I would be curious to get a description as to why one claim it's impossible while the other show that it compiles and starts.

    Are the original authors too much against M1/Apple and justify themselves ? Or does compiling on M1 sort-of works until you hit more complex features that will crash or misbehave ?

  • by mark_l_watson on 12/28/21, 4:15 PM

    I got MIT Scheme running on my M1 MacBook Pro about 6 months ago when I bought the book "Software Design for Flexibility" and although I can't find my notes for that, I think I remember building from source natively, not via Rosetta - but I may remember incorrectly.

    I also remember it taking a while to get Gerbil Scheme running on M1.

  • by pupdroid on 12/29/21, 12:53 AM

    The Racket fork of Chez Scheme runs natively on Apple ARM (AFAIK these changes have not yet been merged into the main branch of Chez Scheme)

    https://github.com/racket/ChezScheme/

  • by softwarebeware on 12/28/21, 4:34 PM

    Just fyi in dark mode on this site, the code snippets are almost unreadable
  • by jeffrallen on 12/28/21, 8:09 PM

    Rule of thumb: don't take advice from people who can't explain why they suggest you comment code out.
  • by montmorency88 on 1/3/22, 10:53 PM

    Very cool how much interest there is in mit-scheme and sicm. On the csail website I think the '.com' binary for scmutils only works with v10 and was released about a year ago. Does anyone know where there are instructions for finding/compiling a version that works with the latest version of mit scheme?
  • by rcarmo on 12/28/21, 6:25 PM

    Nice. FYI, I've been using Fennel on Monterey (via brew), and it's also great for that extra LISPy feeling.
  • by wyclif on 12/28/21, 7:52 PM

    I wish I had known this before I recently installed Racket because I'm currently reading SICP.
  • by Koshkin on 12/28/21, 9:33 PM

    That MIT Scheme includes an emacs clone that uses Scheme instead of elisp is a nice touch.
  • by thomasjudge on 12/28/21, 2:42 PM

    Just a UI comment, the white highlighting of white text on a black/grey background is pretty unreadable in my browser