Hacker News new | ask | show | jobs
by jonkoops 16 days ago
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.

6 comments

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?

Porting TypeScript to Go in 7.0 doesn’t seem like bad engineering. Neither does this port, given that that Bun started out in a somewhat buggy state.
Completely different approaches. The TypeScript Go port was done responsibly, reviewing every line ported, publishing both runtimes in parallel to give it time for real-life battle testing, with plenty of communication to the community about what was happening.

The Bun Rust port was irresponsible and unprofessional, merging a million lines of unreviewed code while gaslighting the community, relentlessly casting shade on Zig while pretending to be neutral and objective. The Bun rewrite was not just bad engineering, but also (one might say "stinky") management and community relations.

It's no wonder the author of Zig blew up emotionally - which was also unprofessional but at least it was honest and human, unlike Bun's author.

Relentlessly? Where did he post about this and how often?
> Porting TypeScript to Go in 7.0 doesn’t seem like bad engineering.

They needed 10x speedup and it was not possible with the current language. And they chose Go, because they could retain 1:1 architecture in most cases. So whether or not it was well engineered, is not so clear. They did not choose Rust because they would have needed to redesign the whole architecture.

In the case of Bun, it smells more like bad engineering, so I am not sure if these are comparable.

> rewrites are bad engineering, in most cases.

I think this situation is a referendum on whether that is still true—or, if it is true, whether the proportions on “most” have changed significantly due to AI.

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

> 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.

If he doesn't want to get involved, then why even write this piece?

He essentially was having a tantrum
You're allowed to have a tantrum when a 10 figure company is doing a marketing stunt and shitting on your life's work to do so.

If you spend X amount of years building something, and someone you know to be a mediocre dev trashes it in an effort to enrich themselves, you're allowed to expose the things you know about them. End of story. I wish more people would throw a tantrum. We should expose all these charleton and thieves.

Kinda like how the Bun team spent years building their product then this guy trashes it? Except for real?

And he didn't "expose" anything but gossip.

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.

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?

> 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".

> 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.

A few of which are on HN front page.