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

help-circle



  • This problem is far more difficult to solve than x64 windows apps running on x64 linux.

    While x64 and ARM are both turing complete and thus anything one can do, the other can also do, there can be subtle differences to the way they do them.

    Like one I’m aware of is the atomicity of loading memory using a co-processor register, which is required for accessing thread local storage, and introduces a subtle race condition if someone uses user mode multithreading (which can be way faster than kernel mode multithreading) without handling the case where they get preempted between moving that register’s value and doing the load, and end up running on a different kernel thread when they get back (because you need one kernel thread per core). That thread would end up with the pointer for another thread’s thread local storage, which tends to break things pretty badly.

    That’s just one that I’m aware of. There’s probably tons of other subtle differences that mean you can’t just have a map of “x in x64 means y in ARM” and use that to generate a compatible binary. It would probably run, but it would have bugs that the original doesn’t that are only seen in rare edge cases.

    Not that I want to discourage this effort, but this is a problem an order of magnitude or two more difficult than the one proton solved, which was essentially just a bunch of wrappers that convert one API or OS behaviour to another equivalent one.





  • For anyone wondering wtf Bun is, it’s a project championing JavaScript. It wants to replace node.js.

    On a tangent, I recently switched from a cinnamon desktop (which uses TypeScript or some form of js) to KDE-plasma because I noticed that cinnamon occasionally couldn’t keep up with rapid mouse movements (and my machine is high end). KDE-plasma handles it fine and even has a “find my mouse” feature that turns doing the “draw fast circles to see if the mouse drifts all over the screen because the handler can’t keep up with the updates” into a game of “how big can I make the cursor”.

    I wish the whole “let’s keep javascript as a thing” movement would just die out. Other languages aren’t hard to learn, why are so many people obsessed with sticking with js and shoehorning fixes for its massive flaws instead of just letting it die?