Linux people doing Linux things, it seems.

  • Snot Flickerman@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    201
    arrow-down
    24
    ·
    edit-2
    3 months ago

    Here’s the thing: you’re not going to force all of us to learn Rust.

    That’s precious coming from Linux developers.

    I am a heavy Linux user. I run multiple microservices on multiple headless devices all Linux.

    This sounds like every fucking Windows user you’ll ever encounter.

    “Here’s the thing: you’re not going to force all of us to learn to use Linux.”

    So, yeah…

    • xan1242@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      68
      arrow-down
      8
      ·
      3 months ago

      It’s just their ego showing through.

      It basically now comes down to the current devs depending on new Rust devs for anything that interacts with Rust code.

      They could just work together with Rust devs to solve any issues (API for example).

      But their ego doesn’t allow for it. They want to do everything by themselves because that’s how it always was (up until now).

      Sure, you could say it’s more efficient to work on things alone for some people, and I’d agree here, but realistically that’s not going to matter because the most interactivity that exists (at the moment) between Rust and C in Linux is… the API. Something that they touch up on once in a while. Once it’s solid enough, they don’t have to touch it anymore at all.

      This is a completely new challenge that the Linux devs are facing now after a new language has been introduced. It was tried before, but now it’s been approved. The only person they should be mad at is Linus, not the Rust devs.

    • Octorine@midwest.social
      link
      fedilink
      English
      arrow-up
      57
      ·
      3 months ago

      I finally watched the talk today and that wasn’t what I thought he meant. What I thought he was getting at was that the rust parts of the kernel interact with lots of other modules written by people who don’t know rust. When those C modules change their semantics in ways that break the rust code, they can’t go fix it because they don’t know rust. In fact, whenever they make a change, they don’t even know if they broke some rust module, because they don’t understand the rust code well enough. And this is something that everyone is going to have to live with for the foreseeable future, because you can’t force all those other kernel hackers to learn rust.

      • Petter1@lemm.ee
        link
        fedilink
        arrow-up
        14
        arrow-down
        7
        ·
        3 months ago

        If you are that good in C(pp), I guess understanding rust code of a module is not sooo hard… I mean, I learned what I know about C from reading stuff in the Kernel that made my embedded Linux project not working.

        But I have yet to read rust.

        • kautau@lemmy.world
          link
          fedilink
          arrow-up
          24
          ·
          3 months ago

          It’s a whole different ballgame. I’ve written a good amount of C and C++ in my day. I’ve been learning Rust for a year or so now. Switching between allocating your own memory and managing it, and the concept of “Ownership” https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html is just something many devs set in their ways aren’t willing to do.

          I understand where they’re coming from, I’ve gone through massive refactors with new tech in my career. I think this approach needs to be more methodical and cautious than it is, but I don’t think they are correct in the end result. I think a memory-safe language is the way to go, and it needs to happen.

          This to me is a classic software project with no manager and a bunch of devs arguing internally with no clear external goals. There needs to be definitive goals set over a timeline. If someone doesn’t agree after a consensus is reached they can leave the project. But as of now I think as others have said this is 80% infighting, 20% actual work that’s happening.

    • kbal@fedia.io
      link
      fedilink
      arrow-up
      60
      arrow-down
      50
      ·
      3 months ago

      Switching everything from C to Rust because it has better memory safety is more akin to changing languages from English to Esperanto because it has gender neutral pronouns and other cool features. Maybe it’s a good idea, but it’s understandable that some people are reluctant.

      • Snot Flickerman@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        82
        arrow-down
        8
        ·
        edit-2
        3 months ago

        Maybe it’s a good idea, but it’s understandable that some people are reluctant.

        I understand that position. I also understand how the words and phrases that the C community has used to communicate with the Rust community seems to be completely dismissive, not just reluctant.

        I quoted what I did explicitly because of how a statement like that comes off to the person it’s aimed at. It doesn’t make them feel like they’re on an even footing working on the same project with the overall goal of it becoming better.

        memory safety is more akin to changing languages from English to Esperanto because it has gender neutral pronouns.

        I mean… not at all? Memory safety is huge for cybersecurity, buffer overflows and the like are common attack surfaces. C requires you to have deep knowledge of safe memory management practices and even then you can end up with memory issues. Rust was developed to avoid such issues entirely. I understand the reluctance but it feels to me like arguing “we should just stick with COBOL because it works.”

        • kbal@fedia.io
          link
          fedilink
          arrow-up
          28
          arrow-down
          14
          ·
          3 months ago

          Gender neutral pronouns are pretty huge too. Sure you can do them in English without too many problems usually, just as it’s also possible to code safely in C. It requires everyone to change their old habits, but it’s much less of a change than is involved in adopting a whole new language.

          Anyway, I do like Rust better personally.

          • explore_broaden@midwest.social
            link
            fedilink
            arrow-up
            25
            arrow-down
            1
            ·
            3 months ago

            I would still say that getting people to the point where they can write safe C code every time is harder than learning Rust, as it’s equivalent to being able to write rust code that compiles without any safety issues (compiler errors) every single time, which is very difficult to do.

          • boonhet@lemm.ee
            link
            fedilink
            arrow-up
            11
            arrow-down
            1
            ·
            edit-2
            3 months ago

            Gender neutral pronouns might be pretty huge too, but nobody’s private data is getting hacked because of gendered pronoun use.

          • Auli@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 months ago

            Don’t thinknits possible by on write safe c code. Otherwise we would not have these issues time and time again. But yes its only the idiots begin don’t know how to code. Projects are big and complicated itsneasy to make mistakes.

        • refalo@programming.dev
          link
          fedilink
          arrow-up
          13
          ·
          edit-2
          3 months ago

          People prefer what’s familiar to them. Rust is completely foreign to them, the syntax is very different, the community is different (and often much younger), it still has many issues and is not ubiquitous, and many people are just slow/averse to change in general. So I absolutely understand the hesitation. And some just don’t like it for other reasons like the syntax, learning curve or other reasons. There’s also still a host of memory-related things Rust doesn’t fix like stack overflows, leaks, bitflips, unsafe context code, and just bad coding practices in general.

          • Octorine@midwest.social
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            5
            ·
            3 months ago

            I blame C++. When these kernel hackers hear about how they should switch to this shiny new language that’s going to make their code so much cleanser and more manageable, I don’t blame them for thinking it’s all bullshit. It was last time.

            • refalo@programming.dev
              link
              fedilink
              arrow-up
              6
              arrow-down
              1
              ·
              edit-2
              3 months ago

              To be fair, there’s nothing wrong with only using the parts of C++ you want. If you avoid things like templates, exceptions, RTTI etc. then e.g. your compile times will not suffer like people always complain about, your error messages will not be cryptic, plus you’ll have stronger typing, easier/safer lifetime management with ctor/dtors and easier to read code from class usage.

              Personally I think Swift has great potential if it can get past the speed and cross-platform issues, as it was designed by (among others) some C++ committee folks, and so it feels a lot more familiar than say, Rust, plus it fixes a lot of long-standing issues.

              There is also an Indian kernel fork that allows C++ drivers.

        • rhabarba@feddit.orgOP
          link
          fedilink
          arrow-up
          6
          arrow-down
          3
          ·
          3 months ago

          I understand the reluctance but it feels to me like arguing “we should just stick with COBOL because it works.”

          For those depending on COBOL code that does the job and has been doing it just well for a few decades, there are approximately zero good reasons to not stick with it.

          • linearchaos@lemmy.world
            link
            fedilink
            English
            arrow-up
            13
            ·
            3 months ago
            1. Eventually all the people who know and are good at cobol will die.
            2. A while before that happens, the people who know it will continually demand more money for their rare skills.
            3. Eventually, the cobol systems out there will need to interface new systems in some way it wasn’t designed to and it’ll be more expensive to shoehorn the remote system than to let the ancient beast retire.
            • mryessir@lemmy.sdf.org
              link
              fedilink
              arrow-up
              2
              arrow-down
              1
              ·
              3 months ago

              Even if, we are talking about the Linux kernel. Our entire ecosystem builds upon C. People choosing C for new projects because it is the common denominator.

              If Rust should be adopted in the kernel faster, patches should be send which comment how each line addresses issues of memory management solved and elaborations for rust specific patterns unfamiliar to a C dev.

              Lurkers will pick up Rust that way as well.

              Each Rust dev had to pick it up and therefore should be able to enable other - probably more experienced - Linux kernel hacker to provide reviewable patches.

              It shouldn’t be the other way around, else you are just stepping on the efforts the other human provided to that project.

              • linearchaos@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 months ago

                I’m not against Rust. I’d like to see something less dangerous with memory than C, but I don’t think it’s time yet for the kernel to leave C.

                It’s pretty clean, stable, it’s working well at the moment and the C language (or variants of it) is/are still actively used everywhere. I think the kernel universally going Rust will be a long road of everything under the sun going there first before it’s ported in earnest.

                • nous@programming.dev
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  3 months ago

                  The goal ATM is simply to allow people to write new drivers in rust, not convert the whole kernel to rust. It will be a very long time, before more core parts would be allowed to be written in rust let alone rewriting any existing core kernel code. Which is all fine as new drivers are a large part where bugs are added - older parts have had a long time for bugs to be found and fixed and so it is far less important to need to rewrite them.

                  • Auli@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    3 months ago

                    Yes there is never old code with bugs that have been sitting there for decades.

          • ayyy@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            3 months ago

            Does it count as “doing it well” when every release has fixes for previous releases’ memory bugs?

      • cm0002@lemmy.world
        link
        fedilink
        arrow-up
        28
        arrow-down
        12
        ·
        3 months ago

        Vast majority of the cybersecurity community: “an absolute ton of exploits come from memory safety issues with C/C++, we should move to memory safe languages like Rust to greatly reduce security risk and make everyone safer”

        You: “Ehh Rust has a couple features, but it’s totally not worth switching from my precious precious C”

        • Auli@lemmy.ca
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          3 months ago

          Yes people are also like you can code c safely yet it doesn’t seem to be that way. With the amount of bugs found over and over again.

        • toastal@lemmy.ml
          link
          fedilink
          arrow-up
          5
          arrow-down
          4
          ·
          3 months ago

          like Rust

          But no one is talking about that that is doesn’t need to be Rust. There are alternatives that can do as much if not more with the type system & safety while being as low-level as C without some of Rust’s restrictions.

          • Pup Biru@aussie.zone
            link
            fedilink
            English
            arrow-up
            10
            ·
            3 months ago

            rust was literally written as a systems programming language to take a similar place as C. i’m not sure of the restrictions you mean

          • cm0002@lemmy.world
            link
            fedilink
            arrow-up
            11
            arrow-down
            1
            ·
            3 months ago

            Not quite, had I done something more broad than sure. But I reference a specific group of people whose job it is to provide security guidance on such matters. The ones who are out there fighting the good fight, RE’ing malware and busting down botnets among many security things

            But I’m sure you are similarly credentialed as the SMEs in the cybersecurity field right?

            • kbal@fedia.io
              link
              fedilink
              arrow-up
              3
              arrow-down
              12
              ·
              3 months ago

              Nah. If you’d been leaning on specific statements of any given expert — of which it is of course possible to find plenty that might in such casual rhetoric be used to support whichever conclusion you like — that would’ve been argumentum ad verecundiam, an appeal to authority. Instead you cited an imagined “vast majority” to exaggerate the universality of your opinion.

              P.S. Whilst I’m indulging my argumentative side perhaps it is also worth pointing out that you totally mischaracterized my own statements and motivation. I am not primarily a C programmer, and I’ve been happy to use Rust myself when the opportunity arises. I have no personal stake in this particular fight.

              • cm0002@lemmy.world
                link
                fedilink
                arrow-up
                7
                ·
                3 months ago

                Ah I see your default is to sprinkle in a bit of argumentum ad logicam and add a dash of straw man at the end

                Your statement comes across as the migration from C/C++ is more of an upgrade for new features and increased “ease of use” rather than an urgent security issue when it definitely is. It’s more than just a case of a couple of experts and some articles, you’ve got multiple governmental and NGOs like The NSA, The Whitehouse, CISA, DARPA all calling for the migration away from C/C++ to memory safe languages

                https://devops.com/darpa-turns-to-ai-to-help-turn-c-and-c-code-into-rust/

                “DARPA, the Defense Department’s (DOD) R&D agency, will lean on emerging AI capabilities in a new program to deal with the costly and time-consuming challenge of rewriting C and C++ code to Rust in a move designed to meet the push for federal agencies and private organizations to adopt memory-safe programming languages.

                https://www.theregister.com/2023/12/07/memory_correction_five_eyes/

                "CISA, in conjunction with the National Security Agency (NSA), FBI, and the cyber security authorities of Australia, Canada, the United Kingdom, and New Zealand, said its call for better memory safety follows from its Secure By Design recommendations – endorsed by all of these cyber authorities.

                “With this guidance, the authoring agencies urge senior executives at every software manufacturer to reduce customer risk by prioritizing design and development practices that implement MSLs [memory safe languages],” the report argues."

                ~

                "CISA suggests that developers look to C#, Go, Java, Python, Rust, and Swift for memory safe code.

                “The most promising path towards eliminating memory safety vulnerabilities is for software manufacturers to find ways to standardize on memory safe programming languages, and to migrate security critical software components to a memory safe programming language for existing codebases,” the CISA paper concludes."

                • kbal@fedia.io
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  5
                  ·
                  3 months ago

                  Indeed the language is extremely fashionable among government types and many others. I did not really mean to suggest otherwise. If accusing me of erecting a straw man is your way of apologizing for your initial comment, I accept it.

                  • cm0002@lemmy.world
                    link
                    fedilink
                    arrow-up
                    4
                    ·
                    3 months ago

                    Straw Man Fallacy: A straw man fallacy occurs when someone misrepresents an opponent’s argument to make it easier to attack or refute. Instead of addressing the actual issue, the person creates a distorted version of the argument that is easier to discredit.

                    This is what you have done in every single reply you made when I have made it quite clear that this is about the migration being an urgent security issue that the cyber security community at large has been calling attention to.

                    You avoid all the core points I make and distort them into trivial things that you can easily argue, like the fact that you “Don’t code C much and use Rust occasionally”. It’s irrelevant to the actual arguments and you use it to dismiss the real core issues AKA a Straw Man fallacy

                    You have failed to argue in good faith and are actually a part of the problem. Good job!

      • Petter1@lemm.ee
        link
        fedilink
        arrow-up
        5
        arrow-down
        7
        ·
        3 months ago

        😂i wish my country switched from german to English because of how difficult it is to talk genderless in that language. Like, every fucking word seems to be gendered here.