Ocaml-gist 0.0.1

It’s my pleasure to announce the initial version of ocaml-gist. It’s still a bit rough, but I believe it shows great potential already: https://sanderspies.github.io/ocaml-gist/. Do note that for now it only supports OCaml 4.04.2.

ocaml-gist allows you to execute OCaml code on any webpage with no server needed. It also provides autocomplete and type info hover with the help of a modified version of Merlin that runs on the web.

I wrote an article that describes the technology used by ocaml-gist in more detail: https://sanderspies.github.io/ocaml-gist/blog.html.

As always, feedback is very welcome.


Slight bump with releasing though, ocaml-gist still needs to arrive on OPAM.

1 Like

What would it take to make it support 4.06.0?

The challenge is ensuring that the copied and modified Merlin code that ocaml-webworker has supports 4.06. I’ll make some time this week to try to support newer OCaml versions. At some point though I would like to depend upon Merlin directly to make maintenance easier.

1 Like

Looks really cool. It would be great to have this working with js_of_ocaml as well, since that would open up a wider set of possible OCaml libraries. We would need that I believe to use this within Real World OCaml, I believe, at least for some chapters.


Neat! This looks like a more sophisticated Klipse. The autocompletion is really cool.

There seems to be a bug on the completion though, if I type Li and press enter on List it will become LList. pri -> print_endline also becomes pprint_endline.

1 Like

One thing that would be very useful, notably in the context of the ocaml wiki but also for documentations and blog posts, would be the ability to switch between reason and ocaml syntax easily, by pressing a button.