3 ms·
Hey HN! I'm Bryan, creator of Revery. I was really surprised when I saw Revery on the front-page of HN, so cool! I apologize that there isn't more info - we're
by bryanphe 8y ago
Hey HN! I'm Bryan, creator of Revery. I was really surprised when I saw Revery on the front-page of HN, so cool!
I apologize that there isn't more info - we're still working on website, docs, architecture diagrams, etc. But I'll be around for a bit to answer questions. It's still pretty new and actively developed - we're building it in parallel with the next version of our Oni [1] text editor. Some of the rationale for this decision can be found in our early architecture document for the next version of Oni [2].
ReasonML (which is a syntax over OCaml) is now a great environment to build native apps. Most of the attention has been focused on the compile-to-JS scenarios, but the tooling is at the point where you can just as easily compile-to-native on the major platforms, thanks to tools like Esy [3] - workflow isn't much different from NPM+JS development!
Jordan and team, as well as OCamlLabs on the OCaml side, have been smoothing out this native workflow (it's not easy to build a package manager for native code!), and I think/hope you'll see more ReasonML projects like Revery start to pop-up.
I'm bullish on this because React-as-a-paradigm (pure-functional UI) is a natural fit - it's like a language designed for React.
Not only that, there is some incredible work that has been invested in the OCaml ecosystem, too:
- The compiler is FAST
- The GC is FAST (also deterministic and supports sliced collections, important for perf)
- Very powerful type system (ADTs, GADTs) - we even express the React 'rules of hooks' in types, such that they're enforced in the compiler.
The output code generated by the OCaml compiler (ocamlopt) is fast too - in some cases on par with C++ [4]
Everything seemed to line up in terms of tech to make it a natural fit for us to give it a try :)
And Revery is meant for very custom UIs - there is a counterpart project called Brisk [5] that uses platform-native widgets. We share common infrastructure and in fact uses Brisk's reconciler to provide the 'React' layer and component model.
[1] https://github.com/onivim/oni https://github.com/onivim/oni
[2] https://gist.github.com/bryphe/ca3260914818a1293864e9fa6422a69c https://gist.github.com/bryphe/ca3260914818a1293864e9fa6422a...
[3] https://esy.sh/ https://esy.sh/
[4] http://www.ffconsultancy.com/languages/ray_tracer/comparison.html http://www.ffconsultancy.com/languages/ray_tracer/comparison...
[5] https://github.com/briskml/brisk https://github.com/briskml/brisk