• 0 Posts
  • 424 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.


  • Buddahriffic@lemmy.worldto196@lemmy.blahaj.zoneBASIC rule
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    Goto was risky and it was one big name on some BBS back in the day that pushed for a “never use goto” dogma, rather than figuring out rules for when it should or shouldn’t be used. And a whole bunch of people just jumped on that bandwagon, but not everyone.

    The main rule for using goto that I’m aware of is to never use it to jump into the middle of a scope. Jumping around in the same scope is fine, jumping out of a scope is fine (assuming you handle unwinding the stack correctly, which I think the C compiler tries to do, at least, but there are other constructs that can save/restore stack contexts to do the same thing as a goto but safer).

    Though programming language contstructs can also help eliminate the cases where using goto gives better code. Breaking out of nested loops is the main good case for goto that I’m aware of. Without a goto, you need to set up an exit flag and check it before starting a new iteration for each loop level you want to escape from. Unless your language supports labelled breaks/continues, in which case the compiler knows which loop the break/continue refers to instead of needing to always assume it means the deepest level.

    C/C++ is my favourite language, but I’ve used an enhanced C++ with labeled loops and it was nice.



  • No, I’m on Fedora 41, though 42 just came out.

    Try a live USB to see if you like the interface. I suggest KDE-plasma if your computer is decent. It’s easy to switch desktops but just be aware that they can make a huge difference in the actual experience of using it, since the desktop is the way you generally interact with the OS. HDR seems to be working fine on KDR, too (wasn’t implemented on cinnamon).

    But from what I’ve heard, Bazzite is another solid choice, especially if you have an nvidia GPU. Though it’s immutable IIRC, which I don’t understand the full implications of but might be worth looking into to help make your decision.


  • That’s what I would do with shower heads, since landlords typically just go with cheap ones that check off “has shower” but otherwise generally suck. They just screw off, I stick the crappy one in the cabinet under the sink, and install another one that I bought.

    Frustrating part is that it doesn’t even cost much to get a decent one instead of the cheapest possible. It’s like landlords and developers go out of their way to save a tiny amount on hardware and appliances that are significantly worse than what you can get for not that much more.


  • If you’re reluctant because you’re expecting it to be a huge pain at first while you do setup and get used to it, I found it actually easier to get things set up on Linux the way I liked them than it does on a new windows install, or sometimes even after a windows update that resets some settings to default (without saying anything other than “your system is up to date” of course). It helped that most defaults are decent. The most time taken during the install was looking up what some choices meant in higher detail.

    Though I do have an AMD GPU, if you have an nvidia GPU, you’ll only get that easy experience on certain distros specifically set up for that, as I understand. Other distros can work with nvidia but require more tinkering as I understand. But for me, I didn’t even have to install GPU drivers. The first game I launched was more of a “wait, will this really just work without needing to install anything else?” than a “ok, time to play a game”. And it did work, at least after checking the “always use proton” option in Steam.

    And don’t worry too much about which desktop you initially select. It’s almost trivial to install and switch to another. Just be aware that cinnamon relies heavily on some form of JavaScript, to the point that my high end PC couldn’t keep up with rapid mouse movement without dropping some of the updates, though tbf it wasn’t a huge impact. But KDE-plasma handles the mouse way better. That’s on Fedora.



  • It’ll be you the next time you click allow for a steam hardware survey. Mine will be part of december’s for the first time since I switched, so I’m helping next month’s number increase.

    Though kinda funny how for a steam survey, I’m all for it, but any other attempt to get usage data gets a fuck no from me. I hope all future valve owners understand the value of that trust and don’t try to cash in on it like some MBA that who thinks thinking of the future means extrapolating the current quarter’s increase in earnings indefinitely into the future.




  • Was it multiple monitors or multiple systems? Can’t see if there’s another keyboard and mouse there in front of the one behind him. Though I suppose it was all supposed to be mainframe terminals (running Linux in the movie, which I’m not sure had a mainframe version, as I understand, it started as a Unix for desktops, where Unix was the mainframe OS).

    Edit: the Linux thing was my own bad memory, Lex recognizes Unix, which is weird because it was an experimental unix filesystem browser UI and most kids wouldn’t have access to machines that run any kind of unix, so it wouldn’t have been a “I played with some computers in my garage” kind of thing. Though being Hammond’s grandkids, it’s not outside the realm of possibility that she did have access to a mainframe either through Hammond’s companies or from access to universities and the like.




  • What if we add some nutrinos? And then reverse the polarity? And maybe some antimatter?

    Wait, was dilithium just the media Star Trek used to go from reacting matter with antimatter, producing heat, causing the dilithium steam to expand, spinning a magnet inside a coil somewhere behind one of those access panels? Was antimatter just fancy futuristic coal powering the Enterprise’s steam engine!?

    Edit: phew No, it’s not just a fancy space steam engine. It is pure fantasy; the dilithium crystal matix regulates antimatter (impossible for any matter to do so) and interacts with subspace (no evidence such a thing even exists), but it’s not spinning any magnets.


  • That depends on how you define “viable”. And “generate”.

    Peltier devices generate a voltage from a heat differential passing through a bi-metalic matrix. It’s not a huge voltage, so the definition of “viable” comes in there, but it can be used to power low power things and works well for heater accessories. I first saw its use for wood stove fans that get powered just by sitting on the stove. I’ve also seen them power USB chargers for pellet stoves.

    And then there’s batteries that generate a voltage from submerging two types of metal in acid. And more modern battery designs might be doing it a bit differently but still no spinning magnets and coils. Obviously they are viable for powering many things, but usually themselves are powered from another source rather than using fresh acid for each charge, so the “generate” bit comes into question.

    I think there’s some others. Like fiction can be used to generate a static voltage and I’m pretty sure I’ve seen some tesla coils that use friction to generate their voltage. If you continuously generate that voltage, you could make a circuit out of it rather than shock high school kids or make their hair stand up, though I don’t know what kind of amperage you could generate like that (that 5 figure voltage isn’t fatal because of a lack of amps).

    I asked an AI out of curiosity and, while I won’t paste the response (feel free to ask one yourself), it gave a list of 20 methods, though I’d say this thread on its own covers about 9 of them, since some are different specific ways of doing similar ones (eg there were 4 based on moving something relative to a magnetic field).


  • Oh yeah, the bit where SSDs move sectors around for wear evening is important. Because of that, it’s possible to completely fill up an SSD after deleting files and still have those files recoverable from the flash chips themselves. Without that secure erase, as I understand it, if a sector gets marked “bad”, whatever data is there might stay there forever (or at least as long as the cells hold a charge).

    So there’s no benefit to writing multiple passes over deleted data on SSDs as far as the flash is concerned, but multiple passes might make it more likely for the controler to actually direct those extra writes to a sector actually storing the data (though the odds might be low unless you’re overwriting all free space, though even that depends on how much space is free vs how many “spare” sectors there are, and even then it might be impossible to get it to write to a sector marked “bad”).



  • I’d say, yes, you are literally consuming your food to take anything of value that your body can extract from it, often at the cost of everything for the thing you’re eating (but definitely at the cost of the parts you eat). Like I’m a bit baffled as to how you can consider it not a form of theft. Hell, I’d even argue it is the purest form of theft there is and quite likely the original theft that only scavengers, photosynthesizers, and other life forms that survive on non-biological sources of energy aren’t thieves in that manner.