[ANN] Sketch.sh now supports OCaml 5.3.0

The interactive OCaml sketchbook sketch.sh has added support for OCaml 5.3.0.

Support for 5.3.0

Storing and running sketches using the compiler version 5.3.0 is now possible, this functionality has been added to the already existing support for versions 4.06.1 and 4.13.1. This new version brings support for OCaml 5’s effect handlers and multicore capabilities. Since sketch.sh runs in the browser using JavaScript via js_of_ocaml, the multicore capabilities are simulated using continuation-passing style.

Here you can see a sketch showcasing effects: Effects Example - Sketch.sh.

While support for intermediate versions is technically possible, it will require adding a mechanism to support choosing the version of the compiler for the current sketch (see issue #375).

Existing sketches and forks

Previously existing sketches remain in their original compiler version, while newly created sketches will be on 5.3.0 by default. For now, the only way to “migrate” a sketch to a newer version of the compiler is by copying its content and pasting it in a new sketch.

Forked sketches inherit the compiler version of the upstream sketch.

Reporting features and issues

Please let us know in case you have a feature request, or if you encounter any issues or bugs. Also, don’t hesitate to reach out via Reason Discord or Discuss DMs if you would like to contribute or participate in the project in some way. There are a lot of opportunities to do so, both on the frontend and backend sides.


Thanks to Ahrefs for supporting an Open Source Day initiative, which allowed to allocate time to work on this improvement for sketch.sh, and for providing the infrastructure to run the sketch.sh service for the community. Thanks as well to the authors and maintainers of the OCaml compiler, js_of_ocaml, and ReScript, that sketch.sh relies upon.

13 Likes