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"
261–270 of 366 posts
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#262It is really sad and unfortunate that coding has started falling under the omnicause. Low-denominator discourse is invading every space I find interesting and it is difficult to avoid.
I am having to blacklist a lot of commenters on this site because they are providing misinformation unnecessarily. There's all this garbage about "big flashy announcements" and so on when all the posts are by random people observing an internal detail of an open-source program's VCS or whatever. https://news.ycombinator.com/item?id=48073680 (seems like just a normal user - enthusiast at best) https://news.ycombinator…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#263This case is wild and seems to perfectly encapsulate all the problems people complain about with vibecoded projects. The "rewrite it in rust" commit is +1M lines of code. Humans haven't looked at that in depth. In about a week, they saw the tests passed and pushed it to main. Now people have started to look through it and are pointing out glaring issues. And the solution is just going to be "feed it to another AI and…
> only solution appears to be "even more AI" That's the idea, to transform businesses to be wholly dependent on "AI" service to develop software. What better way than to re/write entire codebases until no human being understands it. The Zig project know this, and its so-called "anti-AI" policy is actually pro-community and cultivating human understanding. It's not about the tool or technology, per se, it's about peop…
It's sad to see what hacker culture has been reduced to: outright contempt for science and engineering.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#264What 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…
Translating zig -> rust is more complex than writing a JPEG parser in static python and then lowering it into zig and rust differently using idiomatic construct for each language.
Towards that end, I've created a parser for a dialect of python which is suitable for this purpose. It should maintain compatibility with the vast majority of python code out there, while picking up some rust/zig features that make translation easier. JPEG parser included in the assets of the skill for a flavor.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#265Earlier quoted context omitted.
I am having to blacklist a lot of commenters on this site because they are providing misinformation unnecessarily. There's all this garbage about "big flashy announcements" and so on when all the posts are by random people observing an internal detail of an open-source program's VCS or whatever. https://news.ycombinator.com/item?id=48073680 (seems like just a normal user - enthusiast at best) https://news.ycombinator…
How do you blacklist commenters?
But tbh this is trivial to write these days since the boilerplate can be written by the machines and you can just write the core functionality to make it work. I only have it public because I'm hoping others will also block users who misinform as a habit and I can subscribe to their lists and crib off their work without having to do it myself.
If you want to save yourself the first 15 min of prompting, just point Claude Code at this https://github.com/TechnologyBrotherhood/overmod-extension and ask it to implement the local blocking functionality.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#266Earlier 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…
There are also some papers being published that were funded by TRACTOR, such as https://homes.cs.washington.edu/~mernst/pubs/c-rust-macros-p...
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#267Earlier quoted context omitted.
You're right - Rust has never had tech evangelists, absolutely never In fact it's the only technology known to humans to never have had any such thing. Puhleease.
I'm not saying they don't exist. I'm saying that I don't encounter them in the wild. Certainly nowhere near as often as I encounter people who have a loud and obnoxious dislike of Rust. What I'm trying to say is that if you see Rust evangelists everywhere, your label is either so wide-ranging as to be useless or you need to rm your rust_evangelist_evidence.txt because it's likely taking up a disproportionate amount o…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#268Earlier quoted context omitted.
How do you blacklist commenters?
I just wrote a Chrome extension to do it: https://overmod.org/ But tbh this is trivial to write these days since the boilerplate can be written by the machines and you can just write the core functionality to make it work. I only have it public because I'm hoping others will also block users who misinform as a habit and I can subscribe to their lists and crib off their work without having to do it myself. If you want…
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#269Earlier quoted context omitted.
I mean, LLMs have been really good at translating code for a while now, which is why I'm more surprised that others are surprised this happened. They claim its a marketing trick despite the fact that they have to manage and maintain a fork of Zig if they don't switch languages.
They don't have to do that at all. They could've used mainline Zig, without their vibe coded changes to it.
Re: Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"
#270Earlier quoted context omitted.
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.
Lifetimes would prevent the particular use-after-free example here, but the UB that miri currently flags would still exist, as it's related to pointer provenance, not lifetimes. https://www.reddit.com/r/rust/comments/1hxjdvp/eli5_what_is_...
In C or C++ you conventionally store a suitably large integer (uintptr_t for example) and then when you sometimes need a pointer you just cast that integer to a pointer. Under the proposed C provenance semantics PNVI-ae-udi this gets you exposed provenance.
In Rust you conventionally store a pointer, and then when you sometimes need an integer you ask for the address bits from the pointer (which on popular platforms will be the whole pointer but as an integer) or you make pointers from the integer you have with no claim to their provenance. If you're careful this gets you what Rust calls "strict" provenance, it's just straight PNVI.