I am one of the authors of BuckleScript, you can try BuckleScript in the browser: http://bloomberg.github.io/bucklescript/js-demo/ Click Examples see how the JS code generated, questions are welcome!
From a practical standpoint, what's the difference between js_of_ocaml?
Announcing BuckleScript 1.0
21–30 of 78 posts
Re: Announcing BuckleScript 1.0
#22I'm very optimistic about the future of these two projects. Both are working hard to build a soundly-typed platform on top of the JS ecosystem. While there are tons of existing languages that can be compiled to JS, the most successful ones are those (like Typescript) that embrace the npm ecosystem and the huge community investment it represents.
Both Bucklescript and Reason have a huge focus on seamless JS interop and DX, and stand a good chance of bringing soundly-typed functional programming to a much wider audience!
Re: Announcing BuckleScript 1.0
#23Earlier quoted context omitted.
Reason describes itself as "a meta language toolchain to build systems rapidly", which seems a little vague to me. Am I understanding correctly that Reason is both a (kind of) alternative compiler for OCaml's build toolchain, and a dialect of OCaml in its own right? To tie this back to Bucklescript, does this loosely describe the process of using Reason syntax to author Javascript? Reason file -> (Reason) -> OCaml ex…
If you'll forgive the shameless plug, I talked a bit about ReasonML here, hopefully it helps clear things up https://youtu.be/QWfHrbSqnB0?t=29m34s Basically, just a new syntax and a blessed-stack approach that really, really emphasizes developer experience. Which is to say, ReasonML is merely a cosmetic and DX change, it remains compatible and is not a fork of OCaml at all.
Re: Announcing BuckleScript 1.0
#24Earlier quoted context omitted.
Reason describes itself as "a meta language toolchain to build systems rapidly", which seems a little vague to me. Am I understanding correctly that Reason is both a (kind of) alternative compiler for OCaml's build toolchain, and a dialect of OCaml in its own right? To tie this back to Bucklescript, does this loosely describe the process of using Reason syntax to author Javascript? Reason file -> (Reason) -> OCaml ex…
Think Elixir for Erlang. Currently it's a syntax on top of OCaml. But we'd like to polish the OCaml ecosystem tooling too; we're calling the umbrella project "Reason".
Elixir is pretty mature nowadays. Reason still have a long way to go. Hope that will happen.
Re: Announcing BuckleScript 1.0
#25I'm surprised by this one:
https://bloomberg.github.io/bucklescript/js-demo/#Curry_Opti...
Why doesn't it actually curry? Impressive output, don't get me wrong. But given how native and idiomatic currying is in Javascript, and how much trouble I'd expect this to have taken to implement... is there a specific reason for this? Just curious.
Anyway, again: very impressive. Thanks.
EDIT clarification: I expected:
function f(param) {
return curry(32, param);
}
(or is this to highlight the difference between currying and partial function application?)Re: Announcing BuckleScript 1.0
#26Very cool! I'm surprised by this one: https://bloomberg.github.io/bucklescript/js-demo/#Curry_Opti... Why doesn't it actually curry? Impressive output, don't get me wrong. But given how native and idiomatic currying is in Javascript, and how much trouble I'd expect this to have taken to implement... is there a specific reason for this? Just curious. Anyway, again: very impressive. Thanks. EDIT clarification: I expect…
let test_curry x y = x + y + x
You get the expected output function f(param) {
return test_curry(32, param);
}Re: Announcing BuckleScript 1.0
#27Earlier quoted context omitted.
Reason describes itself as "a meta language toolchain to build systems rapidly", which seems a little vague to me. Am I understanding correctly that Reason is both a (kind of) alternative compiler for OCaml's build toolchain, and a dialect of OCaml in its own right? To tie this back to Bucklescript, does this loosely describe the process of using Reason syntax to author Javascript? Reason file -> (Reason) -> OCaml ex…
Think Elixir for Erlang. Currently it's a syntax on top of OCaml. But we'd like to polish the OCaml ecosystem tooling too; we're calling the umbrella project "Reason".
Does this just mean it compiles to OCaml?
Re: Announcing BuckleScript 1.0
#28Very cool! I'm surprised by this one: https://bloomberg.github.io/bucklescript/js-demo/#Curry_Opti... Why doesn't it actually curry? Impressive output, don't get me wrong. But given how native and idiomatic currying is in Javascript, and how much trouble I'd expect this to have taken to implement... is there a specific reason for this? Just curious. Anyway, again: very impressive. Thanks. EDIT clarification: I expect…
Re: Announcing BuckleScript 1.0
#29I was wondering about the practical differences between BuckleScript and js_of_ocaml. Found this brief explanation in the docs[0]: > Js_of_ocaml takes lowlevel bytecode from OCaml compiler, BuckleScript takes the highlevel rawlambda representation from OCaml compiler I presume that means different (higher-level) optimisations are available in BuckleScript? > Js_of_ocaml focuses more on existing OCaml eco-system(opam)…
Re: Announcing BuckleScript 1.0
#30I am one of the authors of BuckleScript, you can try BuckleScript in the browser: http://bloomberg.github.io/bucklescript/js-demo/ Click Examples see how the JS code generated, questions are welcome!
I just wanted to say thanks to the authors of Bucklescript. Not sure if I'll ever get to use it in a production system, but definitely awesome tech. I played with it a little bit and I think an OCaml React app might actually compile faster than the same thing written in ES6 and compiled/built through the normal babel+webpack toolchain.