addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Racket and SICP

From: Paul S.
Sent on: Thursday, March 20, 2014 9:48 PM
I forgot to mention in my previous message...

If you're using Racket to go through the book, Neil Van Dyke has made up a
compatibility package for the dialect of Scheme used in SICP. This includes
support for the picture language used as an example in Chapter 2.

If you're using DrRacket as your interface, just add the following line at
the top of your code:

  #lang planet neil/sicp

Planet is Racket's package repository. When you eval the code, Racket will
automatically download and cache the supporting packages.

It took a bit of doing to figure out how to make this work if you are using
this through code blocks in Emacs's org-babel. You have to eval the
following form (in org-babel, just include it in the first code block of a
session):

  (require (planet neil/sicp:1:17))

Also, in the exercises for 1.2, I found that Racket's built-in random
number generator wouldn't go higher than 4294967087. requiring
williams/science/ran­dom-source from Planet provides a "random-integer"
method without these limits.

Hope this helps!

Paul

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy