Earlier quoted context omitted.
I'm stunned that it went from 'this is an experiment' to merging a ~million lines of (likely) unreviewed code in a week. I have nothing against using agents but to rush something like this and leave the community blindsided seems extremely ameteurish. Like something you'd expect a bright eyed graduate engineer to do.
Blindsided? Has there even been a release yet?
Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
171–180 of 366 posts
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#172Jarred is an exceptional 1% engineer, and its likely he can succeed at this port, to the detriment of naysayers who don't believe there's any chance it's possible.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#173There's a book that changed a lot of the way I think about attention and media [0]. The book isn't very good, but it flags something relevant here. There is a huge asymmetry between the reach of a big, flashy announcement (here: bun was re-written in memory-safe rust in a couple weeks), and the relatively small reach of a correction (often just a footnote on an old article, here a GH issue). This asymmetry is well un…
> a big, flashy announcement (here: bun was re-written in memory-safe rust in a couple weeks) Did they even claim it was "memory-safe"? Every discussion of this topic has had dozens of comments noting that their vibed codebase is bursting at the seams with unaudited unsafe blocks, lightly reviewed by people who seem to not only seem to not understand Rust, but who seem incensed at the idea of needing to understand an…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#174Earlier quoted context omitted.
> The converted unsafe rust segfaulted at the same place the C code did. It's compatible, but not safe That is indeed the point of c2rust. It gives you a baseline that is semantically identical to the original codebase, and with that passing the full test suite, bug-for-bug, you can then start gradually adopting rusty idioms to improve the memory safety of the codebase.
What comes out of c2rust is not intended for human consumption. It's more verbose than the original and harder to work on, but no safer. You lose the C idioms that people understand, while not gaining Rust idioms. It's like working on compiler-generated assembly code by hand. 2022 discussion on HN.[1] There's a DARPA funded effort called TRACTOR, Translate All C To Rust, which has funded some efforts to develop a usa…
I'm much more bullish on the opposite approach. Perform the naive translation, let the LLM loose on cleaning it up...
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#175What I don't understand is if they were going to translate Zig to unsafe Rust, why not just build a translation tool for it? You could do a one-to-one mapping of language constructs, hardcoding patterns in your codebase, and as one friend put it "Tbh they could've just hooked up zig translate-c to c2rust". They would get deterministic translation, would probably have not been a heavy investment to build, and the outp…
[flagged]
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#176Earlier quoted context omitted.
And yet, all I ever see are attacks against these convenient bogeymen with artistic exaggerations like yours... but I never see the bogeymen themselves.
You've never seen the Rust evangelists? I am genuinely jealous. Also, I know you made a typo, but it did make me laugh Bogeymen is what you meant Boogymen reminds me of the joke in Millenium Man (How do you make a handkerchief dance - put a little boogie in it)
Editing the comment out now, thanks for pointing out the typos!
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#177Earlier quoted context omitted.
A bug-for-bug port to Rust is the first step to fixing that. Assuming the port is actually 1:1 without any behavioral changes, these bugs already exist in the Zig code. The difference is now it's known where effort can be dedicated in order to one day have a memory-safe release of Bun. People have absolutely lost their mind over this and completely forgotten the benefits Rust gives you. I feel like I've gone back 10…
[flagged]
And indeed, this is very much what Rust was designed to do with the ability to interface with existing C/C++ code in both directions. So this is the strategy that the designers of the language had in mind from the early days. It's a deliberate choice to offer this, and not an emergent property that was later discovered.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#178Earlier quoted context omitted.
If that was true, then I would expect followups to reduce UB and unsafe in general, or at least requiring a lifetime for caller-owned memory. But I think their true strategy is to have AI produce "fixes" like these which will end up infecting the entire codebase: https://github.com/oven-sh/bun/pull/30728
exactly. If they wanted to iterate on their port they would add lifetime annotations here, which are the tool Rust be uses to ensure safety. They're just kicking the unsafety block down the road. This accomplishes nothing and is not how you get Rust to deliver its safety promise.
https://www.reddit.com/r/rust/comments/1hxjdvp/eli5_what_is_...
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#179Earlier quoted context omitted.
You've never seen the Rust evangelists? I am genuinely jealous. Also, I know you made a typo, but it did make me laugh Bogeymen is what you meant Boogymen reminds me of the joke in Millenium Man (How do you make a handkerchief dance - put a little boogie in it)
I actually have not, for real. And I keep getting beaten up here on HN just for daring to say it. Makes you think who is who in this situation. Bullies screaming they are the victims.
And - the number of times I have been grossly downvoted for daring to utter a true word about Rust (or even Rust adjacent) will let you know your non-existent Rust evangelists are indeed the bullies - with one now screaming that he is a victim.
If you want definitive proof - look at this sub thread where you're so triggered that people talk about the mere existence of Rust evangelists (and evangelists exist for every tech - they always have and always will - which you would know given your [claimed] history in the field) that you want to argue they they aren't evangelists, they're just poor misunderstood victims.
Note: I say claimed not as a jab but because I don't know you and can only go on your claims in your profile.