Live data from Hacker News

My thoughts on the Bun Rust rewrite

andrewkelley.me

111–120 of 757 posts

Re: My thoughts on the Bun Rust rewrite

#112

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

Possible, yes. But it's not like it's terribly difficult to verify correct usage of "unsafe" that amounts to a basic function call to a C library. Trivial uses of unsafe are pretty innocuous.

Re: My thoughts on the Bun Rust rewrite

#113
post #39

Despite stated otherwise in the post, this is a personal attack. Anyway, let's try to discuss something more technical: I predict Zig will lose steam, and in 2027, will lose relevance: 1) It's hardcore Anti-AI 2) It's moved to Codeberg 3) It doesn't have the momentum to sustain the disadvantages of these two decisions The project will in max 2 years make a blog post, not admitting to their mistakes, telling themselve…

what's the problem in moving to codeberg?

the loss of network effect.

Re: My thoughts on the Bun Rust rewrite

#114

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

Yes but through iterative ratcheting, some portion of that unsafe can likely be migrated to idiomatic code without unsafe. And the other 96% of the code now has more mechanical guarantees than it did before.

Static linting in Rust via clippy also makes it pretty straightforward to begin enforcing things like "unsafe blocks need to have safety doc comments" as a CI warning or failure, and there are community tools that focus on this topic too.

I can't stand the practice of "LLM porting" personally but if you're going to do a mechanical rewrite from something else into Rust, this (permit unsafe and unidiomatic but 1:1 translation at first) is a fairly reasonable strategy imo.

Re: My thoughts on the Bun Rust rewrite

#115
post #6

> I actually don't have any personal criticisms of Jarred The whole post felt like a personal criticism of Jarred.

I'd consider the opinions professional criticisms of Jarred. While focused on him individually I don't think they are very personal

Personal and professional are not mutually exclusive.

If I criticize your code, that is a professional criticism.

If I criticize your code and say it reflects your consistent carelessness and stupidity, it is also personal.

If I say you fabricated something, then that is a personal criticism, it alleges an ethical violation. In a professional context, it's also a professional criticism (every profession has some ethical standards).

Re: My thoughts on the Bun Rust rewrite

#116
post #69

I found this post very refreshing! I’m sure it would have been very tempting to one-up the “PR-speak” of the Bun post. Likewise, it would have been very tempting to include the same set of facts that reflect negatively on Jarred, while studiously concealing one’s own opinion (eg “I heard people called him a stinky manager. I am not saying that, other people are, but I’m not”). I appreciated that it was just … genuine…

It’s just one long ad hominem

I don't think you are using that right. Saying someone is bringing a bad vibe to your project, as the point he has a bad vibe is just stating the conclusion.

Like if someone calls you a bad programmer and doesn't hire you as a programmer, isn't ad hominem

Re: My thoughts on the Bun Rust rewrite

#117
I desperately hope that the Andrew Kelley style of software engineering will survive all of this; that users will continue to value quality and not be content with slop. This, of course, presumes that products built fully by agents will produce sub-par quality in the future. If they will be able to manage to glue all of this slop together without the project collapsing in on itself, none of this will matter. I just hope that this isn't the future of the industry.

Re: My thoughts on the Bun Rust rewrite

#118
post #39

Despite stated otherwise in the post, this is a personal attack. Anyway, let's try to discuss something more technical: I predict Zig will lose steam, and in 2027, will lose relevance: 1) It's hardcore Anti-AI 2) It's moved to Codeberg 3) It doesn't have the momentum to sustain the disadvantages of these two decisions The project will in max 2 years make a blog post, not admitting to their mistakes, telling themselve…

Could just as easily say the same thing about Bun.

If one can easily swap in the next new js engine du jour…

Re: My thoughts on the Bun Rust rewrite

#120
When you said that “His code was slop well before LLMs” got a good cackle out of me.

The fact is, most people don’t have taste and haven’t had taste, LLMs just amplify what was already there. Good taste is good taste, slop is slop, and shit is shit.

Glad you guys were able to go your separate ways.

Post reply on HN