3 ms·
Reading the documentation, I just notice lots of familiarity with my own solution using haskell and gi-gtk4. I think that anybody that read https://bichanna.git
by slacknatcher12 1mo ago
Reading the documentation, I just notice lots of familiarity with my own solution using haskell and gi-gtk4. I think that anybody that read https://bichanna.github.io/posts/tea-time/ https://bichanna.github.io/posts/tea-time/ will get the same ideas. This basically boils down to:
1. Use a native widget system such as GTK (I evaluated Qt too)
2. Wrap widgets into a component datatype that is aware on how to update the widget when the props/model changes.
3. Define a dispatch closure that is passed to widget that accepts messages. Actions on the widgets should use this instead of mutating a reference.
4. That dispatch closure is component aware and it will call the update function on all the widgets.
There are some extra complications for long running computations but the model is a good base to build on. I wish the best to the relm team, most likely I will use them when programminmg in rust.
- zeendo 1mo agoIs your Haskell solution open source?
- slacknatcher12 1mo agoNo, it is a commercial project. But there are others following the same pattern on the haskell OSS side. Check https://github.com/Kleidukos/ghcup-gtk/blob/d384e89dd48b4065c97297ce02169d6c890d83d8/src/gtk/UI/CompileOptionsDialog.hs#L37 https://github.com/Kleidukos/ghcup-gtk/blob/d384e89dd48b4065... for an example. That program is a UI for the standard haskell installer.
- javier2 1mo agoHow the hell do you have a commerical haskell binding project?
- slacknatcher12 25d agoNot that difficult if you go for haskell shops and also do freelancing on the side and get to pick the language.
- manmal 1mo agoI haven’t used Haskell much. I thought to try it with agentic help, but then read this post that its compilation times might make it unviable. But what’s your experience?
- slacknatcher12 1mo agoI mean it is compiled language, but it is fine IMHO. I use `ghcide` which is a script for `ghci` (the repl) if an agent wants access.