Learn-OCaml 1.0 approaching -- call for testers

Hello all,

It has been long maturing, but Learn-OCaml 1.0 is about to be released.

Learn-OCaml is a web platform for exercises in OCaml programming, with automated grading, originally developped for the OCaml MOOC. The interface features a code editor and client-side evaluation and grading ; it can be served statically, but if running the bundled server there are also server-side saves, facilities for teachers to follow the progress of students, give assignments, get grades, etc.

What’s new

This first major release, along with a lot of quality-of-life improvements, features a significant rewrite of the evaluation engine. The main visible consequences are:

  • a nice speedup to the grading of exercises in the browser
  • a huge (x100) speedup to the pre-processing of the exercises (when running learn-ocaml build)
  • exercise solutions can no longer leak (the server only provides the already compiled jsoo version to the client), making the platform more suitable for evaluations
  • error messages when compiling exercises are much, much better

A few other most-wanted features have also been added, like a reworked exercise choice page, and the ability to update a running instance with minimal downtime (learn-ocaml build serve --replace)

Future versions

Another most-wanted feature is a proper login system (with choice between email/password or a Moodle server) ; we expect it to land shortly in 1.1, once we work on the remaining rough edges of our already working prototype.

Porting to more recent versions of OCaml is also planned.

Testers required!

As this version features large internal changes, we would be very grateful to teachers who agreeing to try it out and report any regressions before publication (expected by the end of the year).

There are two recommended ways to test the upcoming version:

  • From source: follow the online instructions, or use the following for creating a temporary installation in a local opam switch that you can easily remove afterwards:

    opam update
    opam source learn-ocaml --dev --dir=learn-ocaml-beta && \
      cd learn-ocaml-beta && \
      opam switch create . --locked && \
      export OPAMSWITCH=$PWD && \
      eval $(opam env)
    learn-ocaml build serve --repo=REPOSITORY
  • Using a pre-built Docker image (with REPOSITORY an absolute path, to e.g. a local clone of the corpus — see below)

    docker run --rm \
      -v REPOSITORY:/repository:ro \
      -v learn-ocaml-beta-sync:/sync \
      -p 80:8080 \
      --name learn-ocaml-beta \

Please report in Github, or contact us directly for feedback.

Development static builds are also available at Learn-ocaml latest development artifacts ; tests on the standalone client and server would be helpful (the main binary requires a host OCaml installation with the appropriate learn-ocaml libraries in order to compile the exercises, so the stand-alone version is unlikely to be of use)

The Learn-ocaml Corpus

I’d also like to take the opportunity to point out the new contributions to the public exercise corpus by Simão Melo de Sousa and Hugo Férée, which complete the existing exercises from the OCaml MOOC and the more advanced ones from François Pottier, as well as the curation work by Mohamed Hernouf and Dario Pinto.

You can test the corpus with

git clone https://github.com/ocaml-sf/learn-ocaml-corpus
learn-ocaml build serve --repo=./learn-ocaml-corpus

A live version is also available.

— Louis Gesbert (OCamlPro), on behalf of the Learn-OCaml team

With thanks to the OCaml Foundation for funding the major part of this work.


See also: Learn-OCaml 1.0 is out!

1 Like