Linux people doing Linux things, it seems.

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    16 days ago

    Here’s what I think. Both opinions are correct.

    Rust is sufficiently different that you cannot expect C developers to learn rust to the level they have mastered C in order to be working at the kernel level. It’s not going to happen.

    I don’t really know too much about rust. Maybe one day I’ll actually mess around with it. But the one time I looked at a rust git repo I couldn’t even find where the code to do a thing was. It’s just different enough to be problematic that way.

    So I think probably, the best way IS to go the way linus did. Just go ahead and write a very basic working kernel in rust. If the project is popular it will gain momentum.

    Trying to slowly adapt parts of the kernel to rust and then complain when long term C developers don’t want to learn a new language in order to help isn’t going to make many friends on that team.

    • witx@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      15 days ago

      But that’s the thing where you are wrong. They clearly state they don’t want C developers to learn Rust. In the particular video posted he was saying “I want you to explain to me how this particular API works so that I can do it”

      The concerns about who fixes what on a merge when the C code breaks Rust code are valid, but that’s easily fixed by gathering with the Rust developers, explaining the changes and letting them fix it.

      • DemocratPostingSucks@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        1
        ·
        15 days ago

        You could alternatively phrase “But that’s the thing where you are wrong” as “But here’s the crux of why I disagree”, it’s a bit more personable

        • areyouevenreal@lemm.ee
          link
          fedilink
          arrow-up
          0
          ·
          15 days ago

          This isn’t a disagreement. One person is stating something incorrect. You can disagree on opinion, but facts are facts. The person being referred to here isn’t asking others to learn Rust, they are just asking for more information about the already existing C code so that they can write their Rust code to interoperate with it. This misunderstanding is exactly why that developer was getting heckled on stage, and is the reason why now one has left the project. I would appreciate it if you didn’t make a misunderstanding sound like a valid opinion. Enough damage has already been done.

          • DemocratPostingSucks@lemm.ee
            link
            fedilink
            English
            arrow-up
            0
            arrow-down
            1
            ·
            15 days ago

            It doesn’t matter if you know it’s a fact, and i agree with you for the record. It’s about bringing people along with you - you catch more flies with honey than vinegar - and creating good vibes in the softwaresphere

    • technotony@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      16 days ago

      RedoxOS! There’s been solid progress too, beyond just having a functional microkernel, they have many of the userspace tools/their version of coreutils, even a desktop environment already mostly implemented!

      My understanding is that it shouldn’t be too bad to port some other things over as well. The main issue I had was just the lack of drivers, especially since it’s still tricky even on Linux, and the microkernel architecture (though more secure) also means there’s no way to reuse any of those from Linux

    • Giooschi@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      15 days ago

      But the one time I looked at a rust git repo I couldn’t even find where the code to do a thing was.

      IMO that tells more about how the project was organized and names things than the language used.

      So I think probably, the best way IS to go the way linus did. Just go ahead and write a very basic working kernel in rust. If the project is popular it will gain momentum.

      As the other commenter pointed out, there’s Redox. The issue is that this completly disregards an incremental approach: you have to rewrite everything before it comes usable, you can’t do it piece by piece. Currently the approach of Rust for Linux is not even to rewrite things, but to allow writing new drivers in Rust.

      Trying to slowly adapt parts of the kernel to rust and then complain when long term C developers don’t want to learn a new language in order to help isn’t going to make many friends on that team.

      Have you seen the conference video? That’s not just refusal to learn a new language, it’s open hostility. And it’s not the only instance, for example Asahi Lina also reported unreasonable behaviour by some maintainers just because she wrote Rust code, even when Rust was not involved.

      • areyouevenreal@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        15 days ago

        I think the point of redox is more than just rewriting Linux in Rust. Architecturally they are very different. Redox uses the more modern microkernel approach, whereas Linux is a modular monolith. There are advantages and disadvantages to both designs. They are actually polar opposites in fact. The compromise is something called a hybrid kernel which is used by Windows NT.

        • Octorine@midwest.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          15 days ago

          This is true, but the differences go even further than that. Redox is intentionally non-posix-compliant. This means that userspace programs written for posix operating systems may or may not need patching to even compile.

          Part of the philosophy of Redox is to follow the beaten path mostly, but not be afraid of exploring better ideas when appropriate.

            • Octorine@midwest.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              14 days ago

              I’m not sure. I remember seeing an example in the docs, but I can’t find it now. Actually the docs in general are a lot less opinionated than I remember them.

              One thing that I did find is that the ion shell document mentions that it isn’t a posix compliant shell because they would have had to leave out a bunch of features.

    • kingthrillgore@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      15 days ago

      Good news there’s a project that aims to implement Unix in Rust called Redox and it’s already a good enough project for studying microkernel design

          • barryamelton@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            15 days ago

            Not even, it will suffocate on its own by having the capitalists keeping their changes from each other. Like a bucket of crabs; where if one crab is about to get free the others grab onto it and pull it down.

            Kernels really benefit from being “forced” to share the code changes as the GPL license, they are too tied to HW, and HW needs a lot of capital when iterating.

            • TheHarpyEagle@pawb.social
              link
              fedilink
              arrow-up
              0
              arrow-down
              1
              ·
              15 days ago

              Permissive licenses mean faster and more widespread adoption, it’s up to project maintainers if the tradeoff is worth it. Ideally a company would realize that an open source part of their project probably isn’t radically going to affect their revenue stream, but you don’t just have to convince devs, you have to convince the suits and lawyers, and they will tell you to just build your own rather than give up any precious IP.

    • pathief@lemmy.world
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      14 days ago

      Just go ahead and write a very basic working kernel in rust.

      I don’t get this stance, really. If I want to write a driver in Rust I should start by creating a completely new Kernel and see if it gains momentum? The idea of allowing Rust in kernel drivers is to attract new blood to the project, not to intentionally divert it to a dummy project.

      Rust is sufficiently different that you cannot expect C developers to learn rust to the level they have mastered C

      If you watch the video, no one asked anything from the C developers other than documentation. They just want to know how to correctly make the Rust bindings.

      Note that Rust is not replacing C code in the Kernel, just an added option to writing drivers.

    • Anti-Face Weapon@lemmy.world
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      15 days ago

      Honestly, if anyone has become a master in C, they can become a rust master in short order. It’s different, but not THAT different. The roots are the same.