Live data from Hacker News

Rewrite Bun in Rust has been merged

github.com

581–590 of 822 posts

Re: Rewrite Bun in Rust has been merged

#581

Earlier quoted context omitted.

Zig has these modern language features too fwiw. I think the goal was to do a massive rewrite for Anthropic (they acquired bun) and show that rewriting projects from lang -> lang with Claude can reduce security vulnerabilities to help with the hype for an IPO. I don’t use/know Rust so I can’t comment on the quality, but there was a public security review that found issues with the new Rust code: https://x.com/SwivalA…

There's a reasonable request to run the same analysis for the Zig version of the code as a comparison. In lieu of that, it seems the Swivel devs ran an analysis on Tigerbeetle, one of the other major Zig projects, and found only 7 medium/low priority issues: https://xcancel.com/SwivalAgent/status/2054063291266113994

To clarify, those are things an LLM considers to be issues, and LLMs can make mistakes.

Some of those are clear false positives, others I need to revisit tomorrow to say one way or another.

Re: Rewrite Bun in Rust has been merged

#582

Earlier quoted context omitted.

I think given the novelty of this, a lot of eyes will be on it, so a lot of issues will be dealt with out of the gate. The problem will be when smaller projects that aren't in the spotlight think it's safe too and then do stuff like this after being encouraged by bun, and for those projects then lots of bugs will just remain unfixed. Basically a nation state adversary's wildest dreams came true today.

If that scenario happens it just means the collapse will be slower but still inevitable as anecdotes pile up and reach critical mass of common knowledge.

Yeah. I'm just suggesting bun won't blow up spectacularly as antiai people are expecting it too.

Re: Rewrite Bun in Rust has been merged

#584

Earlier quoted context omitted.

The code was using Zig before, not JS.

Ah fair point. I don't have a sense of which of those are more verbose.

Zig is, typically. And yet here, the rust rewrite is around 60% more lines of code.

Re: Rewrite Bun in Rust has been merged

#585

Earlier quoted context omitted.

>This is the same in COBOL-to-Java ports it isn't, because those guys didn't think a naive 1-1 machine translation would give them the benefits of Java, which somehow the people involved in this rust rewriting seem to think they've already gained despite the virtually identical code. If the whole point genuinely would have been to do a purely mechanical translation they could and should have written a transpiler, whi…

> If the whole point genuinely would have been to do a purely mechanical translation they could and should have written a transpiler, which would have had significantly higher correctness guarantees than this given that it'd be deterministic, but of course that would have defeated the PR purpose of this whole thing, which just looks like a marketing for Anthropic frankly If it were just a marketing stunt you wouldn't…

>You're being extremely negative about this whole endeavour without looking at the evidence that this effort is going far more smoothly than expected

no I'm being negative because as I just said, if you want to do a purely syntactic translation you don't even need an LLM, that's called transpilation and we've been doing it programmatically for decades.

This is the kind of thing that looks great to people who can't program, think this is some new superpower unlocked by the mystery magic of LLMs and that is exactly the kind of impression Claude wants to sell.

Re: Rewrite Bun in Rust has been merged

#586

I just skimmed through the porting guide and based on the number of unsafe blocks, this looks like a fairly straight-forward mechanical translation. If that is the case, why didn't they just "vibe-code" a Zig->Rust translator and a small Rust/TS/JS/whatever script to orchestrate things. You don't even need pretty printing support because rustfmt exists. You'll save on a bunch of tokens, probably a lot of time/enegy,…

Bun is owned by anthropic. They get infinite tokens, and anthropic gets a fluffy PR piece slash advertisement.

Re: Rewrite Bun in Rust has been merged

#587
post #196

Earlier quoted context omitted.

You're not alone in voicing this, another (now dead) comment did it earlier too with a bit more of an emotional response ( https://news.ycombinator.com/item?id=48134229 ). Still, do you folks never do something to see how you feel about something, then chose to go one way or another? I'm not sure why it's so hard to see that it was an overreaction at the time, because it was an experiment, then at one point it stoppe…

Yes sure it's ok to change your mind. But don't you think the people Jarred accused of "overreacting" in retrospect didn't?

Who cares? Go see a therapist

Re: Rewrite Bun in Rust has been merged

#588
post #6

I'm actually excited for somebody trying experimenting with automated translation, but I'm afraid this will be lots of backwards compatibility issues. I started looking at the commits, and it's basically solving the ,,tests not pass'' problem by changing the tests themselves. The real work of making it working on programs that are already deployed will be just starting now. The only silver lining I see is that the se…

> I started looking at the commits, and it's basically solving the ,,tests not pass'' problem by changing the tests themselves. The real work of making it working on programs that are already deployed will be just starting now. Wow, This is definitely quite something for sure. Can jarred comment about if he has read the commits or not too or respond to your comment, this has basically made me lose the small faith I h…

Jared has commented on this elsewhere in the thread, basically claiming the parent you replied to is outright lying: it has removed no tests and has not meaningfully changed annotations to reduce coverage of effectiveness. It added additional tests and made a few changes to hard coded values due to differences in, as an example, how LLVM and Zig handle stack frames.

The MR is right there, linked at the top of this page. You can check who is telling the truth.

That said, I don't know how anyone is actually claiming to have done that. All day, the size of the MR makes the diff take too long to load and GitHub dies. I'll have to pull it later to check myself.

Re: Rewrite Bun in Rust has been merged

#589

As an educational thread, see this one from a week ago where Jarred again deflects from a merge decision and legions of foot soldiers attack anyone who predicted the impending merge: https://news.ycombinator.com/item?id=48073680 Didn't age well, did it?

From "This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely." and what seems to amount to some experimental curiosity -- to merging the whole thing in 10 days!? This seems really crazy.

Re: Rewrite Bun in Rust has been merged

#590

Earlier quoted context omitted.

That analogy might work if this situation is 'reckless behaviour risking children's safety' but in this case it's much closer to 'We made an large, potentially risky change that you can choose to avoid until it's more mature'

The analogy is just bad to begin with. It's more like "we've switched ingredients while actively denying that they'll be switched".

They never denied they'd switch, just that they'd need solid improvements confirmed before they switched. Clearly internally they've decided they've seen the gains necessary to carry on with the switch
Post reply on HN