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

help-circle
  • It’s generally not as heavy because the layer is just reinterpreting API calls while the user code still runs natively. On a browser running JavaScript, it’s using an interpreter for every line of code. Depending on the specifics, it could be doing string processing for each operation, though it probably only does the string processing once and converts the code into something it can work with faster.

    Like if you want to add two variables, a compiled program would do it in about 4 cpu instructions, assuming it needed to be loaded from memory and saved back to memory. Or maybe 7 if everything had a layer of indirection (eg pointers).

    A scripting language needs to parse the statement (which alone will take on the order of dozens of cpu instructions, if not hundreds), then look up the variables in a map, which can be fast but not as fast as a memory load or two, then do the add, and store the result with another map lookup. Not to mention all of the type stuff being handled at run time, like figuring out what the variables are and what an add of those types even means, plus any necessary conversions. I understand that JavaScript can be compiled and that TypeScript is a thing, but the compiled code still needs to reproduce all of the same behaviour the scripting language does, so generic functions can still be more complex to handle calling and return conventions and making sure they work on all possible types that can be provided. And if they are using eval statements (or whatever it is to process dynamically generated code), then it’s back to string processing.

    Plus the UI itself is all html and css, and the JavaScript interacts with it as such, limiting optimizations that would convert it into another format for faster processing. The GPU doesn’t render HTML and CSS directly; it all needs to be processed for each update.

    For D3D to Vulkan, the GPU handles the repetitive work while any data that needs to be converted only needs to happen once per pass through the API (eg at load time).

    That browser render stuff can all be done pretty quickly on today’s hardware, so it’s generally usable, but native stuff is still orders of magnitude faster and the way proton works is much closer to native than a browser.



  • I’m never buying another Logitech device again because that problem that happened with my G7 back in the 00s still happened with my G900 in the 20s.

    With my G7, I’d open it up when it started happening, and open up the switch to re-bend the metal piece to give it some spring back. Kept doing this until one day the plastic button that presses down on that metal part fell on carpet and was gone forever.

    With my G900, I said fuck it and just bought some better mouse button switches and replaced the left mouse button. Was actually kinda glad I needed to because the battery had become a danger pillow so I replaced that, too.

    But with the button issue existing for so long and being fixed by a part that cost a trivial amount compared to what I paid in the first place, you can’t convince me that Logitech isn’t deliberately using switches that fail quickly to drive up demand for mice.





  • Personally, I’d just try live boot usbs instead of going to the effort of setting up VMs for different distros.

    For getting images, my approach would be to search for the distro name to find its website and look for their downloads page. If there’s multiple flavours, just pick one and see how you like it. You can always switch to a different one once you’ve got enough experience to decide what is and isn’t important for you.

    If you just want to game, Fedora was pretty easy to get going for me. I just installed that and then steam and was able to play games after that. I’ve got an AMD gpu and it was actually easier than on windows, since you still need to install gpu and chipset drivers on windows. The only time I spent on that in Fedora was the time it took to figure out I didn’t need to do that.

    Only parts that took a little digging was mounting my other partitions (I think because I misunderstood some setup during the install, but it ended up being no big deal) and finding the setting that enabled all games to be attempted to run with proton, since by default steam will only show games with official linux support as playable by default.

    Also getting sound working the way I wanted it to was a bit of a hassle, though any of the workarounds I tried worked pretty quickly. I wanted to use the optical digital, but it wouldn’t at first, but sound did work from the analog port as well as plugging my soundbar in via USB. And even though I gave up on getting the digital to work at the time because I just wanted to play a game, when I later swung back to it, it just worked, so I’m guessing it was just broken because my motherboard was a new one and the software needed to be updated to properly support it.



  • Also windows locks files that are in use, so attempting to delete system32 would (probably, I’ve never tried it) give some errors because it’s using a bunch of those files already and would leave those files intact even if you’re very determined to get rid of them. This is why you need to reboot to apply many updates because even the updater can’t get around that restriction.

    It’s handled differently on Linux. I’m not 100% on the specifics of the implementation but it either loads files in use entirely into RAM or simply removes the reference to the file when deleted (or makes a new file and points the reference there if you’re replacing the file). That means anything that is currently using the file can continue to do so after a delete/overwrite, so the OS doesn’t prevent it from happening. This is why you can run any updates without restarting on Linux (though you do need to restart to get the system to use some updates, if they update critical components that can’t be restarted independently of the rest of the system, like the kernel).

    If you want to nuke your whole os install drive on windows, you need to boot into a different OS instance (which is what the repair partition is, just a barebones windows install that can access files on the main install without the locking). But Linux can do it from within the same instance.





  • Actually, there is one thing that is an annoyance that I haven’t been able to resolve. I use dvorak as my main layout.

    Sometimes games get the keyboard right and keys are remapped to qwerty layout (and typing still uses dvorak). This case works better than on windows, since playing a game there either required the game itself to recognize keyboard layouts (best case), or remapping the controls (annoying case), or switching to qwerty (frustrating for typing because I’m stronger with dvorak now).

    But sometimes instead it does the opposite and remaps the qwerty bindings to dvorak. As in, even if I swap layouts, wasd are all over the keyboard instead of all together. I need to exit the game, swap layouts to qwerty on the desktop, then relaunch for controls to work properly (and then I can sometimes swap back to dvorak in game and they continue to work). Often, the next time I launch the game, I’ll forget to switch it but it will just work this time.

    And sometimes it behaves like windows did where I can swap the layout in game and keys change as you’d expect.

    I have no idea why it’s inconsistent between these three options or where the “preserve key location despite the layout” feature is even coming from. Anyone have any idea about this?


  • I upgraded my gpu this weekend. Shut down, switched the psu off, swapped the old one out and new one in, booted into bios no issue (to check if I has left pcie on auto or needed to update it), then booted into the desktop (fedora cinnamon). Bam, after login only saw wallpaper, no mouse cursor or other UI.

    Well, at least it’s kinda working. Time to figure out what’s going on. Terminal works. There’s some errors in the log but nothing to do with amdgpu or firmware failed to upload or anything. Software render just shows up as black screen. Reset my cinnamon session and boot back to the same thing. Fuck.

    Then I try moving my mouse way over to the right and it shows up! Oh right. I have my TV plugged in for streaming to it sometimes and it ended up defaulted to the primary display, so my main desktop was only showing up there (and it was off). Right click, display properties, swap my monitor to primary, disable the TV until I turn it on.

    This is about the magnitude of the average problem I need to deal with on Linux. Something isn’t working like I want it to, half the time it’s actually working but I misunderstood something or the default doesn’t match my intent and I need to adjust settings and then it’s perfect or close enough.

    Or the other problem I had yesterday, tried monster hunter world for the first time and it wouldn’t launch. Played satisfactory for a bit instead (new gpu is noticeably smoother yay), then did a quick search, found that a specific version of proton works, switched to that version and it played. That’s the first game that has had such trouble for me.


  • I had to spend an annoying amount of time finding all of the settings to make it so that my windows machine would never wake up on its own, spread out over an even longer period of time because some of them aren’t easy to trigger on my own so it was a matter of trying something and then trying more things if I find it awake on its own again.

    Even disabling the wake on mouse movement was a pain because it doesn’t properly label mice and keyboards and doesn’t have a global setting. I wanted to keep wake on keyboard but not have it wake if my mouse moved a nm because a butterfly flapped its wings too vigorously as it flew by the closed window.

    After I installed Linux, I went to do the same thing there only to find it already had sensible defaults set.


  • It sounds like you might have some network places set up for windows to use but that are no longer reachable (or something along those lines) because that shouldn’t be taking so long so you might have things timing out in the background.

    Or your internet is slow and it’s taking a long time to communicate with one drive or send its screenshots of your document to their creep department.

    Or maybe a print driver that no longer exists still has an orphaned entry in the registry and it spends some time trying to locate it.

    Or malware has set up hooks for any new window that pops up but the print to pdf dialog is set up in such a way that it churns very inefficiently on that window specifically.

    I joke but any one of those might actually be what’s going on.


  • I just did the switch myself on a new PC and getting gaming working wasn’t even that hard. I picked fedora cinnamon.

    Difficulties I had:

    1. When trying the initial live boot, it failed checksum… Because windows fucked with the drive after it saw the utility that wrote the image to it left it “unmounted” (and autoplay would had also fucked with it if I hadn’t turned that off ages ago).
    2. Wired ethernet wasn’t working. Wifi does work, currently using that until I get around to working on that again, though it might just work now that it’s updated.
    3. After installing steam, many games said they were windows games only. Had to enable a setting inside steam to get it to just run them all via proton. Only tried two games so far, but haven’t seen any issues yet. My saves are usable on the one game I was already playing on windows.
    4. Optical audio wasn’t working. Worked around that by plugging in my soundbar to usb, though I’ve also confirmed that the analog port does work. This one might also have been resolved by updating.
    5. Had to set up permissions for steam to use my games partition instead of my home dir for installing games, though I think this was because I missed a step during the install.

    It took more effort getting YouTube (well porn but apparently the same issue affects YouTube) working (netflix just worked, quality seems to even be better, like it doesn’t seem to default to a low quality stream before moving up as the video plays like it would in windows). And even that was only because the desktop I picked didn’t use the same software as instructions for enabling 3rd party repositories and I for some reason decided to search for a GUI option instead of just running the command I could have run from the start.

    The only difficult part is that with all of the available desktops out there that do things a bit differently, it can be hard to find solutions specific to the one you’re using. Like I might have caused some future issues by installing gnome-software since cinnamon uses a different tool for that. But at this point, I feel like making the jump to a different desktop (or even distro) will be much easier, so don’t feel like I’m committed to the one I did pick.

    Which is so much better than windows because on that platform I had to struggle to not be committed to things I didn’t and wouldn’t pick. And it made me avoid updating often because I didn’t want to commit to whatever nagware ms added this time to try to get me to use some software I wasn’t interested in using.




  • One part would be to run a shadow client that takes the user’s input and sees how much the game state diverges. There will be a certain amount of it due to network latency, but if there’s some cheater using an engine mod/hack to fly around the map, this will catch that. Though something like that should be caught by a lower level check that makes sure the players are following the laws of physics in the game (like max speed, gravity applies, no teleporting).

    Another one would be to see if the player follows things they shouldn’t be able to see. If a player hides behind something they can shoot through but can’t see through, do they somehow seem to always know they are there? Do they look around at walls and then beeline for an opponent that was hidden by those walls?

    Another one would be if their movement (view angle) changes when they are close to targeting an enemy or if they consistently shoot when the enemy is centre of target, then it’s a sign they are using a device that even kernel mode anti cheat won’t catch to cheat (it plugs in to your input between your mouse and PC, also plugs in to somewhere that would allow it to act as a video capture device, then just watches for enemies to get close and sends movement or clicks to aim or shoot for you). Though this one is pretty difficult to catch, due to network latency. But those mouse movements might defy the laws of physics if the user was already moving. Natural movement is continuous in position and its first derivative (always, by Newton’s f = ma, though sample rate complicates that), and the way we generally move is also continuous in the second derivative, but banging your mouse into your keyboard can defy that and it’s even more sensitive to sample rate.

    Imo these techniques should be combined with a reporting system and manual reviews. Reports would activate the extra checks for specific players (it would be pretty expensive to do it for all players), then positive matches from the extra checks would trigger a manual review and maybe a kick or temp ban, depending on how reliable the checks are.

    That said, I believe there will eventually be AI-based bots where detecting them vs other skilled players will be impossible. And those will be combinable with some infrastructure that allows players to take certain amounts of control, maybe even with an RTS-like interface that could direct the bot to certain areas. Though adding an LLM and speech to text and vice versa could allow it to just respond to voice commands, both from other teammates and from the player.

    I think at that point, preventing cheating in online games will be impossible and in person tournaments will probably involve using computers provided by the organizers (tbh I’m kinda surprised this isn’t already the case and that some people have been caught using cheats during these kinds of tournaments).