Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
YourMom117711hRust in piss...
A memorable error. So are we learning people can fuck up memory access in any language? Is designing a memory safe language just ruining the skill it takes to design memory safe systems? Is it better to have the safeguards off and learn by attrition. Or is it better make believe we can make safe environments?
In before someone says it was in code marked unsafe or some shit. This doesn't excuse the lack of knowledge of designing memory safe unsafe code. You learn that quickly when writing C/C++. So maybe the safeguards are giving false sense of safety and dulling skills. Kind of like what AI is doing to new devs. -
12bitfloat1101511hThe bug was that they preallocated memory for 200 feature flags because they thought nobody ever needed more, and somebody loaded more than 200 features
*Literally* has nothing to do with Rust
Please stop falling for these absolutely retarded rage bait headlines -
TrayKnots58811hWell... They used an unwrap. Unwrap is shorthand for
match result/option {
Some/Ok(x) => x,
Err(err) => panic!("{err}"),
}
They called the panic function. Not surprising. -
12bitfloat1101511h@YourMom It wasn't a memory error. The code tried filling up an array with too many elements. That (safely) returned an error. And then somewhere up the call stack they unwrap'ed the Result because they thought this situation could/should never occur -
retoor124911h@12bitfloat yeah, it's literally taken over from Lunduke. But i saw it was some unwrap killing it on some picture. Nah, it's still a thing that it completely crashed. That would not happen with python or something that the whole system goes down.
-
retoor124911h@TrayKnots ./ @12bitfloat how could you two go between my first and second comment, that's impressive. I also mentioned the unwrap at exactly the same time.
-
12bitfloat1101511h@retoor Yes that would happen in Python because they chose (!) not to handle that error case
That's the python equivalent of not catching and handling the exception -> crash -
retoor124911hI played around a while ago with the crystal language. Also natively compiled with huge binaries. Their eco system not solid tho.
-
YourMom117710h@12bitfloat not necessarily. I have had exceptions that were async (I think it was) and happily triggered with no crash. So it depends on where the exception is for Python.
If my misrepresentation causes Rust people to rage I don't see how it could be wrong.
But the problem seems very similar to buffer overrun. There was an assumption that it could never go past a certain size. This assumption led to code making assumptions about responses to the situation. It is however and nicer way to fail. Rather than having the surprise crash you can find the source much quicker. So an improvement on how it failed. -
retoor124910h@YourMom wanted to say that about the python exceptions too but i did not want to make floatii upset.
-
YourMom117710h@retoor I like floatii, but now I think of 12bitfloater and I can't unsee.
A floater is some scum you might randomly find in a drink or your soup. Not a pleasant thing to find.
Sorry floatii, we love you. -
Lensflare2183610h@retoor and @YourMom, I‘d expect that kind of misconceptions from JS heads, not you guys. I‘m really disappointed in you. -
YourMom117710h@Lensflare @YourWelcome
This thread is the first I have heard of this. I blame @retardoorii for this. -
YourMom117710h@retoor was I the first to call you retoorded? I can't say you deserve that, but I hope it was me.
-
@YourMom Well, they explicitely made the decision that it should crash. They could have also ignored the error, or properly handle it and it wouldn't have crashed
I get your point about python but that's more of a coincidence that in this specific case this is what you want: Exceptions bubble up automatically and the async runtime will handle any exception and restart the task or whatever
Rust forces you to handle errors instead of auto bubbling up, but they *could* have also bubbled it up to the root and then restart the service
At the end of the day it was a deliberate bad decision, not something that accidentally happened because of flaws in Rust -
YourMom11779h@12bitfloat see, all I had to do was join the crowd to roast Rust and it totally skipped a totally unnecessary Google search. ;-)
-
Others have already corrected you but yes, this was nothing to do with Rust, not even tangentially. Cloudflare's Rust system is very accomplished and something like Python would never be able to handle the loads CF sees without doubling server costs.
The error was in their change management system and outage management/ mitigation. Some poor SQL made it to production, doubled the expected max input size, and propagated quickly throughout the network due to quick response needs (canary not possible).
However, I saw someone mention on Hackernews that there was a EXTREMELY similar thing that happened to Google, but their automatic systems caught the bad change, rolled it back within 4 minutes, before the on-call team could even hear about it.
If you want to blame a language: SQL
If you want to blame the real issues: change management and disaster mitigation systems.
If you *really* want to blame rust: stack traces not being available by default. -
@whimsical I couldn't get past two days of it. Fuckin boring, ugly, difficult language that saps all the fun out of programming.
(If I actually put in the work to learn it, I would probably love it) -
YourMom11778h@whimsical I thought Rust was the language of choice for flamers. Ask Roy Mustang. Although his best flaming power came from his girlfriend.
-
@AlgoRythm yeah, same for me, I did some very low effort study on rust by watching some episodes during eating about Rust. But I don't gain anything to learn it. I always questioned myself if the weird syntax is really needed to compliment the compiler. Could've Rust been a normal language with the same benefits?
-
ok heres ai thread summary~
rust bad
not rust at fault
programmer bad
germany is country (apparently)
premature ejaculation
memory safety is communist plot
python is html -
hjk10156191hEven though I agree that it is a programming error not a memory error. I've seen people write worse Rust code than they would in another language just to make the compiler shut the fuck up and finally built that thang. This might fall in that category. -
@whimsical
> Could've Rust been a normal language with the same benefits?
I‘m telling you all the time, it’s Swift.
Performance and safety of Rust, beautiful and elegant syntax comparable to python or typescript.

Cloudflare went down because of their in Rust written system had an memory error. Haha.
random