so is ocp-build in there and running ok for you?
when I tried compiling it ocp-build proved to be a nightmare and I think it is a dead project now.
so I worked up a makefile to replace it, made some improvements/extensions to the library, and translated the forty thieves demo.
Probably a stupid question: Could anyone explain why we need bindings to GUI libraries written in other languages and cannot have one written in OCaml?
As I understand it, we technically could write a GUI library in OCaml instead of using bindings, but there wasn’t enough need to put effort in doing so, am I right?
I’m asking because it seems to be limiting to bind to libraries, which are mostly written in an OOP lang with OOP in mind.
Doesn’t seems so, it supports only these functions that GTK+ 3 has. Just not yet totally complete and well-tested. Hopefully first proper release soon.
It turns out that implementing a large GUI library can take many years of work, so usually people don’t build new ones simply to provide a cleaner native interface for a given language.
Language-built GUIs also tend not to look very good. GUIs need to integrate into a given OS (or in the case of Linux, a desktop environment), and thus need to have special case handling for every OS in order to look like native applications. This is one of the reasons Electron has taken off – the web is now ‘native’ to every OS, and thus applications made using the same ‘GUI’ elements as the browser tend to look like they belong on every OS.
And it is awful scenario if user has more than one program to run. Good luck running Slack, Nylus, Chrome/Firefox, Visual Studio Code and whatever Electron-based simultaneously on middle-range laptop. Especially if you have more than one site/project opened. Using Qt-based bindings is a way to go (in some cases GTK+ too). Electron is a curse for humanity and it works only in the imagination of developers who think that user going to run only their program and not a hundreds others.
I always thought that Electron is heavy because it has HTML engine inside it. Looking to the Revery README it seems that it will have the same issue too. Why Revery will be better?
Ah, thanks! I have seem react-like core in the readme, so I decided that HTML is somehow used there too.
P.S. Can somebody explain why the folks are inventing the wheel with new OpenGL GUI library instead of using Qt/Qml?
P.P.S. I got a crazy idea. It would be great to transpile ReasonML syntax to Qt/Qml to reuse existing components. Reactive programming will work out of box, we will get rid of untyped javascript in Qt/Qml. Obviously it will be adopted only if folks afraid only about untyped nature of javascript in Qt|Qml
Integrating with an async framework (Lwt/Async) is being worked on. But from the architecture point of view, nothing prevent you from doing so. This model have been proven in React.js framework.
At the heart, there is a reconciler called brisk-reconciler. It takes the JSX which is desugars into a bunch of nested function calls + the current state of the world and returns a set of updates to a tree.
The renderer (revery) would render this into OpenGL scenes. Or brisk would render this into native components.
The asynchronous problem is totally separated from the framework. It just needs proper integration