180 points · by hilti · 3w ago · 101 comments
I don't want to discourage this kind of experimentation, but I also question how much of the last 20+ years of UI and C knowledge was not used in the construction of this project. Also, do I want to build a kanban board in C? Unsure.
Just take care when evaluating this for actual usage.
Do you think that this person is going to stick around and fix those issues, or just move on to the next impressive project in a week?
System design is principally a process of identifying the best possible points at which to decouple the components that will make up the system. A clean design means that components can be swapped out for alternatives easily. Messy designs result in interlocking complexity.
Structuring your components as a general-purpose re-usable library forces you to consider how it is decoupled from consumers. If you do a good job designing it, it should be usable by all sorts of consumers, so you might as well make it a standalone library.
To a first approximation, I think this process of identifying clean decoupling points is the main thing that humans still need to babysit their agents over.
People are becoming extremely lazy and shipping the first slop the model generates because they get a rush from putting their stuff in tot he world as fast as possible.
However, I would bet significant money that all the projects like this (where every aspect has hallmark slopisms (the vibe interface design, the copy) will lose out to projects that are also heavily AI coded but that took the time and care to actually polish and differentiate themselves and thus are later to the game because they shipped after a few weeks or a month of work and refinement instead of a day.
AI can save you a lot of time but it can't save you from your own lack of restraint and your inability to discern and be an objective judge of the value your thing will have to other people. For software, mere existence is no longer sufficient anymore. Anyone can generate whatever you made instantly if you put zero effort or discernment into it. This is why so many of the Ainfluencers are emphasizing "taste".
But even taste won't save you on the end either, since anyone can clone your stuff as soon as it ships.
I personally think the future of software is probably just two extremes:
1. Personal dinky vibe coded apps that all have their individual creator as the sole user.
2. Large scale apps that don't work without significant marshaling of hard physical resources (e.g. LLMs themselves).
All the middle bits, user applications that target a specific problem space but that run locally and/or don't need legions of data centers and networks to run, will probably just die eventually. Maybe a couple of established apps will stick around in business contexts because employees all using their own personal apps and workflows causes too much coordination overhead, but at the consumer level I fully except everyone will be just vibing their own stuff pretty soon here.
For specific and uncommon use cases? Sure. For something as generally applicable as a photo editor or a general purpose OS? Not a chance.
This is something I'm seeing more often... vibecoded is starting to mean somebody just delegated their thinking to AI and whatever AI spit they just shipped blindly.
I think this is quite different then what I'd call AI-assisted coding, in which the engineer is still in the reins and you can see, even if you see the tales of a lot of code in short time, that the code has actually been looked over and polished by a human.
There might be a place for vibecoded software where only the outcome matter and the code is soft of disposable, but a library or a framework doesn't seem to be the place for that.
The question is: if you're doing this same thing, but with LLMs as your "reports," is it vibe coding? The term was once an epithet, but I think it's expanded to refer to the technique of not living in an IDE, not the objective function.
If your objective function places an emphasis on maintainability: vibe coding can be a positive. If not: it can be a source of great pain. As with many things, it's the wielder, not the technique.
This is the kind of thing I can't understand. They're trying to solve a problem they don't have. Assuming other people might need it, without understanding anything about that domain.
There's a thing that people who are infatuated with AI can't understand: anybody else has the same power as you! The old entrepreneurship-like ideal of trying to create something new just for the sake of innovation doesn't work anymore. Innovate on something that solves a problem you have, for you. Otherwise it's just slop, introducing chaos to system, increasing internet entropy.
We have GPUI, we have web components, we have Clay UI. No one needs another C UI library.
Well, actually they do, but the LLM wouldn't know why. You gotta have used all these to figure it out, and then spend months wondering upon a better design, researching old experiments by random people in archived repos for inspiration. LLMs are useful only for that last part, quickly comprehending a strange repo you found from 15 years ago.
Take the chips and rating as an example
https://yappologistic.github.io/CUI/#/c/chips-and-rating
It’s purely aesthetic as functionality (and ux) wise, chips are not different from checkbox with labels and rating is just a discrete slider.
And as I thought, you can see the duplicate code for switch and checkbox here.
https://github.com/yappologistic/CUI/blob/f1202e6d98cdc297f9...
People do need to differentiate between UX primitives and something that just looks different.
In the Apple world, Native usually means using the system UI components and the Apple guidelines.
Wouldn't "native ... for C" be redundant?
A good middle ground might be having platform-specific pieces but expressed using a more standard domain-specific language. E.g. technically you can already wire up GUIs without interface builder but it's quite verbose. There should be some simpler way to express layout constraints and have button callbacks.
Or some flag to ignore users that post these types of projects often.
Though, funnily enough, this kind of info and more is extremely easy to add to HN via a vibed extension. At this point, mine just stops HN from loading completely and constructs its own page (with a proper dark theme and the information I care about).
The reason for this is an effort asymmetry: casting upvotes is easy, and most people do it without much thought, whereas determining that something is spam or misinformation requires looking a lot more closely.
It's not my project but I will definitely give the library a try.
Yes, I sometimes wish for a downvote button, but so far I have more often wished for a way to silently make flagging a no op for users that abuse it.
1. It looks and behaves very polished. From playing around with the gallery the only issues i noticed is that the mouse wheel goes to the "outermost" control instead of the "innermost" and that there isn't a right click / context menu for text input fields with commands like copy, paste, etc (but the common shortcuts do work - including editing shortcuts like home, end, shift+movement, ctrl+d, etc).
2. According to btop the applications seem to use relatively little memory compared to other apps that look similar (~73MB). Of course it "helps" that other apps that look similar tend to use either Electron or some embedded web browser that balloons memory usage to several hundred MBs :-P.
3. There are practically no dependencies - even OpenGL seems to be an optional runtime dependence. Using objdump shows that it only depends on libm, libSM, libX11, libXext and -of course- libc. This is neat for self-contained applications.
4. The files are also relatively small - after stripping debug info from the release binaries (not sure why they're there) the hello world example is ~323KB, most examples (that use richer UIs) are somewhere between 350KB and 400KB and the gallery that contains everything is 1.4MB.
5. The UIs feel very light and snappy/responsive.
On the negative side:
1. The apps always seem to use ~4-5% CPU here - this is because they keep drawing the window all the time. Mangohud shows them not capping the FPS at all - which is good for smooth and responsive input, but drawing should stop if there are no changes to the scene/UI that need updates.
2. The code looks very messy - i do not see any `.clang-format` or anything like that. If you're going to use LLMs for writing the code IMO you should have both automatic code formatting and a `CODE_STYLE.md` (or something like that) for specifying how the code should look. It doesn't avoid the LLMisms in code but helps a lot to keep it readable (IMO at least).
3. There is no custom theme support (you can customize some aspects of its theme but you cannot make it look like, e.g, Windows 95, Mac OS X Leopard or Morrowind).
On the "it depends on your taste" side:
1. It is clearly very web and mobile inspired.
2. It uses an immediate mode approach.
I did an experiment a couple weeks ago of having Opus 5.5 translate an MP3 decoder from Rust into Cortex-M33 assembly language, both raw asm and symbolasm. The code was 3x smaller and ~1.5x faster than Rust -O3. These seem like gains that are worth it.
The tools have gotten fancier, for sure, though.
For larger codebases, things might be different.
I'm really curious how secure C software would be if reviewed by AI and run exclusively in a WASM runtime.
EDIT: It's immediate mode.
$ tree lab
lab
├── BUI
├── CUI
├── GPUI
└── TUI bool narrow = cui_viewport_size(ui).x < 760;
cui_row(ui, .width = CUI_FILL, .height = CUI_FILL, .align = CUI_ALIGN_STRETCH) {
if (!narrow) { sidebar(ui, s); cui_separator(ui); }
content(ui, s, narrow); /* a menu button opens the drawer when narrow */
}
cui_sheet(ui, "Menu", &s->drawer, .side = CUI_SIDE_LEFT, .size = 280) { nav(ui, s); }
There's a reason QT uses XML for their layouting, there's a reason people prefer Tauri + Vue/React, there's a reason Swift uses declarative paradigms in all their UI code. It's not that you can't build good UI frameworks in low-level languages; for example, I think Go's Fyne[1] is a pleasure to use. But people actually used their brains when designing that framework, as opposed to "hey Claude build a UI framework in C, make no mistakes."[1] https://fyne.io/
I would be more concerned about the opposite problem: the fact that it's apparently reactive and thus inherits the same performance pitfalls as every other reactive UI framework. Retained-mode UI is much uglier (at least if you build the UI in code) but doesn't have these issues.
edit: actually it's worse than reactive, it's full immediate-mode render-everything-every-frame.
You're on shaky ground using xml for ui layouts as posterchild for good developer ergonomics.
Sure there is, it's just that the reason might be a very bad one unlike what you imply
The use of C, in that case, was likely made for performance reasons and avoiding dependencies.
The author added dozens of complex widgets in a few days, AI driven of course. The intended audience is not manual coders, you would show some examples to the clankers and ask for you UI and custom widgets.
_sigh_
I didn’t see the code here because I couldn’t find an easy link to its Github. My UI framework i’m calling FocalUI. We do layout and basic geometry with a fork Clay where we added “layer” and “focusable” markers to Clay elements. Instead of drawing immediate mode, we store a list of draw commands and layer geometry in a CoreAnimation-like tree. The renderer composits the layer tree and renders to OpenGL, and we use damage tracking to copy just the changed pixels from the GPU back to the camera’s framebuffer for scan-out.
It’s been a huge effort to add touch inertial scrolling, spring animation, navigation effects etc at 55hz to this device that before only did d-pad nav at 25 Hz, but things are starting to shape up for a release this week :)
Well, fewer problems!