• 0 Posts
  • 459 Comments
Joined 2 years ago
cake
Cake day: November 13th, 2023

help-circle







  • I’ll never understand MFers in the rurals curating lawns.

    Basically, it’s a flex. In order to have a perfect looking grass yard, you either need to kill all your free time to maintain it, or pay people a lot of cash to keep it tip-top. And the free time thing also requires money since you probably don’t have your life set up like that unless you’re paying for it somewhere else. Any other approach will yield mediocre results which will immediately mark you as unable to keep pace with your more monied neighbors.

    Assuming you’re playing their game, that is. Which you clearly are not. Good job!





  • Well, I did have the older version on the left as a kind of rosetta stone for this. Plus, this kind of “init and/or return” pattern shows up a bunch of places, so it makes sense someone would want a quick version that’s harder to screw up or has fewer side-effects.

    I’ve also spent years investigating better ways to do things through various versions of C++, D, Rust, Go, and TypeScript. After a while, the big-picture patterns start to emerge and you see different camps start to converge on the same kinds of things. Stuff like these weird features start to feel like learning a new slang term for something you’ve felt, but could never say so succinctly.

    In the case of ??= it’s a more formalized Python x = x or y or x = x || y in JavaScript. The catch is that not all languages treat assignments like expressions that can be returned, so you get a clunky return as a separate statement; return (x = x or y) doesn’t always fly. That friction is all over the place, and it’s natural to want a shorthand for this very thing.

    Sure enough, after searching a bit, ??= shows up in JS, PHP, and even Ruby has a version.

    Edit: more context.



  • Eh, I haven’t touched C# since 2001. I agree that the more verbose style is more explicit, and so more readable. That said, I can figure most of the new style out from context.

    • => is clearly a closure declaration operator, similar to JavaScript.
    • x ??= y is shorthand for “assign y to x if x is not set, and return x” which is kind of nice.

    There must also be some shorthand going on for getter properties being the same as methods w/o an arglist (or even a ()).

    The only part that has me stumped is the unary question-mark operator: private static Singleton? _instance = null; I can think of a half-dozen things that could be, but I cannot decide what it’s doing that the original question-mark-free version isn’t.





  • I had a domestic A/C unit fail this way. Zip ties kept the power leads to the compressor taught against the bottom leg of the compressor housing (cast iron or some kind of steel). The edge of the zip tie, combined with vibration and moisture abraded the insulation over the period of about 3 years and grounded out against the housing. This destroyed the compressor motor windings (melted to a dead-short under power), leading to a pricey repair.

    Technician knew what to look for since he saw the exact same failure mode on that make of A/C unit in a commercial model on a rooftop.



  • I dunno, eyeballs are pretty much unitaskers. Vision gets used to help reinforce balance, reflexes, and proprioception, but that’s all in the brain.

    Teeth might be debatable. Arguably they’re only for masticating food. The debate opens up whether other functions are physiological and so compulsory, social constructs, or neurological things we do instinctively.

    With everything else, I 100% agree. It’s all an engineering nightmare to service and troubleshoot.