Skip to content

Commit d07c51e

Browse files
authored
Merge pull request #237 from rescript-association/blogs
Link redirects etc
2 parents 446b0ad + 6b306e5 commit d07c51e

16 files changed

+156
-114
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Reason Association
3+
Copyright (c) 2019 ReScript Association
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
author: rescript-team
3+
date: "2020-08-10"
4+
category: compiler
5+
badge: roadmap
6+
title: "BuckleScript & Reason Rebranding"
7+
description: A new unified experience for the platform
8+
---
9+
10+
We're pleased to announce that BuckleScript is getting a brand new name: **ReScript**.
11+
12+
## History & Summary
13+
14+
- **OCaml** is a typed FP language compiling to bytecode and native code.
15+
- **Js_of_ocaml** is based on OCaml and compiles to JavaScript for OCaml users.
16+
- **BuckleScript** is a fork of OCaml that also outputs JavaScript, optimized (features, JS interoperability, output, build tools) for JS developers rather than OCaml developers.
17+
- **Reason** is an alternative, JS-looking syntax layer over OCaml, plus extra tools. Reason used 1. BuckleScript to produce JavaScript output and 2. OCaml to produce native output. Most of the community focused on the former usage.
18+
- Reason and BuckleScript shared most teammates, who wanted to double down on the JS use-case.
19+
- **ReScript**, thus born, is the new branding for BuckleScript that reimplements or cleans up Reason's syntax, tools, ecosystem & docs into a vertically integrated experience.
20+
- Reason project will continue serving its purpose of a syntax layer for native OCaml. Some folks might use Reason with Js_of_ocaml to output JS code.
21+
22+
## Community Situation
23+
24+
BuckleScript started with the idea that **JavaScript programmers deserved a great typed language with a fast and lean toolchain**. This idea took root and, over the years, we've gradually accomplished feats such as:
25+
- a state of the art compiled JavaScript output that rivals hand-written JS,
26+
- a fast & reliable toolchain much needed in front-end and Node development,
27+
- various JS interop features that spawned an ecosystem of well typed libraries,
28+
- a production-ready standard library,
29+
- [and recently](/blog/bucklescript-8-1-new-syntax), a fresh syntax made by a major contributor of Reason's old syntax.
30+
31+
These developments have attracted many people into our community. But one bigger challenge persisted: newcomers dropped out at the sheer amount of extra incongruent tools and learning overhead from having to understand OCaml concepts, Reason concepts, and BuckleScript's concepts. Take, for example, what's required to make a React app using BuckleScript:
32+
- Knowledge of React.
33+
- Knowledge of JS.
34+
- Knowledge of BuckleScript's specific bindings to React (that we've tried hard to keep to a minimum).
35+
- Knowledge of OCaml idioms, which leaked through BuckleScript.
36+
- Knowledge of BuckleScript's JS interop and the build system.
37+
- Knowledge of the Reason syntax.
38+
- Avoiding the distractions of OCaml and Reason's unrelated, native-oriented build tools, package manager, etc.
39+
40+
Ironically, the more documentation we pile up, the more mental overhead newcomers suffered. During the meetups, we've frequently seen folks' enthusiasm crushed at the sheer prospect of making a web app while keeping 5+ tabs' worth of documentations open. This was discouraging for everyone.
41+
42+
The adoption barrier is real, and it's about time we finally solve it.
43+
44+
## The Rebranding
45+
46+
Today, we'll start to truly unify the various BuckleScript-related projects under the ReScript umbrella. This includes:
47+
- The compiler, build system and the new syntax unified under a single installation.
48+
- Doubling down on editor tooling for ReScript usage.
49+
- A single documentation site (this one), which unifies all the docs and greatly trims down on redundant and stale info.
50+
- Streamlined communication through said website, a [forum](https://forum.rescript-lang.org) and a new [Twitter](http://twitter.com/rescriptlang).
51+
- The renaming of various tools, always in a backward-compatible way.
52+
53+
In short, all JS-related concepts previously under disparate Reason and BuckleScript ecosystems are now called ReScript. Previously, due to the messy situation, most real-world BuckleScript adoption came from a few heroic community members suffering through the technical and social risk of spreading our tech to their coworkers. From today onward, you can simply tell to your coworkers: **"this is ReScript"**, and point to them a clear starting point.
54+
55+
It's worth emphasizing that while this rebranding seems disruptive, it's mostly a bunch of name changes for the same tech. The Q&A below addresses some of the worries on existing code.
56+
57+
## Q & A
58+
59+
**What's that recently released BuckleScript syntax called?**
60+
61+
There's no dedicated name for the syntax anymore. It's simply called the ReScript syntax. The extension is `.res` and `.resi`. Existing tools operating on `.ml`, `.mli`, `.re` and `.resi` continue working.
62+
63+
**Will there be a migration script to gradually convert our code to the new syntax?**
64+
65+
Yes. See our [migration page](/docs/manual/latest/migrate-from-bucklescript-reason). You can mix and match old and new code for a smoother transition.
66+
67+
**Will BuckleScript (now ReScript) break my existing code?**
68+
69+
No. The new syntax & tools sit alongside the existing code. We **won't** remove OCaml and Reason support from ReScript for a long time.
70+
71+
**What's the editor tooling story?**
72+
73+
Much more streamlined now! See our [Editor Plugins](/docs/manual/latest/editor-plugins) page.
74+
75+
Reason-language-server will continue working as-is for existing usage. We as first party don't work on ocaml's language server.
76+
77+
**Will I be able to continue writing OCaml/Reason and compile to JS using BuckleScript in the future?**
78+
79+
It follows from our previous answer that yes, you will still be able to. Though community-wise, we're encouraging the new syntax and tools.
80+
81+
The compiler will also continue to acquire upstream OCaml features when relevant.
82+
83+
**Will the new syntax prompt the move to a non-OCaml AST?**
84+
85+
No, since that'd break existing ppxes (e.g. internationalization, graphql). If we feel the need to adopt a new AST in the future, it'll again be purely additive.
86+
87+
**Will we have 3 syntaxes to worry about?**
88+
89+
The plan is to emphasize the new syntax and focus our tooling around it. It'll be confusing to temporarily have different syntaxes in the same codebase, but that's the cost of a proper migration support. We hope this is transient; it's darkest before the dawn.
90+
91+
**How do we address the fragmentation of the community by the new syntax?**
92+
93+
Folks who have been in the community for a while know that there have always been opposing philosophies regarding newcomer funneling, tooling emphasis, library preferences, etc., due to differing cultures.
94+
95+
Rather, it's more accurate to say a few pieces of awkwardly shared infrastructure held opposing forces together. This is true when Reason spun off from OCaml's engineering, and true when BuckleScript entered the picture.
96+
97+
We can't realistically always release new features that are a compromise of various philosophies, but that's exactly what we've been trying to do for the past few years. BuckleScript's reimplementation of the Reason syntax is a departure from that (much tighter integration with the compiler, more JavaScript/TypeScript-friendly philosophy, fewer compromises, faster, less buggy). We believe that its quality speaks for said departure.
98+
99+
The ReScript community will comprise of the majority of the old Reason community, most of which focused on the BuckleScript part already. The remainder of the Reason community still exists and will now focus on their existing use-case better.
100+
101+
**The new changes make me worried about the future support I'm going to receive from the team.**
102+
103+
_Retrospective edit, in 2021_: suffice to day that we've been doing well =).
104+
105+
## Conclusion
106+
107+
Thank you for your support and keep shipping. A brighter future awaits us!
108+
109+
Stay safe,
110+
111+
The ReScript team (Hongbo, Cheng, Cristiano, Maxim, Patrick, Ricky).

_blogposts/2020-08-28-new-rescript-logo.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
author: made_by_betty
3-
date: "2020-08-27"
3+
date: "2020-08-27"
44
title: "A New Logo for ReScript"
55
previewImg: https://res.cloudinary.com/dmm9n7v9f/image/upload/v1598616442/Reason%20Association/rescript-lang.org/Art-3-rescript-launch_ovoibg.jpg
6-
articleImg: https://res.cloudinary.com/dmm9n7v9f/image/upload/v1598616442/Reason%20Association/rescript-lang.org/ReScript-3_by4q2u.jpg
6+
articleImg: https://res.cloudinary.com/dmm9n7v9f/image/upload/v1598616442/Reason%20Association/rescript-lang.org/ReScript-3_by4q2u.jpg
77
description: |
88
Today, our resident designer Bettina is unveiling to us the fresh new ReScript branding we've been long waiting for. We hope you're as excited about the result as us!
99
---
@@ -56,6 +56,6 @@ We hope you enjoyed our new design article. In the future, we're hoping to inter
5656

5757
## About the Designer / Creator
5858

59-
[Bettina Steinbrecher](https://bettystein.com/) is a freelance designer and brand consultant, specialising in digital products and brands, based in Vienna. Previously she has been a Digital Designer and later on Head of Brand Design at [adidas runtastic](https://runtastic.com/), where she led major design efforts in the visual brand developing processes before and during the Runtastic / adidas acquisition. She is now working as a freelance designer.
59+
[Bettina Steinbrecher](https://bettystein.com/) is a freelance designer and brand consultant, specialising in digital products and brands, based in Vienna. Previously she has been a Digital Designer and later on Head of Brand Design at [Adidas Runtastic](https://runtastic.com/), where she led major design efforts in the visual brand developing processes before and during the Runtastic / Adidas acquisition. She is now working as a freelance designer.
6060

61-
She has been involved in our design processes since the inception of the [Reason Association](https://reason-association.org) in 2018, and was responsible for all the user-facing websites such as `reasonml.org` (now `rescript-lang.org`), reason-association.org. She also created the new logo of the [OCaml Software Foundation](https://ocaml-sf.org/).
61+
She has been involved in our design processes since the inception of the [ReScript Association](https://rescript-association.org) in 2018, and was responsible for all the user-facing websites such as `reasonml.org` (now `rescript-lang.org`) and rescript-association.org. She also created the new logo of the [OCaml Software Foundation](https://ocaml-sf.org/).

_blogposts/archive/bucklescript-8-1-new-syntax.mdx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ date: "2020-07-01"
44
previewImg: https://res.cloudinary.com/dmm9n7v9f/image/upload/v1587472539/Reason%20Association/reasonml.org/reasonml_art1_1280_zfwnyo.png
55
category: syntax
66
badge: release
7-
title: "ReScript: A New Syntax for BuckleScript"
7+
title: "A New Syntax for BuckleScript"
88
description: |
99
First announcements on our latest efforts for a better syntax parser.
1010
---
1111

1212
> **Update / August 13th 2020:**
13-
> BuckleScript is now called ReScript, more infos [here](/blog/bucklescript-is-rebranding)
13+
> BuckleScript is now called ReScript, more infos [here](/blog/bucklescript-is-rebranding).
1414
1515
## What's new?
1616

17-
The release of BuckleScript 8.1 contains a new important addition: we've rewritten the Reason syntax parser and printer.
17+
The release of BuckleScript 8.1 contains a new important addition: we've rewritten the vendored Reason syntax parser and printer.
1818

1919
The rewrite was done by a community member of ours, [Maxim](https://twitter.com/_binary_search). Maxim was a main contributor to the old Reason repo, and together we've reached the conclusion a while ago that the codebase needed a revamp. After wrestling with it for the longest time, we've settled on a low-key rewrite.
2020

21-
We apologize for having kept this under wrap; syntax discussions have always been churny, so we didn't want to prematurity announce something before it's ready. After testing this extensively; we now deem it solid enough for your consumption.
21+
Syntax discussions have always been churny, so we didn't want to prematurity announce something before it's ready for proper critiques. After testing this extensively; we now deem it solid enough for your consumption.
2222

2323
**Here's what you need to know:**
24-
- The new syntax comes directly with your BuckleScript 8.1 installation. You won't have to install anything else. It does not depend on the old `refmt`.
25-
- There are a few differences in syntax, documented [here](/docs/manual/v8.0.0/migrate-from-bucklescript-reason).
26-
- This is BuckleScript-only currently.
27-
- Our editor support is currently limited; we'd like to take this occasion to clean it up. In the meantime, if you upgrade your [VSCode](https://marketplace.visualstudio.com/items?itemName=jaredly.reason-vscode) or [Sublime Text](https://github.com/reasonml-editor/sublime-reason) plugin, you should get the proper highlighting.
28-
- We've made a refmt-to-new-syntax converter that we'll release later. We'd like you to test it on small bits of code for now; a wholesale conversion at this stage would be a bit too rushed.
24+
- The new syntax comes directly with your BuckleScript >=8.1 installation. You won't have to install anything else. It does not depend on the old `refmt`.
25+
- There are a few differences in syntax between the Reason syntax, documented in the [migration docs](/docs/manual/v8.0.0/migrate-from-bucklescript-reason).
26+
- The migration docs also guides you toward converting your codebase to the new syntax, file by file or project by project.
27+
- This syntax isn't available on Reason native compilation.
28+
- As always, check our documentation's Editor Plugins section for your editor's support of this new syntax.
2929
- To avoid conflict, we've employed the new file extensions `.res` and `.resi`, for implementation and interface respectively.
30-
- This means the syntax sits alongside the existing Reason and ml syntax. We'd like to avoid eagerly deprecating the other syntaxes, but if this new one works well, we'd like to move onto more ambitious territories. Either way: your existing code will keep working!
31-
- Issues for the new syntax should go to [https://github.com/BuckleScript/syntax](https://github.com/BuckleScript/syntax) (to lessen the load on the main BuckleScript repo)
30+
- This means the syntax sits alongside the existing Reason and ml syntax. Your existing code will keep working!
31+
- Issues for the new syntax go [here](https://github.com/rescript-lang/syntax).
3232

3333
**This is how it looks like:**
3434

@@ -57,22 +57,21 @@ window["addEventListener"]("focus", onFocus)
5757
**Here is an example of an error message:**
5858

5959
```
60-
File "src/test.res", line 12, characters 57-231:
60+
Syntax error!
61+
src/test.res:7:31-8:0
6162
63+
5 │ }
64+
6 │
65+
7 │ let message = j`hello ${world}!
66+
8 │
6267
63-
10 │ }
64-
11 │
65-
12 │ let message = jHello ${userName->Js.String.toUpperCase}!`
66-
13 │
67-
14 │ type student<'extraInfo> = {
68-
69-
Did you forget to close this template expression with a backtick?
68+
Did you forget to close this template expression with a backtick?
7069
```
7170

72-
The short version: install [email protected], create a new `.res` file in your new/existing project, then have fun!
71+
The short version: install [email protected] or later, create a new `.res` file in your new/existing project, then have fun!
7372

74-
Quality-wise, the parser now features excellent error messages, is noticeably faster on projects of all scales, and should be much more robust. The rearchitecture also allows us to release in a more professional manner. We'll go into more details on the motivation and architecture in our upcoming blog posts; these will prove to be **very** interesting and illuminating for all engineers. Stay tuned! In the meantime, for any immediate questions, please ask in this [Discourse thread](https://reasonml.chat/t/bucklescript-8-1-new-syntax-option/2379).
73+
Quality-wise, the parser now features excellent error messages, is noticeably faster on projects of all scales, and should be much more robust. The rearchitecture also allows us to release in a more professional manner. We'll go into more details on the motivation and architecture in the future when the syntax pans out well; hopefully, these will prove to be **very** interesting and illuminating for all engineers. Stay tuned!
7574

76-
Maxim's effort is our community at its best and we hope that you'll enjoy his work as much as we did testing it!
75+
Maxim's effort is our community at its best and we hope that you'll enjoy his work as much as we did!
7776

7877
Stay safe!

0 commit comments

Comments
 (0)