I’m old. I don’t understand it.

  • muusemuuse@lemm.ee
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    10 days ago

    So buckle up, it’s story time.

    Your computer needs to run software like any other computer does for it to do what you want it to do. There are lots of different parts that do the same thing in different ways and so there are lots of ways to make a computer.

    Once upon a time people would write software for specific machines. Anytime a new machine was released, they had to change the software to work on the newer machine. This got real old real fast.

    Operating systems come between your software and your hardware. Rather than release a version of your software for each individual type of computer, you just have to release software that works on a specific operating system. So if I sell a program that draws red squares, I would have to release tons of different versions for different machines. That’s expensive and a pain in the ass to maintain. So instead I release my red square program for windows. Now, I describe to windows how to draw that red square with my program and windows handles the task of telling all those different types of computers to do what my program wants it to do.

    Microsoft makes windows. Apple makes macOS. But there are others that exist with a different business model. Linux is free and exists under a different philosophy, that a community can share knowledge to replace the locked down and expensive offerings from Microsoft and Apple. To fund this, they may charge for support of the product instead of or in addition to the operating system itself.

    When people talk about Linux they are typically referring to a Linux distro that can make up an entire operating system, oftentimes a full replacement of windows or macOS. But technically Linux is just a part of what makes the entire operating system. It’s arguably the most important part, the kernel. Think of the kernel as the core of the operating system. Everything else an operating system does is built on top of the kernel. Linus Torvalds maintains the Linux kernel and he just gives it away.

    Linux doesn’t really do a hell if a lot by itself, but a kernel is an incredibly complicated thing to create. So others contribute not just to improving the kernel but making other things that use it to do other things. Because Linus already has a kernel he released for others do what they want with it, it makes things a LOT easier to develop since a huge part of the work has already been done.

    All operating systems have kernels and they are the probably the biggest pain the ass part to make. Linus created a simple one years ago and shared it with everyone, who contributed their ideas over the years to enable it to do all sorts of things it couldn’t before.

    Now here’s the interesting part: all those people who contributed to developing this thing have day jobs and their employers really don’t want to pay them to reinvent the wheel. So all the big, heavy, expensive, vital stuff that happens behind the scenes that makes our world work needs experienced people to make it work and it doesn’t want to make something only a few people can make work. It would be a catastrophe if the only guy who knew how your shit worked retires, dies, or, dare I say it, asks for a raise. -wilhelm scream-

    So if a big company uses Linux, they have an enormous community of talented people they can hire at any time, they aren’t locked into a way of doing things that can request a ransom to continue working (ahem, adobe), and their start up costs are lower.

    So who uses Linux? Almost everybody. If it’s online, there’s Linux backing it. Meta (Facebook), Google, Amazon, Apple, even fucking Microsoft uses Linux, and most of the companies using it also contribute back into Linux development because it’s much cheaper than doing it all by themselves.

    Now how does this affect you? Linux isn’t just for highly skilled tech professionals running major operations. It’s for that little computer in your desk that just looks at Facebook and internet porn too! Many people are looking for alternatives since their perfectly working windows 10 computer won’t be supported past October anymore and not all of them can upgrade to windows 11. But you can install Linux for free and you’ll be fine.

    • FelixCress@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 hours ago

      You seem to know a lot about Linux so I wonder if you could answer my question - if I already have software (well, games) installed using Windows, would the same be compatible with Linux or would I have to start from the scratch and try to see if there are Linux compatible versions of these games?

      • muusemuuse@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 hour ago

        Short answer: yes and no

        Longer answer: remember my red square example earlier? Software is typically written for an operating system rather than a specific machine. Each operating system can do similar things but they do those things in different ways. So my red square program for windows would be different that on for Linux or Mac.

        When your write software, it calls out of other things in the operating system to do work on its behalf so it’s written with the expectation that what it’s talking to will already understand the things it’s going to say the way it’s already programmed to say them. But when you try to run a windows game on something other than windows, it doesn’t work. It’s like trying to talk to someone when they speak a different language. You can’t understand eachother.

        Enter WINE. WINE translates windows instructions into Linux instructions on the fly. It is able to intercept instructions a program sends out to the OS, then translate them to whatever equivalent Linux has.

        This works…ish. Because Linux and windows and built entirely differently, there isn’t always a direct equivalent for what a program might ask the OS to do. So WINE has to get clever. WINE has been taught over the years what is close enough to expected behavior for most programs to generally run fine with it. But because there is so much difference between expected behavior and what we are able to fake, it can’t create a solution that works 100% of the time so some apps might work while others don’t. You’ll have to try it to be sure.

        But you asked about games and games are a bit more tricky. Games have extra things in them that most other apps don’t have. The biggest concern with games are DRM and anti-cheat code.

        DRM (digital rights management) basically tries to keep people from making illegal copies of their games. There are many different methods of DRM but they all expect the environment they are run in to work in a very specific way, so if they see something unexpected, even if it’s technically right, it will fail. The DRM will assume the game is an illegal copy and won’t run. WINE isn’t great with DRM but sometimes it can work anyway.

        The other issue is anti-cheat and this has a similar issue to some forms of DRM. With anti-cheat, a game is designed to notice if someone is peeking at its working memory and possibly writing changes that the game didn’t want. So some of these install very low-level drivers in the system that tell the game what is spying on its memory. Some DRM systems work this way too.

        WINE is super clever, but remember that it is only able to fake an environment and translate commands on the fly. It needs equivalents to exist in Linux or at least something close enough it can make up the difference. These anti-cheat drivers are basically malware because they don’t follow the rules that normal software does. They don’t behave like normal software does. They need to install at the kernel level and mess with things that deeply. Linux kernel modules DO exist but they work entirely differently from windows kernel modules and there’s no way to translate something that low level in real time. There’s also no interest in creating such a technology as even Microsoft has admitted it was a terrible idea and are now kicking third parties out of its kernel thanks to the crowdstrike incident.

        So if a game calls out for that anti-cheat software or DRM driver saying “hey you’ve got my back, right?” There’s nothing there to answer it. So the game won’t run.

        There is some good news though. For many reasons, there has been massive blowback against DRM over the years and many vendors are paying attention and selling games without invasive DRM and anticheat measures. GOG has lots of DRM-free games and there are plenty of cracked games out there that had these obnoxious bits of code yanked out if you know where to look. There’s also plenty of small, indie games that never had DRM or kernel-level anti-cheat code in the first place and those have a much higher success rate of running under WINE. Some of them even have native Linux versions. (If you install zandronum on Linux natively, no wine, you can run all zandronum games, like doom or megaman 8-bit deathmatch)

      • Gronk@aussie.zone
        link
        fedilink
        English
        arrow-up
        6
        ·
        10 days ago

        Programming is a balance of compromises, one has to define a balance between optimisation, maintainability, legibility, security and much more.

        The kernel handles a bunch of different ‘low level’ things that are quite complicated (Allocating memory to programs, scheduling what programs the CPU needs to run, creating security layers for users, handling temperature and performance throttling, peripherals etc)

        Due to its pivotal role in an operating system, the kernel developers walk a very thin line of compromises to ensure that it can be maintained and still remain performant.

        They do all of this while ensuring that any updates to the Kernel do not break older systems when they update (fingers crossed) or they do not break programs specific to the user (Userspace programs)

      • muusemuuse@lemm.ee
        link
        fedilink
        English
        arrow-up
        4
        ·
        10 days ago

        Literally everything depends on it. It has to account for a lot of variables. It has to be compatible forward and backward. There’s also a lot of personalities involved in its development and they all need to get along.

      • squaresinger@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        9 days ago

        Per se, it’s actually not. There are thousands and thousands of hobby-level kernels floating around. Many university courses actually include making your own simple kernel.

        The big issue is that the kernel is the core of the whole ecosystem. Everything builds upon it. So if you build a new kernel, you pretty much need to rebuild everything built on top of it.

        As a bad comparison, imagine you came up with a genious new shape for a car fuel hose nozzle. You know, the thing you plug into your car to refuel it. Designing a new nozzle is easy. Getting it made isn’t much harder either. Retrofitting billions of cars to work with that new shape is an almost impossible amount of work. So while making a new nozzle is no problem at all, actually implementing it is almost impossible.

        The same holds true for the kernel. Making “a kernel” isn’t a big issue. Getting it to work with all PCs with all their diverse hardware and software is close to impossible.

        The Linux kernel and the drivers running in it easily have billions of work hours invested into it, and still it doesn’t work perfectly with every piece of hardware you might have in your PC.