Question

I want to find the scheme implementation running on emacs under Windows for working through SICP. the MIT scheme come to my mind, but the its official site says Code for running MIT/GNU Scheme under GNU Emacs doesn't work on Windows, I don't want to use its default editor on windows. How can I work through this under windows? are there any scheme implementation can do this? I have tried Petite Chez Scheme. But there is something wrong to work through the SCIP.

Was it helpful?

Solution

The most friendly Scheme environment these days is Dr Racket, which you can get from http://racket-lang.org/. It provides a graphical IDE on top of Racket, which supports many variations of Scheme.

To use Dr Racket with SICP, first open Dr Racket and then replace the first line that says something like

#lang scheme

with

#lang planet neil/sicp

Then click the green run button in the upper right. That will start downloading an SICP package from Racket's repository and install it (you can Show Log to see what's happening).

Once that's done, you should be able to run (dec 5) and get 4, and (inc 3) to get 4.

Edit: The documentation for neil/sicp is at http://www.neilvandyke.org/racket-sicp/ if you want to check it out, but there's not too much to know about the package.

OTHER TIPS

As another answer has mentioned, Racket is probably the best/most widely used scheme implementation for Windows. You can use the #lang sicp directive at the top of your .rkt file when working through SICP.

To get the nice features (REPL, syntax highlighting, etc.) you can install emacs racket-mode. Thereafter, you should be able to open your .rkt file in emacs and run it with C-c C-c*.

*Note that I needed to explicitly set the racket-program variable to "C:\\Program Files\\Racket\\Racket.exe".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top