15 comments

[ 6.5 ms ] story [ 148 ms ] thread
> Experience has shown us that an immediate mode API is the only sane way to program GUI applications

I wonder how long till they pivot away from this belief. I feel like everyone in UI goes through this phase as some point, but in the end it doesn't scale to truly complicated UI

I will admit that I don't like vibecoded things, but perhaps I must stomach that AI will be writing a lot in this brave new era.

However, when the commit history has stuff like

  v0.5.0: native backends, software renderer, text input, IME
  Co-authored-by: Claude <noreply@anthropic.com>
  Co-authored-by: Codex <codex@openai.com>
  Co-authored-by: Composer <composer@cursor.com>
  Co-authored-by: Cursor Grok 4.5 <noreply@cursor.com>
  
  377 files changed
  Lines changed: 62423 additions & 2871 deletions
it's very hard. These “change the entire world” commits make for a history that is impractical to follow for a human, and therefore of little interest to me.
I understand the core is the layout engine and a component library? Does the rendering somehow benefit from GPU?

I recently had a good experience creating custom UI based on ebitengine — also a cross-platform Go engine. As it is a game engine, it has this built in game drawing loop, GPU-accelerated, with some cross-platform kb/mouse input handling. And this feels like a good platform to build the layout engine and components on top of. Have you ever considered this? Or how does your approach compare to that of ebitengine? Did you try (and do you position) your library to build custom UI for some underpowered computers such as Raspberry Pi?

How it compares to Fyne?
cross-platform is overstatement.

can I run it on Android? iOS?

no? then 99.999999% of real world users cannot access it. and if it is desktop oly, what is the point? it is no better than web.

> Immediate mode API in the true sense: you never need to maintain UI widgets or sync your data with widget state.

https://judi.systems/shirei/

Known Issues & Limitations

The following are known issues and limitations that we plan to tackle:

    Large text blocks will kill responsiveness! Use the LargeText widget.

    The widget catalog is aimed at developer tooling, not general consumer polish: no rich text, tree widget, or date picker yet.

    There is no robust theming system. Some widgets take an accent color; custom button styles mean implementing your own (the stock Button is a usable reference). Styling can still be verbose at times.
Are these statements compatible?
I had a look through the code to see how it manages not to use a pile of C libraries with cgo like other Go GUI libraries.

The answer is platform dependent:

Windows loads the relevant DLLs by hand and calls them. This is a well established technique in Go programs and due to the super stable DLL interface works well.

Linux has an x11 and Wayland backends and these implement (through a library) the wire protocols directly in Go which is nice and will make cross compilation and distribution easy.

macOS does appear to use cgo to access the cocoa libraries. macOS doesn't like statically linked Go programs anyway though as they don't use system name resolution so this isn't a bad compromise, but will mean macOS stuff needs to be built on macOS I think.

I didn't see Android or iOS support.

A nice innovative approach to GUI building. Since the lowest common denominator for the backends is an RGBA buffer, this will bypass all accessibility things the OS provides.

The above gleaned after a few minutes reading the source so may not be 100% accurate.

What a waste of tokens.
> What is it that matters for "immediate mode"? Is it that the UI renders everything every frame? No. It's that you build the UI by describing what it should look like everyframe, based only (or mostly) on the data. This is why React won...

I don't think that's why React got so popular. React popularized unidirectional data flow, which is different than immediate mode rendering. This readme file seems to conflate the two of those.

Now that I think of it, couldn't one argue that React itself is a retained mode UI, since it choses which components to re-render and which not to?

Super vibe coded project still uses an LRU cache (github.com/dboslee/lru v0.0.1) as a dependency, this is exactly the things these llms were supposed to solve right, why the hell do people still add these 100 lines dependencies in their projects?
This looks better than the other native Go GUI frameworks. Frameworks like these are a really good target for coding agents: the biggest impediment to building a new UI framework is the sheer amount of meticulous grunt work needed. So, sure, I'm on board with the idea of languages not normally a perfect fit for native UI work getting solid, generated frameworks.

But: what's the real advantage at this point to having frameworks like these? I can get arbitrary SwiftUI interfaces built very quickly, with a lot of attention to macOS (for instance) idiom, and an automatically generated interface between the SwiftUI app and Go. That works pretty great. Why take the UX hit at all?

I think AIs generally "like" the API surface exposed by Shirei. They seem to understand it pretty well and are able to "vibe code" any kind of UI you ask of them using this framework.

To your general point though, yes, there's a lot of uncertainty about what things it makes sense to build in the AI era. I don't have good answers for what would make sense for 10 years down the road, but at this point of time, I think a project like this actually makes perfect sense.

Now that AI can write the code for us, we need better frameworks and libraries, because a lot of what we have now is quite honestly slop.

You could say that you could get AI to maintain 3 separate codebases of the same application UI, each one targeted to a different platform, and the AI will maintain the feature parity and you won't have to worry about it.

For now, AI can take care of coding, but it does not relieve you of having to pay attention to things. If you create 2 or 3 code bases for the different platforms you target, the maintenance burden still falls on you.

But I don't know for how long the situation will remain like this.

Last year I did not think I'd be using AI for coding. I dug up a few tweets I posted last year saying that LLMs have hit a plateau and will stop improving, and that AI coding is a scam being promoted by charlatans.

    Co-authored-by: Claude <noreply@anthropic.com>
    Co-authored-by: Codex <codex@openai.com>
    Co-authored-by: Composer <composer@cursor.com>
    Co-authored-by: Cursor Grok 4.5 <noreply@cursor.com>
How do you get so many agents to co-author a single commit?
Rebase (squash), I assume