• 0 Posts
  • 477 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle
  • I had an A5 a while back and samsung didn’t make me hate them so the next phone I got was an s10. On that phone, they decided that they needed to dedicate a physical button to their fucking virtual assistant bixby. It was pretty obvious to me that these virtual assistants were mostly actually data vacuums, wanting to integrate into every aspect of your life so they can access better data on all those aspects.

    Every single time it opened that fucking thing, it was unintentional. It wasn’t as annoying as your TV, since I bet the phone was way faster and had enough memory to not have to discard whatever else you were doing just to open its app, but it exemplifies how I see samsung today. Hardware had great specs but the software made it annoying by trying to lock everything in to their ecosystem without a hard lock like apple. Even MS had ways of disabling the windows button (which used to have a high chance of crashing a game if you accidentally hit it).





  • I remember being annoyed that I had to install yet another launcher and make yet another account when I was installing portal. But I didn’t know at the time that this was the launcher to end most other launchers and accounts, or at the very least made most of that transparent other then adding an extra click to launch some games.

    Iirc, Blizzard had just replaced the wow in-game patcher with a launcher (though I don’t recall if they had a unified launcher for each game, if they all had their own at that point, or if it was just wow), Oblivion had a game launcher, and I think there were a few others. Some of them even needed to be installed separately iirc.

    Steam is nice because, being the launcher for most of my games, it’s just always open and helps organize my games. And it doesn’t feel like its main purpose is to make money, with everything else just being about opening pathways to that money. And even though it is meant to make Valve money, it’s the lack of blatant dark patterns and constant upsell attempts that makes it feel better than most of the rest of the commercial world.



  • At one point I developed a habit of converting any recursive algorithm I was writing into a loop instead, since I knew function calls have overhead and all recursion really does is lets you use the calling stack and flow control as an invisible data structure.

    Then I got a question about parsing brackets properly during an interview and wrote a loop-based parser to solve it and the guy had to fish for a bit before I remembered recursion and realized that’s the answer he was looking for. My mind just wouldn’t consider using a whole calling stack when an integer would do the trick faster.






  • If it makes you feel any better, you would have turned 30 today regardless of what you have done in the past (unless you don’t make it to 30 (unless quantum immortality is real)).

    Happy birthday! And if you aren’t happy with your efforts so far in life, better to tackle that looking forward than regret it looking back, though be kind to the yourself of today so you don’t regret spending your life preparing for the future instead of enjoying the moment.







  • That assumes SetTimeout() is O(1), but I suspect it is O(log(n)), making the algorithm O(n*log(n)), just like any other sort.

    Did some looking into the specifics of SetTimeout() and while it uses a data structure with theoretical O(1) insertion, deletion, and execution (called a time wheel if you want to look it up), the actual complexity for deletion and execution is O(n/m) (if values get well distributed across the buckets, just O(n) if not) where m is the number of buckets used. For a lot of use cases you do get an effective O(1) for each step, but I don’t believe using it as a sorting engine would get the best case performance out of it. So in terms of just n (considering m is usually constant), it’ll be more like O(n²).

    And it’s actually a bit worse than that because the algorithm isn’t just O(n/m) on execution. It needs to check each element of one bucket every tick of whatever bucket resolution it is using. So it’s actually non-trivially dependent on the wait time of the longest value. It’s still a constant multiplier so the big O notation still says O(n) (just for the check on all ticks), but it might be one of the most misleading O(n)'s I’ve ever seen.

    Other timer implementations can do better for execute and delete, but then you lose that O(1) insertion and end up back at O(n*log(n)), but one that scales worse than tree sort because it is literally tree sort plus waiting for timeouts.

    Oh and now, reading your comment again after reading about SetTimeout(), I see I misunderstood when I first read it and thought you meant it was almost as fast as bucket sort, but see now you meant it basically is bucket sort because of that SetTimeout() implementation. Bucket sort best case is O(n), worst case is O(n²), so I guess I can still do decent analysis lol.



  • Yeah, I can say that covers most of the “troubleshooting” I’ve had to do with games that don’t work. I usually go in thinking “uh oh, maybe it’s time for me to have to check a bunch of proton versions, this will be a pain” only to see that it’s trying to run it natively and switching to proton at all resolves any issues.

    The only other thing that comes to mind is that I use dvorak and something about the way keyboard layouts are handled means it tries to “preserve” the bindings when I switch layouts in game, so it keeps the messed up QWERTY keys but dvorak layout even when I switch (and can tell it’s switched from typing things like in chat). Most games let me rebind the keys so I just need to go through the bindings, hitting the key currently bound each time as if I was using QWERTY and it rebinds. Though I suspect that due to the “preserve the layout” behaviour that keyboard input is handled specially by proton and maybe I can tweak settings to get the desired behaviour (ie, changing layouts in game means I want the bindings to change).