Live data from Hacker News

My thoughts on the Bun Rust rewrite

andrewkelley.me

91–100 of 757 posts

Re: My thoughts on the Bun Rust rewrite

#92
post #3

I read the post and roughly summarized it as: 1.It felt uncomfortable that Bun was presented as a representative example of Zig. From the internal Zig perspective, it looked more like a bad example of how to use Zig. 2.It felt uncomfortable that they spoke as if Rust prevents things that could actually be handled by Zig's style guide. 3.I(OP,andrewkelly) don't think badly of Jarred as a person, but after signing a co…

Not accepting a PR because it was purely written by AI is like saying PRs will only be accepted if the developer used a standing desk for more than 75% of the time during the code's creation. In the end, as long as the code is not shit, who cares how the sausage was made!

We have the potential to get along really well, but this isn't really the right comment thread for that, haha

Re: My thoughts on the Bun Rust rewrite

#93
> You can imagine how we might want to put some social distance between ourselves and a project whose irresponsible software engineering practices invite the exact kind of criticism that people are eager to level.

The other (very salient) points notwithstanding, I'm afraid this quote shows that Zig hasn't learned a lesson that other languages of its generation (and older) have: if a project's memory safety depends only on "responsible engineering practices", then that project most likely won't be memory safe. Quoting the "swiss cheese" model used in risk management: one slice of cheese (engineering practices) just isn't enough if you want to be reasonably sure your program is memory safe.

Re: My thoughts on the Bun Rust rewrite

#94

Earlier quoted context omitted.

Yes, I think very easily and I have read examples of this. There are bits of this in the article, but the main thrust attempt to portray Jarred as a greedy asshole enamored with Thiel/VC thought is not about the project and quite clear reading the article. It’s entirely tactless and bitter imo

> main thrust attempt to portray Jarred as a greedy asshole enamored with Thiel/VC thought What made you get that takeaway from the article? I didn't get that feeling at all, mainly seems to be something like "Jarred does some good and some bad, personally I don't agree, still wish him well", but clearly some specific part in the article must have given you this impression, if so what part?

> jumping head first into problems that he was not yet equipped to solve, leading to mediocre outcomes in terms of engineering

> having graduated from the Thiel Fellowship school of thought rather than university, he was essentially groomed from a young age into uncritically embracing the Silicon Valley mindset,

> this "beginner energy" started to hit differently for me. It's one thing to choose a poor work-life balance for oneself; a different thing entirely to demand it of others

> Poor communication, unrealistic expectations, low empathy, no experience

> gets to live out his productivity fantasy fever dream, he's probably already super wealthy. He has minor tech celebrity status.

Frankly, I have trouble seeing how a neutral reader doesn’t see this as a clear personal attack. That the article ends with “I actually don't have any personal criticisms of Jarred” is almost comical given the preceding paragraphs.

Re: My thoughts on the Bun Rust rewrite

#95
post #14

To me, this whole effort of rewriting Bun from Zig to Rust looks like a big marketing move. The question is: if Anthropic AI is really that powerful, why not just fix the bugs and give it the more ambitious task of redesigning the existing Bun Zig codebase in a way that eliminates not only the current bugs but also prevents similar ones from happening in the future?

"effort" is a big word to describe typing out a few prompts to create something with 5k+ open issues.

Re: My thoughts on the Bun Rust rewrite

#96

Anyone who would write an article like this is much more distasteful to me than anything Jarred did.

Why? I think the original blog post, which he is replying to, demands a reply. Its a breath of fresh air to get this whole debate out in the open

Jared’s post was entirely technical, this post was mostly personal.

Re: My thoughts on the Bun Rust rewrite

#98

> The main problem, however, was code quality. > The sleight of hand misdirects the reader away from the main way bugs are eliminated: by dedicating engineering resources to it. Perhaps the amount of bugs comes from using a C-like language that requires meticulous manual care to avoid writing runtime bugs. Even C++ would be a safer choice because of RAII. When you have to dedicate significant resources to avoid/fix r…

Memory safety problems are still possible in the new Rust Bun:

     At the time of writing, about 4% of Bun's Rust code sits inside an unsafe block (~13,000 unsafe keywords across ~27,000 lines / ~780,000 lines), and 78% of those blocks are a single line — a pointer that came from C++, or one call into a C library.

Re: My thoughts on the Bun Rust rewrite

#99
post #31

Earlier quoted context omitted.

If you use Rust the way it was designed to be used, rather than relying on countless "unsafe" blocks, you need to redesign the entire codebase architecture to make it compatible with the borrow checker rules.

Even if you “rely on countless unsafe blocks”, unsafe is additive, it gives access to additional APIs which are not checked. It does not disable affine types, the borrow checker, or send/sync traits. Unless the entire codebase is unsafe (e.g. fresh out of c2rust) it’s very hard to not have more guarantees. And because unsafe is generally highly local or localizable reasoning (conventionally backed by safety justifica…

For 99.99% of cases, you're reading and writing this under an operating system whose kernel is written in a language without send/sync, and inside a browser that also largely written in languages without send/sync, because those systems are fundamentally well designed. So instead of fixing the bugs and rethinking the architecture, the author of Bun decided to transpile almost the entire codebase from Zig to Rust without a deep architectural review. Okay...

Re: My thoughts on the Bun Rust rewrite

#100
post #44
post #24

Earlier quoted context omitted.

The sole reason for that rewrite was Zig creator announcing he won't be accepting AI contributions. It hurt Anthropic's feelings.

[citation needed]

Citation that this was the reason or citation that he said that?

For the latter: https://youtu.be/iqddnwKF8HQ?si=cvU8Fh3ah7ZCxg3M

From 26:38

Post reply on HN