logoalt Hacker News

jonkoopsyesterday at 10:34 AM6 repliesview on HN

What I have been missing in all this debate is substance. I don't care that Bun was ported to Rust; I don't care that Andrew wrote a hit piece about it; I don't care that Anthropic sells shovels in the gold rush.

What I do care about is technical details. Jared shared some motivation as to why they ported to Rust, and I think they look valid (even if provided with sparse evidence). But I have not seen any sort of refutation from Andrew that these are not actually issues or how they should be solved in Zig canonically. I'd really like to see an exploration of these arguments, specifically pertaining to the Zig code as it was written for Bun.


Replies

qweryyesterday at 12:27 PM

The facts as presented from the Bun side show a lack of technical merit for the rewrite. This shouldn't be surprising, because rewrites are bad engineering, in most cases.

The Bun project was started in Zig by someone with a lack of experience using the language, despite the massive scope and complexity, and was effectively a rewrite from another language in the first place.

From the Bun post:

> Bun started as a line-for-line port of esbuild's JavaScript & TypeScript transpiler from Go to Zig.

Then, a few years later, the entire codebase was thrown out to do another rewrite in another language.

What is there to address?

show 1 reply
ozgrakkurtyesterday at 10:38 AM

Andrew essentially wrote that “bun code was bad anyway”.

And also he implied he doesn’t even want to engage with anything relating to this since Jarred is toxic and there is no value in the debate.

I think these points are fairly clear from his blog post

show 1 reply
araozyesterday at 2:32 PM

the best way I've seen it described is like this: Bun wants to move fast and breaks things, Zig forces you to move slow and carefully.

Bun wants to ship new features ASAP (a shell lang, sqlite/pg client, etc), so they'd really want stuff like memory management out of the way. Zig forces you to think and deal with memory management, lifetimes, etc. Rust is just a better fit like w `Drop`, and Zig explicitly won't add `Drop` or anything similar.

Just like I wouldn't write a SQL database in Python, Zig is not the right tool for Bun. So there isn't really anything that "should be solved in Zig canonically". I'd say it's more in how Jarred want the project to move forward. Move fast and break things.

afavouryesterday at 1:56 PM

TFA article addresses this directly. The write up is good but it is selectively written to contain almost exclusively positives.

Like build times: they rewrote the Zig compiler to improve them, but Rust build times are typically much slower. Why no discussion of that at all?

iooiyesterday at 3:58 PM

> I don't care that Anthropic sells shovels in the gold rush

The people selling shovels are the ones building data centers and energy. Tokens are the "gold".

geraneumyesterday at 11:14 AM

> What I have been missing in all this debate is substance.

That’s strange because in this (and Andrew’s in lesser extent) post there’s plenty of substance on both technical, management and corporate influences like the difference of styles guides vs agent instructions, binary size, compile time, Anthropic’s marketing and incentives, etc. It’s hard to miss.

show 1 reply