Originally posted by mmstick
View Post
Announcement
Collapse
No announcement yet.
Rust For The Linux Kernel Sent Out For Review A Fourth Time
Collapse
X
-
-
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.
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.
- Likes 3
Leave a comment:
-
Originally posted by pabloski View PostYes obviously. If we programmers were omniscient God, we would program with a hex editor.
Obligatory xkcd: https://xkcd.com/378/
Leave a comment:
-
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.
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.
- Likes 9
Leave a comment:
-
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 refers to things like being well-understood, having a formal language specification...etc
ie
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.
- Likes 1
Leave a comment:
-
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.
- Likes 1
Leave a comment:
-
Originally posted by Volta View PostThe most advanced and successful operating system kernels are written in C.
- Likes 3
Leave a comment:
-
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.
Or in software land: we'd all be using Windows rather than Linux. (talking about desktops, not servers where Linux is king)
- Likes 2
Leave a comment:
-
Originally posted by betty567 View Post
Both are an attempt to make programming "easier" for people that cannot handle true low level programming.
- Likes 2
Leave a comment:
-
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.
- Likes 5
Leave a comment:
Leave a comment: