[Teaching] Getting OCaml set up on a mac

Yaron Minsky yminsky at janestreet.com
Fri Jan 23 01:42:38 GMT 2015


On Thu, Jan 22, 2015 at 8:25 PM, Louis Gesbert
<louis.gesbert at ocamlpro.com> wrote:
> Thanks for the feedback. It's probably still a bit rough at the moment but the config-updating engine is there, and polishing configuration itself from there should be straight-forward (and never-ending).

Indeed.  Now I think is the time to really focus on getting it
working, because this is the beginning of the semester, and so now is
the most valuable time to have something working cleanly.

It would be good to know what we have there now.  It seems like a
minimum should be:

- tuareg
- merlin
- ocp-indent
- utop

all read to go in emacs.  Getting vim and sublime text support would
be lovely too, but I think less critical.  What does user-setup
already support?

> The idea, with this and the "depext" package is to have a setup that can be limited to:
>
>     PACKAGES="user-setup merlin utop cohttp js_of_ocaml oasis ocp-indent ocp-index ssl core_extended async js_of_ocaml core_bench cohttp cryptokit menhir"
>     opam init -a
>     opam install depext
>     opam depext $PACKAGES
>     opam install $PACKAGES
>
> and results in a ready-to-go environment. This is in particular targetted at VM setup, of course.

Interesting. Concretely, what would would depext do in this context?
I did a fresh install of a number of packages on my mac, and I didn't
need much else, but I may have already had the dependencies in place
via brew.

y

>> - Yaron Minsky, 22/01/2015 10:56 -
>> It installed cleanly for me, but it doesn't quite work.  I installed
>> user-setup, merlin, ocp-indent, tuareg, utop, core and async.  It all
>> went through, but when I open a .ml file, it shows up in lisp mode,
>> not tuareg.
>
> Seems it doesn't handle the opam-installed tuareg package well at the moment, should be fixed in a moment.
>
>> On Thu, Jan 22, 2015 at 10:54 AM, Greg Morrisett <greg at eecs.harvard.edu> wrote:
>> > Okay, I just followed these steps:
>> >>
>> >>   opam update
>> >>   opam install user-setup
>> >
>> > and it seems to be hanging.  Is there a log file or
>> > other config information that I can send you to help
>> > figure this out?
>
> Thanks. I just managed to reproduce on OPAM 1.1 and hope to fix it quickly.

Greg, it's also probably a good idea to encourage your students to
upgrade to the latest opam if they're on a mac.  Homebrew is pretty
lightweight, and has opam 1.2.0.

y


More information about the Teaching mailing list