Show HN: A backend agnostic Ruby framework for building reactive desktop apps
92 points| zero-st4rs | 9 months ago |codeberg.org
It is currently written in C/Ruby and uses a custom tree sitter grammar to describe templates.
Features include: composable UI components, template directives, event and prop handling, slots, styles and automation capabilities baked in.
One of the goals of the project is privileging easy to write custom components via a drawing API over providing a fixed set of components.
At the time of this writing it should install on Windows, Mac, and Linux, but sometimes it is hard to test the install on all platforms.
I'd love to hear any feedback or suggestions on the project. It is still in an early stage, but it would be great to hear thoughts.
Docs are here: https://hokusai.skinnyjames.net/ Repo is here: https://codeberg.org/skinnyjames/hokusai
Licensed under the PPL
viraptor|9 months ago
maxmcd|9 months ago
omneity|9 months ago
Awesome work!
zero-st4rs|9 months ago
unknown|9 months ago
[deleted]
xfalcox|9 months ago
zero-st4rs|9 months ago
jenadine|9 months ago
I wonder what that means in practice for such a library.
zero-st4rs|9 months ago
From the discussion here: https://news.ycombinator.com/item?id=43938309, it probably won't stay PPL for much longer. It just needs to be worked out.
az09mugen|9 months ago
zero-st4rs|9 months ago
whalesalad|9 months ago
zero-st4rs|9 months ago
Since Hokusai uses MRI, one can pull in from that ecosystem of gems.
RubyMotion also appears to support (iOS, Android, OSX) whereas Hokusai intends to support OSX, Linux, and Windows.
Implementation-wise, the framework itself seems different. Looking at the following [RubyMotion app](https://github.com/HipByte/RubyMotionSamples/tree/master/ios...), the logic is spread out over separate files and it doesn't appear to have a templating language.
On the other hand, Hokusai UI components are just a class that inherits from Hokusai::Block, and are self contained blocks that can be stitched together.
Hokusai is more like Vue Single file components in this regard. Hokusai also doesn't make a distinction between a "component" and an "app", they are all just Blocks.
Does that answer your question?
zem|9 months ago
zero-st4rs|9 months ago
Ideally, there should be an automated way builtin to the gem that packages apps.
Currently, I use a tool I wrote called Barista to package an an application with it's dependencies, (part of it was modeled after chef/omnibus). This might not be the best way though, so I'm open to ideas.
dismalaf|9 months ago
zero-st4rs|9 months ago
Rake tasks don't have builtins for this iirc.
iraliaf|9 months ago
zero-st4rs|9 months ago
The repo itself has more examples.
talljohnson1234|9 months ago
samiv|9 months ago
I program (mostly) in C++ using Qt for my UIs and I just use the Qt Designer to visually drag and drop to build my UIs and the actual code gets generated by the tool.
Fast and simple.
sunrunner|9 months ago
Qt looked interesting, particularly with the concise syntax afforted by QML and QtQuick, but the licensing was off-putting and even just getting access (for a non-commercial project for example) seemed to require an awkward sign-up and some kind of installer.
I crave the conciseness and simplicity of something like SwiftUI but the options for doing that in a cross-platform way seem limited.
Klonoar|9 months ago
teaearlgraycold|9 months ago
zero-st4rs|9 months ago
unknown|9 months ago
[deleted]