What is the best Scheme implementation for working through SICP?

后端 未结 8 1189
南笙
南笙 2020-12-04 09:30

I have been using PLT Scheme, but it has some issues. Does anyone know of a better implementation for working through SICP?

相关标签:
8条回答
  • 2020-12-04 09:34

    Use MIT Scheme.

    It's recommended by the authors of SICP, and is used at MIT for the 6.001: Structure and Interpretation of Computer Programs course.

    0 讨论(0)
  • 2020-12-04 09:45

    MIT/GNU Scheme, just make sure you load the SICP compatibility package (yes, they provide specific libraries to enhance guarantee the SICP exercises work).

    0 讨论(0)
  • 2020-12-04 09:46

    This was suprisingly annoying to get done on macOS. Here's how it works as of today, assuming you have Homebrew. (Might want to run brew update once in a while).

    brew cask install racket
    raco setup  # might be optional
    raco pkg install sicp
    

    Now you can (require sicp) or simply run

    racket -l sicp --repl
    

    Which you might want to abbreviate to scheme. In bash that'd be

    alias scheme='racket -l sicp --repl'
    

    which you can add to your ~/.bashrc

    0 讨论(0)
  • 2020-12-04 09:47

    I've just started do SICP this week.

    Currently, MIT Scheme is broken in in Ubuntu Linux (9.04 "jaunty"). It might be working in the future.

    DrScheme is working, and is working well. You can use soegard's package listed above or Neil Van Dyke's package, which is based on soegard's package and is available from http://www.neilvandyke.org/sicp-plt/. The nice thing about this package is that when installed, you can use Language|Choose Language.... menu item to select SICP.

    0 讨论(0)
  • 2020-12-04 09:48

    PLT Scheme works pretty well, or MIT Scheme as Keparo suggested. What issues are you having with it?

    0 讨论(0)
  • 2020-12-04 09:52

    I'm now working through SICP using Chez Scheme. It's a pretty old dialect of Scheme, so presumably it isn't too far from what SICP was written around.

    Note that the Chez Scheme project page links a Windows binary and source that can be built on Unix-like platforms. But if you're on a Mac, you'll probably want to do

    brew chezscheme
    man chez
    

    Assuming you have homebrew, which you really should.

    Why not MIT Scheme? Because the interactive front end is Edwin, an editor that uses EMACS conventions. (Currently, it's an actual EMACS mode, tho it used to be implemented in Scheme.) I used to know basic EMACS, but my skills atrophied from disuse, which tells me that relearning this editor is just not worth the trouble.

    Why not DrRacket? If I had seen @frederick-squid 's brew instructions, I might have given it a try. Instead I tried to follow the official instructions for scheme and sicp, which are seriously out of date. Then I tried to make the IDE go into scheme mode, which seems to be intuitive but isn't.

    Just too much trouble. And I'm not sure I want to get into a fancy language design IDE, especially one whose poor support of Scheme sparked the original question.

    0 讨论(0)
提交回复
热议问题