29 comments

[ 0.11 ms ] story [ 56.4 ms ] thread
Interesting project, but needs documentation. In particular, what's the model it uses? I.e. how are events, state, etc. handled? Normally I'd just work it out from the code examples, but the example in the README is over 200 lines which is too long for me.

(Don't tell me here. Make your docs better, so everyone benefits!)

> Inspiration

> GPUI - Zed's GPU UI framework

Cool, but a comparison would also be very helpful.

If I decide to make a GUI app with Zig, how do I choose between Gooey and GPUI?

So far, all I know that GPUI is more mature and has at least one successful project built with it, so...

Also:

> Gooey: Turn (almost) any Python 3 Console Program into a GUI application with one line

> https://github.com/chriskiehl/Gooey

This is great, we need more of this. It's high time we began to escape the dark ages of rule-by-Electron. See Bitwarden's recent fumble of a redesign.
Nice work but honestly I haven't seen convincing arguments for writing medium to large GUI applications in a language that has no automatic GC.
This looks good. But the thing that always lets me down on UI frameworks is how much freaking work it is to get something on the screen. My first language was Borland Turbo C++. It was so comparatively simple to do stuff. If I want to write a circle on the screen its just this:

#include <graphics.h> #include <conio.h>

int main() { int gd = DETECT, gm;

    initgraph(&gd, &gm, "C:\\TURBOC3\\BGI");

    circle(320, 240, 100);

    getch();
    closegraph();

    return 0;
}

Making some shapes and forms wasn't that much work either.

If I think back to VB and Windows (whatever it was then) making a basic window, form and some buttons was so simple and easy, they even made GUI builders because they were so good.

Somewhere along the lines GUIs became overly complex to implement.

100% Agreed. My first language was LibertyBASIC. It had everything a kid could want to make a paint program that had (at the time) more features than MSPaint, or whatever little game. Menu bars, undo/redo, dialogue windows, panes, sprites, sound, etc.

Compared to the effort:quality of something like tkinter, LibertyBASIC put it to shame! Not to throw shade, tkinter is perfectly fine but I don't think I would have cared for it at that age.

It also taught me how to pirate software, when I found out the borland compiler required to make .exe's I could give my friends was $200 :)

I know I must be underthinking this, but I really don't know why native toolkits can't just implement some codegen thing that takes XML and produces the above.

Like, all of that should be expressable with just

  <graph>
    <circle />
  </graph>
Ahhh a fellow Borland Turbo C++ Dev (we weren't called Devs back then!)

I agree. GUI these days are largely driven by how HTML works and we now have a whole generation of UI Devs (frontend devs) who've never known any other way.

I missed the good old ways of GUI.

It is great to see the Zig ecosystem growing, even though it was achieved by AI. I wish humans had done it, but I do not wanna start a debate between those who arent fans of AI and those who are.
(comment deleted)
I was really eager to use those new frameworks until a recent HN comment raising how power-hungry and wasetul these were for most of their usage (terminal, forms, tui), and now I think it will probably be seen as ‘bloat’ in the future.
I have to say it: Zig devs are on another level
I wasn’t clear from the description if text rendering is GPU accelerated, or in my case drawing quads from an atlas of characters in a texture is probably more efficient.
"Rewrite GPUI in Zig and make no mistakes" ahh moment. I will never trust software that is written by people who don't understand anything and just generate slop. You have a powerful tool that can help you understand how things work and improve your skills. You can explore huge codebases and find exactly what you're looking for without wasting hours digging through code. Instead, you choose to generate ai slop.
It's not particularly revelatory to point out that this project has been generated largely by LLM (claude most likely, given the CLAUDE.md in the repo).

Also looks like a bit of introspection has happened ... https://github.com/duanebester/gooey/blob/main/docs/architec...

I wonder if this is just what we get now: low quality code, expressed rapidly. We are excited by the promise only to be disappointed by the reality of the implementation.

There are still a few new things around that are carefully and thoughtfully developed and put out into the world. zig itself. MitchellH's ghostty. And there's still all the older foundations of really wonderful, robust, software created by people like Linus Torvalds and couple of generations of open source devs, that applied great skill, ingenuity and hard work to produce the very best software.

But I fear that I'm in for a period of lamentation as we get wave after wave of promising sounding developments, but where the reality is low quality, LLM generated crap that you really shouldn't use if you want secure, stable performant, production-ready software.

Seems like perhaps we've been through a golden age of really great software and that now it's coming to a close.

(edited to fix spelling)

That plan smells AI generated:

> Gooey is in better shape than most ~140 KLOC Zig codebases — every directory has a mod.zig, namespaces are layered, and core/interface_verify.zig provides compile-time platform-backend checks. But the architecture has drifted in a few

I too have used AI to plan cleaning up its own mess, and this self-congratulatory prose is extremely consistent ("every directory has a mod.zig", whoop dee woo!).

In my experience, AI is largely incapable of fixing its own mess to an actually competent degree (and full disclosure: I still ask it to, not pointing fingers here) and it's probably due to it walking on egg shells around its own feelings. I've had to tell it to completely change course during cleanup at least 30 times this week.

Also: https://xcancel.com/mitchellh/status/2060088112257372610

More visual examples are sorely needed - I could only find a small (toy) example of a dialog, that didn't seem to showcase many of the framework capabilities.
At first I was very excited about this project. After reading the comments, I'm now deeply saddened by it... Given how much competition there already is in the GUI framework space, it's very difficult to see why something hastily thrown together by AI would get much traction. To really make an impact in this space, I think we'll need to see something thoughtfully designed that really tries to innovate in some profound way rather than just being more of the same
Maybe I'm wrong, but I'm really skeptical about projects like this. 200000 lines of code addition in 3 months, basically 2000 lines per day. I don't think any human brain is capable to handle such cognitive complexity, unless the code is all plain data get/setters, which any framework is certainly not. For me a good way to use LLM is to learn how to build something big by writing a tiny one with it. But this only gives a shallow understanding of a big system. For any critical complex system you want to maintain for a long time, LLM is in no way a good choice.
Using an AI-generated GUI framework written in Zig (a lang with no safety guarantees despite being quite helpful to human devs) is a brave decision.
This is great.

Show me the GUI! We are gonna need more than a couple pics of chat-zig.

(comment deleted)