calcopiritus
@calcopiritus@lemmy.world
- Comment on How One Uncaught Rust Exception Took Out Cloudflare 1 day ago:
I see you ignored my entire comment.
I don’t know what is more explicit about expect. Unwrap is as explicit as it gets without directly calling panic!, it’s only 1 abstraction level away. It’s literally the same as expect, but without a string argument. It’s probably top 10 functions most commonly used in rust, every rust programmer knows what unwrap does.
Any code reviewer should be able to see that unwrap and flag it as a potential issue. It’s not a weird function with an obscure panic side effect. It can only do 2 things: panic or not panic, it can be implemented in a single line. 3 lines if the panic! Is on a different line to the if statement.
- Comment on How One Uncaught Rust Exception Took Out Cloudflare 1 day ago:
An unhanded error will always result on a panic (or a halt I guess). You cannot continue the execution of the program without handling an error (remember, just ignoring it is a form of handling). You either handle the error and continue execution, or you don’t and stop execution.
A panic is very far from a segfault. In apparent result, it is the same. However, a panic is a controlled stopping of the program’s execution. A segfault is a forced execution stop by the OS.
But the OS can only know that it has to segfault if a program accesses memory outside its control.
If the program accesses memory that it’s under it’s control, but is outside bounds, then the program will not stop the execution, and this is way worse.
- Comment on How One Uncaught Rust Exception Took Out Cloudflare 2 days ago:
Replace uncaught exception for unhanded error.
- Comment on How One Uncaught Rust Exception Took Out Cloudflare 2 days ago:
“unwrap should not exist” is true as long as you don’t want to ever use the language. If you actually want to use it, you need it. At least while developing.
Some values cannot have a default value. And some cases it’s preferable to panic even if it has a default value.
unwrap is not the problem. Cloudflare’s usage is.
- Comment on How One Uncaught Rust Exception Took Out Cloudflare 2 days ago:
It’s really hard to do without Rc (or similar) or unsafe.
- Comment on Hard drives on backorder for two years as AI data centers trigger HDD shortage — delays forcing rapid transition to QLC SSDs 2 weeks ago:
Data storage devices are the last items you wanna buy second hand though. A drive failing could mean much more than just having to buy a new one.
- Comment on LLMs Will Always Hallucinate 3 weeks ago:
I’ll remember this post when someone manages to make a human fly by tieing a cow to their feet.
- Comment on LLMs Will Always Hallucinate 3 weeks ago:
No it is not. It is the same as saying you can’t have coal energy production without production of CO2. At most, you can capture that CO2 and do something with it instead of releasing to the atmosphere.
You can have energy production without CO2. Like solar or wind, but that is not coal energy production. It’s something else. In order to remove CO2 from coal energy production, we had to switch to different technologies.
In the same way, if you want to not have hallucinations, you should move away from LLMs.
- Comment on sucked in losers 3 weeks ago:
Heh. Ironic.
- Comment on Yo, fire fox what the fuck? 3 weeks ago:
This is a windows/hollow knight issue.
Firefox has no way of knowing that you’re playing a full screen game.
- Comment on Why are people using the "þ" character? 4 weeks ago:
This comment was surprisingly easy to read. Definitely easier than if it were for the “th” sound
- Comment on Fedora Will Allow AI-Assisted Contributions With Proper Disclosure & Transparency 4 weeks ago:
The problem with that is that reviewing takes time. Valuable maintainer time.
Curl faced this issue. Hundreds of AI slop “security vulnerabilities” were submitted to curl. Since they are security vulnerabilities, they can’t just ignore them, they had to read every one of them, only to find out they weren’t real. Wasting a bunch of time.
Most of the slop was basically people typing into chatgpt “find me a security vulnerability of a project that has a bounty for finding one” and just copy-pasting whatever it said in a bug report.
With simple MRs at least you can just ignore the AI ones an priorize the human ones if you don’t have enough time. But that will just lead to AI slop not being marked as such in order to skip the low-prio AI queue.
- Comment on Fedora Will Allow AI-Assisted Contributions With Proper Disclosure & Transparency 4 weeks ago:
I hope they are prepare for the AI slop DDoS. Curl wasn’t, and they didn’t even state they would welcome AI contributions.
- Comment on Are there any good 3D Nintendo FAN made games? 4 weeks ago:
Pokemon uranium is playable on PC, I don’t think it works in consoles. Played it long time ago so I don’t remember how good it is though.
I don’t know how easy it would be to find though since Nintendo shut it down.
- Comment on People dont believe protesting works if they will only do it on their day off. 5 weeks ago:
The difference between treason and a revolution is which side wins at the end.
Just make sure you’re enough people doing it.
- Comment on What possible evolutionary advantage is offered by my ears suddenly sprouting tons of hair? 1 month ago:
I don’t think anyone denies that whatever happens after you no longer pass your genes around has no evolutionary effect.
Whether helping your offspring is evolutionarily helpful or not might be debatable (I don’t see how it would not be helpful though)
Even in beings that not form societies it has an impact. Example:
You reproduce, then instantly die. Now your offspring have more available resources around them, since you no longer consume them
Or, your reproduce and you become much stronger, but not aggressive towards non-predators. Now predators are less likely to be near you, and your offspring are probably near you. Therefore, they probably benefit from having less predators around.
- Comment on IT'S A TRAP 1 month ago:
You’re not stupid for it. Since it makes sense.
However, due to the way we “calculate” the sizes of infinite sets, you are wrong.
Even integers and all integers are the same infinity.
But reals are “bigger” than integers.
- Comment on We're all going home early today 1 month ago:
My microwave has a sticker so you don’t heat liquids without a teaspoon. I’ve heated milk in it every day for years, every time with a teaspoon in it. It also heats up faster with it.
- Comment on Why can't countries with vast deserts make solar farms to power the world? 2 months ago:
You can spend millions on building power lines over oceans and such. Or you could just spend that money on building your own power production. Might be more expensive (or not), but you get to control the production.
- Comment on what's your take on employers banning the use of languages other than English between coworkers at the workplace? 2 months ago:
When 2 people that know a language want to talk shit about someone else that doesn’t know the language, the first thing they’ll do is speak that language.
It’s not an unreasonable fear at all.
- Comment on what's your take on employers banning the use of languages other than English between coworkers at the workplace? 2 months ago:
Depending on context it might be stupid or make sense.
At my company, which has 100% Spanish employees, we can talk among ourselves in Spanish. However, in things “for the record” such as jira tickets, git commit messages, documentation pages, they have to be in English.
It makes no god damn sense. Nobody is going to read Jira ticket #6738 in 40 years when we are a multinational. It’s a ticket about fixing a typo in page 567 of the documentation. 100% of employees speak spanish, and some have dogshit English.
- Comment on proportional reaction 2 months ago:
Because it can be done for multiple lines too. And you can do else-if too. Also, “if” and “else” is more recognizable than “?” and “:”
x = if y > 5 { println!("Y was over 5"); z + 5 } else if y < 0 { handle_negative_y(y); z - y } else { println!("<WARN> unexpected value for y"} 0 }
- Comment on proportional reaction 2 months ago:
This is valid rust. I don’t know if there are more languages with this feature
- Comment on What is with this new generation of shooters writing stuff on the bullets? Is this some new fad like if I go deer hunting or something I write FUCK BAMBI on the bulllet? 2 months ago:
Swords had phrases written on them too. This has been happening since forever.
- Comment on Exactly Six Months Ago, the CEO of Anthropic Said That in Six Months AI Would Be Writing 90 Percent of Code 2 months ago:
“in 20 years” doesn’t get as much hype as “in 3 months”
Maybe if they said “in 3 months” instead we would’ve actually have had it in 20 years. Seeing how much ai attracts money with these obviously unbelievable promises.
- Comment on Exactly Six Months Ago, the CEO of Anthropic Said That in Six Months AI Would Be Writing 90 Percent of Code 2 months ago:
From the makers of “fusion energy in 20 years”, “full self driving next year” and “AI will take your job in 3 months” cones “all code will be AI in 6 months”.
Trust me, it’s for real this time. The new healthcare system is 2 weeks away.
- Comment on Time to bash Americans again 2 months ago:
When brown, they are inmigrantes anda those are ghettos. When white, they are expats in expat communities.
- Comment on Why solar power is the only viable power source in the long run 2 months ago:
Except for nuclear (fusion and fission) an geothermal, every form of energy comes from the sun eventually.
Fossil fuels used to be living forms, that got their energy from either other life forms or photosynthesis. Maybe geothermal for deep sea creatures.
And even fission and geothermal you could argue it’s solar. Not from our sun, but from other stars, that formed the atoms. Both the radioactive ones and the ones that are hot inside the planet.
- Comment on YSK that you can force Windows 10 to open your default browser instead of MS Edge with MSEdgeRedirect 2 months ago:
Or you can just uninstall edge.
- Comment on Make it make sense 2 months ago:
You think drivers from your <country/state/city> are bad? That’s because you have never driven in my <country/state/city>