Live data from Hacker News

Claude Code uses Bun written in Rust now

simonwillison.net

651–660 of 920 posts

Re: Claude Code uses Bun written in Rust now

#652

Drilling into the original article where Jarred explained the reasoning behind the change, It's pretty clear that under zig the team was doing things by hand that are automatic in rust. Humans and agents share one thing: they are both non-deterministic. He talks about the issue of tracking memory lifecycles manually in zig so it can be explicitly freed. As expected, this leads to a long list of bugs where people miss…

Rust is the clear winner of LLM era, you can't say otherwise.

Re: Claude Code uses Bun written in Rust now

#653
post #647

Earlier quoted context omitted.

> You can just do that, and then Zig is really no less robust than Rust. If you just don't write bugs, then yes all languages are equally robust, including assembly. Zig, like C, is simply not a robust language. I don't know why this feels like something contentious? It's clearly not intended to be robust?

the buffer managemnt is just different pattern and style of code thats more low level. when you care about performance and cpu cache, you have to make sure that actual physical memory gets computed at same time as other memory near it so there is less latency.

the primary motivation isn't latency but complexity. People do in some applications free or allocate collectively because they have interrupt times in mind, but most of the time when you manually manage memory the issue is mental overhead, so people gravitate towards models they can keep in their head.

Allocating in large chunks is often not very performant which is why people came up with tools like the borrow checker, you often want to allocate and deallocate dynamically on a need-basis but that's exactly where bugs occur.

Re: Claude Code uses Bun written in Rust now

#654
post #616

Earlier quoted context omitted.

> Rust does this automatically. A garbage collected language does this automatically. Rust still requires thinking about and tracking memory lifecycles, but the borrow checker will complain and keep you from doing it wrong. That's why LLMs like Rust. It gives immediate feedback on what to fix. By-default constant reference parameters helps prevent major performance problems.

It’s my understanding that bun was ported to unsafe rust, so even these gains would require additional effort on the team’s part, right?

Unsafe Rust doesn't automagically disable typesystem (& borrow checker, but lifetime are a sort of types).

Once raw pointer is turned into a T, &T or &mut T, the borrow checker is on.

Re: Claude Code uses Bun written in Rust now

#655
post #508

Earlier quoted context omitted.

Yes they stopped caring after C89, Plan 9 C compiler was a mix of C89 with extensions. Still they are the authors, and withdrawing from WG14, going their own direction with Alef, Limbo, and finally Go, kind of proves the point they considered C done for its original purpose.

> kind of proves the point I don't think it proves anything other than the wanted to work on something else.

It is a bit of presumptuous for one to assume to know better about something than the original authors.

Something was designed in a certain way, accomplished its goal of writing portable UNIX, and then design by committee took over.

The authors, with their experience moved on, the committee and the audience doubled down on the flaws.

Re: Claude Code uses Bun written in Rust now

#656
post #635

Earlier quoted context omitted.

> You can just do that, and then Zig is really no less robust than Rust. If you just don't write bugs, then yes all languages are equally robust, including assembly. Zig, like C, is simply not a robust language. I don't know why this feels like something contentious? It's clearly not intended to be robust?

Zig is intended to be as robust as it can be as long as it doesn’t implicitly add code (no destructors that run code you didn’t explicitly call), or increase compiler complexity and compilation time. I don’t think it makes sense to say Zig is or isn’t intended to be robust in general. Like, we don’t say Rust isn’t robust since it doesn’t add dependent types and general purpose static verification that can do more gen…

A casual read of TigerBeetle's practices makes it clear they're doing some very unusual things, both in their memory allocation strategy and in their testing/verification.

Despite TigerBeetle being one of the highest-profile remaining Zig projects, I actually don't think they're representative of the average Zig project at all.

Re: Claude Code uses Bun written in Rust now

#657
post #12

Earlier quoted context omitted.

I think the Zig people are really just worried that maybe Zig itself is a DOA language before it has even reached 1.0 because it doesn't offer enough over C for any serious use and their flagship project has now abandoned it.

Zig is a DOA language for other reasons though. The reason why Rust enthusiasts act so morally superior is because they are: > Rob Pike, an unsafe guy, may insist that a small language and garbage collection are enough. But the typesafe visionary Grzegorz Wielbodłąński understands the deeper truth: every invalid state permitted by a compiler is a tiny act of civilizational sabotage. https://x.com/typememetics/status/…

You didn't just quote The Institute of Typesafe Memetic Research as proof of anything...

It's a shitposting, hyperbolic bait account. As funny as calling Andrew Kelley Smelley, it's not meant to be taken as gospel.

Re: Claude Code uses Bun written in Rust now

#658

Drilling into the original article where Jarred explained the reasoning behind the change, It's pretty clear that under zig the team was doing things by hand that are automatic in rust. Humans and agents share one thing: they are both non-deterministic. He talks about the issue of tracking memory lifecycles manually in zig so it can be explicitly freed. As expected, this leads to a long list of bugs where people miss…

> "make it compile" is a pretty good target.

But only as far as "make it compile" is a good predictor of runtime behavior. In C++ for instance, I can "make it compile" and it still crashes at runtime or does other undesirable things.

Re: Claude Code uses Bun written in Rust now

#659
post #635

Earlier quoted context omitted.

Zig is intended to be as robust as it can be as long as it doesn’t implicitly add code (no destructors that run code you didn’t explicitly call), or increase compiler complexity and compilation time. I don’t think it makes sense to say Zig is or isn’t intended to be robust in general. Like, we don’t say Rust isn’t robust since it doesn’t add dependent types and general purpose static verification that can do more gen…

A casual read of TigerBeetle's practices makes it clear they're doing some very unusual things, both in their memory allocation strategy and in their testing/verification. Despite TigerBeetle being one of the highest-profile remaining Zig projects, I actually don't think they're representative of the average Zig project at all.

Can you elaborate on the unusual part?

Re: Claude Code uses Bun written in Rust now

#660

Earlier quoted context omitted.

They had a human oversee the bun rewrite, didn't they?

that's the hypocrisy I was pointing out. Lol For their work they extensively test using humans with deep expertise But while marketing they say just vibe code bruh And here they can't even rewrite CC in rust? Why not! Use 1000000 agents!! Write it in platform specific binary! SAAS is dead, that's what he claimed. So what's stopping him from writing the harness in Rust or C than ReactJS?

What hypocrisy? Anthropic never said you don't need a human anymore.
Post reply on HN