[ANN] Sketch.sh now supports multiple compiler versions, starting with 4.13.1

The interactive OCaml sketchbook sketch.sh has now support to store, edit and run sketches in different versions of the OCaml compiler.

Support for 4.13

Storing and running sketches using the compiler version 4.13.1 is now possible, this functionality has been added to the already existing support for version 4.06.1. The Reason parser and formatting tool refmt were also updated to a more recent version that supports 4.13.1.

Here you can see a sketch showcasing the monadic let syntax, using the example from the official OCaml docs: ZipSeq - Sketch.sh.

Existing sketches and forks

Previously existing sketches remain in 4.06.1, while newly created sketches will be on 4.13.1. For now, the only way to “migrate” a sketch to the 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 forked sketch.

Future plans

In the future, there are plans to support version 4.14.0 of the compiler, and we are considering adding a way so that the version of the compiler can be chosen for a given sketch. We are also working on migrating the editor UI codebase to a more recent version of ReasonReact, and use JSX3 instead of JSX2.

Feature requests and bugs

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 DM or any other means if you would like to contribute or participate in the project in some way.


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.

15 Likes