Skip Navigation

Posts
14
Comments
236
Joined
3 yr. ago

  • For what I see it'd be just like saying "using a password" vs "using a user and a password".

    As long as API keys have more entropy than typical username & password combinations they can be more secure. Imagine if you had a system where you make a token by concatenating username and password - the security properties don't change just because you're exchanging one string instead of two separate ones.

  • Could this have happened if users.mutableUsers was set to false? I see a warning in the manual saying in that case users and groups will be replaced on system activation.

  • I dunno, I'm feeling some optimism. Biden's work has been undoing decades of Reaganomics policies, with impressive results. The process of holding politicians accountable is gradually doing its thing. Progress fighting climate change is slow, but real.

    Extremists are making as much noise as ever. But that could be because they've a) backed themselves into a political corner that they don't know how to get out of despite extremism being unpopular, and b) certain politicians may be worried that if jail time is going to be handed out the law will come for them next so they're making longshot attempts at stopping those dominos from falling.

    In 2024 Biden will have the advantage of being an incumbent during a period of economic growth (if all goes well), Republicans have lost some of the skewed congressional districts they had previously, and the young voters that surprised people in 2020 & 2022 will be joined by a new cohort.

    When you're living through a sucky period of history things are sucky until they aren't.

  • Yes, and nationalize the US rail network so passenger trains can actually work well. I think the experiment in publicly-owned roads has shown some promise on that front.

  • Oh, I forgot to do my fanboy plug. I've had the easiest time setting up Proton dependencies on NixOS. It unifies configuration with package management, so the Steam configuration module can reference your installed hardware, and load the appropriate graphics packages automatically.

    Basically you opt into unfree packages, and put programs.steam.enable = true in your NixOS config, and that's it.

  • I don't know what the issue is; but something to try if you haven't already is to go through the setup instructions on the Arch Wiki, paying special attention to making sure that you have the correct 32-bit graphics dependencies installed.

  • Neat! And for anyone not familiar Lib.rs is ~a package repository, described as~ an alternative [frontend] to Crates.io.

  • Neat! And for anyone not familiar Lib.rs is ~a package repository, described as~ an alternative [frontend] to Crates.io.

  • I've seen admins asking for more fine-grained moderation tools. Maybe eventually things will work the way you're hoping. Here's a quote from a Beehaw admin,

    an unfortunate reality we’ve also found is we just don’t have the tools or the time here to parse out all the good from all the bad. all we have is a nuke and some pretty rudimentary mod powers that don’t scale well.

    Defederating prevents trolls on another instance from coming into comments in local communities to harass people. From an admin/mod perspective you have to take some kind of action to stop that.

  • Plastics? No, wait...

  • Oh, forgotten memory unlocked. I listened to that one a lot in high school

  • Looks very nice! My 9-year-old has just planted watermelon seeds in the backyard to raise money to buy a horse. He's really getting into planning all aspects of this business. I showed him this picture for inspiration.

  • Well I just discovered how much I enjoy The Diplomat so I think Netflix is safe for now. I have kids so Disney+ is staying. Paramount+ has me locked in for Star Trek (per their evil plan). I got a Hulu trial to watch Futurama - but that feels like at least one subscription too many so Hulu is likely to get the axe.

  • I got an ADHD evaluation from a therapist at my college through the college's free health service. I remember one of the tests was a Tower of Hanoi puzzle. I tried to explain that that result might be skewed because I had studied the algorithm for that puzzle in computer science class the week before. Anyway, I ended up diagnosed with ADHD.

    I've also gotten evaluations for my kids. I know that's a bit different from an adult diagnosis, but I think the process of setting up the evaluation is the same: find a neurologist, call and say, "I think I might have ADHD. Can I make an appointment for a test?" If they ask, tell them about the reasons for your suspicions.

    If you're in the US It's probably a good idea to talk to your primary care physician first just to get a referral to appease your insurance provider. I'm sure they won't think you're weird or obsessive. No one expects you to have firm evidence of a condition before you're tested for it.

    Oh, and I don't think of ADHD as a disorder, despite the second "D". There isn't anything wrong with me. It's just that my brain works differently than the typical brain. That comes with pros and cons.

  • One of my kids gets a lot of fevers and headaches. He also is a very picky eater, and doesn't drink enough water. (We're working on both of those.)

    My other kid is not so picky, and rarely has fevers or headaches.

    You can probably tell I have an opinion on the nature of these correlations.

  • TIL - I thought of this as a Persian tradition. Apparently the idea of a deliberate flaw in a woven work features in both cultures.

  • No problem! I thought there was a good chance you already know the concept, just not in the exact, unfortunately-overloaded words of your post title.

  • That advice does not literally refer to interface the programming language feature. It means to test the observable behavior of a component, not internal implementation details.

    In your example, write tests for both Rectangle and Triangle that call area, and assert the result is correct. But do not test, for example, the order of mathematical operations that were run to calculate the result. The details of the math are an internal detail, not part of the "interface".

  • In the context of vectors I prefer my APIs to return an empty set rather than an None-option. This makes handling it much easier because you can still iterate over it, it just has nothing.

    I can see that argument. But you can also iterate over an Option-wrapped response with something like for x in xs.into_iter().flatten() { ... }, and the Option gives you an extra bit of information that can be helpful in certain cases.

  • You may be better off with &[String] as a read-only view of Vec. To get &[&str] I think you need to create a new collection to hold the &str values. (String and &str have different memory representations.) But the choice depends on what you want to do - maybe providing &str values adds a convenience that is worth creating a second collection.

    For the Option case I would go with Option<&[String]>. My understanding is that Option<&T> is the same size as &T for any T so an owned Option wrapper is zero-cost. If the reference pointer is null then Rust interprets that as None. Besides you usually want ownership of an Option so you can map it or whatever else you want to do.