27 comments

  • nepthar4 hours ago
    Okay, so this is cool, but also vibecoded by someone who just does frontend. I totally support AI development, but the first commit was 4 days ago and it&#x27;s entirely written by claude. The UI looks like &quot;the style that that AI comes up with&quot; turned into a C framework.<p>I don&#x27;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.<p>Just take care when evaluating this for actual usage.
    • simplesocieties0 minutes ago
      People (rightly so) complain about the wastefulness of datacenters and AI mostly due to the pollution, and &quot;projects&quot; like this one not only do not justify that pollution, but worsen it.<p>We have GPUI, we have web components, we have Clay UI. No one needs a C UI library.
    • arecsu3 hours ago
      The thing with these kind of projects is that... What value do they really bring to the table? Because if it&#x27;s so easy to come up with something like this (and arguably easier over time), then if I need a UI toolkit and components for my app, I can just prompt them right away to obtain something like this with minimal effort. Plus, adapted to my needs, my code, my platforms and language. UI&#x2F;UX done right is still a dance between design and engineering. But I&#x27;m not sure these libraries do solve anything meaningful today that is worth the abstraction and dependency.
      • pan692 hours ago
        I am pretty sure that, even though this project is generated by AI, there will be a large majority of quicks and edge cases and bugs, just like as if a bunch of people would have written it. It&#x27;s just that the initial bulk of the code was produced in a fraction of the time. All those bugs, quicks and edge-case still need to be resolved (if you were to actually use this). If you prompt your own version of this you just end up with your own set of bugs, quirks and edge-cases. The nature of software hasn&#x27;t changed, just the speed with which we produce it.
        • creata5 minutes ago
          I promise you, this project has not addressed the quirks and edge cases. I don&#x27;t think many of these components have even been tested by a human, because there are glaring omissions that you&#x27;d see if you just played around with them for a minute.<p>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?
      • mjburgess2 hours ago
        ~200 USD in 1mo of claude, and 4 days of developer time -- call it 5000 USD
    • creata2 hours ago
      <i>How</i> does a five-day old C project have 611 stars? Hard to imagine that many people are writing user interfaces in C...
    • dalemhurley3 hours ago
      It looks like ShadCN-UI which AI likes to use.
    • mgdev4 hours ago
      Some projects are worth it just for the rebrand.
  • hollowturtle1 hour ago
    I click around on mobile nothing happens, vibe coded trash. I’d spend 10 minutes comparing it to Clay but it’s not worth it I already know the result. The problem with this kind of projects is they expire very soon, the least the effort the least the value
  • zerr4 hours ago
    More like custom UI components. Native would have been if you had wrapped e.g. Cocoa NSButton on macOS and Microsoft.UI.Xaml.Controls.Button on WinUI.
    • stephc_int133 hours ago
      Native is one of those words that means different things depending on context and your background. For me, native means actual binary code running on the machine, not through a JVM or V8 or anything of the sort.<p>In the Apple world, Native usually means using the system UI components and the Apple guidelines.
      • i2talics3 hours ago
        &gt; native means actual binary code running on the machine<p>Wouldn&#x27;t &quot;native ... for C&quot; be redundant?
        • stephc_int133 hours ago
          Not the best title. It is not &quot;for C&quot;, but in C. And currently useable on desktop + web but after looking at the project I think it will quickly be ported on mobile etc.
    • krackers3 hours ago
      There are some libraries that use native widgets on each platform, e.g. libui-ng. Although the issue with things like this is that you aren&#x27;t going to be able to use all of AppKit, and you get forced into the lowest common denominator expressable by all platforms.<p>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&#x27;s quite verbose. There should be some simpler way to express layout constraints and have button callbacks.
  • turtlebits3 hours ago
    We need a HN min-release-age flag for posted projects.<p>Or some flag to ignore users that post these types of projects often.
    • zamadatix2 hours ago
      The site and community should be structured such that what it values discussion for naturally bubbles up, not different opinionated flags for each interest, fad, or pet peeve.<p>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).
      • wavemode1 hour ago
        Any community needs not only a bubbling up of good content, but also an immune system against bad content. Otherwise in practice you become inundated with spam and noise.<p>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.
    • hilti3 hours ago
      I usually don&#x27;t post a lot, but to be honest: the components demo definitely caught my attention (I know it&#x27;s coded by Claude)<p>It&#x27;s not my project but I will definitely give the library a try.
    • ivanjermakov48 minutes ago
      Surprised post downvoting is not a thing yet.
  • apitman3 hours ago
    Since most of my code for work is AI-generated now, I recently started a small side project in part to continue practicing coding by hand, and decided to use C. There&#x27;s something nice about using a language that&#x27;s simple enough that I could write&#x2F;maintain my own compiler if I really had to.<p>I&#x27;m really curious how secure C software would be if reviewed by AI and run exclusively in a WASM runtime.
  • piker4 hours ago
    C increasingly makes sense for compile times if you can have a separate Fable pass on memory safety, etc.
    • nateb20224 hours ago
      Assembly is increasingly making sense for compile times if you can have a separate Fable pass on code correctness, etc.
      • piker4 hours ago
        I think you’re kidding, but wouldn’t you have to maintain different code bases for each platform? C compiler gets you everywhere and WASM.
        • genxy4 hours ago
          Once you have Wasm, it gets you everywhere and the best path to Wasm is Rust.
          • drnick12 hours ago
            But Rust is unreadable compared to reasonably well written C. It matters if you care to read any of the code yourself and&#x2F;or want to retain the ability to make manual changes. There is a reason C hasn&#x27;t been displaced after all this time.
          • arbll3 hours ago
            Funny in a thread that started with `increasingly makes sense for compile times`
            • genxy3 hours ago
              Fine, I&#x27;ll make a fast rust compiler.<p>Rust with no deps and a single compilation unit is already fast.
        • raphlinus4 hours ago
          Yes, and? As the cost of code generation approaches zero, this starts to make more sense, especially if you <i>do</i> have mechanisms in place to ensure safety and correctness.<p>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.
          • zamadatix2 hours ago
            As the cost of code gen approaches 0 the cost of the test suite actually grows. Not just in definition, but execution.<p>An MP3 decoder for a single target doesn&#x27;t really run into that complexity, a UI components library for (Linux, Windows, macOS) * (x86-64, ARM64) suddenly has a 6x multiplier on what was already something with waaay deeper dependencies and integrations than MP3.<p>At least that&#x27;s what I&#x27;ve noticed vibing my DE without external libraries. It went really fast when the complexity was small because most of the work was in adding code. Then it started taking longer to build and test, even with optimized builds and tests, than it took for the AI to do its part.
          • piker3 hours ago
            Yes that makes sense, but if you&#x27;re iterating on software then I think C will generally win due to its ability to compile cross-platform until you want to build a &quot;release&quot; which you could do by having Fable translate it to ASM at that point.
          • genxy3 hours ago
            Did you have it go directly to asm or emit the assembly from the Rust toolchain and then contract that? For small stuff, I have been having it write directly, or larger pieces I am having better results via contractions.
            • raphlinus3 hours ago
              For this experiment I had it write directly.<p>I should add, part of the experiment was to test whether having variable names and (C style) types would help the LLM. For a task of this size (about 1.5 kLoC Rust, 3k insn asm) it was inconclusive, but for larger projects I suspect it would make a difference.<p>And the plan for symbolasm is to move past C style types into Rust style and maybe dependent typing, specifically to facilitate automated proofs.
          • mlfreeman3 hours ago
            at that point, how hard would it be to get the LLM to just make the binary? (iow, llm as compiler)
        • linkdd4 hours ago
          Just ask the slop machine to translate the binary to every platform.
    • MomsAVoxell3 hours ago
      C has always made sense for building software as long as you do a memory safety pass.<p>The tools have gotten fancier, for sure, though.
    • efficax2 hours ago
      <a href="https:&#x2F;&#x2F;fil-c.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fil-c.org&#x2F;</a> exists
    • comex3 hours ago
      I&#x27;m observing the opposite phenomenon. I recently vibecoded (with supervision) a 25k-line Rust codebase that takes 15 seconds for every build. If I were writing that by hand, a 15-second build time would drive me crazy and I would stop working until I could find a good way to speed it up. With vibecoding it barely matters, because the interval between builds is much longer and the agent (Opus 5.5) spends most of its time thinking or running tests. Unlike me, the agent rarely makes the kind of trivial mistakes that require rebuilding multiple times in a row.<p>For larger codebases, things might be different.
    • lpghatguy3 hours ago
      Leaving memory safety up to a model is wild. That&#x27;s not a sound guarantee of safety for anything.
  • brabel3 hours ago
    This is amazing, finally a good looking UI framework for a low level language! I will be looking at this next time I need a little UI, since it&#x27;s nice when you can make an app that has a UI and it&#x27;s distributed in much, much less than 1MB rather than 300MB as most Electron apps.
  • wg04 hours ago
    Looks like ShadCN. That too in C. It&#x27;s really really elegant.<p>EDIT: It&#x27;s immediate mode.
  • dbvn2 hours ago
    This is a major spillage of CUI
  • saidnooneever5 hours ago
    this looks really sweet actually. didnt dig into the backing code yet but the examples look really nice and clean to implement a UI with. well done.
  • kettlez3 hours ago
    Clearly vibecoded, but it looks really nice. The widget id generation seems pretty naive, I wonder how well it handles dynamic UIs.
  • skydhash4 hours ago
    This looks like built by someone raised exclusively on web and touch technologies, forgetting that both are the results of constraints. The web was not meant to be a UI platforms and have poor primitives, and touch devices lack precise positioning and a physical keyboard.<p>Take the chips and rating as an example<p><a href="https:&#x2F;&#x2F;yappologistic.github.io&#x2F;CUI&#x2F;#&#x2F;c&#x2F;chips-and-rating" rel="nofollow">https:&#x2F;&#x2F;yappologistic.github.io&#x2F;CUI&#x2F;#&#x2F;c&#x2F;chips-and-rating</a><p>It’s purely aesthetic as functionality (and ux) wise, chips are not different from checkbox with labels and rating is just a discrete slider.<p>And as I thought, you can see the duplicate code for switch and checkbox here.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;yappologistic&#x2F;CUI&#x2F;blob&#x2F;f1202e6d98cdc297f901d16b674259c6a646aa80&#x2F;src&#x2F;cui_controls.c#L141" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yappologistic&#x2F;CUI&#x2F;blob&#x2F;f1202e6d98cdc297f9...</a><p>People do need to differentiate between UX primitives and something that just looks different.
    • hollowturtle1 hour ago
      Also ids are generated with discrete values? Never seen something like that cui_make_id(ui, label) ^ 0xC0EC0001u
  • slopnt1 hour ago
    Design is essentially a clone of egui in C.
  • pearcoder3 hours ago
    Since AI has removed the bottleneck of writing code, so I understand why not go directly C. This could bite back sooner or later.
    • keel-control2 hours ago
      as elon musk said eventually the only language used would be assembly for systems programming because programming languages are only needed by humans.
      • bigyabai2 hours ago
        That&#x27;s a very easy thing to say when you own an AI company, and much harder to agree with when you pay by the token.
  • rafael-lua2 hours ago
    Can&#x27;t wait for RUI, the vibecoded Rust version of this vibecoded C project.
  • mllev151 hour ago
    One of the most hideously ugly C codebases I’ve ever laid my eyes on. I don’t even care if it’s bug free. What value does this add to the programming community? A “library” generated by a morally bankrupt megacorporation’s plagiarism machine. Good job learning nothing, contributing nothing except another shadcn looking UI shitkit, and further training the beast that will eat you alive one day. I will now use this opportunity to promote Clay (not mine obviously), which is absolutely loaded with heart and soul, and is a beautiful piece of engineering: <a href="https:&#x2F;&#x2F;www.nicbarker.com&#x2F;clay" rel="nofollow">https:&#x2F;&#x2F;www.nicbarker.com&#x2F;clay</a>
  • all24 hours ago
    The acronym collision is entertaining. I now want to use CUI to mark up my CUI.
  • CrzyLngPwd4 hours ago
    Looks lovely, but without long term support and hostory, I wouldn&#x27;t touch it with someone else&#x27;s long stick.
  • dvt3 hours ago
    So funny seeing these kinds of frameworks being vibe-coded. I can tell the author has never used the zillions of frameworks the LLM was trained on. Writing (and maintaining) this kind of code is absolute nightmare fuel.<p><pre><code> bool narrow = cui_viewport_size(ui).x &lt; 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); &#x2F;* a menu button opens the drawer when narrow *&#x2F; } cui_sheet(ui, &quot;Menu&quot;, &amp;s-&gt;drawer, .side = CUI_SIDE_LEFT, .size = 280) { nav(ui, s); } </code></pre> There&#x27;s a reason QT uses XML for their layouting, there&#x27;s a reason people prefer Tauri + Vue&#x2F;React, there&#x27;s a reason Swift uses declarative paradigms in all their UI code. It&#x27;s not that you <i>can&#x27;t</i> build good UI frameworks in low-level languages; for example, I think Go&#x27;s Fyne[1] is a pleasure to use. But people actually used their brains when designing that framework, as opposed to &quot;hey Claude build a UI framework in C, make no mistakes.&quot;<p>[1] <a href="https:&#x2F;&#x2F;fyne.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fyne.io&#x2F;</a>
    • comex3 hours ago
      That looks pretty readable to me. Somewhat noisier than SwiftUI due to all the repeated &quot;cui_&quot;, but not much. I&#x27;ve seen far worse.<p>I would be more concerned about the opposite problem: the fact that it&#x27;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&#x27;t have these issues.<p>edit: actually it&#x27;s worse than reactive, it&#x27;s full immediate-mode render-everything-every-frame.
    • weego2 hours ago
      <i>There&#x27;s a reason QT uses XML for their layouting</i><p>You&#x27;re on shaky ground using xml for ui layouts as posterchild for good developer ergonomics.
      • dvt1 hour ago
        It’s like democracy: the worst except for all the others.
    • stephc_int133 hours ago
      I think you are missing the point entirely.<p>The use of C, in that case, was likely made for performance reasons and avoiding dependencies.<p>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.
  • zerr4 hours ago
    Can you please prompt your agent to generate a C++ binding?
  • MomsAVoxell3 hours ago
    You know what this needs now? A Lua REPL.
  • huhtenberg4 hours ago
    Any pre-built examples? Even if it&#x27;s something like a calculator.
  • annoyingnoob4 hours ago
    CUI - Controlled Unclassified Information.
    • MomsAVoxell3 hours ago
      <p><pre><code> $ tree lab lab ├── BUI ├── CUI ├── GPUI └── TUI</code></pre>
    • dabluecaboose3 hours ago
      Yeah I just did a double take at my desk reading this
    • blahyawnblah3 hours ago
      Yeah. Not good acronym for this.
  • Luke26424 hours ago
    Looks great, but node editor is janky on mobile.
  • ipsum23 hours ago
    I wonder how this does with embedded devices. Would be cool to get an ESP32 with smooth animations&#x2F;nice UI.
  • jitl1 hour ago
    I’ve also spent the last couple of weeks vibe coding a component-based UI framework for C. My target is embedded hardware with 2 * 300mhz ARM 32 CPU, and a Nintendo 3DS like OpenGL ES 1.1 GPU from DMP: Fujifilm cameras from 2013-2016 like the X70, X-E2, X-T1, X100T. It’s a bit faster than iPhone 2007 on CPU side, and slower on the GPU side due to needing to copy from GPU back to main memory for scan-out. It’s funny how these things seem to come up and then everyone’s doing it.<p>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.<p>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 :)
    • hollowturtle1 hour ago
      Mentioning vibe coding and “It’s been a huge effort to add …” in the same phrase what a joke
      • jitl14 minutes ago
        life’s more fun if u do funny stuff
  • cincinnatus4 hours ago
    Shame to put effort into encouraging more C code. All C code needs to be torn out by the roots. I don&#x27;t care how carefully crafted it is and how many Fable passes have been done, it is inherently unsafe.
    • Luke26423 hours ago
      Embedded guy here... Nah. No MMU, no problem. ;-)<p>Well, fewer problems!