Earlier quoted context omitted.
I haven't really gotten into much ML yet, and I'm curious to hear what people knowledgeable with OCaml think about http://facebook.github.io/reason/ The name makes it impossible to research to find any blog posts or anything, but the familiar syntax alone might make it at least a first step for me.
Speaking for myself, I think Reason is a very good thing and rewriting this in Reason or adding a Reason layer is a goal/TODO.
Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
11–20 of 31 posts
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#12Earlier quoted context omitted.
Speaking for myself, I think Reason is a very good thing and rewriting this in Reason or adding a Reason layer is a goal/TODO.
That's awesome and great work. I know it's dumb that the thing holding me back from OCaml is the syntax, but after giving up on an Om project I've come to accept js will always be the greatest common denominator.
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#13Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#14Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#15In the same vein, there are also some F# to JS compiler projects such as Funscript ( http://funscript.info/ ) and Fable ( https://github.com/fsprojects/Fable ). F# is an open-source Ocaml inspired language for .net.
Though you can use just the compiler inside a regular ASP.NET MVC project, if you so choose.
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#16Earlier quoted context omitted.
Differences from js_of_ocaml (not an easy find) Js_of_ocaml takes lowlevel bytecode from OCaml compiler, BuckleScript takes the highlevel rawlambda representation from OCaml compiler Js_of_ocaml focuses more on existing OCaml eco-system(opam) while BuckleScript's major goal is to target npm Js_of_ocaml and BuckleScript have slightly different runtime encoding in several places, for example, BuckleScript encodes OCaml…
I haven't really gotten into much ML yet, and I'm curious to hear what people knowledgeable with OCaml think about http://facebook.github.io/reason/ The name makes it impossible to research to find any blog posts or anything, but the familiar syntax alone might make it at least a first step for me.
[0]: https://xivilization.net/~marek/blog/2016/05/19/reason-lets-...
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#17Why?
Also, allowing side-effects while still providing the mentioned type system makes it potentially much easier to integrate with existing JS code.
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#18Why?
A sane, powerful type system is actually enough of a rationale and a selling point, at least for me. Also, allowing side-effects while still providing the mentioned type system makes it potentially much easier to integrate with existing JS code.
Haskell is lazy, which means using GHCJS to compile it to JS produces code full of explicit thunks (think of promises). Both Elm and PureScript are compile-to-JS-languages that inherit a lot from Haskell, but not it's laziness.
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#19For those interested in this, https://github.com/bloomberg/bucklescript is an alternate (albeit new) OCaml to JS compiler. There's already talk about supporting JSX syntax: https://github.com/bloomberg/bucklescript/issues/162
Reason doesn't yet work with Edgar(OP)'s React bindings yet, but it could easily (and therefore JSX would work as well).
Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples
#20Earlier quoted context omitted.
Speaking for myself, I think Reason is a very good thing and rewriting this in Reason or adding a Reason layer is a goal/TODO.
That's awesome and great work. I know it's dumb that the thing holding me back from OCaml is the syntax, but after giving up on an Om project I've come to accept js will always be the greatest common denominator.