Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by LeonidasXIV on Sunday December 20, 2015 @05:20PM
(#10768519)
I don't get your criticism, what is the problem?
I think naming it this way makes a lot of sense, since OCaml has a lot of <target-type>_of_<source-type> functions, so it is a pretty clever nod to OCamls conventions.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by Scarbutt on Sunday December 20, 2015 @05:27PM
(#10768548)
Oh didn't know that, thanks for clarifying, received my ocaml book last week but haven't started.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by mahsu on Sunday December 20, 2015 @07:09PM
(#10768873)
jsoo certainly takes some getting used to, especially when it comes to actually having to care about the return types of things. Online documentation is painfully sparse and the ocaml type checker was vague at times, so there was quite a bit of trial and error. It does help that all the library bindings are parallel to their javascript counterparts.
Pattern matching with Ocaml is definitely a plus :P, but I definitely felt that working with Ocaml was substantially more challenging. Especially since none of us had prior experience in game development, much less functional game development, the code we produced was riddled with mutability. It would've helped to look at established design patterns first.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by djur on Sunday December 20, 2015 @10:07PM
(#10769354)
I personally found the jsoo documentation almost unusable (same with Ocsigen). OCaml still has a pretty serious shortage of up-to-date, descriptive documentation, especially outside the Jane Street Core bubble.
I'm really excited to see this project because it's the first jsoo program I've seen with a logical structure and a considerable amount of logic implemented in OCaml that ties into JS.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by VeejayRampay on Sunday December 20, 2015 @05:24PM
(#10768536)
js_of_ocaml is very Ocaml-idiomatic.
Re:MariOCaml: HTML5 Mario, written exclusively in OCaml
by GreaterFool on Sunday December 20, 2015 @06:27PM
(#10768762)
It is sometimes referred to as `jsoo` which confused me the first time I saw it without context ;)
Anyway, would be nice to hear the author experience using js_of_caml.
EDIT: Is the canvas api the future of web apps? I mean if someone can write such an interactive web app with no 'javascript library of the month' makes you think of all these JS libs doing the same thing over and over, or is Ocaml such a nice language that makes working with the browser much nicer?