What interpreter to use while reading SICP? [closed]

一世执手 提交于 2019-12-31 04:45:20

问题


I'm reading SICP book available at http://mitpress.mit.edu/sicp/

To run the sample code which interpreter should I use ?

I've considered Dandelion Lisp plugin for Eclipse : http://sourceforge.net/projects/dandelion-ecl/

Also considered Scheme for windows http://www.gnu.org/software/mit-scheme/

Which one should I use ?

Reading this question it seems I should use Scheme ? : What are the actual differences between Scheme and Common Lisp? (Or any other two dialects of Lisp)

If so will http://www.gnu.org/software/mit-scheme/ suffice ?


回答1:


MIT-scheme should work, depending on your OS, but it's not a terribly great interface. Racket is a very popular interpreter for Lisp-y things, and there does exist a package for Racket that tries to implement SICP scheme. It's not perfect, but it's what I've used in the past for SICP, and you'll be fighting much less with the interpreter than with MIT-scheme.




回答2:


In DrRacket IDE there is a SICP compatibility language. Using DrRacket helps format code, identify errors and it has a debugger. It also supports standard Scheme as well as it's own dialect, racket, which is very similar but has lots of libraries like most modern languages.

To install (after you have installed DrRacket)

From terminal run:

raco pkg install sicp

You get lots of output and perhaps some WARNINGS. Restart DrRacket and replace #lang racket with #lang sicp. To get the picture language add (#%require sicp-pict), thus this example should work nicely:

#lang sicp
(#%require sicp-pict)

(paint-hires  (below (beside diagonal-shading
                             (rotate90 diagonal-shading))
                     (beside (rotate270 diagonal-shading)
                             (rotate180 diagonal-shading))))

This is a short version of an answer to Which lang packet is proper for SICP in Dr.Racket?



来源:https://stackoverflow.com/questions/25087287/what-interpreter-to-use-while-reading-sicp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!