3 ms·
I made those notebooks that can execute OCaml locally in-browser: https://louisabraham.github.io/domical/ https://louisabraham.github.io/domical/ What do you t
by Labo333 8y ago
I made those notebooks that can execute OCaml locally in-browser: https://louisabraham.github.io/domical/ https://louisabraham.github.io/domical/
What do you think?
- thangngoc89 8y agoOh hey. I think we should collaborate somehow. I'm building https://sketch.sh/ml https://sketch.sh/ml which does the same thing (execute OCaml locally in-browser)
- nikhilsimha 8y agoThis is the most constructive comment thread on HN in a long time!
- Labo333 8y agoI discovered Sketch on the OCaml forum just after I finished the alpha version of domical. I'll publish domical after some issues coming from iodide are corrected. Sketch is really awesome, and serves different purposes. Domical is just an interpreter for the iodide notebooks, which are designed to be portable and execute all kind of languages: js, python (those crazy folks compiled the full interpreter and f numpy in WASM) and now OCaml. I can see that sketch has really a lot more features. A key feature of iodide is its simplicity and portability: the whole notebook is written in a readable format looking like markdown and called jsmd. Take a look at the source code of the page to better understand. So definitely we have a lot to share on our respective projects, even if I am not one of the main contributors of iodide (I just did the OCaml part). If you want to continue this discussion, my email is on my homepage :)
- xfer 8y ago> Performance: better than native `ocaml` Maybe you could word it as native `ocaml` interpreter instead? Ocaml can compile to machine code.
- igouy 8y agohttps://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/ocaml.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... "The OCaml native-code compiler, version 4.07.0"
- xfer 8y agoAnd? what does that have to do with javascript?
- Labo333 8y agoOf course, I put the "`" to indicate the interpreter command. The compiler is called with `ocamlc`. The online version is basically a top-level exucuted by the js engine of your browser, and it is more performant than its equivalent executed natively.
- smortaz 8y agoVery nice. There's also this (copy/pasting): If you want to try F# w/o any installation, try it in Jupyter on Azure Notebooks: https://notebooks.azure.com/Microsoft/libraries/samples/html/FSharp%20for%20Azure%20Notebooks.ipynb https://notebooks.azure.com/Microsoft/libraries/samples/html... Browse w/o loggin in, or if you want to edit/run/..., sign in, click Clone, then play around. It's all free. Cheers.
- emmelaich 8y agoLovely. I hit the link to run the "world's hardest sudoku" and wondered why it wasn't doing anything. It had -- in 2.5s :-)
- Labo333 8y agoI don't know what browser you are using but in my experience, Firefox is faster than Chrome :) For the performance we really have to thank the folks of js_of_ocaml!