1 ## Identifying your system ##
3 We'll assume you're using either Mac OS X, or Windows, or Linux.
5 If you're using **Mac OS X**, take note of what version of the Mac OS you're
6 running. (Under the Apple Menu, select "About this Mac".)
11 * Mountain Lion (10.8)
15 If you're running **iOS**, you probably can't use this software on that machine. (A bit more below.)
17 Furthermore, you'll be in one of two subgroups:
19 * You'll have Apple's Xcode and the independent MacPorts system
20 installed. (Probably you don't. If you don't know what I'm talking about, you don't have these.)
22 If you don't have these, but want to try this route, you can read about
23 the MacPorts system at <http://www.macports.org/>.
24 This automates the building of Unix-type software on your Mac; it
25 makes it a lot easier to check for dependencies, use more-recent
26 versions of things, and so on. (Though as it happens, MacPorts only has an older version of
27 our chosen implementation of Scheme.)
30 <http://developer.apple.com/technologies/tools/xcode.html>. Some
31 versions of this have been available for free, though you do have to
32 register with Apple as an "Apple Developer", which involves accepting a
33 legal agreement with Apple. I have an older version of this installed.
34 If you download a recent version, email me and let me know how the
35 process works so I can tell others. There are instructions about how to
36 get Xcode in the MacPorts installation guide.
38 The latest version of Xcode to work with Leopard is 3.14; more
39 recent versions (>= 3.2) require Snow Leopard. 3.2.6 is last version that can be downloaded for free by users of 10.6 / Snow Leopard. (But if they pay, they can use up to Xcode 4.2.)
40 Xcode 4.1 was free to all users of 10.7 / Lion. Is Xcode 4.6.x still available for free? Are Xcode 5.x and/or 6.x available for free?
44 * Or you won't have those installed. (**Most Mac users will be in this group.**)
45 Then you'll need pre-packaged (and usually pretty GUI) installers for
46 everything. These are great when they're available and kept up-to-date;
47 however sometimes those conditions aren't met.
50 If you're using **Windows**, you'll be in one of two subgroups:
52 * You'll have the Cygwin system
53 <http://www.cygwin.com/> installed.
54 This puts a Unix-like layer on top of your Windows system,
55 and makes it easier for you to use the same software everybody
56 else will be using, without its needing as much special-for-Windows
57 treatment. However, many of you won't have this installed.
59 * You won't have Cygwin installed. You might in theory have
60 a different group of compilers installed (Microsoft Visual C++) but
61 we'll assume that the overwhelming majority of users in this group
62 don't have access to a compiler and need pre-packaged installers
65 If you're using **Linux**, you could be using any one of numerous packaging
68 * We'll give examples using the packaging system shared by Debian and Ubuntu,
69 and we'll assume that those of you using different packaging systems will know
70 how to make the relevant substitutions. You may also want to take note of the
71 output of the "uname -srm" command. On my machine this tells me "Linux
72 3.12.8-extrastuff x86\_64". That tells me I'm running the x86\_64 (as opposed to the
73 i686 or i386 or whatever) version of Linux, and that I'm running kernel
76 **For all of these groups**, a general item to take note of is what "processor architecture" your machine is running. Three of the possibilities are:
78 * One of Intel's i386, i486, i586, i686 architectures. These are collectively known as "x86" or "IA-32" or sometimes just "32-bit".
79 * Intel or AMD's x86\_64 architecture. This is sometimes also called "x64" or "amd64" or "IA-64" or sometimes just "64-bit".
80 * ARM or some other architecture. These are generally lower-powered machines, like iPads. Some of the software we're proposing *might* in principle be capable of running on such machines, but installers don't seem to be available. We'll assume you have access to an x86 or x86\_64 machine.
82 In the Linux example above, I could tell my machine is running x86 because the result of the `uname` command said "i386" at the end. Another machine I have says "x86\_64" at the end. On a Mac, you can also say `uname -m` in a Terminal session, and it will say something like "i386". I think that Mac OS's from Lion / 10.7 forward have all been x86\_64-only. On Windows, I don't know how to collect this information. But generally, machines running Windows XP will probably be i386/32-bit (unless it's a version of Windows with "64-bit" or "x64" in its title); machines running Windows Vista or Windows 7 or Windows 8 could be running either x86/32-bit or x64/64-bit.
85 ## PLEASE REPORT PROBLEMS (AND SOLUTIONS!) ##
87 We haven't tested these instructions ourselves, and they're not explicit
88 step-by-step instructions in any case. If you encounter troubles, please email
89 to let us know so that we can amend the instructions to help others. If you
90 figure out how to fix the problem youself (and please do), please also write
91 with suggestions how we can change these instructions to make the process
92 easier and more straightforward for others.
97 **Scheme** is one of two major dialects of *Lisp*, which is a large family of
98 programming languages. The other dialect is called "Common Lisp." Scheme is the
99 more clean and minimalistic dialect, and is what's mostly used in academic
102 Scheme itself has umpteen different "implementations", which share most of
103 their fundamentals, but have slightly different extensions and interact with
104 the operating system differently. One major implementation used to be called
105 PLT Scheme, but then a few years ago changed their name to Racket.
106 This is what we recommend you use. (If you're already using or comfortable with
107 another Scheme implementation, though, there's no compelling reason to switch.)
109 Racket stands to Scheme in something like the relation Firefox stands to HTML. It's one program among others for working with the language; and many of those programs (or web browsers) permit different extensions, have small variations, and so on.
111 Racket has several components. The two most visible components for us are a command-line interpreter named "racket" and a teaching-friendly editor/front-end named "DrRacket". You will probably be working primarily or wholly in the latter.
113 <!-- racket used to be mzscheme, DrRacket used to be DrScheme -->
115 * In your web browser:
117 There is a (slow, bare-bones) version of Scheme available for online use at <http://tryscheme.sourceforge.net/>.
120 * **To install in Windows**
122 Go to <http://racket-lang.org/download/>. Download and install the "Windows x64" version. (Or the "Windows x86" verson if you have an older, 32-bit system.)
124 * **To install on Mac without MacPorts**
126 Go to <http://racket-lang.org/download/>. Download and install the option for your system, most likely "Macintosh
127 OS X (Intel 64-bit)".
129 * **To install on Mac with MacPorts**
131 You can install a command-line version of
132 PLT Scheme (dating from early 2009) by opening a Terminal
135 sudo port install mzscheme
137 If you want the GUI components, I think you'll need to use the
138 "Mac/without MacPorts" installation options above.
140 I recommend also typing:
142 sudo port install rlwrap
144 then if you ever use the command-line program `mzscheme` (or `racket`), you should start it by typing `rlwrap mzscheme`. This gives
145 you a nice history of the commands you've already typed, which you can scroll up and down in with your
148 * **To install on Linux**
150 Use your packaging system, for example, open a Terminal and
153 sudo apt-get install racket
155 It's very likely that your packaging system has some version of
156 Racket available, so look for it. However, if you can't find it you
157 can also install a pre-packaged binary from the Racket website at <http://racket-lang.org/download/>.
158 Choose the option for your version of Linux (Ubuntu and Debian are available).
160 As above, I recommend you also type:
164 then if you ever use the command-line program `mzscheme` (or `racket`), you should start it by typing `rlwrap mzscheme`. This gives
165 you a nice history of the commands you've already typed, which you can scroll up and down in with your
171 **Caml** is one of two major dialects of *ML*, which is another large family of
172 programming languages. The other dialect is called "SML" and has several
173 implementations. But Caml has only one active implementation, OCaml or
174 Objective Caml, developed by the INRIA academic group in France.
177 *Will add more information about this soon.*
181 It's helpful if in addition to OCaml you also install the Findlib add-on.
182 This will make it easier to install additional add-ons further down the road.
183 However, if you're not able to get that working, don't worry about it much.
186 * **To install in Windows**
188 Go to <http://caml.inria.fr/download.en.html>.
189 You can probably download and install the
190 "Self installer for the port based on the MinGW toolchain"
191 even if you don't know what MinGW or Cygwin are.
192 Some features of this require Cygwin, but it looks like
193 it should mostly work even for users without Cygwin.
194 At the time of this writing, only an installer for the previous
195 version of OCaml (3.11.0, from January 2010) is available.
197 To install the Findlib add-on, you must have the
198 Cygwin system installed. We assume few of you do,
199 so we're not going to try to explain how to do this.
200 If you want to figure it out yourself, go to the
201 Findlib website at <http://projects.camlcity.org/projects/findlib.html>.
203 * **To install on Mac without MacPorts**
205 To install OCaml 3.12 (just released this summer), go to
206 <http://caml.inria.fr/download.en.html>
207 and download and install the "Binary distribution for Mac OS X"
209 To install the Findlib add-on, you'll need the Xcode development tools
210 to compile it yourself. Once you get that far, it's probably easiest
211 for you to install MacPorts and just install things using the MacPorts
212 instructions. (Use the MacPorts version of OCaml, instead of installing
213 the package from the caml.inria.fr website, as described above)
214 However, if you do have Xcode, and want to do without MacPorts, then
215 what you need to do is download Findlib from
216 <http://download.camlcity.org/download/findlib-1.2.6.tar.gz>.
217 Unpack the download, open a Terminal and go into the folder you just
223 This will build an installer package which you should be able to
224 double-click and install.
226 * **To install on Mac with MacPorts**
228 You can install the previous version of OCaml (3.11.2,
229 from January 2010), together with the Findlib add-on, by opening a Terminal
232 sudo port install ocaml caml-findlib
234 As with Scheme, it's helpful to also have rlwrap installed, and to start OCaml as `rlwrap ocaml`. This gives
235 you a nice history of the commands you've already typed, which you can scroll up and down in with your
239 * [More details about installing OCaml on Macs, if needed](http://cocan.org/getting_started_with_ocaml_on_mac_os_x)
241 * **To install on Linux**
243 Use your packaging system, for example, open a Terminal and
246 sudo apt-get install ocaml ocaml-findlib
248 That will install a version of OCaml (probably 3.11.2, from January 2010)
249 and the Findlib add-on.
251 If for some reason you can't get OCaml through your
252 packaging system, you can go to
253 <http://caml.inria.fr/download.en.html>.
254 Pre-packaged binary installers are available for several Linux systems.
256 If you can't get findlib through your packaging system, you'll
257 need to download it from
258 <http://download.camlcity.org/download/findlib-1.2.6.tar.gz>.
259 and use gcc to compile it yourself. If you don't know how to
260 do that, you probably don't want to attempt this.
261 Here are the INSTALL notes:
262 <https://godirepo.camlcity.org/svn/lib-findlib/trunk/INSTALL>.
264 As with Scheme, it's helpful to also have rlwrap installed, and to start OCaml as `rlwrap ocaml`. This gives
265 you a nice history of the commands you've already typed, which you can scroll up and down in with your