Hacker News new | ask | show | jobs
by jdw64 10 days ago
But according to Andrew Kelly, Bun was full of bad Zig practices. So why did they keep pushing forward with Zig?
3 comments

Indeed it's surprising, given the zig compiler famously causes all developers who use it to merge into a single organism with a combined nervous system.
The Zirgs they call them (I'm kidding)
Because their ego got hurt that a big project decided to not use their "amazing" language.
No it's vice versa
It seems you misunderstand what happened to Bun: Anthropic has burned some investor money for a PR stunt -- our LLM can port this -- and also to punish Zig which dared to ban LLM contributions by taking away a significant project from the ecosystem. It worked, Rust didn't dare to enact a similar ban.
Anthropic tried hard to port using their LLMs but their models were not trained on enough zig corpus hence failed and they blamed it on Zig's principles
Claude Code uses Bun written in Rust now

https://news.ycombinator.com/item?id=48966569

What failed?

Please re-read my comment, I didn't mention anything about Rust. (IK they later switched to Rust. A year ago no LLMs were good at rust, similar to zig today, however its different story now)
You wrote "port", perhaps you meant "maintain"?
What failed?
… failed to maintain it in Zig due to the LLM issues. You misread
Do you have a source for that?
I work with both Rust and Zig. Claude is much more efficient (~ magnitude in time) and correct (output actually compiles) with rust.
I can see why that's the case, given that Rust is that much more popular than Zig. I wonder whether there's a difference between LLMs reading code and writing. If reading code is easier than writing it, then it makes sense that Claude was able to port from Zig to Rust with good results.
Aside from relative lack of examples, Zig also changes fundamentally from version to version.

LLMs are fundamentally pattern recognizers though. Bun is big with lots of repeated conventions - very straight forward to translate those conventions to others (zig to rust)

I’ve been building a toy game engine for learning and have had great success translating small C libs (collision detection and physics for instance) into zig, often in one shot.

Why would Anthropic ever admit this?
They wouldn't. But I was curious why you were confident that Anthropic "blamed" on anything.