installation refinements
[lambda.git] / how_to_get_the_programming_languages_running_on_your_computer.mdwn
index 8e65a54..11ee086 100644 (file)
@@ -32,7 +32,7 @@ Furthermore, Mac users will be in one of two subgroups:
     There are instructions about how to get Xcode on the [Installing MacPorts](https://www.macports.org/install.php) page.
     Some versions of [Xcode](http://developer.apple.com/xcode.html) are available for free on the Mac App Store.
     Other versions are available through Apple's Developer website (some of these are free, but do require you to
-    register with Apple as an "Apple Developer", which involves clicking to accept a legal agreement with Apple.)
+    register with Apple as an "Apple Developer", which involves clicking to accept a legal agreement with Apple).
     I have an older version of this installed. If you download a recent version, email me and let me know how the
     process works so I can tell others.
     <!--
@@ -106,9 +106,14 @@ easier and more straightforward for others.
 of programming languages. The other dialects are called "Common Lisp" and "Clojure".
 Scheme is the more clean and minimalist dialect, and is what's mostly used in
 academic circles.
+
+*   In your web browser:
+
+    There is a (slow, bare-bones) version of Scheme available for online use at <http://tryscheme.sourceforge.net/>.
+
 Scheme itself has umpteen different "implementations", which share most of
 their fundamentals, but have slightly different extensions and interact with
-the operating system differently. One major implementation is called Racket,
+the operating system differently. One major implementation is called [Racket](http://racket-lang.org),
 and that is what we recommend you use. (A few years back they were called PLT Scheme, but then
 they changed their name to Racket.)
 If you're already using or comfortable with
@@ -121,17 +126,13 @@ try are
 or [Chibi](https://code.google.com/p/chibi-scheme). The later in that list you go, the more likely it
 is that you'll have to compile the software yourself. (Thus Mac users will need Xcode.)
 
-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.
+Racket stands to Scheme in something like the relation Firefox stands to HTML. It's one program (or platform) among others for working with the Scheme language; and many of those programs (or web browsers) permit different extensions, have small variations, and so on.
 
 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.
 <!-- "racket" used to be mzscheme, "DrRacket" used to be DrScheme -->
 
 The current version of Racket is 6.1.1 (released November 2014).
 
-*   In your web browser:
-
-    There is a (slow, bare-bones) version of Scheme available for online use at <http://tryscheme.sourceforge.net/>.
-
 *   **To install in Windows**
 
     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.)
@@ -150,14 +151,21 @@ The current version of Racket is 6.1.1 (released November 2014).
 
          sudo port install mzscheme
 
+    <!-- mzscheme v4.1.5, from March 2009; latest mzscheme is 4.2.5, from April 2010 -->
+
     If you want the GUI components, I think you'll need to use the
-    "Mac/without MacPorts" installation options above.
+    "Mac/without MacPorts" installation options above. Or you could try the Chicken Scheme implementation instead of Racket. This is more current.
+    To do that, type:
 
-    I recommend also typing:
+        sudo port install chicken readline
+
+    <!-- chicken v4.8.0.2, from Feb 2013; latest available is 4.9.0.1, from Nov 2014 -->
+
+    Whether you use mzscheme or Chicken, I recommend also typing:
 
         sudo port install rlwrap
 
-    then if you ever use the command-line program `mzscheme` (or `racket`), you should start it by typing `rlwrap mzscheme`. This gives
+    then if you ever use the command-line program `mzscheme` (or `racket`, for that matter), you should start it by typing `rlwrap mzscheme` (or whatever). This gives
     you a nice history of the commands you've already typed, which you can scroll up and down in with your
     keyboard arrows.
 
@@ -177,7 +185,7 @@ The current version of Racket is 6.1.1 (released November 2014).
 
         sudo apt-get rlwrap
 
-    then if you ever use the command-line program `mzscheme` (or `racket`), you should start it by typing `rlwrap mzscheme`. This gives
+    then if you ever use the command-line program `mzscheme` (or `racket`), you should start it by typing `rlwrap mzscheme` (or whatever). This gives
     you a nice history of the commands you've already typed, which you can scroll up and down in with your
     keyboard arrows.
 
@@ -198,12 +206,15 @@ However, if you're not able to get that working, don't worry about it much.
 
 The current version of OCaml is 4.02.1 (released October 2014).
 
-Another instruction page focuses on [OPAM](http://ocaml.org/docs/install.html), also [this](https://opam.ocaml.org).
+*   *Another instruction page focuses on [OPAM](http://ocaml.org/docs/install.html), also [this](https://opam.ocaml.org).*
+
+*   *[More details about installing OCaml on Macs, if needed](http://cocan.org/getting_started_with_ocaml_on_mac_os_x)*
 
 *   In your web browser:
 
     There is a (slow, bare-bones) version of OCaml available for online use at <http://try.ocamlpro.com/>.
 
+
 *   **To install in Windows**
 
     Go to <http://caml.inria.fr/download.en.html>.
@@ -256,8 +267,6 @@ Another instruction page focuses on [OPAM](http://ocaml.org/docs/install.html),
     you a nice history of the commands you've already typed, which you can scroll up and down in with your
     keyboard arrows.
 
-*   [More details about installing OCaml on Macs, if needed](http://cocan.org/getting_started_with_ocaml_on_mac_os_x)
-
 *   **To install on Linux**
 
     Use your packaging system, for example, open a Terminal and
@@ -287,7 +296,7 @@ Another instruction page focuses on [OPAM](http://ocaml.org/docs/install.html),
 
 ## Getting Haskell ##
 
-This last step is less crucial than the others, since we will be focusing
+This last installation is less crucial than the others, since we will be focusing
 primarily on Scheme and OCaml. However we, and the readings you come across,
 will sometimes mention Haskell, so it might be worth your installing this too,
 so that you have it available to play around with.
@@ -305,12 +314,36 @@ other.
 
     There is a (slow, bare-bones) version of Haskell available for online use at <http://tryhaskell.org/>.
 
-sudo apk-get install haskell-platform
+Like Scheme, Haskell has a couple of different implementations. The dominant one, and the one we recommend you install, is called [GHC](https://wiki.haskell.org/GHC), short for "Glasgow Haskell Compiler". To install this on your machine, there are a couple of different strategies. It's helpful to understand some lingo as you begin this process:
+
+*   As mentioned, **GHC** is the main Haskell engine or compiler you'll be installing. The current version is 7.8.4, from December 2014.
+*   **gcc** and **llvm/clang** and **Xcode** and **MinGW** are names for other compilers on different systems. Oftentimes these will be used during the installation process to get GHC up and running. Some of the strategies described below will help you install these if they're not already on your machine.
+*   **alex** and **happy** and **haddock** are names of various Haskell helper programs that GHC uses to get up and running.
+*   **[Cabal](https://www.haskell.org/cabal)** is a "package manager" for Haskell. It allows you to install libraries or extensions that other people have built. (Usually those are published at the [Hackage](http://hackage.haskell.org) web site.) Some of these are experimental and may not always work; others are quite fundamental and are almost de facto parts of what people expect in a Haskell system.
+*   **[Haskell Platform](https://www.haskell.org/platform)** is a standard bundle that includes a fixed version of GHC, plus fixed versions of some of the most popular libraries or extensions. This is updated once or twice a year. The current version is 2014.2.0.0, from August 2014. It includes GHC version 7.8.3.
+
+The easiest way to get up and running with Haskell/GHC is to install the Haskell Platform. Here's how to do that on Windows:
+
+*   Go to <https://www.haskell.org/platform/windows.html> and follow the instructions. It looks like this process will automatically install the MinGW compiler needed to get this build of Haskell running on Windows.
+
+On a Mac without MacPorts:
+
+*   Go to <https://www.haskell.org/platform/mac.html> and follow the instructions. This requires Mac OS X 10.6 / Snow Leopard or later; but there is a link to an earlier version of Haskell Platform, that's built for Mac OS X 10.5 / Leopard. These instructions also require that you have (parts of) Apple's Xcode tools installed. (These are mentioned above.) There are some very brief comments about different options for how to get that on the Haskell Platform page.
+
+*   [Here is more info](https://github.com/pittsburgh-haskell/haskell-installation) about installing Haskell on Macs.
+
+On a Mac with MacPorts:
+
+*   In a Terminal, type `sudo port install haskell-platform`.
+
+On Ubuntu or Debian Linux:
+
+*   In a Terminal, type `sudo apk-get install haskell-platform`.
 
-<https://github.com/pittsburgh-haskell/haskell-installation>
 
-<https://www.haskell.org/platform>
+---
 
-Getting started: <https://wiki.haskell.org/Haskell_in_5_steps>
+*   It's useful to know about the general [Haskell wiki](https://wiki.haskell.org) (not restricted to just GHC). They have a [Getting Started](https://wiki.haskell.org/Haskell_in_5_steps) page, which also recommends that you install the Haskell Platform.
 
+*   <http://new-www.haskell.org/downloads>