Live data from Hacker News

Announcing BuckleScript 1.0

bloomberg.github.io

41–50 of 78 posts

Re: Announcing BuckleScript 1.0

#41

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've been meaning to get into ClojureScript. Can you elaborate on why it leaves a bad taste in your mouth?

Re: Announcing BuckleScript 1.0

#42
post #8

I'm on the Facebook Reason team, and we're using BuckleScript to compile OCaml into the best compiler output I've ever seen. People didn't recognize that my React components were generated, not hand-written. BuckleScript's author (hongbo_zhang here) has been incredibly responsive and welcoming. We'll be publishing the React.js binding on HN in a few days. Stay tuned! We (including Hongbo) are all sitting in irc #reas…

> We'll be publishing the React.js binding on HN in a few days.

Sounds great. Will this be announced on any email list I could subscribe to? Thanks!

Re: Announcing BuckleScript 1.0

#44

It looks like tail call optimization only works in simple situations. let rec foo i = if i It would be nice to get a warning when tail calls cannot be optimized.

yes, we will have this warning when upgraded into OCaml 4.04 Note that optimizing mutual recursive call is a very hard problem it needs VM level support

Re: Announcing BuckleScript 1.0

#45

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!

Thanks for this! Really awesome stuff!

One question here: how tight the compiler is binded to OCaml semantics? Besides Reason, do you think it's possible to build a frontend for other languages and integrate the backend of BuckleScript to generate beautiful JS as well? Or in other words, what property do you think a language should have so we can generate this level of beautiful JS outputs?

BTW: Please understand I'm not objecting OCaml, I do believe OCaml is an awesome language, but my point is: if possible, we should make this beautiful backend for generating human-readable JS more accessible than restricting it to OCaml only, shouldn't we :)

Re: Announcing BuckleScript 1.0

#46
post #8

I'm on the Facebook Reason team, and we're using BuckleScript to compile OCaml into the best compiler output I've ever seen. People didn't recognize that my React components were generated, not hand-written. BuckleScript's author (hongbo_zhang here) has been incredibly responsive and welcoming. We'll be publishing the React.js binding on HN in a few days. Stay tuned! We (including Hongbo) are all sitting in irc #reas…

> We'll be publishing the React.js binding on HN in a few days. Sounds great. Will this be announced on any email list I could subscribe to? Thanks!

No email list for now. We'll be active in the chat rooms and HN though.

Re: Announcing BuckleScript 1.0

#47

It looks like tail call optimization only works in simple situations. let rec foo i = if i It would be nice to get a warning when tail calls cannot be optimized.

yes, we will have this warning when upgraded into OCaml 4.04 Note that optimizing mutual recursive call is a very hard problem it needs VM level support

Mutual tail call optimization requires VM level support in general but can be accomplished within a compiliation unit (module) via inlining.

Re: Announcing BuckleScript 1.0

#48

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've been meaning to get into ClojureScript. Can you elaborate on why it leaves a bad taste in your mouth?

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 entire system more complex than it needed to be (was there any reason we needed to have a closure dependancy?).

Don't get me wrong, Clojure isn't an objectively bad language, it's just a language I personally dislike. If you have similar tastes to me, you may not like it either. OTOH, You may thibk it's The Best Thing Since Sliced Bread (TM). That's fine, I just won't agree.

Re: Announcing BuckleScript 1.0

#49

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…

Took more than 10 seconds to find this link:

http://wiki.call-cc.org/eggref/4/spock

Re: Announcing BuckleScript 1.0

#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?
Post reply on HN