Live data from Hacker News

Revery – Native, high-performance, cross-platform desktop apps

github.com

91–100 of 129 posts

Re: Revery – Native, high-performance, cross-platform desktop apps

#93

> Revery is the same - aside from platform-specific behavior, if your app looks or behaves differently on another platform, that's a bug! I want my applications to feel like they belong to the platform and not identical on every platform

For me that depends entirely on what application it is. For large well-known applications I want them to be consistent across all operating systems. Firefox, Chrome, (MS|Libre) Office, Photoshop, etc are all large enough and ubiquitous enough (depending on computing context) that I want them to behave as closely as possible to each other.

For applications that are mostly for that OS, I would prefer they adhere to the tenets of design for that OS.

This is less a matter of wanting it to feel a certain way and more a matter wanting familiarity and utility out of the applications I'm most likely to experience on different operating systems when I'm on them. Function is much more important than form for me in this case.

Re: Revery – Native, high-performance, cross-platform desktop apps

#94
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

[2] https://gist.github.com/bryphe/ca3260914818a1293864e9fa6422a...

[3] https://esy.sh/

[4] http://www.ffconsultancy.com/languages/ray_tracer/comparison...

[5] https://github.com/briskml/brisk

Re: Revery – Native, high-performance, cross-platform desktop apps

#95
post #83

did all of this spawn from Phonegap? I remember when Phonegap first came out, it was a clever thing but rough around the edges. I used it when chasing the cross-platform mobile app dream with some success. Then Apache picked it up as Cordova and the Ionic framework really helped to show what could be done with it. Ionic has come a long way and I'm, today, finishing up a client mobile project using that framework. A w…

Not really. The idea of using HTML and Javascript to create apps isn't really new, and Phonegap and Electron are quite different architecturally. (Phonegap was really just a series of abstraction libraries that bundled in a webview into a native app; Electron couples a browser with a Node run time) One of the competitors to Phonegap in the earlier days, Appcelerator Titanium, was capable of targeting the desktop, and was released in December 2008.

Re: Revery – Native, high-performance, cross-platform desktop apps

#96
post #7
post #4

The developers behind Oni (a text editor inspired by Vim and VSCode) are rewriting it in this framework: https://github.com/onivim/oni2

The project looks interesting, but the licensing change from MIT is a bit worrying: "Oni 2 is licensed under the CC-BY-NC-4.0 license." CC licenses are not a good fit for software in general - and "non commercial" isn't very clear. Making something available at zero cost doesn't necessarily make it "non commercial". Ed: and it means that code snippets/widgets from oni2 can't be used elsewhere without careful licensin…

Oni 2 creator here. Agree with your concern 100%. We're working to review the license and come up with a better fit with more clarity.

We really just want a license that says - free to use for educational / non-commercial purposes, but a license is required to use in a commercial environment. No real "drop-in" licenses to support this, unfortunately. Some additional thoughts about our considerations here: https://www.reddit.com/r/neovim/comments/ae7ef6/question_abo...

The work that we want to share out (custom widgets that are more generally applicable) will live in Revery - that's the reason we split Revery out from Oni2 into an MIT Licensed project - so that we could share the heart of the work out with a broader community, and get help building out this foundation, too.

Re: Revery – Native, high-performance, cross-platform desktop apps

#97
post #24

Well the example application seemed fairly solid, well worthy of a screenshot. I would like something like this for some simpler custom tools every now and then. It does seem to exhibit the usual custom rendered app issues. I suppose it is constantly redrawing the screen, as it seems to have constant cpu usage even when doing nothing, so not laptop friendly (though perhaps fixable still). Some of the widget seem fair…

Hey scoopr! Thanks a lot for trying it out.

> It does seem to exhibit the usual custom rendered app issues. I suppose it is constantly redrawing the screen, as it seems to have constant cpu usage even when doing nothing, so not laptop friendly (though perhaps fixable still).

Yes, at least when there is an animation active (we redraw the screen in that case). Most event-based apps, though, would only redraw in response to user input or for a temporary animation - our initial demo is constantly animating at 60hz, so maybe not the best performance demo...

> Some of the widget seem fairly arcane but usable.

Definitely. Still a lot of work needed here. We've had some excellent help from the community getting an initial palette of controls; but still a ways to go!

> One thing that was very alien to me was the build tooling and language/runtime.

This is great feedback. We should include more details in our README about this. The stack is really Esy [1] -> Dune [2] -> OCaml compiler (ocamlopt) [3]. Then C linker for your platform.

> Also how easy would it be to link C/Rust lib, so that revery would only be used as the UI layer for something else.

I haven't tried Rust, but C libs are doable with Reason/OCaml's C FFI [1]. In fact, several of the underlying pieces of technology powering Revery (GLFW, FreeType2, Harfbuzz) are used via this FFI [4].

[1] https://esy.sh/

[2] https://dune.readthedocs.io/en/latest/quick-start.html

[3] https://caml.inria.fr/pub/docs/manual-ocaml/native.html

[4] https://github.com/bryphe/reason-glfw

Re: Revery – Native, high-performance, cross-platform desktop apps

#98
post #30

Native? High-performance? Using Electron?! Something isn't right.

Sorry, our documentation isn't very clear. The API is Electron-inspired (as if you had React+Redux+Electron), but it's compiled down to a fast native stack consisting of GLFW/FreeType2/Harfbuzz.

Re: Revery – Native, high-performance, cross-platform desktop apps

#99
post #73

Earlier quoted context omitted.

Non-native GUIs are probably the number one reason we've fallen so far behind in control over our UIs that "dark mode" is legitimately considered a feature. It is absolutely ridiculous that, in 1995, I could completely change the font sizes and color scheme of my UI radically and it would work with the vast majority of applications, but in 2019 I have to wait for a developer to decide to add a theme or provide some k…

In 1995 there were far fewer platforms than there are now, and most people only had one: their own computer. Nowadays, we expect the same services to work on our laptop, our work computer, our personal iPhone, our work Android, our smart TV... the importance of parity between versions is much higher.

True, and also, the fact that apps have to work everywhere because everyone’s either on Mac, Windows, Linux, or BSD. And also a lot of power users and people who except things to just work compared to the early days of the PC. Remember sound drivers?

Re: Revery – Native, high-performance, cross-platform desktop apps

#100
post #19

Earlier quoted context omitted.

Of course that's a choice for everyone to make, but I feel like in general the benefit of fitting in the platform is overrated. After all the whole webapp-everything somewhat shows that people don't care that much, they are happy to use GMail for example. Another family of examples would be the big software packages like the Adobe or Autodesk stuff, they tend to have a fairly custom look&feel. IMO it's probably suffi…

What's "modern"? In no particular order (all of the below I've seen broken in numerous ways by non-native GUIs): - Does it receive proper keyboard focus? - Does it respond to keyboard input? - Does it adhere to the OS color theme? - Does it break OS accessibility features (high contrast/voice over/invert colors/grayscale/font sizes/etc. etc.)? - Does it respect scaling and resolutions? - Is font rendering consistent…

The average app today (see discord) is: Yes Yes Optional, but a nice to have No Yes Yes Yes Yes Yes Yes No (but it needs to be improved) No ( it needs to improve though Same with above What is HIG? Yes Yes
Post reply on HN