some refactoring, including exposition
[lambda.git] / juli8.mdwn
index 92900aa..b2689af 100644 (file)
@@ -26,15 +26,15 @@ Below, we'll give instructions on how to install Juli8 into your existing OCaml
 
         opam switch 4.02.0+improved-errors && opam install --switch=4.02.0+improved-errors delimcc && eval `opam config env`
 
-    Installing the `delimcc` library gives you Oleg's Delimited Continuation library for OCaml, which we will encourage you to play around with later in the term. It's not essential to have it, though. There are some advantages to using one of the 4.02.x versions of OCaml, though, rather than the 4.01.0 version I think most of us ended up installing. One advantage is that now you can use the special <code>#show <i>symbol</i></code> command in OCaml sessions, which works like Haskell's special <code>:info <i>symbol</i></code> inside a GHCi session. Then for example, instead of having to type:
+    Installing the `delimcc` library gives you [Oleg's Delimited Continuation library for OCaml](http://okmij.org/ftp/continuations/implementations.html), which we will encourage you to play around with later in the term. <!-- see also http://stackoverflow.com/questions/14431257 --> It's not essential to have it, though. There are some advantages to using one of the 4.02.x versions of OCaml, though, rather than the 4.01.0 version I think most of us ended up installing. One advantage is that now you can use the special <code>#show <i>symbol</i></code> command in OCaml sessions, which works like Haskell's special <code>:info <i>symbol</i></code> inside a GHCi session. Then for example, instead of having to type:
 
         module type SOMETHING = Monad.OPTION
 
-    as [[I directed you elsewhere|/topics/week9_using_the_monad_library]], you can instead just type:
+    as [[I directed you elsewhere|/topics/week9_using_the_monad_library/#index1h2]], you can instead just type:
 
         #show Monad.OPTION
 
-2. The program that starts up when you type `ocaml` is OCaml's Standard "Toplevel" Interactive Interpreter. There's an alternative interactive interpreter that you can try out, which some people like. It's called **utop** and [you can read about it here](https://github.com/diml/utop) or [here](https://opam.ocaml.org/blog/about-utop). To install it, you can just type `opam install utop`. I'm not so crazy about it myself. But I prefer to use *some* kind of helper program with OCaml's Standard Toplevel, because the Standard Toplevel itself doesn't let you scroll back through commands you typed previously, has only very rudimentary facilities for editing a line if you made a mistake and so on. One virtue of utop is that it does those things better, but there are also other ways to do them better. What I use is a wrapper program called **rlwrap**. Here are instructions for how to install that:
+2. The program that starts up when you type `ocaml` is OCaml's Standard "[[Toplevel|/topics/week8_monads_and_modules/#toplevel]]" Interactive Interpreter. There's an alternative interactive interpreter that you can try out, which some people like. It's called **utop** and [you can read about it here](https://github.com/diml/utop) or [here](https://opam.ocaml.org/blog/about-utop). To install it, you can just type `opam install utop`. I'm not so crazy about it myself. But I prefer to use *some* kind of helper program with OCaml's Standard Toplevel, because the Standard Toplevel itself doesn't let you scroll back through commands you typed previously, has only very rudimentary facilities for editing a line if you made a mistake and so on. One virtue of utop is that it does those things better, but there are also other ways to do them better. What I use is a wrapper program called **rlwrap**. Here are instructions for how to install that. (Kyle is using OCaml on Cygwin on Windows, and there it *looks* like rlwrap is already installed; on the other hand, it doesn't seem to be working. The issue might not be with rlwrap, but rather that his Terminal is not passing the appropriate keypresses through to the shell session it's hosting.)
 
     > First, I had to upgrade the version of the "GNU readline" library on my computer. My Mac with System 10.9.5 has a version of that library, but it's too old to use with recent versions of `rlwrap`. So I downloaded [the source code for GNU readline](http://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz). Double click the downloaded archive to expand it, if your browser doesn't do that automatically. Then go inside the `readline-6.3` folder in a Terminal. On a Mac, you can click on the folder in the Finder and do a Copy (or cmd-C). Then open a Terminal and type `cd` followed by a space then do a Paste (cmd-V). Then press <code><i>return</i></code>. Once you're inside the `readline-6.3` folder, type this command in the Terminal:
 
@@ -91,7 +91,7 @@ Below, we'll give instructions on how to install Juli8 into your existing OCaml
 
         #use "juli8.ml";;
 
-4. Next create a folder in your `$HOME` directory named `.juli8`. **Download the Juli8 code from [[here|/code/Juli8-v1.3.tgz]].** That link will no doubt be updated frequently in April and May 2015. The current version is: 1.3, posted 5 April 2015. Copy the contents of the `Juli8` folder that you downloaded into the `$HOME/.juli8` folder that you created. (So `$HOME/.juli8` should contain folders `haskell`, `ocaml`, and so on.)
+4. Next create a folder in your `$HOME` directory named `.juli8`. **Download the Juli8 code from [[here|/code/Juli8-v1.6.tgz]].** That link will no doubt be updated frequently in April and May 2015. The current version is: 1.6, posted 13 April 2015. Copy the contents of the `Juli8` folder that you downloaded into the `$HOME/.juli8` folder that you created. (So `$HOME/.juli8` should contain folders `haskell`, `ocaml`, and so on.)
 
     Now whenever you start up OCaml, the Juli8 OCaml libraries (including their monad components, which we'll be making extensive use of) will automatically be loaded. <!-- If later you want to load Oleg's Delimcc library, type `#load "delimcc.cma";;` then use the `Delimcc` module. -->
 
@@ -292,6 +292,8 @@ If everything works, then when you start up GHCi, you should see a prompt like t
 
 Note that the GHCi command line already by default accepts the special keycommands described under item 2 in the Setting up OCaml section above. Additionally, if you type just the start of a command and then press `Tab`, GHCi will attempt to figure out what you started to type and finish the word for you.
 
+<!-- One difference is that in GHCi, you clear an `^R` search with `^C` rather than `^G`. -->
+
 
 ## What do I get from Juli8 for Haskell? ##