Unofficial Hacker News companion — get notified on comment replies, and more.

Prospero: Bloat-free, native AI coding harness with ImGui (opens external site)

89 points by ingve 4 days ago | github.com | 39 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (13)

  1. A 5mb binary for windows? Wow I'm looking forward to try this!
    Replies (2)
    1. This comment makes me wonder: could an AI be used to make binaries leaner, and by what fraction?
      Replies (4)
      1. Of course, and to the extent technically possible. Modern AIs can do pretty much anything as long as there is a clear objective function, and the binary size is absolutely one of them. The problem is just that it is not a commonly asked objective.
        Replies (1)
        1. You could just as well ask the model to minimize startup time and it'll just move all the init into lazy loading on first click - formally the target metric improves but in reality it only gets worse
      2. Check out os8088, a Mac-like operating system for the original IBM PC that comes with a lot of apps for it. AFAICT everything is vibecoded using Claude, Codex, etc and pretty much all apps are very tiny (a few KB).
      3. You absolutely can! Just using cl.exe and not linking everything in Visual Studio will likely cut down your compile times and binary size.
      4. The factor starts by what programming language and GUI toolkit gets chosen, and nowadays more often than not, the wrong path is taken.
    2. Harnesses are complicated beasts, there's a lot more needed than you might expect!

      I've been a harness builder this year: Juggler (https://github.com/juggler-ai/juggler) and as a veteran native C++ guy, I'm also a stickler for the "no bloat" approach. I made it a Go binary and used webviews instead of electron, with no node etc.

      However, Juggler's download size has grown this year from about 40MB to 70MB, just because of the massive amount of stuff that you need to put in there to cover all the features people want.

      Using Juggler as an example, any fully-featured agent is going to end up containing a list of junk like this:

      - all the 3rd party libraries for provider APIs like anthropic, codex, etc, some of which contain massive amounts of generated code

      - file format parsers and display classes for loads of random file types, including handling all kinds of images for multi-modal agents

      - a sqlite engine just to be able to import sessions from other code agents

      - a whole WebRTC stack: ICE, DTLS, SCTP and mDNS for remote connection handling

      - all the official MCP SDK junk

      - google's genai also drags in gRPC and protobuf with it

      - Juggler's i18n alone adds about 0.5MB per language, and I've added 8 languages so far

      So sure, you can write an basic agent in 5MB, but it's going to be pretty bare-bones!

      Replies (3)
      1. A 70mb go binary ? This also is very lean so I'll definitely try!
        Replies (1)
        1. Having posted the message above, I realised that I've never really tried to optimise juggler's installer size, and discovered that there's a lot of slack in there. So expect it to shrink by about half in the next release..!
      2. I really don't understand the obsession with binary sizes, like, would you really rather take a lesser option or download the bigger binary that will not even put a dent in your storage use compared to games or video data or cache etc?
        Replies (1)
        1. To be fair, my own obsession isn't really about storage space, it's more about big fragmented apps with thousands of resource files.. I hate it when you see a node/electron app that's actually a folder full of shrapnel. Obviously most people don't notice or care about this, but it just offends my sense of tidiness.

          So in juggler's case, it's actually one binary with all the assets it needs baked inside. Nothing to go wrong, get deleted or moved around, etc.

          (Yes, I'm sure there are probably packagers for node that can hide it all in a binary too, but it all still feels like a big bag of mess to me)

      3. Juggler looks pretty good, thanks for sharing.