Live data from Hacker News

Zerostack – A Unix-inspired coding agent written in pure Rust

crates.io

301–310 of 334 posts

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#301
post #94

Earlier quoted context omitted.

Rust "denialism" is as annoying as rust evangelism. Of course any seemingly idiomatic rust is going to run circles around TS transpiled into JIT-compiled JS.

Lamenting any 'not even criticism' of Rust as 'denialism' is just evidence of the insane cult that is Rust. Rebuilding Claude Code in Rust will make almost no difference in terms of real world performance. V8 is 'relatively fast', and there wouldn't be any noticeable improvements there, and probably not memory footprint either. The source for Claude Code was leaked and it's a vibe-coded mess, there's not much thought…

You're the delusional one for bringing up the memory usage of the inference server that clearly isn't running inside the coding agent.

The problem with your comments is that you're showing off a fundamental lack of understanding between managed languages and unmanaged languages.

The vast majority of GCs are optimized for throughput and allocate big chunks of memory. They also tend to never release it if there was a temporary memory spike. The most advanced GCs also tend to have either read or write barriers, which slow down basic object accesses.

Just in time compilation and managed languages in general need to retain a runtime representation of the source code to perform JIT compilation and then they have to store the compiled code in memory as well.

JavaScript uses references against dynamic objects, which means you have to pay the indirection cost of a pointer but you also need to store type information as well to monomorphize the object literals and classes at runtime and fall back to a regular hashmap when fields are added dynamically.

All of these things will add up and increase the amount of memory the application uses and how slow it runs.

Sure Claude Code has severe architectural issues causing it to leak hundreds of gigabytes of RAM, but if those were not there you could easily build a C++ based alternative that runs circles around a hypothetical JavaScript based Claude Code that got its act together.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#302
post #223

Earlier quoted context omitted.

codex is in rust and not in power and memory hungry js/ts.

oh sweet I had no idea. funny that i mostly use it to write rust

It was previously JS/TS, but they rewrote it in Rust, sometime in the past 12 months.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#303
post #253

I tried to install opencode on my x200 laptop, it would segfault as Bun wants some specific intel processor extensions (SIMD). Now I tried to install zerostack, but the compilation freezes at a certain package. Is there a static binary available for linux?

I finally managed to compile it, quite happy with the usage.

Will try to rebuild it with static flag.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#304
The way I see this going is there will be 10s of thousands of model harness projects out there, because the tools make it so easy to make a harness that suites your workflows exactly the way you like (as someone who made their own harness)

I also used bwrap for sandboxing. I'm looking at layering slirp4netns, because I found out that models will happily break out of the sandbox via the the host network interface.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#306
post #228
post #212

Earlier quoted context omitted.

latency and throughput (when with Java the system is crying for more memory while it's chilling in the Rust case)

What's the latency difference between a long running process issuing a network call in Java vs rust? This is such a short time that it is completely overshadowed by noise (OS doing something else, what other software is running etc) As for throughput: you have 1-2 requests going at a time, the next one waiting for the reply. What throughput are we talking about? That's like speeding to the post office and expecting y…

> That's like speeding to the post office and expecting your letter to get to the recipient faster.

I mean, the post office is not a magic box. Actual people will take your letter somewhere, sometimes batching sends. So running to the post office might actually get your letter in an earlier batch, same as ordering on amazon or your online supermarket in the morning or in the evening might change the delivery time.

Pedantic, I know, but interesting example.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#307

Earlier quoted context omitted.

For small to medium projects, an LLM can write functional (if not well crafted) Rust. Considering how easy this is now, why choose a heavier, slower and less typesafe language?

I find it kind of shocking that Anthropic doesn't see it this way.

Claude Code has whole game engine built into it. God knows why.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#308
post #277
post #52

I (somewhat jokingly) wrote one recently too... https://github.com/pnegahdar/nano in under 200 lines. Repl, sessions, non-interactive, approvals, etc The smarter the models get the less the harnesses matter (outside of devx). Maybe one day I'll run it through swebech.

Ok, I know it's a joke. And also, are you daily-driving it?

Not daily driver, but have used it as a utility a few times.

For my daily work I like letting different harnesses compete and look over each others work (while subsidized with the subscriptions) so I use OpenADE.

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#309
post #48

Earlier quoted context omitted.

I'm building an agent framework in golang and it is extremely light weight. Startup time is under 1/2 second, and RAM usage is really low. I have a 12 year old laptop and it happily runs without slowing down. There's no reason what is essentially a string concat engine should be slow on any hardware, including old hardware.

Sounds interesting, would you like to share any more information about your project?

Link is here [0]. The idea is to model cognitive states (how to think), and workflows (what to think about) as statecharts. The charts will be defined in YAML (version-able, hot-reloading). Context payloads are defined in an agent YAML file. Think of it as a map, like a drive map for a computer's HDD/SSD. You spec the order of context chunks, what goes into them, and then when the inference payload is built, it uses the context map definition (comprised of the chunks you defined), the agent definition (including model params like context length, temp, etc), cognitive state, and workflow state to build out the inference payload.

Agent cognitive states may add chunks to the system prompt. Workflows may add chunks to the system prompt. Tool access may vary by agent/workflow state (policy is last-defined-wins overlays to keep it simple to reason about).

Agents may run by themselves or be 'bound' to a workflow. Agents can detach from a workflow before it is finished, and either re-bind, or another agent may bind to the workflow (one implements, another reviews, for example).

Conceptually, this is all very simple, which is why I'm hand rolling it.

The goal is a minimal runtime that can support long-running agents in a 'zero human company' setting.

On top of the runtime will be a minimal change control workflow (if you've spent time in hardware engineering, these are standard processes governed by a company's quality system).

I've yet to wire in the economic pieces (token spend, power consumption, rollups that show performance of various agents based on inputs and outputs).

It is a bit far fetched, but I'd like to get this thing ISO9001 certified, and maybe AS9100 certified.

This is all to scratch my own itch, tbh. Most agentic systems are hard to reason about, bloated, lack visibility in the appropriate places, lack economic data of sufficient granularity, and so on. So I'm building this.

[0] https://github.com/zerohumancompany2/maelstrom-code

Re: Zerostack – A Unix-inspired coding agent written in pure Rust

#310
post #266

Earlier quoted context omitted.

You won't hear the fan because you're still building it. The resources I was talking about are developers × time.

I am talking about using software - if software is used by many people, that's the more relevant resource usage.

It is a common trend for companies to optimize for visible CapEx at the cost of increased but invisible OpEx for consumers.
Post reply on HN