This isn’t Linux, but Linux-like. Its a microkernel built from the rust programming language. Its still experimental, but I think it has great potential. It has a GUI desktop, but the compiler isn’t quite fully working yet.

Has anyone used this before? What was your experience with it?

Note: If this is inappropriate since this isn’t technically Linux, mods please take down.

    • weclaw@lemm.ee
      link
      fedilink
      arrow-up
      93
      arrow-down
      3
      ·
      11 months ago

      From my personal experience I can tell you 2 reasons. The first is that this is the first general purpose language that can be used for all projects. You can use it on the web browser with web assembly, it is good for backend and it also is low level enough to use it for OS development and embedded. Other languages are good only for some thing and really bad for others. The second reason is that it is designed around catching errors at compile time. The error handling and strict typing forces the developer to handle errors. I have to spend more time creating the program but considerably less time finding and fixing bugs.

      • agent_flounder@lemmy.world
        link
        fedilink
        English
        arrow-up
        28
        arrow-down
        1
        ·
        edit-2
        11 months ago

        That sounds pretty great. I get sick of having to switch gears for every layer. As a hobbyist it is tough to remember five or six languages well enough when only coding something a few times a year.

        Since I do embedded, scripting, web front and back end this is sure tempting.

        I have been hesitant to try to learn yet another language (this would make…ummm… idk I lost count ages ago). But with all the hype I may break down and give it a whirl.

        • YIj54yALOJxEsY20eU@lemm.ee
          link
          fedilink
          arrow-up
          8
          arrow-down
          6
          ·
          11 months ago

          Sounds like python may be a better fit if its supported on the embedded devices you use as it will cover scripting and backend too. Rust has quite a learning curve and can be rather verbose.

          • agent_flounder@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            11 months ago

            I do use python quite a bit for scripting and backend, app, and I’ve used MicroPython a little bit, preferring C, C++ for embedded. It’s pretty great for what I need.

            I might mess around with Rust out of curiosity anyway, though the downsides you mention make it less compelling for me, personally. I’m not a big fan of verbose languages (e.g., Java, though I have used it for some apps).

            • anton@lemmy.blahaj.zone
              link
              fedilink
              arrow-up
              3
              ·
              11 months ago

              Messing around with rust is certainly worth it, as it can change the way you think in a way that improves code in whatever language you write.

            • YIj54yALOJxEsY20eU@lemm.ee
              link
              fedilink
              arrow-up
              2
              ·
              11 months ago

              If you are curious definitely do check it out! It’s a really cool language to learn and you’ll start to enjoy the fight the compiler puts up.

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

            Sorry but I don’t see the reasoning backing the enthusiasm for python. Sure, it is great for scripting (this includes machine learning), but why for anything else?

          • LeFantome@programming.dev
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            11 months ago

            I realize that even $2 systems are running full Linux distros these days but Python does not map to what I think of as “embedded”. If you have a full Python interpreter, it is already a pretty rich environment.

            That said, this is what computing is starting to look like. There is less and less “bare metal”. I work with people that claim to be “firmware” engineers and then, when you look, you find out they have a full Ubuntu distro running and they may as well be running on a laptop.

      • LoETR9@feddit.it
        link
        fedilink
        arrow-up
        1
        arrow-down
        13
        ·
        11 months ago

        I feel like C++ is as competent as Rust for any project and it’s definitely older.

        • xor@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          10
          ·
          11 months ago

          Not sure I can think of anything I’d enjoy less than trying to build a web app in cpp

        • weclaw@lemm.ee
          link
          fedilink
          arrow-up
          7
          ·
          11 months ago

          Before using Rust I was using C++ for most projects and while it is a really powerful language there were some big problems:

          • no standard build system, most projects use cmake or meson and vendor dependencies with the projects. These build systems were really hard to learn (especially cmake, meson is easier). There are package managers these days such as conan and vcpkg but there is not really one standard way to build programs like in rust.
          • error messages were really hard to understand, especially when the project uses templates
          • it felt like 3 languages in one, projects written before c++11 differ greatly from c++11 and up
          • some of the new language features have really weird syntax, for example lambdas
          • some people say that rust is hard, but modern c++ is considerably harder to learn, just look at the list of modern c++ features: https://github.com/AnthonyCalandra/modern-cpp-features, you have to know the different pointer types (unique_pointer, shared_pointer etc.), templates, rvalue references and move semantic, exceptions, constexpressions and the list goes on
        • Wooki@lemmy.world
          link
          fedilink
          arrow-up
          6
          arrow-down
          1
          ·
          11 months ago

          Rust was created because c++ was so bad. Just take a look at crates they need a whole lot less maintenance because less bugs.

          • LoETR9@feddit.it
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            11 months ago

            My point wasn’t that C++ is good. My point was that C++ can and is used everywhere (desktop applications, web applications, OSs,…) and is older than Rust. So I feel that “this is the first general purpose language that can be used for all projects” is false. Probably “this is the first general purpose language that I (and many others) like to use for all projects” is true, but is a different claim.

            TLDR: You said Rust was first language capable of system, app and web, it isn’t.

            • LeFantome@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              11 months ago

              It depends on what “can be used” means. I really like C# and it “can be used” for that full stack C# for example can write out native machine code, can manually and precisely lay out memory, and can directly link to assembly language routines. You can write an OS in C#. Even as a fan though, I would certainly argue that it is the wrong tool for that job.

              In the same vein, while I know C++ “can” be used for web dev, I would argue that anybody that tries to do so for any significant project is insane.

              I am not sure I would use Rust for “everything” but I do think the claim that Rust is one of the first languages where it is reasonable or practical to choose it for any of these uses is valid. Rust code can be very high level and often does not much different than a scripting language. At the same time, it can go as low-level as you want. This article is about an OS in Rust ( and there are few ). Web dev in Rust is totally reasonable and there are a few popular frameworks available. Rust has one of the best WASM stories around.

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

              It is good and rust improves on its gaping weaknesses.

              Yeah I never made that claim the threads OP did.

      • fossphi@lemm.ee
        link
        fedilink
        English
        arrow-up
        29
        arrow-down
        1
        ·
        edit-2
        11 months ago

        Yes, as much as I appreciate memory safety and rust in particular. I’m very worried by this pivot away from copyleft and GPL. Specially the rewriting in rust phenomenon of fundamental stuff. It’s safer, yes, but they’re all pretty much non GPL and it seems very risky to me. Make no mistake, the industry is riding this wave to move away from copyleft to permissive licenses.

        I wish that people understood the importance of FSF and GNU

        • agent_flounder@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          arrow-down
          3
          ·
          11 months ago

          Well that is rather insidious. Crap. They probably understand the reasons for the GPL very well. Doesn’t mean they support them.

          • fossphi@lemm.ee
            link
            fedilink
            English
            arrow-up
            6
            ·
            11 months ago

            I’m sure there’s some community pull as well, because most of the rust ecosystem seems to be converged on MIT. But what despairs me is the wilful sidelining of GPL and everything GNU by some open source community members/corporate people. So yeah, you’re probably right

        • jack@monero.town
          link
          fedilink
          arrow-up
          3
          arrow-down
          9
          ·
          edit-2
          11 months ago

          You make it sound like a conspiracy. Just accept that some things are organically more popular, like MIT which is very easy to understand and use for normies. It’s not perfect, but that’s how it is

          • Danny M@lemmy.escapebigtech.info
            link
            fedilink
            arrow-up
            17
            arrow-down
            4
            ·
            edit-2
            11 months ago

            MIT is a terrible license that only got popular because of the popularity of the anti-open source movement in the last decade.

            one could write books about what’s wrong with the MIT license.

            It could even theoretically be argued that MIT has in some ways allowed big tech companies to proliferate, by effectively allowing them to take open-source code, modify it, and then close it off in their proprietary software. What does this mean? It means that the work of countless dedicated open-source developers can be co-opted by companies that have done almost none of the work, reaping several billions of dollars, while the developers who actually did the work make no money. It’s like opening your doors wide only to have someone come in, take your stuff, and sell it back to you.

            In contrast, in licenses like the GPL, there’s a requirement that if you use GPL-licensed code and modify it, your new code also has to be open-source under the GPL.

            • lukas@lemmy.haigner.me
              link
              fedilink
              arrow-up
              3
              arrow-down
              2
              ·
              edit-2
              11 months ago

              I love the free software ideals, but I think we’ve got a different understanding about what constitutes a good and a bad license. What many people seem to forget about software licenses is that there are these other countries besides America. They couldn’t care less about whatever judges rule over there. A good license is a dumb simple license that anyone can enforce in court with ease. A bad license is a convoluted license that crumbles like a house of cards in court. I read the GPL. It’s convoluted. It’s an opaque terms of service agreement riddled with legal boilerplate disguised as software license. A poor execution of the ideals I hold. I only use the GPL as a formality to say that I support the free software ideals, but I have zero confidence in enforcing the GPL.

              • Danny M@lemmy.escapebigtech.info
                link
                fedilink
                arrow-up
                3
                ·
                edit-2
                11 months ago

                I’d like to correct you by saying that GPL is DEFINITELY enforceable in countries other than america. I can’t say about every country (tho that will be the case with every license), but for instance it’s definitely enforceable in europe. For example in Germany and France there have been a few lawsuits that the FSF helped carry out against immoral companies.

                GPL Enforcement Cases - FSFE

                If you’re in Germany the Institute for Legal Questions on Free and Open Source Software is a law firm that literally works only on enforcing the GPL, FOSS licenses and other technological human rights that are being ignored by big tech.

                If you want to be even more sure about European Enforcement you may want to checkout the EUPL v1.2 which is GPLv3 compatible.

                In other countries, such as Japan, the GPL is also enforceable, so long as you treat it the same way as copyright, so you’re willing to sue companies that you know are stealing from you (the FSF can help you if you can’t afford it).

                Russia and China don’t care, but… it’s Russia and China, that’s not really news, is it? :)

                EDIT: I will write a full article about the legal enforce-ability of FOSS licenses such as the GPL before the end of the year

      • lukas@lemmy.haigner.me
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        Shame that we don’t have a proper copyleft license tho? GPL, as nice as the intentions are, is a license so convoluted that I’m not sure whether it’d hold up in court in my country.

        • Spore@lemmy.ml
          link
          fedilink
          arrow-up
          43
          ·
          edit-2
          11 months ago
          1. breaks compatibility
          2. breaks compatibility
          3. breaks compatibility
          4. hard to add without breaking compatibility

          Then we arrive at Rust as a natural outcome.

          And it’s of course possible to migrate to Rust from C or C++ progressively, fish has almost got it done.

          • jack@monero.town
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            11 months ago

            Did fish migrate progressively tho? I thought they swap out everything at once as soon as the rewrite is ready

            • Spore@lemmy.ml
              link
              fedilink
              arrow-up
              4
              ·
              edit-2
              11 months ago

              Well, they are not going to release in between, but their rewrite still “works” at each commit being a hybrid of Rust and C++.

        • Mubelotix@jlai.lu
          link
          fedilink
          arrow-up
          14
          ·
          11 months ago

          Rust isn’t just a new improved version of C or C++. It’s completely new and it feels completely different to use Rust. In a positive way

        • callyral [he/they]@pawb.social
          link
          fedilink
          English
          arrow-up
          7
          ·
          11 months ago

          (notice: I am not a Rust or C/C++ expert)

          Doing all that is creating a completely separate programming language from C. Rust is that programming language.

          Fix shitty imports

          Rust does that with modules and crates.

          Improve syntax rule

          You mean having consistent/universal style guidelines? Rust pretty much has that with rustfmt.

          Improve memory management

          Safe Rust is memory safe (using things like the borrow checker), and Unsafe Rust is (usually?) separated using the unsafe keyword.

          Although Unsafe Rust seems to be quite a mess, idk haven’t tried it

          Other new misc features

          Rust has macros, iterators, lambdas, etc. C doesn’t have those. C++ probably has those but in a really weird C++ way.

            • Spore@lemmy.ml
              link
              fedilink
              arrow-up
              3
              ·
              11 months ago

              I’d say no. Programming safely requires non-trivial transformation in code and a radical change in style, which afaik cannot be easily done automated.

              Do you think that there’s any chance to convert from this to this? It requires understanding of the algorithm and a thorough rewrite. Automated tools can only generate the former one because it must not change C’s crooked semantics.

                • Spore@lemmy.ml
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  edit-2
                  11 months ago

                  I think there’s no need to stick with one particular language. It benefits to learn more languages and bring the “good parts” of their design into your code whatever you are writing it in.

                  Btw It happens that I’ve learned a bit of RISC-V, with Rust.

        • Skull giver@popplesburger.hilciferous.nl
          link
          fedilink
          arrow-up
          2
          ·
          11 months ago

          C and C++ can’t be fixed retroactively because old code must remain compatible.

          If you’re going to implement your own C dialect, you may as well just write a new language.

          For C++ that’s Rust, for C that’s probably Zig (Zig will just let you import existing C files, which helps with porting). Carbon and experimental languages like Jakt may also work, it all depends on what your priorities are.

        • agent_flounder@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          Idk what the iso fuck up and I don’t code enough to appreciate whatever technical debt exists in either so I am probably sound like an idiot but…

          Since I do infosec, the glaring issue for me is not being memory safe.

    • beeng@discuss.tchncs.de
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      11 months ago

      The idea is less bugs due to stricter rules when developing and compiling. You can understand that.

      Then, also more access to build tools and high level programming without changing languages.

      If you have no need for that, then just know others do and it’s a great thing.