92 points · by zero-st4rs · 1y ago · 34 comments
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
On the first read it's basically: compatible with BSD-like and PPL... and not much else?
It actually seems to break the licensing itself - the colorize gem is GPL2, which seems not compatible with PPL. https://github.com/fazibear/colorize/blob/master/LICENSE https://codeberg.org/skinnyjames/hokusai/src/commit/5380728d...
And you are correct, including colorize does break GPL2, I'm surprised I missed that.
Any lawyers out there? :)
Awesome work!
I wonder what that means in practice for such a library.
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.
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?
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.
Rake tasks don't have builtins for this iirc.
The repo itself has more examples.
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.
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.
That being said the packages (without online installer) are also available for direct download when you know where to look... [see link below]
If you're on Linux though the situation is much simpler since your distribution most likely already packages the Qt libs so you just use your package manager to install them and off you go...
Regardless, for anyone looking for a native portable toolkit, I don't really think there's anything that comes close to Qt in terms of functionality and tooling (like Qt Creator and Qt Designer) and once you get over the idiosyncrasies and quirks its really quite good (for the most part).