Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
371–380 of 862 posts
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#372Earlier quoted context omitted.
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 lin…
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.
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.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#373There's so much good stuff in this post. Can't help to think of a recent HN post about most AI-generated projects being abandoned within months. Why? Because value of a project is not in the code produced. It's in the amount of battle-testing that code has seen. Battle-tested, mature code > fresh rewrite. Existing Zig codebase has seen X amount of battle-testing. Rust rewrite: 0 (except -I'm assuming- passing test su…
They get abandoned because they get generated on a whim. Sunk cost fallacy can be a feature: if you have spent a lot of blood, sweat, and tears on a project, you are more likely to push it through adversity and the doldrums that inevitably one will encounter. If all it took was one of those momentarily brilliant ideas and a prompt on Claude to produce something, there is no attachment whatsoever to it. Speaking as th…
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#374Earlier quoted context omitted.
It was a pull request and a blog post which HN et al. collectively foamed at the mouth about. You’re acting like Anthropic sunk millions into a marketing campaign.
For what we know, probably around $200,000 to run the rewrite and rewiew it, + whatever was involved in writing the blog post and advertise it.
The cost was only provided as an honest estimate of what it would have cost someone else at time of writing, which I thought was fair.
The number is peanuts relative to the cost of engineers working on the project. I find it odd that so many people think this cost number is some sort of smoking gun.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#375There's so much good stuff in this post. Can't help to think of a recent HN post about most AI-generated projects being abandoned within months. Why? Because value of a project is not in the code produced. It's in the amount of battle-testing that code has seen. Battle-tested, mature code > fresh rewrite. Existing Zig codebase has seen X amount of battle-testing. Rust rewrite: 0 (except -I'm assuming- passing test su…
They get abandoned because they get generated on a whim. Sunk cost fallacy can be a feature: if you have spent a lot of blood, sweat, and tears on a project, you are more likely to push it through adversity and the doldrums that inevitably one will encounter. If all it took was one of those momentarily brilliant ideas and a prompt on Claude to produce something, there is no attachment whatsoever to it. Speaking as th…
I dunno, this idea guy seems to have some really great ideas, what's wrong with you skeptical programmers who aren't on board implementing his ideas for equity?
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#376Earlier quoted context omitted.
> Anthropic is not in the programming language market; their post about rewriting Bun in Rust is full of technical details that led to improving the end product for their users Anthropic absolutely is in the programming language market. If/since AI makes rewrites to certain languages relatively easy, a success story will tie the given language(s) to the given AI company. Rust may have a tremendous success in the futu…
> since AI makes rewrites to certain languages relatively easy This premise makes no sense. AI makes rewrites to any language easy.
The LLM companies have truly astounding power to now steer the direction of the entire industry. It should worry all of us.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#377There's so much good stuff in this post. Can't help to think of a recent HN post about most AI-generated projects being abandoned within months. Why? Because value of a project is not in the code produced. It's in the amount of battle-testing that code has seen. Battle-tested, mature code > fresh rewrite. Existing Zig codebase has seen X amount of battle-testing. Rust rewrite: 0 (except -I'm assuming- passing test su…
I don't even get what they gain by Rust - Bun imports Webkit, which is a C++ project, relying on it for stuff like JITing Javascript. I would say that's a major concern, and making sure the JIT doesn't emit anything broken or naughty is completely outside the scope of Rust.
> heap-use-after-free crash in node:zlib when calling .reset() on a zlib, Brotli, or Zstd stream while an async .write() is still in progress on the threadpool
https://github.com/spaceraccoon/vulnerability-spoiler-alert/...
If you look at the fix you can see its all in their zig codebase:
https://github.com/oven-sh/bun/commit/621c4016218bb782e05907...
What is kind of funny is that nodejs also had a basically identical bug with an almost identical fix:
https://github.com/spaceraccoon/vulnerability-spoiler-alert/... https://github.com/nodejs/node/commit/53bcd114b10021c4a883b0...
But now the interesting question, how does the code look like in Rust?
https://github.com/oven-sh/bun/blob/8f1a9540fdff25410506de76...
It has the same guard in place as the zig and c++ versions, the rust code also just calls into the zlib bindings after the "write in progress" check.
So in this case at least the same exact use-after-free would've happened and they don't win anything from the rust port.
Another one was this:
> crash and out-of-bounds read in Buffer#copy and Buffer#fill when a valueOf callback detaches or resizes the underlying ArrayBuffer during argument coercion
I think ths is the fix:
https://github.com/oven-sh/bun/commit/79522ab6c579736dc239fa...
But the bug here is in C++ bindings, Rust wouldn't have helped here either.
Last one:
> double-free crash in the CSS parser when background-clip had vendor prefixes and multi-layer backgrounds
Fix: https://github.com/oven-sh/bun/commit/912970c98437e418a95b6b...
Code side-by-side:
Rust: https://github.com/oven-sh/bun/blob/8f1a9540fdff25410506de76...
Zig: https://github.com/oven-sh/bun/blob/912970c98437e418a95b6b5b...
I can't judge the Zig code, perhaps someone could say if this was a "beginner" mistake.
But this is at least one case where Rust would've helped, although even that is a bit complicated considering stuff like bun_ptr:
// Lifetime-erasure helpers (RUST_PATTERNS.md §6/§18) — re-exported here so
// crates that already depend on `bun_collections` (logger, css, js_parser,
// crash_handler, watcher, http_types) can route the borrowck-dodge through
// one centralised `unsafe fn` instead of open-coding the lifetime cast.
pub use bun_ptr::{RawSlice, detach_lifetime, detach_ref};
Which is a bit concerning?Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#378Earlier quoted context omitted.
If you don't intend to write misleading stuff that makes Zig look bad when you leave and if you avoid ghosting the Zig foundation in scheduled meetings you had with them, I suppose you should be good.
I think we can quibble about the Bun post’s factual claims. But I don’t think the post was deceptive or dishonest in its claims. Like most technical writing, it represents a vantage point. As for ghosting in meetings: sure, that seems bad. I would also be upset if someone did that to me. But you can state that factually without making it into a personal attack. It would even be more convincing.
Presenting only one side of argument (only pros, no cons, etc.) is deceptive and dishonest. The fact that they were incredibly focused on build time in Zig and didn't even talk about it as a tradeoff going to Rust is very telling.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#379There's so much good stuff in this post. Can't help to think of a recent HN post about most AI-generated projects being abandoned within months. Why? Because value of a project is not in the code produced. It's in the amount of battle-testing that code has seen. Battle-tested, mature code > fresh rewrite. Existing Zig codebase has seen X amount of battle-testing. Rust rewrite: 0 (except -I'm assuming- passing test su…
Because most projects are abandoned within months. Why should they be any different in that respect?