News for hackers. Stuff that matters.
Re:DARPA: Translating All C to Rust (Tractor) by jerf on Tuesday July 30, 2024 @12:10PM (#41110690)
I believe it goes something like, "I have constructed a strawman that Rust claims that all code written in it is automatically safe by all conceivable definitions of safe, but look, ha ha, here's something that detects unsafe code in Rust!", and I don't mean "code marked in unsafe blocks".

It's a concatenation of several logical fallacies in a row; equivocation, straw manning, binary thinking about safety, several others. It's hard to pick the main one, but I'd go with the dominant problem being a serious case of binary thinking about what "safety" is. Of course, if the commentor is using anything other than Idris for all their programming, they're probably not actually acting on their own accusations.

Re:DARPA: Translating All C to Rust (Tractor) by PreInternet01 on Tuesday July 30, 2024 @12:18PM (#41110829)
Oh, come on. This repository demonstrates that, when using 'safe' Rust, there are still double-digits cases where you may still encounter dread-pirate-UB.

Again, I don't want to argue against you using or enjoying Rust, I would merely like to point out that it does, demonstrably, not solve all programming problems ever...

Re:DARPA: Translating All C to Rust (Tractor) by commodoreboxer on Tuesday July 30, 2024 @12:23PM (#41110909)
> This repository demonstrates that, when using 'safe' Rust, there are still double-digits cases where you may still encounter dread-pirate-UB.

No it doesn't. Miri is for unsafe code. There's no UB in safe Rust by design. Any UB caused without unsafe is considered a bug to be fixed.

Re:DARPA: Translating All C to Rust (Tractor) by PreInternet01 on Tuesday July 30, 2024 @01:18PM (#41111679)
MIRI also detects problems in generally safe Rust. If you want to know how I know, read the sibling comments. Or, like, just downvote me, it's not like I care about my imaginary Internet points.

The sanity of future devs, though? I do care about that, though, and there is a huge problem with that in the Rust 'community'

Re:DARPA: Translating All C to Rust (Tractor) by nequo on Tuesday July 30, 2024 @01:42PM (#41111992)
> ... in generally safe Rust.

Just to find agreement about the terminology, wouldn't we call all code that is not inside an unsafe block "safe?" If so, then adding "generally" is superfluous, right?

If not, then how is "generally safe" different from "not inside an unsafe block?"

Re:DARPA: Translating All C to Rust (Tractor) by jerf on Tuesday July 30, 2024 @01:49PM (#41112079)
I didn't expect you to outright confirm that you are using the "solve all programming problems ever" strawman, but, err, thanks for the proof I guess. I thought maybe I went a bit overboard in the reading between the lines but I guess I nailed it.
Re:DARPA: Translating All C to Rust (Tractor) by marcosdumay on Tuesday July 30, 2024 @04:08PM (#41113590)
> Of course, if the commentor is using anything other than Idris

I'm sure the Idris compiler has bugs somewhere too. If the OP actually programs, they are violating their rationale (I'm quite sure assembly or assembled binary aren't ok either).