Live data from Hacker News

Announcing BuckleScript 1.0

bloomberg.github.io

61–70 of 78 posts

Re: Announcing BuckleScript 1.0

#61

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?

People gave you the part in favor of bucklescript, so I'll give you the other side of the story:

bucklescript doesn't respect the OCaml memory model and runtime semantics, which makes it incompatible with some part of the ecosystem.

Js_of_ocaml already has various features that bucklescript doesn't have: dynlink, support for concurrency libraries such as lwt and async, etc. It's also much more stable and battle-tested.

Re: Announcing BuckleScript 1.0

#62
post #50

This is one of the few JS compiled languages that interest me: Some of these languages add a very thin syntactic layer on Javascript and maybe a type system. If I wanted Javascript, I'd use Javascript, and if I wanted types, I'd use Flow, not a new programming language that's kinda-sorta-not-really JS. That leaves this, Clojurescript, and SPOCK as the only really interesting projects. They all have runtimes that are…

I bet you heard about Elm and purescript?

Forgot about those. Yeah, they're on the list. Elm seems to be the most practical of the lot, and also one of the nicest to program in.

Re: Announcing BuckleScript 1.0

#63
post #51

Earlier quoted context omitted.

Well, first off, I don't really like Java or the JVM. That in itself is a pretty strong reason to not get into Clojure. Secondly, I don't really like Clojure as a language: It's strongly opinionated, and made some unorthodox (for a lisp) design choices which I dislike. Finally, Clojurescript is really heavyweight, dragging along not only its own runtime, but also the google closure library and compiler, making the en…

Not an expert, but having dabbled in cljs, I think this misrepresents it. The closure dependency makes things arguably heavier at dev time, but at compile time it allows for a lot of dead code elimination and other optimization that makes the actual output much more light weight. It doesn't slow down development, but allows for a much better product to be deployed.

Fair enough. However, as I've mentioned, there are other reasons I dislike clojure.

Re: Announcing BuckleScript 1.0

#65
post #50

Earlier quoted context omitted.

I bet you heard about Elm and purescript?

Forgot about those. Yeah, they're on the list. Elm seems to be the most practical of the lot, and also one of the nicest to program in.

I've been using Elm for the last 2 weeks on a project and I love it. I still get slapped around all the time by the compiler, but at least I know my program won't have any run-time exceptions.

Re: Announcing BuckleScript 1.0

#66
post #65

Earlier quoted context omitted.

Forgot about those. Yeah, they're on the list. Elm seems to be the most practical of the lot, and also one of the nicest to program in.

I've been using Elm for the last 2 weeks on a project and I love it. I still get slapped around all the time by the compiler, but at least I know my program won't have any run-time exceptions.

If you like Elm, you will like Buckle too! we have a much faster compiler, and you can compile it into native code as a bonus : )

Re: Announcing BuckleScript 1.0

#67
post #61

Earlier quoted context omitted.

From a practical standpoint, what's the difference between js_of_ocaml?

People gave you the part in favor of bucklescript, so I'll give you the other side of the story: bucklescript doesn't respect the OCaml memory model and runtime semantics, which makes it incompatible with some part of the ecosystem. Js_of_ocaml already has various features that bucklescript doesn't have: dynlink, support for concurrency libraries such as lwt and async, etc. It's also much more stable and battle-teste…

to be precise, Js_of_ocaml does not respect OCaml memory model either, think about float. But I think Js_of_ocaml is really great, BuckleScript and Js_of_ocaml have different use cases.

Re: Announcing BuckleScript 1.0

#68
post #59

Earlier quoted context omitted.

as long as it is vanilla OCaml (no c stubs), it should be fine

Uh, given that you don't respect ocaml's memory model and force -safe-string, that's just not true. Any Obj.magic that is correct in OCaml is probably not going to be correct in bucklescript. Did you actually tried to compile core ?

`-safe-string` is the future. Any compiler can not guarantee its correctness if you write crazy code , `Obj.magic` here. I am not interested in core personally, but I don't see any reason why it will not work if it is vanilla OCaml

Re: Announcing BuckleScript 1.0

#69

This is one of the few JS compiled languages that interest me: Some of these languages add a very thin syntactic layer on Javascript and maybe a type system. If I wanted Javascript, I'd use Javascript, and if I wanted types, I'd use Flow, not a new programming language that's kinda-sorta-not-really JS. That leaves this, Clojurescript, and SPOCK as the only really interesting projects. They all have runtimes that are…

redhat's ceylon looks good too: http://ceylon-lang.org/

Re: Announcing BuckleScript 1.0

#70

I've just started learning OCaml. Bucklescript as well as F* and Reason are the reasons I chose OCaml over F# https://www.fstar-lang.org/

do you have any uses in mind for F*? i went through the tutorial a while ago, and it looked very nice, but i couldn't think of anything i wanted/needed to use it for.
Post reply on HN