Skip Navigation
Would this be a correct syntax for error handling when making an http request?
  • You can use expect on Options and Results to extract the value and panic on Error in the same line (https://doc.rust-lang.org/std/result/enum.Result.html#method.expect).

    let html_content = reqwest::blocking::get(&permalink).expect("the request should succeed");
    

    You can also use unwrap if you don’t need a custom message. The ? operator is definitely the most compact way of handling errors, and for good reason because the rust developers want people to use it. Once you learn that the code will become somewhat smaller.

  • About that...
  • I wouldn’t say the OS is Linux any more than the OS of an Apple computer is XNU. Linux is just the kernel. Similarly the other OS isn’t “Windows NT kernel,” but Windows 10 or Windows 11.

  • Google and Apple lose their court fights against the EU and owe billions in fines
  • Yeah but also this is only for their EU profit, so it’s really an even higher percentage.

    It doesn’t really make sense to talk about money they made in other countries when talking about these fines, as if they make 5 billion in profit in country X and get fined 6 billion, they would still have lost money for operating in the country regardless of how much money they made other places. Since they lost money in the country, that fine would be high enough for them to want to fix their law breaking or totally pull out of the country, and so the fine accomplishes its purpose.

  • UK's first 'teacherless' AI classroom set to open in London
  • To be fair the glorified babysitter wouldn’t require 4+ years of education on educating children, so they probably couldn’t just be “simply teaching.” This is still an awful idea, they seem to be trying to save money by paying a glorified babysitter a lower wage than a teacher. Private schools can be for profit in some place, I wonder if that applies here.

  • The Irony of 'You Wouldn't Download a Car' Making a Comeback in AI Debates
  • I’m pretty sure that it’s true that citing sources isn’t really relevant to copyright violation, either you are violating or not. Saying where you copied from doesn’t change anything, but if you are using some ideas with your own analysis and words it isn’t a violation either way.

  • Can you safely heat people with microwaves?
  • My point is that the heat increase of the heart doesn’t have to be so insane. If someone was designing a microwave human heater they would have to make the power level such that it would always result in a safe rate of temperature increase. Obviously using an off the shelf food microwave wouldn’t work.

    Is heating someone too quickly a concern if they don’t have hypothermia? Like if I’m sitting round in my house and start to feel cold, and I get in a hot bath, it’s not going to heat me up too fast, right?

  • Can you safely heat people with microwaves?
  • But wouldn’t the microwaves also warm the heart? There’s no reason a microwave at the right power couldn’t slowly heat someone up. I don’t think the OP is asking about someone who is dangerously cold either, so the extreme care that needs to be taken when someone is in serious danger due to how cold they are might not be relevant in this case.

  • Can you safely heat people with microwaves?
  • Microwaves don’t just heat water molecules, although due to density they absorb a large amount relative to many other substances. Also since humans are mostly water, the heating should be even enough to not be quite as problematic as you describe. Some sensitive areas like eyes are an issue, but otherwise it’s possible a low enough dose could warm someone a couple of degrees without causing any harm.

  • Type in Morse code by repeatedly slamming your laptop lid
    github.com GitHub - veggiedefender/open-and-shut: Type in Morse code by repeatedly slamming your laptop shut

    Type in Morse code by repeatedly slamming your laptop shut - veggiedefender/open-and-shut

    GitHub - veggiedefender/open-and-shut: Type in Morse code by repeatedly slamming your laptop shut

    cross-posted from: https://lemmy.world/post/17528189

    2
    Factorio @lemmy.ml explore_broaden @midwest.social
    Friday Facts #417 - Space Age development | Factorio
    factorio.com Friday Facts #417 - Space Age development | Factorio

    Hello, we usually show finished stuff in Friday facts these days, but I personally always liked to have a peek behind the curtains and see the (temporary) mess there. This motivated me to do some kind of overview of how the overall expansion development felt from my perspective. If you are lik...

    Friday Facts #417 - Space Age development | Factorio
    0
    Game Recommendations

    I’m looking for recommendations on high quality open source games to try. Some of my favorite games I’ve played recently are Factorio, Kerbal Space Program, and Outer Wilds, but I’m willing to try many kinds of games (besides FPS).

    0
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)EX
    explore_broaden @midwest.social
    Posts 3
    Comments 242