5 ms·
OCaml/js_of_ocaml is presently my favourite AltJS stack. OCaml syntax is super idiosyncratic and doesn't resemble anything, but, once you retrain your eyes, th
by implicit 11y ago
OCaml/js_of_ocaml is presently my favourite AltJS stack.
OCaml syntax is super idiosyncratic and doesn't resemble anything, but, once you retrain your eyes, the underlying semantics are terrific.
js_of_ocaml imposes very minimal code overhead (6k-ish). Sourcemaps work great, and OCaml values are mapped into JS in a very straightforward way. You can read them in a JS debugger.
Ocsigen's lwt library is also the best "callback hell" solution I've found.
- jordwalke 11y agojs_of_ocaml is very well supported as well - in my personal experience.
- lindig 11y agoCould you recommend a project to look at? I'm familiar with OCaml but found Ocsigen as a whole impenetrable and would be interested in something more library than framework.
- implicit 11y agoI don't, unfortunately, nor do I have any source code I can share. :( The only advice I can offer is that the documentation actually is correct and pretty complete, but there's nevertheless something about its organization that makes it difficult to find what you're after. In particular, start by reading this page carefully: http://ocsigen.org/js_of_ocaml/2.5/manual/library http://ocsigen.org/js_of_ocaml/2.5/manual/library It explains everything at a high level.
- mercurial 11y agoYou have opium [1], which is considerably lighter and more traditional (no Eliom stuff). 1: https://github.com/rgrinberg/opium https://github.com/rgrinberg/opium
- rgrinberg 11y agoI think the GP wanted something with js_of_ocaml. Nevertheless, as the author of Opium, I am grateful for your recommendation :)
- eatonphil 11y agoJust reposting from below, but if you want lightweight, take a look at OWebl[0]. It is by far the smallest with no Core dependencies. The API is familiar if you write Python or Ruby. Documentation is continually published and it remains one of the most up to date alternatives to Ocsigen. [0] http://meetowebl.com http://meetowebl.com