For my own Rust project I require myself to have a comment for every unwrap call that explains why that unwrap will never panic. For everything else I let the function return an error, with help of the anyhow crate and error contexts.
- 0 Posts
- 43 Comments
darvit@lemmy.darvit.nlto
Technology@lemmy.world•Microsoft wants to replace its entire C and C++ codebase, perhaps by 2030English
26·5 months agounsafe { <the whole codebase> }
darvit@lemmy.darvit.nlto
Asklemmy@lemmy.ml•What youtuber do you think had the biggest downfall?
14·7 months agoProbably pewdiepie. He was very popular before the incident, after which noone wanted to touch him. His Scare Pewdiepie show also got canceled. He has regained popularity again though.
Be careful, the actual logging can happen at a later time, and because the log function may take a reference to the value, if you modify r it may show the modified version of r in the logging instead of the original r.
Using -F with tail is even better than -f because it handles files getting truncated or getting created.
Exactly! This is why the server should just send a clear error message. 99% of the time the client just wants to show the error message to the end user, and not have to wrangle all kinds of normalized data into one.
This looks so over-engineered. Most of the time you only need an error message. Make the message clear enough so that it can be shown to the end user.
darvit@lemmy.darvit.nlto
Programmer Humor@lemmy.ml•i love ai in my offline foss softwares that are still in beta
53·8 months agoThere is no investing in crypto; that’s called speculation or gambling.
Everyone in this thread: PHP sucks because it was bad when I last used it 20 years ago.
Those haven’t existed in PHP anymore for a very long time.
Well better late than never.
darvit@lemmy.darvit.nlto
Technology@lemmy.world•Supreme Court to decide whether ISPs must disconnect users accused of piracyEnglish
1·10 months agoThats what the firewall rules do too, don’t allow internet connection if there’s no vpn connection.
Firewall is a system-wide solution that always works, while qbt config relies heavily on the application implementing interface binding properly. Which it doesn’t fully btw.
darvit@lemmy.darvit.nlto
Technology@lemmy.world•Supreme Court to decide whether ISPs must disconnect users accused of piracyEnglish
1·10 months agoBetter to just configure a firewall properly so that no packets can go outside of the vpn tunnel.
darvit@lemmy.darvit.nlto
Asklemmy@lemmy.ml•What's a piece of esoteric knowledge you have?
2·1 year agoIt’s the same when creating network interfaces via the
iptool.
Have you tried contacting the agency that deals with business registrations? Maybe they can flag the business for using a fake address.
darvit@lemmy.darvit.nlto
Asklemmy@lemmy.ml•How do you work against muscle memory to change a physical habit?
1·1 year agoWhat helped me type faster and with more fingers, was chatting in multiplayer games.
darvit@lemmy.darvit.nlto
Technology@lemmy.world•Gaming chat platform Discord in early talks with banks about public listingEnglish
7·1 year agoValve is huge and still privately owned. There’s no requirement for a company to go public.
darvit@lemmy.darvit.nlto
Programmer Humor@programming.dev•(How to trigger programmers (and make them irrationally angry)
3·1 year agoIt’s fine, we all know what you meant.
Sounds like what a lot of beginner programmers do as well.