[Teaching] Asking teachers: what support would you want to distribute OCaml to students ?

Louis Gesbert louis.gesbert at ocamlpro.com
Wed Nov 26 07:23:55 GMT 2014


Getting a working and convenient installation of OCaml and related tools has been made easier in the past few years, but we're not quite there yet to make it a breeze to have it set up in a classroom. As the main maintainer of OPAM, and wanting to improve on this, I would be glad to know more about the actual expectations of teachers -- and the grudges they may have with the current situation.

1/ What systems does it need to work in ? Does that include Windows ? (and Cygwin ?)

Eg. what OS, and within controlled or heterogeneous installations ? We may be lacking easy way to install OCaml + tools easily on some platforms, but the issue is a bit different if we require a more strictly consistent installation across machines.

What works well currently is system packages for homebrew on OSX and various Linux distributions [1], and the all-in-one Windows packages for core OCaml [2][3]. OPAM is still lacking on Windows, and it's unlikely that we can quickly manage to have a large portion of the OPAM packages working natively soon [4]. There is always the Cygwin possibility, also.

2/ What form should the distribution be in ?

Restricting to OSX and major, not too outdated Linux distributions, getting OPAM and installing a selected set of packages on a given OCaml version should be fairly straightforward. Situation is not as bright if we want to extend on that.

We are on two parallel tracks to improve on that:
* provide better packaging (or installers) as consistently as possible on as many platforms as possible; handle external package dependencies in OPAM (non-ocaml libraries that need to be installed on the system, e.g. GTK headers for installing OPAM packages using Lablgtk)
* provide an all-in-one boxed environment containing a consistent installation of OPAM and tools in a dedicated universe

The first track is long-standing and long-term ; the second has seen two "opam-in-a-box" [5] prototypes, based resp. on Docker [6] and Vagrant [7], but they aren't yet fully satisfactory. That leaves three main options for set-up:
* system-specific packages (or bundles thereof plus some automated configuration)
* ready to use (Linux) VM images
* VM-based solution using some helper technology (Docker, Vagrant, ...)

3/ opam-in-a-box

Opam-in-a-box started as a tool to generate boxed versions of OCaml + OPAM + tools + documentation for easy deployment. I intend to improve on it but would like to make sure to do that in the right direction.

First and foremost, should it be a ready-to-use package or VM image, or rather a tool that will generate one from a set of base OPAM packages and some configuration options ? What medium should it be based on ?

Vagrant or docker make the work of bundling and configuring VMs much easier, but they'll need to be installed themselves on the host machine before we can start installing the opam-in-a-box distributed image, which seems like a major downside. Besides, Docker is Linux only, which would be a show-stopper, except that they now provide Windows and OSX installers bundled with a minimal Linux VM [8]. If their installer is customisable enough, we could imagine basing the installation on that. This starts to be many layers though, and not sure how well it can coexist with an existing Virtualbox installation.

4/ interface and documentation

Pre-configured installations of vim and emacs should be part of this. It gets more delicate to include graphical tools if we're using a VM ; but web tools (tryocaml [9], iOCamlJS [10]...) may be served from the VM.

On documentation, the new opam-doc should be ready soon ; we can let students rely on the www instance, or include a static version of documentation pages related to the included OPAM packages. Including the opam-doc tool itself seems too heavy since it relies on a patched OCaml compiler.

There doesn't seem to be an obvious ideal solution yet, so I'd be glad to know your needs more precisely to find the best compromise.

Louis Gesbert - OCamlPro

[1] https://opam.ocaml.org/doc/Install.html
[2] https://protz.github.io/ocaml-installer/
[3] http://typerex.ocamlpro.com/ocpwin.html
[4] https://github.com/ocaml/opam/issues/246
[5] https://github.com/ocaml/opam/issues/1035
[6] https://github.com/avsm/docker-opam
[7] https://github.com/AltGr/vagrant-opam
[8] https://docs.docker.com/installation/windows/
[9] http://try.ocamlpro.com/
[10] http://andrewray.github.io/iocamljs/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/teaching/attachments/20141126/6e0dcb1b/attachment.html>

More information about the Teaching mailing list