Gooey: A GPU-accelerated UI framework for Zig
Posted by ksec 6 days ago
Comments
Comment by henry_bone 6 days ago
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)
Comment by Aurornis 6 days ago
A year ago it would have taken someone months of nights and weekends effort to get this much code up and running. That person would have developed a good intuition for the architecture and where it should go.
Now Codex or Claude can bang it out in a couple days. You can try to have it do spec documents, code reviews, and cleanup passes but with today's tools these projects reach a point where it's just a swirling mess of pieces duct taped together in a way that passes tests. In my experiments, you quickly reach a point where the usable context depth (which is less than the 1M limits) keeps overflowing before you can get usable refactors in, and you're just going in circles. I know it's theoretically possible to avoid these problems, but in practice you get spaghetti projects like this.
Comment by elcritch 5 days ago
Previous models both GPT and Claude would struggle with the larger picture more. Pretty quickly they’d do one off hacks. Eventually they’d code themselves into a wall if you weren’t careful.
Haven’t hit that wall with GPT-5.5 yet. New changes or improvements on a GUI library I’m building seem to be constant in time per feature.
Though I’m talking only 10k’s of LOC. Also I’m using Nim which is both strongly typed and concise.
Comment by willtemperley 5 days ago
I’m seeing a similar improvement with Opus 4.8, which is acting like an engineer that cares about correctness. The harder the problem the better it seems to do.
I think a golden age of software is just starting for indie software. It’s just going to take a while to see the first really good results.
Comment by SkiFire13 5 days ago
Comment by reactordev 5 days ago
Comment by elcritch 5 days ago
I'm wanting to build pieces of software that I've been wanting and often working on for years. These new models are making it possible for me to scale my work to build it.
Comment by hiccuphippo 5 days ago
There should be some way to measure (and display) how much of a project is understood by the humans behind it.
Comment by henry_bone 5 days ago
The LLM is the finishing tool, not the architect or core developer.
Comment by danielvaughn 6 days ago
Comment by henry_bone 6 days ago
I guess I hope that the good stuff keeps coming and the dross falls away. More signal, less noise.
Comment by danielvaughn 6 days ago
On a small bright note, I've gotten AI to help me produce some of my best work over the last couple of months. It may enable sloppy behavior, but it doesn't require it. I have hope that serious work will win out in the end, and that sheer human effort is still the differentiator.
Comment by henry_bone 6 days ago
At least that's how I read it. :-) I'm learning that there's a place for the LLM but it's the sandpaper, not the chisel.
Comment by Pxtl 6 days ago
Comment by danielvaughn 5 days ago
Comment by Pxtl 5 days ago
Like even the basic question of "hey did I already merge this branch?" becoming unknowable if you autosquash-on-merge is just nasty.
I've got a million ideas on what the "correct" fix for that problem might be, but imho it's a flaw deep in the heart of git that creates a massive amount of pain.
But I'll give it credit for being rock solid and blazing fast, as you say.
Comment by zamalek 5 days ago
> 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
Comment by mpeg 5 days ago
Have seen it from jobseekers trying to boost their profile with fake projects, founders trying to make their product more attractive to VCs, consultants trying to advertise their services...
I don't always have time for OSS, but every PR I've ever sent has always been hand written, and tested, and has taken into consideration the project coding style and architecture choices – I don't like this new world where developers can't even be bothered to write the docs.
Comment by mwcampbell 6 days ago
Comment by lelandbatey 6 days ago
Comment by Ajakks 5 days ago
Comment by ecshafer 6 days ago
#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.
Comment by WD-42 6 days ago
You can optimize a library to make it comparatively simple to draw a circle on a screen. But that tells me nothing about binding state, signals, styling, widget hierarchy, etc. Maybe these frameworks look complicated to you because doing something more than drawing a circle is actually more complicated.
Comment by cwillu 6 days ago
Comment by monster_truck 6 days ago
The only updates it gets anymore are little data packs when laws/regulations change and it seems like they automated that because it's always ready before it's needed. The last "big" update was a guide to running it in parallels on new macs.
Comment by chii 5 days ago
Comment by hombre_fatal 6 days ago
That's the hard part. I'll take on incidental boilerplate (e.g. Elm) if the architecture helps me build and understand applications. Whatever gets me to that latter part.
Comment by lll-o-lll 6 days ago
However, you need to remember that these simpler tools were a product of a much simpler set of requirements. Fixed themes, fixed screen size, fixed aspect ratios. I imagine a wysiwyg editor that gives you all the power of, say, CSS, and yet remains simple for simple things, sounds like a much more difficult task. I haven’t worked on UI in 20 years, so maybe such tools do exist.
Comment by chii 5 days ago
so the problem is CSS isnt it?
The constraints and flexibility of CSS makes it difficult to make a simple outcome easy to specify in similarly easy CSS.
Comment by SkiFire13 5 days ago
Comment by bschoepke 6 days ago
https://www.reddit.com/r/rust/comments/1tql7uf/microsofts_wi...
Comment by coffeeaddict1 6 days ago
#include <QApplication>
#include <QWidget>
#include <QPainter>
class widget : public QWidget {
void paintEvent(QPaintEvent*) override {
QPainter(this).drawEllipse(QPoint(320, 240), 100, 100);
}
};
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
widget w;
w.resize(640, 480);
w.show();
return app.exec();
}
It doesn't seem too complicated to me.Comment by ecshafer 6 days ago
Comment by cwillu 6 days ago
Comment by TheRoque 6 days ago
Comment by nnevatie 6 days ago
The licensing is trying to paint a picture of LGPL being somehow uncertain/evil, the way Qt advocates non-idiomatic C++ practices - I could go on for days, but shall digress.
Comment by jetbalsa 6 days ago
from tkinter import \*
root = Tk()
a = Label(root, text ="Hello World")
a.pack()
root.mainloop()Comment by nandomrumber 6 days ago
Comment by monster_truck 6 days ago
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 :)
Comment by zionsati 3 days ago
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.
Comment by danielvaughn 6 days ago
Like, all of that should be expressable with just
<graph>
<circle />
</graph>Comment by molybd3num 5 days ago
Comment by Gerharddc 6 days ago
Comment by 1matin 5 days ago
Comment by Gerharddc 5 days ago
Comment by Simran-B 5 days ago
I'm not sure if it's actually needed - a lot of things have been tried and the paradigms that persisted you can choose between but it seems to be a matter of taste. I often feel that the real issue is the lack of maturity and stability. I rather want a complete UI toolkit including learning resources (not reference docs!), no matter how boring, instead of super clever implementation that is never in a usable state.
Comment by mgerb 5 days ago
Comment by sppfly 5 days ago
Comment by noelwelsh 6 days ago
(Don't tell me here. Make your docs better, so everyone benefits!)
Comment by cookiengineer 6 days ago
(Author of Gooey [1], a GUI framework for WebASM in Go)
Comment by noelwelsh 6 days ago
Comment by persedes 6 days ago
Comment by anitil 6 days ago
Comment by cookiengineer 6 days ago
Comment by Findecanor 6 days ago
And in early 2000, I was in a mailing list for designing a successor/replacement to X11, code-named "Gooey" that never went anywhere.
Comment by minraws 6 days ago
Comment by WD-42 6 days ago
Comment by WD-42 6 days ago
Comment by porphyra 6 days ago
https://github.com/duanebester/gooey/blob/main/CLAUDE.md
But still, the project solves a legit pain point. And the author seems pretty hands-on with steering the technical implementation details.
Comment by KolmogorovComp 6 days ago
Comment by 1matin 5 days ago
Comment by Erenay09 6 days ago
Comment by john_alan 6 days ago
It's a real problem, so many projects are adding features at breakneck speed, but with so many bugs and so little understanding.
Maybe that's just how it all works now, but I don't like it.
Comment by kristoff_it 6 days ago
Comment by atmikemikeb 6 days ago
Comment by jbritton 6 days ago
Comment by vova_hn2 6 days ago
> 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
Comment by shorsher 6 days ago
Comment by torginus 6 days ago
Comment by ssernikk 6 days ago
GPUI is for rust, not zig
Comment by mgrandl 6 days ago
Comment by LouisvilleGeek 6 days ago
Comment by Sakamitsu 6 days ago
Comment by nnevatie 6 days ago
Comment by snarfy 5 days ago
Show me the GUI! We are gonna need more than a couple pics of chat-zig.
Comment by AbuAssar 6 days ago
Comment by spartanatreyu 6 days ago
Comment by amelius 6 days ago
Comment by localhoster 5 days ago
Comment by mawadev 6 days ago
Comment by porphyra 6 days ago
That said, it fills a legit hole in the ecosystem and the author seems to be hands-on with the technical direction.
Comment by randypewick 6 days ago
What's so special about Zig dev that puts them aside from the giants they stand on?
Comment by Validark 6 days ago
Comment by randypewick 2 days ago
Arguably, there are important things that Zig devs are doing which are not "Zig dev made" (hence the "giants" I mentioned). NASA 10 rules are now rebranded as "tiger style" and marketed along Zig; Data Oriented Design existed before Zig; LLVM existed before Zig; the authors of gpui, the library that seems to have inspired gooey, apparently did a pretty great job (please correct me if I'm wrong, I don't do graphics, don't use gpui, this is what I understood when gpui came out).
I'm sure Zig devs made pretty great things, too! Does Zig make them apart? Do Zig attracts more capable devs than other languages, maybe? Genuine question!
Comment by Validark 1 day ago
On the subject of Data-oriented design, it's mostly just the default way of thinking about software in most contexts. The DoD movement is not so much building on predecessors as it is ignoring predecessors who tell us to use OOP and "clean code" for everything.
LLVM is the part of Zig that breaks the most, it's the slowest part of the compiler by leaps and bounds, and takes the most time of the core team to fix the constant breakages it introduces. I'm glad it exists obviously, to some extent, but I wouldn't praise it for much more than its widespread appeal and ease of "adding another pass" compared to GCC and having more of a company-friendly license. It could have been designed a lot better and could be managed very differently and we'd see better results.
GPUI - I bet it's great. I guess I just tend to dislike phrasing like "stand on the shoulders of giants" because I tend to think the best thing hasn't been built yet. "Real engineering has never been tried!" I agree though that an AI port of a Rust library to Zig is probably not what any of us consider the holy grail of engineering.
In short, I think Zig and TigerBeetle and the Handmade Ethos exist not primarily because others paved the way, but because others went astray. Andrew Kelley used to argue with people online about how cross-compilation should be easy for systems languages and got hit by the excuse parade every time. Eventually he decided to quit his day job and solve it himself. Is that standing on the shoulders of giants? I don't think so. Yes, he has technically picked up where others left off, but he's picking up on abject failures and fixing them.
Now there is good engineering within LLVM and Clang, and good developers have done good work on it. I'm not saying everyone who worked on it is stupid or did bad work. However, there are glaring issues at a macro level and organizational level that individual contributors can't fix.