8 ms·
BuckleScript Is Rebranding
- rashkov 6y agoI lucked into a job writing ReasonML (soon to be ReScript) on a React codebase some time late last year, and I've got to say that so far it has been a career highlight for this engineer. Not only did it scratch my itch for functional programming, but I also got to use one of the best type systems around as well, given how this project lives on top of the OCaml compiler. That said, there were definitely some rough spots along the way, but I'm hopeful that this re-branding and unification of the infrastructure is a step in the right direction.
- donut2d 6y agoI definitely had the same positive experience with using OCaml/Reason at my job as well. There's so much power in being able to accurately represent the data model in the type system.
- rashkov 6y agoYep! This talk captures it pretty darn well: https://www.youtube.com/watch?v=Up7LcbGZFuo https://www.youtube.com/watch?v=Up7LcbGZFuo Besides that, the compiler becomes a partner in coding. - Refactoring things is no longer something I avoid, because the compiler will point out any unexpected places that interact with a given piece of code. - I can code for an hour without loading the app, and be reasonably certain that the code I'm writing will be more or less be correct. Overall, I feel like the compiler does the double-checking and second-guessing that I was always doing in the back of my head, which gives some peace of mind and frees me up to focus on the actual task.
- donut2d 6y agoYeah! I'll code for days without running the app. In OCaml, it's as you say, mostly correct when I actually get around to running it. With PHP/JS, I still have a lot of work ahead of me. With OCaml I feel like I'm thinking much more about the problem and less about the language I'm using.
- dagurp 6y agoThe lack of documentation is the main issue that I had with it.
- Taikonerd 6y agoI'm glad that this project seems to have some momentum. There was a long time when the ReasonML blog didn't update, and I was afraid the language was dead.
- cies 6y agoIt's use is widening at FB, that's what I understood.
- sikan 6y agoThis has been confusing for sure - most of the improvements for the language has been blogged at the Bucklescript website, since the Reason repo was only responsible for the syntax (and syntax has been mostly stable). So there is a ton of momentum hidden from visitors on the Reason site. Hopefully that issue solved by this rebrand - a language should have a unified website for Syntax, Compiler and Standard Lib, and Blog Updates.
- frou_dh 6y agoCan't all of this be sidestepped and just write standard (non-forked) OCaml and feed its bytecode through Js_of_ocaml https://ocsigen.org/js_of_ocaml/ https://ocsigen.org/js_of_ocaml/ ? That might not have the ultimate React integration (guess that's the answer to the question). But on the other hand probably aligns better with the instinct of many developers to reduce (albeit not eliminate) levels of unnecessary layering.
- lfischer 6y agoBuckleScript (now ReScript, I guess) can still compile standard OCaml syntax.
- donut2d 6y agojs_of_ocaml and ReScript (BuckleScript) have different goals. js_of_ocaml is optimized for working with existing OCaml libraries. ReScript is optimized for working with the JS ecosystem. That's my understanding at least as someone who has only worked in native OCaml and BuckleScript, but hasn't touched js_of_ocaml.
- wtetzner 6y agoYeah, and js_of_ocaml seems like a more reliable solution, since it uses the normal OCaml compiler and just translates the bytecode. I don't see any reason good React integration couldn't have been built on top of js_of_ocaml. The whole BuckleScript/Reason project seems like it just made the whole ecosystem messier for very little gain.
- 6y ago
- andrewl-hn 6y agoFrom an outsider perspective it's still make very little sense. I thought ReasonML is a language, an alternative to Elm, PureScript, or other FRP-focused compile-to-js languages. When I check projects on GitHub written using ReasonML it says "Reason" as a language name (why is it just Reason, and not ReasonML?). For example, Onivim: https://github.com/onivim/oni2 https://github.com/onivim/oni2 What's BuckleScript then? How is it related to Reason? If it's related why did it have such a seemingly unrelated name in a first place?
- donut2d 6y ago> What's BuckleScript then? How is it related to Reason? If it's related why did it have such a seemingly unrelated name in a first place? My understanding, is that confusion is part of why they're rebranding everything to ReScript. The language and compiler are now all ReScript. I think the reasoning for the difference in naming is likely historical. I'm not sure, but I think BuckleScript came before the Reason syntax was developed. But it's not like BuckleScript has any connection to OCaml, either. So I dunno.
- whb07 6y agoBucklescript is the ocaml -> JS compiler created within Bloomberg. Reason is just JS syntax like sugar on top of Ocaml. The creator (of React as well) saw it as a middle ground to bring in the giant JS ecosystem and population which makes some sense.
- dmitriid 6y agoAll these questions are exactly why they rebrand under a single name, ReScript. - ReasonML is a thin syntactical wrapper on top of OCaml - To compile it down to Javascript you need Bucklescript, an OCaml-toJS compiler developed by Bloomberg (IIRC) and so on All the tools need to be installed from different sites, have their own sets of dependencies and conventions etc.
- yawaramin 6y agoNot really. ReasonML is vendored and distributed with BuckleScript. It's one install to get started: npm install --global bs-platform
- _dwt 6y agoI get puzzled by how often projects whose ostensible user bases are composed entirely of technical professionals seem to make vast sweeping branding changes on the basis of "simplifying" the "confusing" naming, so that we end up with three(?) different things (a compiler, a language syntax, a new almost-compatible version of the language syntax) with the same name. Is there really a large audience of programmers capable of writing OCaml but not catching on that "BuckleScript" referred to the compiler? (For that matter, is there really a large audience of programmers capable of writing OCaml but only if the syntax superficially resembles JS? Maybe I'm the one out of sync here...)
- donut2d 6y agoReason/BuckleScript has always been about attracting JS developers to the powerful type system of OCaml. That was the reasoning for the Reason syntax. This, to me, feels like another step in accommodating developers who are coming from outside the OCaml ecosystem. When I was a less experienced developer, and even still sometimes now-a-days, as I approached a new language, the difficulties I often had were more with the tooling surrounding a language rather than the language itself. As a language ages and evolves, I think it's easier for the authors and contributors to forget what it's like approaching it fresh. Many times documentation is written with an unintended assumption of an understanding of the ecosystem. Coming to the OCaml/Reason/BuckleScript ecosystem could definitely be confusing.
- dustingetz 6y agoI'm a Clojure/Script programmer, it took me 20+ minutes to figure wtf this even is and I'm still not clear on the mission. Clojure is pretty clear https://clojure.org/about/rationale https://clojure.org/about/rationale Here's what it looks like: a new language for cross platform typed functional programming targeting OCaml (server) and Javascript (browser) ecosystem compatibility, backed by Facebook & marketing to mainstream JS devs
- pawelmurias 6y agoYes, the naming is a complete cluster fuck.
- dmitriid 6y agoIf you search for "bucklescript" on Google, it shows lots of links to https://bucklescript.github.io https://bucklescript.github.io All of them are now broken. So much for "we'll rename tools in backwards compatible way" Edit: the site is now back
- donut2d 6y agoOoo, that's no good. I'm surprised that wasn't handled better. At least with a simple page explaining what's up.
- glofish 6y agoOr if you go to the docs, BuckleScript is everywhere: https://reasonml.org/docs/reason-compiler/latest/introduction https://reasonml.org/docs/reason-compiler/latest/introductio...
- yawaramin 6y agoOr if you go to the ReScript docs, the naming has been changed: https://rescript-lang.org/docs/manual/latest/introduction https://rescript-lang.org/docs/manual/latest/introduction
- dmitriid 6y agoThe fact that naming has been changed shouldn't break people's bookmarks, links from blogs, links from external documentation, search etc. You keep the site around until the current version is truly and fully deprecated, and only then remove it, maybe. The site is back up though. Next step is to plaster banners on each page directing users to the nee docs.
- yawaramin 6y agoThe redirects are all done directly. No banners needed.
- 6y ago
- markdog12 6y agoStill no async/await?
- andrew_ 6y agoSeems like a poor choice of branding for discoverability and SEO. Really curious about the process for that decision.
- frou_dh 6y ago"Reason" was/is an inspired name for this kind of programming language. I mean, here's what the dictionary says: reason [mass noun] The power of the mind to think, understand, and form judgements logically -- Alice: What are you using for that project? Bob: I'm using Reason
- andrew_ 6y agoI don't think it's in dispute that the name "Reason" is inspired. "ReScript" is not good for discoverability when we're discussing that in the context of search engines, however.
- e12e 6y agoHm. So there was a bucklescript language/syntax - in addition to ocaml and reasonml? I'm not sure what to make of: https://rescript-lang.org/ https://rescript-lang.org/ > This has no impact on the development of the ReasonML language. In contrary, ReasonML can now focus on their goals, as much as we can focus on ours. Does this mean that ReScript is/will be a language that compiles to js, but not machine code? And that ReasonML will continue as an ocaml dialect that supports both compiling to machine code (eg for back-end services, native apps) - and to js - using the ReScript compiler? But only interop with ReScript when targeting js?
- fspeech 6y agoBucklescript extends OCaml syntax. OCaml has good support for language extensions. You need adaptations to interface to js.
- e12e 6y agoOK. So ReasonML and bucklescript both extend ocaml syntax? And the bucklescript syntax and compiler is becoming ReScript - distinct from ReasonML. But the ReScript compiler supports three syntaxi going forward: ReScript(bucklescript), ReasonML and ocaml? And the ocaml (native) compiler supports ocaml and reasonml - but not ReScript?
- fspeech 6y agoReasonml is an alternative syntax for OCaml. From the user's perspective, there is just one language OCaml, with two alternative syntax OCaml or Reason. If you want to interface to Js you need additional annotation for FFI, no matter which syntax you choose. The Reason syntax includes this FFI https://reasonml.github.io/docs/en/external https://reasonml.github.io/docs/en/external adapted from Bucklescript, while Bucklescript itself is just OCaml plus the annotation and maybe other compiler directives. The Reason syntax also includes support for React which is not part of OCaml. I don't know what goes under the ReScript umbrella.
- 6y ago
- leshow 6y agoCool, I hope this does well. Last I looked at reason/bucklescript I really liked it, but found the barrier for entry pretty high. The bsc compiler wouldn't even install on arch.
- sweeneyrod 6y agoWhat problems did you have installing? I think it was straightforward for me on manjaro.
- leshow 6y agoThis was a year or more ago, but this failed to install: https://aur.archlinux.org/packages/bs-platform/ https://aur.archlinux.org/packages/bs-platform/ It's pretty out of date here too. I can't remember if I tried to install with npm.
- sweeneyrod 6y agoOh yes, you definitely want to install it with npm rather than your package manager, unless you are trying to completely avoid npm.
- gklitt 6y agoI really really want this stack to succeed -- I think it has so much potential. And I've been hoping that some of this confusion would get cleared up. Unfortunately, after reading this blog post I think I'm even more confused than I was before. Are Reason and Rescript separate projects? It seems like there are now _three_ different syntax options: OCaml, Reason, and ReScript? Even if it's a good change in the long run, the lack of clarity is concerning... Seems like it may be more stable to just stick with OCaml syntax and js_of_ocaml [1] for now... Also interesting that OCaml is not mentioned a single time on the new website [2]. I guess they're trying to appeal to JS devs and sell it as a new thing, but seems useful to at least be aware that there's a connection to an established language? [1]: https://ocsigen.org/js_of_ocaml/3.7.0/manual/overview https://ocsigen.org/js_of_ocaml/3.7.0/manual/overview [2]: https://rescript-lang.org/docs/manual/latest/introduction https://rescript-lang.org/docs/manual/latest/introduction
- aarpmcgee 6y agoPretty confused over here as well, and I already had a decent idea of the differences and why's between Bucklescript, Reason, and OCaml.
- giancarlostoro 6y agoI wasn't confused till I read this comment after reading the ReScript docs: > ReScript looks like JavaScript, works like JavaScript, works with JavaScript, and outputs to the highest quality of clean, readable and performant JavaScript. The big difference is that ReScript comes with a bulletproof type system, a solid build system, and a couple of extra features that'd make JavaScript users envious. https://rescript-lang.org/docs/manual/latest/introduction https://rescript-lang.org/docs/manual/latest/introduction So you're saying their ecosystem supports other languages too?
- yawaramin 6y agoNo, that's not what it's saying...
- grok22 6y agoThis seems like it is only adding to the confusion. Is only BuckleScript rebranding to ReScript or the entire Reason/BuckleScript eco-system? Also BuckleScript is a memorable name and ReScript is just "meh"... Edit: The "rescript-lang.org" page is clearer -- it's the entire Reason/BuckleScript world is being rebranded into a single unifying thing. Still confusingly though, they call this the "documentation" site.
- node-bayarea 6y agoSo, no more "BS" ;)
- intelleak 6y agoCan I get a compile to js comparison here- if you've used more than 1 1) bucklescript 2) typescript 3) f# fable 4) scala.js 5) gopher.js 6) clojure 7) elm
- yomly 6y agoWhat blows my mind about bucklescript is the compiled output is small and readable. Also because "it's just javascript" making it work with other javascript is much easier than with other examples. The compiler is also FAST That experience is similar to typescript "it's just JS" except that the HM type system feels like MAGIC when you compare it to TS. When you work with cljs and elm you need to bring in the runtime so the payloads are large. Additionally errors in prod can be opaque as the output is usually minified and barely resembles your original source. I believe there is tooling around this but it is still not the same as regular JS in that regard. Interop between reasonml and cljs is comparable - typing reasonml can take a bit of getting used to but there are escape hatches and gradual typing to allow you to incrementally type things. So ELI5: type system of Elm. Interop and "impurity" of cljs but immutability encouraged by language "its just JS" like TypeScript Haven't used f#, scalajs or gopher Unfortunately, because there are many many layers of complexity which is not always easy to google or discover it can be hard to get started
- percjval 6y agoHere is what they are saying on reasonml.chat[0]. [0]: https://reasonml.chat/t/bucklescript-is-rebranding/2460 https://reasonml.chat/t/bucklescript-is-rebranding/2460
- yomly 6y agoShame libraries like bs-json bs-css bs-express all exist...
- ryyppy 6y agoReScript will continue to support existing bucklescript bindings and tools (like ppx). It would be great to align library names with the new brand name though (bs- always sounded weird imo)
- karmakaze 6y agoTL;DR - https://rescript-lang.org/ https://rescript-lang.org/ Future of BuckleScript and Reason now both called ReScript.
- e12e 6y agoNo, apparently not. (it's what I thought first too). It would seem bucklescript (the language/syntax) and bucklescript (the compiler) and the infrastructure for js interop will be named ReScript. ReasonML (the syntax/language) will continue to work with both the ReScript compiler/framework and with the ocaml compiler.
- pjmlp 6y agoJust another example why betting on platform languages always wins long term.
- yawaramin 6y agoHow so?
- pjmlp 6y agoPlatform languages might not be so shinny as guest languages, but they will stay relevant as long as the platform plays a major role, and might even outgrown the platform into other domains. Guest languages are always fighting for adopting, require FFI, additional debugging tools, tend to create duplicate libraries for everything ('cause their use must be idiomatic in guest language). Even when FFI is kind of copy-paste compatible with the platform language, eventually the platform language will introduce concepts that aren't that easy to integrate into guest language, or the shiny features from guest language require funnel interfaces to the host language, or aren't exposed at all, thus increasing the divergence. Then comes the rebranding, which might introduce uncertainty into the ecosystem regarding its future. So coming back to the platform languages. C, JavaScript, Java, C#, PHP, Objective-C, Swift might be not be the best, and they have their warts (how I love to hate C), but at the end of the day they own the platform that made them what they are, and will stay around as long as their platforms are relevant.
- ilaksh 6y agoI was trying to convince my boss to let me break off a piece of my Node.js program and rewrite it as a separate Ocaml process. Which he thought would take too long. But then I remembered Reason exists and there is no argument about taking too long anymore because I can incrementally convert one function at a time if I need to. I hope someone convinces the guy who shows up on Google under Rescript to use another name or something.
- ilaksh 6y agohttps://discord.com/invite/reasonml https://discord.com/invite/reasonml to discuss with them directly.