OS Notes:

This document is written with the Mac in mind. You will be installing DrRacket and additional files. On a Mac, DrRacket will go in the Applications folder; /Applications to be more precise. The equivalent directory on a PC is C:\Program Files (x86). Any reference to /Applications on the Mac in these directions should be translated to C:\Program Files (x86) on a PC. (NOTE: I am aware that not everyone uses the C: drive on a PC for applications. If you have customized your PC to use an unconventional way of organizing your content, that's great! Just use your own setup instead of C:\Program Files (x86) when it comes to installation.)

I haven't tried installation with Linux; my guess is that if you are motivated enough to use Linux, you'll figure this out. If not and you have Linux on a laptop, bring it to me at school and we will try to help you with your installation.

To install DrRacket on a Mac:

STEP 0

Download DrRacket from https://download.racket-lang.org/ and use the DMG file to install. Move the resulting folder into the Applications folder. (DrRacket makes this pretty obvious.) Please note that the installation takes a little bit of time--be patient!

 

If you are taking AP CS A, then you are done. To get the version of Scheme that works with the content in the book, under the Languages menu, select Choose Language. Then select Other Languages. Under Legacy Languages, select R5RS. Then click Run.

STEP 1

To set up base Simply Scheme code with DrRacket :

1. Open DrRacket. Notice that in the interactions area (bottom half), there is a complaint that a language must be chosen. Note that there is a Languages menu; inside it will be no mention of Simply Scheme at this point.

2. Under the File menu, select Package Manager...

3. Click on the "Available from Catalog" button at the top center of the window.

4. Type in "simply-scheme" (without the quotes) into the filter. That will reduce the packages you can see to only ones with "dyoo" in them. (If you don't see simply-scheme listed, click the Update Package List button in the Package Manager.)

5. Scroll down to the package "simply-scheme". Select it and click Install.

Installation may take up to a minute, depending on your Internet connection.

6. Quit DrRacket without saving.

7. Open DrRacket.

8. Under the Languages menu, select Choose Language.

8A. If you are taking FOOP, Simply Scheme should now appear under Teaching Languages. Select it and then click Run.

8B. If you are taking AP CS A, select the R5RS under "Other Languages" and then click OK. Then click Run. You are done.

9. (The rest of these instructions are for using Simply Scheme only.) Test by typing "se" (without the quotes) in the interactions area (bottom half of the window). If it indicates that se is a procedure, everything is good. If an error is produced, then something went wrong during installation.

10. Rename the "Racket 8.13" (or whatever the most recent version is) folder in the /Applications folder to "Racket" (without the quotes).

11. Get the scheme.zip file from http://paleyontology.com/scheme.zip, and extract it, producing a folder called "scheme". Put this folder into the Racket folder. Some load commands may not work without the scheme folder being inside the Racket folder.

12. Note that the pathnames used load the ttt.scm file depend on your having done Step #10, above. If you skipped it, then you will get an error message when you try to do this.

12A (Mac). Test by typing the following in the definitions area:

(load "/Applications/Racket/scheme/ttt.scm")

and then click Run. All this does is to verify that you can load the "ttt" (Tic-Tac-Toe) code for chapter 10.

12B (PC). Test by typing the following in the definitions area:

(load "C:\\Program Files (x86)\\Racket\\scheme\\ttt.scm")

and then click Run. Note that the double-backslashes are needed. Also note that "C:\\Program Files (x86)" only applies if that is where you put your DrRacket folder. If you put it elsewhere, you need to type a path that takes you to the folder where you put Racket.

13. In the interactions window, type "ttt" without the quotes. If it indicates that ttt is a procedure, everything is good. If an error is produced, then the place where ttt.scm is located is not under
/Applications/Racket/scheme. Go back to step 2 and make sure that the Scheme folder is really
inside the Racket folder which should be inside the /Applications folder.