Show HN: Run GUIs as Scripts — hokusai-pocket turns Ruby UI code into portable binaries

What it is
Hokusai-pocket is a work-in-progress tool that lets you write GUI apps and simple games in a Ruby-like DSL and run or package them as standalone binaries. Think of it as a tiny app bundler: mruby + raylib + a tree-sitter template parser wrapped into a single runtime. The repo on GitHub contains a runnable example (a minimalist counter) that shows how Hokusai maps template, style, and block code into a live UI. Simple, elegant, and oddly satisfying.
How it works
The build path relies on a helper called barista, which bootstraps and compiles mruby, tree-sitter, raylib and produces a hokusai-pocket binary and several static libs (libmruby.a, libtree-sitter.a, libraylib.a, libhokusai.a). To run an app you use hokusai-pocket run:target=
Try it
The included counter example demonstrates the flavour: a Block subclass, separate style and template sections, helper blocks (vblock/hblock/label), and a Hokusai::Backend.run wrapper to set title, FPS and fonts. Want to ship to multiple platforms? The publish step will create platforms/[platform]/[target]/… artifacts, though cross-compilation is still being ironed out. Easy to get started if you can build barista; a one-liner clones and gets you into the repo.
Status and invitation
This is clearly early-stage: docs flag “work in progress,” testing notes are sparse, and the author asks for ideas and contributions. The repo layout and build flow are exposed for tinkering — modify the Brewfile to change the mruby/raylib/tree-sitter build, or update hokusai code and run barista hokusai to refresh libhokusai.a. Want to hack on tiny, scriptable GUIs or package little games for jams? Here’s a neat place to start.
Sources: github.com/skinnyjames, Hacker News
Comments