this post was submitted on 06 Aug 2023
-58 points (25.8% liked)

linuxmemes

22296 readers
45 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     

    After working with linux drivers for far too long, I’ve developed some strong opinions on the so-called “APIs” they implement.

    all 21 comments
    sorted by: hot top controversial new old
    [–] [email protected] 38 points 2 years ago (1 children)

    Linux: Of course you can use these syscalls designed in the 70s. Windows: Compatibility with what? No, you must use these newly-designed functions that exist only on windows. It's for your own protection.

    Tell me again how proprietary software gives a shit about compatibility.

    [–] MooseBoys 3 points 2 years ago (1 children)

    “Backwards compatibility” is a totally different thing from “cross compatibility”. Of course proprietary software is going to be less cross-compatible.

    [–] [email protected] 4 points 2 years ago
    [–] tills13 34 points 2 years ago (2 children)

    Sorry isn't Linus the one that always says "never break user code"? Or are you complaining about how you actually use those APIs?

    Plus I've seen many, many shitty closed source APIs. You are conflating correlation and causation.

    [–] nevemsenki 2 points 2 years ago (1 children)

    Good points, but there's undeniably some poor choices here and there. Like trying to recompile a bunch of kernel modules every time the kernel version changes makes me wish they had a better system in place... or even worse , if you have a blob driver, you're SOL or stuck on an old version.

    [–] uis 4 points 2 years ago

    This is also why proprietary drivers are bad.

    [–] MooseBoys 2 points 2 years ago* (last edited 2 years ago) (1 children)

    never break user code

    That’s a fine mantra to have but is rarely true in practice. I’ve seen way to many needlessly breaking changes in open-source libs that are explained away with “users can just pin the old version until they update their code”.

    To be clear, the linux kernel itself is almost never the cause of the breakage per se, but some other library often implementing one of the APIs it defines. Often the reason for the breakage is under-specification of the original API, for example including a uint32 flags field that is not checked against a known set of valid flags, and inevitably ends up populated with vendor-specific (and often conflicting) usages.

    As much as API design is about exposing the functionality you want, it also involves avoiding exposing functionality you dont’t want to expose. Open-source software often omits that critical design consideration, waving it away under the false virtue of “openness”.

    [–] [email protected] 8 points 2 years ago* (last edited 2 years ago)

    FOSS leads to bad API design

    Later...

    ...some other library often...

    How long until...

    I swear I'm right, guys. Just trust me!

    [–] [email protected] 21 points 2 years ago

    With the risk of breaking the internet, I see no reason to fight someone who is wrong.

    [–] Botzo 19 points 2 years ago (1 children)

    My 14+ year old laser printer "just works" on the latest linux kernel. It has been several years since MacOS supported installing the last driver binary created for it.

    [–] MooseBoys 0 points 2 years ago

    If it “just works” with linux it’s probably using a standard protocol like LPR that you can just as easily use on MacOS without a driver. The driver is usually just for non-standard functionality like color level monitoring or scanner/AIO integration that you won’t get on Linux anyway.

    [–] [email protected] 14 points 2 years ago (1 children)

    yeah because windows is a shining example of a great api

    [–] [email protected] -2 points 2 years ago (1 children)

    Some super old version of GIMP will run on both XP and Win11.

    I had to modify and recompile my laptop's Broadcom WLAN driver for it to run on the latest kernel.

    Fight me 🤪

    [–] uis 2 points 2 years ago (1 children)

    And how many super old drivers run on both XP and Win11?

    [–] [email protected] 2 points 2 years ago

    None beyond basic drivers tbh, it was a tongue-in-cheek joke just to have some fun.

    I thought the big flaw in my argument (comparing the Linux kernel ABI to the Win32 API) was obvious ☹️

    [–] Dnn 14 points 2 years ago

    Well, trying to take your point seriously I guess you could argue that companies with paying customers do have an incentive to keep stuff compatible. However, also FOSS devs don't like public shitstorms by their users which should be a similarly effective.

    However, you just argue based on annecodotal evidence without explaining how your examples are exclusive to FOSS.

    [–] [email protected] 13 points 2 years ago

    Any concrete examples on that? I feel like FOSS is what pushes people towards making modular software with APIs in the first place while proprietary software is usually monolithic, probably because all the devs are colleagues and can just talk to each other.

    [–] [email protected] 8 points 2 years ago

    I would much rather pay for closed source code that also has bad api and lazy backwards compatibility!

    [–] [email protected] 6 points 2 years ago

    Just buy a shiny undocumented ARM macbook and stop making low effort bait posts on a Linux memes lemmy community.

    This is a nothing post.

    [–] [email protected] 5 points 2 years ago

    If you don't bother to provide any argument, I won't bother to argue.