• 33 Posts
  • 3.24K Comments
Joined 6 years ago
cake
Cake day: May 31st, 2020

help-circle

  • What I always find frustrating about that, is that even a colleague with much more Bash experience than me, will ask me what those options are, if I slap a set -euo pipefail or similar into there.

    I guess, I could prepare a snippet like in the article with proper comments instead:

    set -e # exit on error
    set -u # exit on unset variable
    set -o pipefail # exit on errors in pipes
    

    Maybe with the whole trapping thing, too.

    But yeah, will have to remember to use that. Most Bash scripts start out as just quickly trying something out, so it’s easy to forget setting the proper options…


  • I don’t have the Bash experience to argue against that, but from a general programming experience, I want things to crash as loudly as possible when anything unexpected happens. Otherwise, you might never spot it failing.

    Well, and nevermind that it could genuinely break things, if an intermediate step fails, but it continues running.


  • The problem is that all of this happened outside the law. Calling it a “DMCA takedown” is misleading, because it’s not making use of the DMCA’s mechanisms. There actually are hefty penalties for false DMCA claims, but only if you file them with a court.

    I assume, Valve may be liable as well, for distributing copyrighted material (especially after they’ve been notified of it). At the very least, YouTube also has a system like that, where they allow claimants to bully creators with no repercussions.
    Basically, Valve, YouTube et al need their own copyright takedown system to be preferrable for companies, so that those use it instead of filing an official DMCA claim.

    Of course, the root cause of the problem is still the DMCA.





  • Huh, so if you don’t opt for these more specific number types, then your program will explode sooner or later, depending on the architecture it’s being run on…?

    I guess, times were different back when C got created, with register size still much more in flux. But yeah, from today’s perspective, that seems terrifying. 😅



  • What really frustrates me about that, is that someone put in a lot of effort to be able to write these things out using proper words, but it still isn’t really more readable.

    Like, sure, unsigned is very obvious. But short, int, long and long long don’t really tell you anything except “this can fit more or less data”. That same concept can be expressed with a growing number, i.e. i16, i32 and i64.

    And when someone actually needs to know how much data fits into each type, well, then the latter approach is just better, because it tells you right on the tin.



  • Ephera@lemmy.mltoComic Strips@lemmy.worldXXX
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    Well, there might be other reasons to need them. For example, I once got locked out of an account, because I had lost the 2FA credentials (which I did not have in KeePass, incidentally). The webpage let me back in with a recovery question.

    Well, technically, it was a recovery code which was just random symbols I had been provided upon account creation, but kind of the same thing in the end.





  • Man, I understand that it’s trying to give tips, but this really comes off as condescending. “Just create these three pieces of complex, non-obvious documentation and ensure you have highly automated specification and code quality checks.”

    I also have to say, if you expect maintainers to be experts in how to correctly prompt LLMs, and expect them to be hot for reviewing/rewriting generated code, then they might as well prompt the LLMs themselves.
    Sure, there may be extra effort involved by outside contributors – may, because they do attract folks who have no interest in putting in any effort – but is that really worth the overhead of having to communicate with the LLM through a middleman?


  • Oh man, I’m currently watching a Let’s Play of basically a puzzle game, and the game has some logic where when the player doesn’t make progress for a certain timeframe, then the narrator says variations of “If you’re stuck, remember, you can always undo.” and “Having some trouble? You can restart the level and try again!”.

    Now they’re playing the later levels, which are supposed to have you scratching your head for a bit. And you can hear the narrator say those phrases seemingly every minute, even though they’re frequently using undo and restart.

    Really feels like the devs discovered during playtesting that players forget about undo and level restart, but then never did another playtest to get the feedback that it needs to be toned down.



  • Ephera@lemmy.mltoScience Memes@mander.xyzit's a long distance relationship
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    4
    ·
    3 days ago

    I’m open for counterarguments, but I always felt this was a silly way of looking at things. You cannot measure stuff at the quantum level without significantly altering what you measured. (You can never measure without altering what you measured, since we typically blast stuff with photons from a light source to be able to look at it, but for stuff that’s significantly larger than photons, the photons are rather insignificant.)

    As such, you can look at measuring quanta in two ways:

    1. Either the quantum had the state that you end up measuring all along. It is only “undetermined”, because strictly nothing can measure it before you do that first measurement.
    2. Or you can declare it to have some magical “superposition”, from which it jumps into an actual state in the instant that you do the measurement.

    Well, and isn’t quantum entanglement evidence for 1.? You entangle these quanta, then you measure one of them. At this point, you already know what the other one will give as a result for its measurement, even though you have not measured/altered it yet.
    You can do the measurement quite a bit later and still get the result that you deduced from measuring the entangled quantum. (So long as nothing else altered the property you want to measure, of course…)


  • Ephera@lemmy.mltoScience Memes@mander.xyzit's a long distance relationship
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    1
    ·
    3 days ago

    The analogy that makes most sense to me so far, is this:
    You rip a photograph in half and put both halves into envelopes. Now you send one of the envelopes to your friend in Australia. You open the other envelope. Boom! Instantaneous knowledge of what’s in the envelope in Australia. Faster than light!!!

    In quantum terms, you “rip a photograph in half” by somehow producing two quanta, which are known to have correlated properties. For example, you can produce two quanta, where one has a positive spin and the other a negative spin, and you know those to be equally strong. If you now measure the spin of the first quantum, you know that the other has the opposite spin.