User avatar
sodiboo pride_heart @sodiboo@gaysex.cloud
10mo
things you can say when sorting IEEE-754 floating point numbers, AND when awaiting a parcel where's my fucking order
3
1
0
0
User avatar
sodiboo pride_heart @sodiboo@gaysex.cloud
10mo
bonus points if you're intimate with Rust, then this punchline should land a little harder
1
0
0
0
User avatar
Alba 🌸 v_pat @mildsunrise@tech.lgbt
10mo
@sodiboo yeah tbh i was going to reply

🫵 rustacean

because
not even haskell is so pedantic about order axiom violations that they force you not to use < and such on floats. i guess in rust it could have more severe safety implications
1
0
0
0
User avatar
walnut 🌱 @walnut@thesoftestpaws.net
10mo
@mildsunrise @sodiboo
When would it be a [memory] safety issue instead of 'just' a logic error?
2
0
3
0

User avatar
sodiboo pride_heart @sodiboo@gaysex.cloud
10mo
@walnut @mildsunrise yeah no, faulty Ord is not unsafe. if your code relies on that generically, your code is wrong.

but Rust generally tries to avoid logic errors too by having pretty strict contracts and invariants.

faulty
Ord could, for instance, lead to a busy loop sorting a list that will never be stable. that's why it's not "allowed". but it's definitely not a safety issue; not in the sense that Rust uses "safety", because a busy loop (denial of service) is "safe" according to Rust
0
0
1
0
User avatar
Alba 🌸 v_pat @mildsunrise@tech.lgbt
10mo
@walnut @sodiboo actually no, i'm wrong, unsafe code cannot rely on PartialOrd or Ord trait implementations to be correct, it has to guarantee safety regardless. for that to be the case, the traits would have to be marked unsafe too i think
0
0
1
0