Announcement

Collapse
No announcement yet.

Rust For The Linux Kernel Sent Out For Review A Fourth Time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jacob
    replied
    Originally posted by mmstick View Post

    Weird quote pick for System76. We've made better pitches for Rust in the past, and that was just a description of a small project.

    This would be more appropriate: https://www.rust-lang.org/production/users (138 companies listed)

    But it's only a small fraction of companies using Rust, because your company has to willingly and voluntarily request to be added to the Rust website. Apple, Google, Microsoft, IBM, and virtually all the fortune 500 won't bother.
    That's a fair point actually, and in that case another good reference would be the Rust Foundation. Google, MS etc are all there.

    Leave a comment:


  • smitty3268
    replied
    Originally posted by Volta View Post

    Can you show us how successful the Rust is? I'm not against it, but I'm trying to figure out on what basis some people formulate their claims.
    No, because I have no intention of trying to prove anything. I don't care what people think about rust. I'm not a huge proponent of it. I do think it's done a great job of generating ideas about what languages can do and showing that C can be improved upon, but that doesn't mean I think Rust will replace it or anything like that.

    I just think someone claiming that Rust is a high level language and seemingly thinking that it relies on not being able to manage memory is hilarious to laugh at.
    Last edited by smitty3268; 13 February 2022, 04:11 PM.

    Leave a comment:


  • CommunityMember
    replied
    Originally posted by pabloski View Post
    Yes obviously. If we programmers were omniscient God, we would program with a hex editor.
    Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.

    Obligatory xkcd: https://xkcd.com/378/

    Leave a comment:


  • pabloski
    replied
    Originally posted by Volta View Post

    I bet it's not C fault, but some developer. It's quite hard language, but very powerful one.
    Yes obviously. If we programmers were omniscient God, we would program with a hex editor. Why waste time with IDEs, debuggers, high and not so high level languages, runtimes, garbage collectors? You only need a hex editor.

    But, on planet Earth, things are very different. Programmers are just humans. Their brains have very limited powers. We get tired. We lose concentration. And we make mistakes.

    And if the programming model isn't there to help you, disaster is around the corner. It is that simple.

    The radical innovation proposed by Rust is the implementation of a new programming model, a restricted model that squeezes the state dimension of a software and make it tractable by an automatic system. To understand this concept, thing about AES cryptography. Do you know why it is secure? Because the space of possible solutions ( keys ) is hugeeeee. This means the problem is intractable. There is no computer capable of brute forcing it in a reasonable time.

    But what happens if you make a part of the key fixed? Maybe you force the highest 192 bit to be all zeros? The dimension of the problem decreases dramatically. Our computer can manipulate it and extract a solution in a relative short time.

    Rust makes the same thing to the programming problem. The restrictions imposed by the ownership rules, make it possible for the compiler to track the lifecycle of a program object from the start to the end. This is why Rust's compiler can catch a lot of bugs at compile time.

    Also Rust imposes on the programmer I code of conduct, by which no undefined behavior is tolerated. Think about strings in Rust. They are just vecs, so all the typical bound checks, ownership rules, etc... apply. But the string class adds another rule, that the byte sequences inside its buffer must be valid Unicode code points. This is not something imposed by Rust's programming model, but it is imposed by the code of conduct. A programming construct must identify the shortcomings and undefined elements of its domain and remove them.

    So it isn't the language the only component being sanitized. It is the ecosystem. Build small modules, with restrictions in place if necessary and controls to shoot down every possible undefined behavior or other type of uncertainty.

    Leave a comment:


  • akira128
    replied
    Originally posted by Vistaus View Post

    Age is never a definition of maturity. If it was, then we wouldn't have 40-year olds acting like 16-year olds, for example. Hell, even in software land, that would mean that we should be using KDE 1 instead of KDE 5, as KDE 1 is more mature in terms of age.
    Maturity (at least in my mind) has nothing to do with functionality, capability, features...etc.
    Maturity refers to things like being well-understood, having a formal language specification...etc

    ie
    https://en.wikipedia.org/wiki/ANSI_C

    I mean, developers want a language and associated libraries to be well-documented, api stable, and bug free.
    And that obviously takes time to get to that point.

    So in short: stability and standardization --which again, are traits that have absolutely nothing to do with overall functionality.

    Also, I simply said that time helps on the maturity scale (as in it doesn't hurt). I never said it was the be-all end-all.
    There's obviously a million other factors involved.
    And why does everyone on the g*d damn internet take everything to the extreme?!
    Oh...he said that "time helps on the maturity scale"....oh...that must mean that he thinks "time == mature == better".
    I bet you'd be great at this game called "jumping to conclusions" .... you definitely have the mind for it ; )
    I mean c'mon man, understanding context and nuance is key. Unfortunately, not everyone has the ability to process information like that...
    Last edited by akira128; 13 February 2022, 06:55 PM.

    Leave a comment:


  • Vistaus
    replied
    Originally posted by akira128 View Post

    I was simply pointing out that the steady rise in popularity and increased adoption of Rust is an indication of its "success" as a language.
    The time frame is irrelevant (albeit that helps on the "maturity" scale), it's the rate of adoption that really matters.
    Age is never a definition of maturity. If it was, then we wouldn't have 40-year olds acting like 16-year olds, for example. Hell, even in software land, that would mean that we should be using KDE 1 instead of KDE 5, as KDE 1 is more mature in terms of age.

    Leave a comment:


  • CommunityMember
    replied
    Originally posted by Volta View Post
    The most advanced and successful operating system kernels are written in C.
    Actually, the most successful OSs (and their predecessors) were written in System 360/370/ESA/Z assembly language and (in some cases) PL/X. z/OS, z/VM, z/TPF, z/VSE are the current variants. While you may never have heard of those OS's, they do run a significant part of the underlying infrastructure and would be considered advanced and successful.

    Leave a comment:


  • Vistaus
    replied
    Originally posted by jacob View Post

    C is very mature but definitely not successful, at least not in terms of the quality of the software it has produced. It has been successful in terms of adoption because as you rightly say, for decades there was basically nothing else, so it was used by default.
    Exactly! Hell, if we only kept using the adopted stuff rather than the good stuff, we'd have no over-the-counter drugs to cure headaches as drilling a hole into people's skull to alleviate headaches was very successful in terms of adoption wordwide. Just to name an example.
    Or in software land: we'd all be using Windows rather than Linux. (talking about desktops, not servers where Linux is king)

    Leave a comment:


  • Vistaus
    replied
    Originally posted by betty567 View Post

    Both are an attempt to make programming "easier" for people that cannot handle true low level programming.
    If that attracts more developers and it's still as safe (which it is, because it's Rust), then that's a win in my book.

    Leave a comment:


  • mmstick
    replied
    If you have any doubt about Rust being useful at the level of a kernel, spend some time reading the source code for the Redox kernel. You can also check out the embedded hardware projects that people are using Rust for. The code that interacts directly with hardware may be unsafe, but you can create safe abstractions from that. You can absolutely create newtypes and state machines to logically represent hardware states and prevent misuse of hardware APIs in a similar fashion that the Rust standard library provides safe abstractions for interacting with OS APIs.

    https://gitlab.redox-os.org/redox-os/redox
    https://github.com/stm32-rs/stm32-rs

    Leave a comment:

Working...
X