Hello everyone, over the past few months, I’ve been working on a little project called
Sketch.sh. It’s a interactive notebook style (like IPython and Jupyter).
It uses Js_of_ocaml’s toplevel to evaluate the code completely in browsers. You can save/share the sketch with a url as well.
I created this with the hope to lower the bar for learning OCaml/ReasonML in general. There are a lot of sketch made by people who is learning the language already!
The project is
open source on Github so check it out.
Hi this looks like an awesome tool. Thanks for creating it!
I just wanted to play around with it a bit and ran into something that’s not clear to me. I was expecting that switching from Reason to OCaml syntax would actually change the code. But it doesn’t do that?
So when you switch the example, the you get new syntax errors?
Thank you for playing with it.
Converting between Reason <–> OCaml syntax is being worked on. You can track it here: https://github.com/Sketch-sh/sketch-sh/issues/137
In the meantime, clicking on that button only change Toploop parser and outcome printer. Because the code is being executed after changing syntax, so you’ll see a syntax error at the moment.
It is a very cool project. What libraries are installed? It would hope for the ability to at least optionally add libraries like core_kernel or base or batteries.
How about the everything?
I’m currently working on the integration and prebuild a large set of handpicked libraries. but once the issue was resolved, I can support the whole opam registry (well, only what jsoo can compile)
Quick update: converting between ReasonML and OCaml has been deployed to main website. Now when changing language, the code will be converted automatically.
February 27, 2021, 10:53pm
@thangngoc89 it’s an amazing tool!
I suggest that you add a mention to your tool on awesome-ocaml on GitHub, it will help newcomers to discover it!
February 28, 2021, 1:06am
Wow awesome! Thank you for this massive effort. There goes the rest of my weekend …