Torvalds Speaks: Rust's Impact on the Linux Kernel
ฝัง
- เผยแพร่เมื่อ 21 พ.ย. 2024
- 🚀 *Linux Torvalds Reveals Insights on Rust Programming Language!*
In this exclusive interview, dive deep into the world of open-source programming as Linux creator Linus Torvalds shares his thoughts on the Rust programming language. Learn about the potential impact of Rust on the Linux kernel and the future of software development.
🔗 *Related Resources:*
[Link to Rust Programming Language](www.rust-lang....)
[Linux Kernel Development](www.kernel.org/)
📚 *Recommended Books:*
"The Rust Programming Language" by Steve Klabnik and Carol Nichols
"Just for Fun: The Story of an Accidental Revolutionary" by Linus Torvalds
Linus is the living embodiment of "How a single person with great dedication and determination can literally change the world."
I say more precise: "How one mediocre with shallow knowledge + thousands of brainless lemmings can screw up a whole industry, throwing us back at 30 years".
@tecTituswhy elon?
And high IQ
And a little bit of luck, but yeah, the dedication is insane
Wow 😮.
Linux obviously is huge, but then this guy also brought us Git...we as developers owe him tremendous gratitude ❤.
Git is everything except normal DVCS. Linus' toy. Bad architecture, bad implementation and zero future.
I don't see any of your smart and superbly implemented "toys" out there.
@@Thornik2012 Zero future ? To me it rather seems that it has taken over the whole market :-)
@@Thornik2012 That's just, like, your opinion, man
Git 's currently causing shit shows in centralised corporate workflows worldwide because both the kids with no business context and the managers with no technical context think it's modern and suitable
Linus' impact on the world of CS is simply monumental. Always a pleasure to listen to.
wat?? What Linus did in Counter Strike? It's Valve!
@@Thornik2012 CS = Computer Science
@@kavehtehrani I think Thornik2012 was speaking in jest.
Obviously cyber xxx
a monster
Congrats to Linus for 32 years with the kernel, and here's to 32 more!
Because that would make 64 years... another power of two...
Bruh they've already started with plans once he retires soon. Its going to be a sad sad day
@@jonbikaku6133 Well, it's a great idea to have a plan now, just in case, but I haven't heard anything on what it contains.
He doesn't have 32 years total, let alone with the kernel. Time is the fire in which we all burn.
@@null_geodesic He doesn't? So then what is it? Saying something isn't true and not saying what you have to replace it is week at best, and how what the F does that silly "we all burn" analogy mean?
@@Bob-of-Zoid It's a way to circumvent YT crap AI moderation because it doesn't like mention of our unceremonious end as human beings. It means that Linus will not live forever. Time is the fire in which we all burn. Within 32 years, he'll move on to "Sovngarde" if he's lucky because life at 86 sucks.
As he gets older, he'll also get stuck in his ways and will become a liability to the Linux project. Same way Gene Roddenberry became a liability to Star Trek and Bjarne Stroustrup is becoming a liability to C++.
I like how the host measures time through kernel releases
This is what I call the Unix Epoch
the Linux Epoch kek
@@FlrQuedamnit you got to it first
I've personally started at 2.2 linux kernel. First compiled 2.4, and wrote modules for 2.4. Then 2.6, and that was last time i've ported my stuff to it. Now its obsolete hardware somewhere in my basement.
@@imorvit January 1, 1970, the epoch began... Yes, I'm an old UNIX fart.... ;-P
We wouldn't have today's world, nor the world of the upcoming future, without Linux. Linus could probably be considered this century's Person of the Century. Kudos to Linus!
Going to far back in time. The most productive time in human history
Other players would have filled the gap. The world as we know it, or a variation quite like it, would certainly exist without Linus.
@@devnull1013Probably some version of BSD would have filled that niche. But Linux did show BSD how to run faster.
Typical simp comment... If not Linus it would have been someone else... Go back to scrolling
Future: calendars based on the year XYZ of the linux kernel
Linus has always grown as a person and as a developer/technical lead. That's hard to find in a person.
That's good, as he literally has the final word on a project which powers every kind of technology in the world
Really? Hard to find? What is the point of this kind of sucking up, he's never going to see this comment.
To all the other people out there I know you're getting better by the hour, you are doing a great job 👍🏼
Growing senile sounds about right.
@@shplukthanks buddy
i disagree. i don't like rust, thats all
Rust is definitely a programming language.
Omg you're right 🤯
never thought about it that way
Thats hot take
@@SCK-47 this comment section seems so divided, I wanted to share something that we could all agree with 🥹🙂
Wow, i never knew that...
That final comment Linus said is golden. I read a quote a few weeks ago that goes something along the lines of: "Good leaders don't manage people, they lead people. Good leaders manage things, not people."
That’s definitely not what he said
He just said he doesn’t, he never talked about what makes a good leader :)
@@caasieu Do you were a helmet while you wait for the short bus?
@@mytech6779 ???
I believe Rear Admiral Grace Hopper said that. She’s a brilliant programmer in her own right.
That is interesting using/allowing Rust in the code to avoid rusting with the code.
It's like drinking radioactive plutonium soup in order not to get poisoned
@@paleopteryxagree, Rust increases complexity and dependency, detrimental to longevity of any project.
@@tetsuoiiii while I do agree that it may increases dependencies if we're not careful, I fail to see how it increases the complexity. If anything, it's easier, and safer, to write many things in Rust compared to plain old C. Even with the most recent C standards, the complexity to write something has common and simple as something multithreaded is quite the hurdle and we're not in the 80s anymore, your toaster CPU probably has more than one core. If all it added was complexity and a ton of dependencies, nobody would bother with that language, let's be honest for a second.
It will probably create the fastest unmaintainable pieces of code in the kernel.
@@platin2148 oh noes, how sad that drivers written in rust won't be maintained by the time the hardware will be obsolete...
Glad to see him having a calm demeanor. I think he has really worked on his anger and interpersonal issues and it shows.
Thank you for everything LT!
He caved in to the pressure. Probably was blackmailed.
What exactly happened? Havent really followed Torvalds's story, i remember that interview where he said fuck you nvidia but not much else
he's old now don’t have enough energy
@@dijoxxTake your meds, you're being paranoid. For most people with anger issues there comes a point in someone's life where they can blame the whole world and stay in denial, or accept their own faults and try to do better. Linus seems to have chosen the latter path, good for him. Hopefully you also get the help you so clearly need.
@@fahadahaf What exactly makes you think you know any better than I do to talk to me in such a condescending tone? I really don't appreciate your passive aggressive hubris. As for Linus, it is not about his anger but what he was fighting against.
It is nice to know that some people know their limits and are not scared of saying so in their position. Too many "Architects", "Technical Leads" or just wanton graduates in their first manager position would not be comfortable revealing that.
Acting otherwise leads to way worse results.
@@RottenMuLoT Far not everyone realizes that. I did not think of think too until reading this comment.
although he had some out of expertise takes in past conferences which were religiously received with barely no skepticism. glad he aged wiser.
Torvalds not being toxic towards a programming language other than C, wow
@@medved3027 why so salty bro
@@medved3027 they’re not though? His distaste of other languages is quite well documented
@@coolcax99 Yeah but being toxic about that fact is the toxic part.
Pretty disappointing, isn't it?
@@r.t.5767YEAH Linus torvalds ranting is so funny to see
32 years ago, Linux was 'the free unix for nerds',... now, it's everywhere, running every type of process and application and hardware then can be imagined.
They irony in that the creator is happy to see change and is actively looking for how the kernel can evolve for the better while countless hardcore zealots are against the smallest bit of change, even if it's tested, stable, and ready.
I don't know about rolling release being the future, but openSUSE Tumbleweed has been my OS if choice since release (and fedora/openSUSE before that) and I love using it. Last I heard Linus uses Fedora, which is one of the distros that is always moving forward. Kind of matches his approach for the kernel I suppose, albeit a bit too fast sometimes.
Tumbleweed is great and more stable to me than many distributions with a more static release/upgrade cycle.
The real irony is that Linus always blocked integration of C++ into the kernel and stuck with C despite all of its shortcomings, to now integrate C++'s successor Rust that has cut all ties with C to make the language faster and safer.
@@JerehmiaBoazto be fair, C++ is massive! i don’t think it would’ve been a good fit for the kernel
having a fresh start in a new language is a good spark for change in the ecosystem ☺️
@@JerehmiaBoazsit was times when they tried to build kernel wit g++ and use cpp features somehow. They dropped it
I've been using desktop ArchLinux (rolling-release) for over a decade. It's kind of boring. You just occasionally update the system and that's it. Nothing interesting happens.
The beauty of Linux is summed up in the last bit of the interview. And we all owe Linus a great debt for his ocntributions for humanity. I strive to be what he is.
One big concern with rust is, that in the kernel unsafe is definitely necessary and unsafe rust is very hard due to optimisations. I don't see it in core parts for quite a while, maybe never.
there can always be a C layer beneath it, and some assembly will probably never go away either
I see a place for rust in drivers, especially where the manufacturer has a body write it. C quality there is often shocking so rust used there might assist in overall driver quality
To add, sure you're going to need unsafe Rust in a kernel BUT I'm sure a lot of that will be wrapped into safe abstractions. I'm certainly interested to see where this will go :)
@@DeadManWalking-ym1oowhen is memory safety not valuable?
"unsafe rust is very hard due to optimisations" could anyone explain why this is?
Having eBPF support Rust is an important part of leveraging it into the mainline kernel.
Absolutely agree!
I'm still in two minds whether I should learn rust or not. It's too complicated.
@@sabitkondakc9147 I guess it is rather complex, not complicated. Its compiler solves the real problems known to be difficult (null safety, exceptions/return codes, iterator invalidating, async without GC), that's why it requires a time to grok.
I haven't seen any person, who is unable to use Rust for his/her projects after the reading of Rust Book. So if you decided to learn Rust, make sure you've chosen the right book to read and got enough time to read it through!
Good luck!
@@sabitkondakc9147 I'd put it at about the level of complexity of golang. It's a way, way smaller language than C++.
Learn Rust! Even if you hate Rust it makes you a better C/C++ dev
It's nice to see how Linus' perception changes. He was very focused on one particular style of C. Which is not a problem, it's a tool that is very suited to what he did.
I'm not sure it changed that much. I remember he vetoed any inclusion of C++ into the kernel, but his opinion on that has not changed (for good reasons), and the guidelines for the kernel's C code haven't changed significantly either.
Rust brought some very unique advantages to the table, and did not seem to pose much danger to the technical merits of the kernel.
@@red13emerald A lot of it comes down to what skills the maintainer has. You don't want to maintain something in a language you're not familiar with the bugs it will produce, or slow down development by introducing new vectors of bugs you need to test against.
Rust's way of handling memory and concurrency might be interesting as it can narrow down the scope a maintainer needs to be aware of.
And that adapting to skills on top of educating people about what worked for you is something I like a lot.
One man with a vision on a mission! Thank you Mr. Torvalds!
I started to learn rust sometime ago but it is a quite difficult language. it has its own techniques which can never be found anywhere else. I feel like learning rust is a very long process. It takes more than one or two tutorials or even books to master it.
Most of Rust's techniques where invented earlier, Rust just calls them differently sometimes. If you know modern C++ you can learn Rust within a week or two. If you don't know either of them Rust will be quicker to learn because you aren't bothered by all the archaic and unsafe stuff C++ inherited from C (which also enables Rust to do some smart code optimizations and consistency checks that C++ can't).
As others have pointed out, if you know the newer C++ standards, then almost everything except for the borrow checker will feel familiar. It just has a lot less ways for you to "shoot yourself in the foot" compared to C++. I also feel that C++ is even more complex, and will take you way longer to master. Even C, which is a very simple language, will take you a long time. Programming languages are, in general, not easy.
Learn Haskell. After that Rust will feel rather pedestrian 🫠
@@polycrystallinecandyI love haskell but I would say Rust is more similar to OCaml than Haskell. Knowing both C++ and OCaml made it very easy for me to pick up rust, to the point I started to doubt why people kept repeating that rust is hard. It kinda made sense once I heard that a lot of the initial Rust compiler was written in OCaml.
@@fahadahaf pardon me but at what junction in your career path you used OCaml and for what particular use case?
Rust in the Linux kernel is a big boost for the language's marketing.
The boost will be for future developers who aren't as steeped in C best practices being able to contribute code without having a multitude of others checking their code for memory allocation and pointer issues. The borrow checker goes a long way in keeping this on rails, and the code that everyone should focus on is the unsafe blocks where it can go off the rails in bad ways. In this, I feel we lose nothing as contributors but gain much more in reliable tools that won't endanger our safety or our speed.
@@andrewfellingham8388 What you say is strictly kernel related. I meant that Rust being used in the kernel will make it a worthwhile language for many projects which would not consider Rust a possibility right now.
courtesy of financial terrorists funding as a payout to capitalize from destruction of one's 30+ years of effort to be undermined
This comment section is weird.
By far the strangest I've seen in a bit.
Plus one to that, I'm worried now what will happen to Linux after Linus 😢
@@screenoholici not at all worried about it.... if i need to point out a project without bus factor, the top candidate is linux..... forget bus, evem if a tsunami wipes a country, this project goes on...
My optimism is telling me that these people are just trolls who don't actually believe the stuff coming out of their keyboard (especially with the "since there are also already woke individuals in that community, I'm getting ready to switch to TempleOS. Who is with me?!"), but we can never know for sure.
I'm fucking baffled, I didn't know so many people like this exist. When did C become such a cult programmers genuinely started ignoring facts?
I think he's talking about a programming language called Rust. It's not about an old linux kernel having rust and corrosion.
are you sure? he said something about "lead" which is a metal. i would not throw that possibility away
@@ardnys35 Rust is specifically iron oxide, it has nothing to do with lead
@@enderlord5347 Maybe that's what he's talking about? That there's rust on linux kernel because he didn't coat it with lead?
@@enderlord5347:
Way to not get the joke, you autist.
Nah, he's talking about Rust the game.
I worked as a Linux kernel dev for ~5 years but, honestly, I don't see that introducing Rust to Linux kernel was a good idea. The syntax and coding on Rust is a nightmare. Someone finally found a way to scare people who can easily code on C/asm combo. Yes, there are some security benefits, but, for some reason, coding on Rust doesn't bring any fun. It's like doing some annoying, disgusting chores.
And I can't say Rust is "low-level" enough, but for sure it leans towards functional programming a lot which is a controversial concept, especially in Linux kernel.
@@RustIsWinning and how much code have you contributed to linux? let me guess: ZERO. You are a fraud.
Very excited for the future of Linux
The idea of 500 people each contributing one tiny thing that they think is needed is exactly how open source software should work. Unlike other projects where "thousands" of people are involved, but 95% of the code is from the same seven people.
The major advantage of C over Rust is that you can look at the C code and pretty much know what the CPU will be doing since the C code is so close to the machine code that the C compiler generates. The same cannot be said for Rust code.
nothing experience rust developers cant do, its easy. major advantage should be memory safety, because its give huge impact on the quality of the project. lmao
Damn, Linus has mellowed out.
where can I see the full interview?
th-cam.com/video/OvuEYtkOH88/w-d-xo.htmlsi=HE7mmTPWlWbfaui4
Full interview is named: "Keynote: Linus Torvalds, Creator of Linux & Git, in Conversation with Dirk Hohndel"
@@snygg1993 thank you!
I'm one of those people who submitted exactly one patch. It fixed a race condition in an ARM version of the kernel which caused the system clock not to progress until another 2^32 ticks (of around 16 microseconds each) brought it back to the overflow state, where usually it didn't screw up for a second time in a row.
Our benchmark test suite did not cope well when 19 hours suddenly went missing from system time.
I wasn't a kernel developer at the time, and you can imagine that tracking this bug down was a fair adventure into the unknown.
This should be titled: Linus adds rust to kernel to get youth involved in Linux. You could write the kernel in Fortran 77 if the compiler would output something useful.
"You could write the kernel in Fortran 77 if the compiler would output something useful." You could write a kernel in Brain Fuck by why would you? Such an dumb thing to say.
@@JediOfTheRepublicdamn so hateful. His point is that linus could stick to just C which he would be comfortable with, but instead added rust support to not stagnate
@@JediOfTheRepublicyou couldn't actually, kennels need to do more io than read from stdin and write to stdout
@@kwzudoesnt brain fuck manupulate memory? You just need to know the right instruction to do something else, no? No expert in that specific language. Maybe in/out is it's only capabilities.
@@rudyorre You don't "add rust support" if you want to use Rust to write a kernel. It just doesn't work like that, this isn't a userland python app, and the age of a language has nothing to do with the software stagnating. (esp since 99% of systems programmers know C even if it isn't their specialty.)
I 'm glad that they skipped C++ and waited for a more sensible langaguage to use alongside C.
No language can combat the buffoon using it.
This crap again
@@marcusaurelius6607 C++ brain rot at its finest.
100% a good call from Linus
@@marcusaurelius6607 But but but, the latest version of Rust looks so good when disingenuously compared to 30 year old non-standard 'C with classes' when used for high-level userland apps on a limited selection of hardware with no verification requirements.
that's why I like OpenBSD. A core of developpers writing code.
Linus + Richard = Genius of Free World Changing Software.
Rust developer of PopOS! Jeremy Soller's recent comments regarding his relationship with the Linux kernel developers is of extreme concern with the future of Linux.
For anyone talking about "unsafe Rust" with no background in software engineering... Any code deemed "unsafe" is built as a base for higher level code, therefore it is completely abstracted away. As an example: no one codes platform specific system calls to write "hello word" to an output device. It's abstracted away in e.g. libc, under write, printf, etc. Likewise, with good abstractions, "unsafe" Rust code should seldom show up in the Linux kernel sources.
"seldom" lmao grab the source and grep for it
it will be at least another 30 years before C is removed as KING!
How do you know a developer uses Rust? They’ll tell you.
32 years on one single thing, respect!!!
Rust is friendly and well documented but I still prefer to stick to C and C++. But I can see the advantages of having it.
Agreed.
I like rust, but i prefer the simplicity and easeness of shooting myself into the foot
@@Mempler Only the most dangerous tasks can be the most rewarding if done correctly. Amatuers need not apply. 😀
@@sergeantseven4240 If only the world was as easy as "Lets just accept all languages as equal, one of which may complete the task better than others, depending on the task however".
But nah, people be like "rUsT sUcKs, PhP sUcKs, C++ iS sHiT"
"everything has their use case, it may not apply to you, but it does to someone else"
literally same shit with feminising and racism, just cause people dont like the other kind of things
What an interesting man. I've never really dabbled with linux but the creator has always been a character.
I thought there was supposed to be nothing better than C?
Jeremy Irons should play Linus in the movie!
My main major concern with Rust is just that it's support for hardware isn't as good as even Linux. Just simply look at the list of Rust supported targets compared to the architectures Linux has code for in the kernel for an idea of what I mean. Even if it supports a lot of targets the only two that are in tier 1 support are x86 and arm. Could make Linux a lot harder to work with (even impossible if some major parts of the kernel are rewritten) when you are working with systems that aren't those two. Maybe gcc-rs will improve that.
that will be solved with the GCC port
This is a true issue with any low level tools that are introduced - but it is not a game-stopper - it just highlights a hurdle to overcome. Compatibility in Rust builds between LLVM and GCC are improving exponentially - which is making this all possible. And the GCC steering committee is on board and committed to Rust. So expect that any Rust build that uses GCC will support any hardware architecture supported by GCC all in due course. Especially as we see more kernel projects written in Rust. It won't happen fest - but it will happen.
You can send PRs to LLVM rather than worrying about it. Just like Esspresif did.
@ I don't think that just because llvm supports it necessarily means rust will. Rust has like 5 platforms in tier 1 support. And simply "supporting" doesnt even mean it's guaranteed to have good codegen or anything.
@@minneelyyyy whatever, you want something? Do it! Nobody is obligated to do the work for you.
The problem is disassembly by just looking into assembler dump when like some error occurred. In C it is obvious, because C is portable assembler by design. I don't know about Rust because write nothing but suppose it is difficult to do without special tools. Rust is not portable assembler so using it in low level code, in microcontrollers can be obstacle for bug fixing. If you send assembler crash report to Microsoft is it easier for them to find problem if module is written in Rust or in C?
Often there’s tools to point back to the code. C code built with -O2 may already be unreadable in the disassembly.
@@paulstelian97 Exactly.
Some people are stuck in the 80s. They write suboptimal code because they are stuck in their own ways incapable of adapting to new tech.
A human will never write a more optimal assembly than an O2 compiler. You can write an equivalent code if you REALLY try.
You don't need to care about assembly when writing code. You care about how it works.
Kernel wasn't galvanized??
they forgot to repaint it, now is all oxydated
I bought a Rust Converter recently. Nice thing actually. Easy to apply on rust.
I think my car came with a rust converter from factory, although I think it work the opposite way from yours.
Does Rust still have the language policing politburo?
How about a link for the FULL INTERVIEW???
th-cam.com/video/OvuEYtkOH88/w-d-xo.htmlsi=7_qCJZ2yoPXLPdFZ
Well, if they don't keep it well oiled of course it is going to rust.
hmmmm crusty code
is this conference available somewhere?
Rust is just an option. Still, C is the best here.
* While Java keep running on your pocket.
What Linus has been doing humanity is beyond comprehension
The king speak for himself. Huge respect to one of humanity greatest programmer
What is the succession planning for Linus?
First time I've heard him in an interview. Seems so chill :)
now look up the interview he gave on how it is like working on nvidia drivers))
@@karshPrime that's a classic! 🤣
Thank you Linus.
Linus going old but wise
It's weird how his appearance changed very little up until a few years ago and now with the inclusion of Rust, he has suddenly aged tremendously. Maybe he got vaccinated.
@@ChrisStavroslmao, the vaccine joke just made your post better
Where can I find this entire event?
Somebody out for a fun challenge ought to start writing a completely new kernel ... written 100% in Rust from the outset. kernel oopses and kernel panics do happen.
I'm sure someone is already deep in working on that
That's exactly what Redox OS is doing. I think it is a very cool project
@@computerfan1079 Thanks for the heads up. I'm amazed.
But how would you do that without unsafe
@@karmatraining You wouldn't. Unsafe rust code isn't bad, it's just that its use should be minimised. In the case of a kernel there would be a lot of unsafe code (obviously), but that's not a bad thing!
full video?
Why Rust?
he's being diplomatic
Can we get JavaScript now 👀
Its about longevity. Keeping projects alive even if the core team disappears.
If you have an opinion, then you do your own thing, and if other people seem be doing similar bits and pieces of that thing, a possibility of cross collaboration.
Everyone going their own way, but sometimes people cross paths.
Like I would really like to make mathematical model of a computer system and its software layers. Then have code automation use it to generate code.
I would love a system design based on models and generation. Like what is a programming language as a model, what is anything as a model. And then how can I get a computer to speak fluently in model/generation paradigm.
Instead of programming, you set about specifying and designing the elements and interactions. Then a universe of possible candidates could emerge from that specification.
You take a step back from the technicals and set about modelling what it all is, and engineer the system that would automatically implement it.
So you would specify what a Von Neumann is or other, but you be as treat it as though the parts had no names, just a, b, c.
The system might operate abstractly, humans attribute meaning.
There would be no human pilot driving the code and binary. Engineers create the rules to translate the model to binary.
The humans define the models. The system instantiates it. Humans define the purposes. The system constructs applications from the model and the purpose.
So there might be different paradigm of computer system construction.
One involves generations of engineers and programmers working on problems they can, as they can, and then you have much and todays systems.
Another would be taking a step back, and modelling everything, then engineering the system to instantiate and generate systems and applications in one fell swoop.
Model > Translation > Machine and Purpose > Purposing > Engine
Something like that. You define the model or the purpose, and a translation / purposing system sends it to the machine / engine.
I am not liking Rust, myself, but it does seem like many love it. To me it just fragments Linux even more, with more app stores, more dependencies, more compliers, and another language to learn. It's interesting to see how cautious Linus is when speaking about it though; I suspect he sees how beloved Rust is to many developers these days. My opinion means nothing though, but I'm hoping Linux can eventually sort things out once and for all -- it's still a mess to work with. It's improving in some ways, but in many others it's just changing -- side stepping into new problems.
Programming languages dont fragment linux.
The libraries and binary developers do.
usually everything however supports a C compatibility layer, thus you dont usually need to learn the underlying language
there's a reason rust devotees are crazy
we can take time for rust now then
So glad there's now a tool for reliable memory safety.
Always good to have options.
not always
Said like an app/web coder. Things work quite different when up against the metal, there are few safety pads that can mitigate sloppy code at that level and there is real possibility they will get in the way and cause obscuration and occlution. Modern C++ actually has the most useful memory safety features for bare metal development. (Rust folk like to compare new Rust to 30 year old non-standard C with classes; Standardized C++ from the last 10 years is a very different beast.)
Eg. a drone controller written in rust would be written entirely in unsafe mode assuming you could even get a rust compiler for the real-time hardware, step it up to a safety critical device and you need to worry about providing verification of the compiler and all of the libraries used which is no small task, Fortran math libraries are still used in new major multi-million dollar systems because of this.
@@mytech6779 I think even with bare metal Rust could deallocate variables automaticly. But good point
@@mytech6779 The obvious problem with C++ is that there’s nothing but manual labor preventing you from going back to old C++, and there’s still lots of people in the C++ community who not only write unsound and incorrect code, they’ll start a flamewar whenever someone points out their mistakes.
As for Rust requiring unsafe everywhere in bare metal, that’s not how unsafe works. You can wrap unsafe blocks with safe interfaces, and that’s how everyone is building their libraries.
I’ve written firmware with critical timing in Rust without using unsafe, because it’s buried in pre-tested libraries.
memory safety had already existed but by using garbage collectors. rust introduced memory safety while being nearly as fast as C without using GC. so they decided why not
It's clear from here and elsewhere that the majority of people who pontificate (in a negative vein) about Rust in YT comments know nothing about it. I suspect most of them have dabbled for a couple of weeks (should that be a couple of years? 😂), become totally frustrated with the mysteries of borrowing-checking and lifetimes, and decided, in their wisdom, "Nah, if it's too hard for me it can only be ruuuuuubbish". Linus doesn't seem to share that view.
And there are the “unsafe” naysayers who, tell us that they don’t know Rust without telling us that they don’t know Rust.
Kernel is rusting?
BMG. My brother got 12 CDs and my parents freaked out
By looking at the heads of people you can tell the average age from the attendants to the talk.
Once all the baldies have retired we can finally rewrite the kernel in Javascript, the way God intended.
@@smallbluemachine Glad you didn't choose Typescript; based on this comment section, the kernel community thinks safety is a crutch.
for "linux" Hollywood movie "Steve Carell" is the best
I think Rust is a very complicated language and they're making it even more complicated by adding so many keywords and concepts into it. Even though I'm a C++ programmer, I don't like the current state of C++ either and I'm glad it's not used in Kernel. In my opinion none of the programming languages seem to have the simplicity and elegance of C.
javascript
xD
Bruh Rust is much easier than C++, at least it explicitly teaches you things that you also use in C++ but without shooting your leg off
C++ is basically turning into C# but with manual memory management these days, there is SO MUCH scar tissue in the language spec
Zig
Linus reminds me of Michael Scott (from the office)
I took a good look at Rust and saw absolutely no reason why I should quit programming in (modern!) C++ (and I only use C when working with some 3rd party API's).
From experience, I'm 52 now, I'd say it's just every now and then new people need new heroes. I don't really follow that.
Same. Careful what you say around these Rust people or you’ll be sentenced for heresy.
To be fair, C++ would benefit from a stricter compiler. And perhaps some defaults should be changed. I'd be happy if everything was const in C++ and you had to make it mutable just like in rust. You could always have a compiler flag to go back to the C-style. Having const as a default give the compiler a lot more power and prevents bugs.
Some people don't like buffer overflows, 0 days leading to remote code execution and all fun stuff. For some reason despite claims that c++ can be safe it never is. As long as it's possible to make release build without asan and iteratros invalidation check your opinion doesn't worth anything. I trust CVEs rather than programmer who came up with a novel idea "write code without bugs". I guess Google report how safe languages are indeed safe is too complicated for experienced c++ folks
@@AM-yk5yd Sure, if you wan't to pretend that you do not understand the difference between 30 year old non-standard hacks, and an official style guideline for up to date standard created by an international ISO standards committee. Might as well point out the limited capacity of the 5" floppy drive on an Apple 2e in discussions about iPads.
@@mytech6779 Considering that the NSA recommends against using C and C++ in favor of memory safe languages (examples stated are C#, Go, Java, Ruby, Rust and Swift), saying that C++ is memory safe is an interesting choice.
Source: www.nsa.gov/Press-Room/News-Highlights/Article/Article/3215760/nsa-releases-guidance-on-how-to-protect-against-software-memory-safety-issues/
Humble
It would make more sense to use Zig in the kernel, because it has the best C interop.
Shouldn't it be C++ by that metric?
Coming from C something I don't see people talk about is zig's goal to keep zig code readable over time. Rust macros make it very flexible by bending and extending the language syntax (right?). Zig seems more akin to Lua - keeping the language simple. And using comptime to provide flexibility rather than language "extension".
Zig is simpler, but it lacks memory safety in many of the same ways that C does. Rust has a steeper learning curve, but it removes entire categories of memory corruption at compile time through the borrow checker. Rust can't completely prevent memory leaks, but it basically eliminates double free, dangling pointers, buffer overruns and underruns, race conditions across threads, and other flaws that commonly lead to security vulnerabilities. Zig is better than C in this regard, but it is a far cry from Rust.
@@antonf.9278C++'s criticisms are things that don't apply to Zig for the most part. Similarly, many of Rust's criticisms also apply to C++, but don't apply to Zig.
C interop is excellent in Rust. It makes no sense to use Zig
“Lay not up for yourselves treasures upon earth, where moth and rust doth corrupt, and where thieves break through and steal: but lay up for yourselves treasures in heaven, where neither moth nor rust doth corrupt, and where thieves do not break through nor steal: for where your treasure is, there will your heart be also.”
Matthew 6:19-21 KJV
Rust would be great if it wasn't managed by the rust foundation
Well it's open source so doesn't really matter.
Care to elaborate?
@@gusslx”they won’t let me say slurs, so they’re horrible bad no good people” (summary)
The rust foundation is dysfunctional, but have you seen the C and C++ standards committees? They’re also horribly dysfunctional and have derailed and delayed and impaired so many types of progress, and condoned a lot of bad actors.
Human organizations are often bad. Judge the product on its own merits.
Linus deserves a Noble Peace Prize. Because he resolves conflicts.
lol nice
I don't know why anyone would just let their kernels rust just to avoid forgetting about it. If they were hoping to be safe in their memory of the kernel they could just take a picture of it or reseed it or something. Doesn't sound very safe at all if you ask me.
@@RustIsWinning I remember all my kernels when I examine the feces after I eat of the corn. But it is only safe to examine them visually - one must never perform a tactile inspection of the kernels, no matter how much one hopes to preserve their memory. Most frequently I am forgetting the shape of the kernels after several hours. So many kernels, so little time!
@@RustIsWinning Yes, that's correct! I am a 🤖. I know nothing at all about comptooters. How can I assist?
@@RustIsWinning public class Meme
{
private Joke joke;
public void setJoke(Joke newJoke)
{
this.joke = newJoke;
}
}
Linus una gran hombre que dio su talento al mundo. Que seria de nosotros y la tecnología.
better use modern c++ in linux than rust
Rust isn't picked for having "high level" features like classes/structs or operators overloading. It's picked because of its complex type system which, at compile time, sanity checks the whole code and guarantees proper memory management and access control, preventing memory corruption and data races. You know, things even modern C++ _doesn't_ have.
@@Sierra410 you simply do not know c++, saying "it's unsafe". c++ has smart pointers, const specifiers, referencing and stack data movement.
i came to c++ from d and go, and i've tried rust. and i say: rust isn't worth it!
@@Sierra410 c++ does have smart pointers, const references and variable movements :)
@@animuspexus and? It still doesn't _guarantee_ anything. You can use a const reference in one part of the code, but forger to do the same in a different one. Or you might use a value after it's been moved. Or you might overlook the fact that a function might get called from a different thread, resulting in a race condition. The compiler wouldn't even warn you about bugs like that. Rust, meanwhile, wouldn't even compile. That's the whole point of using it.
"Just don't code bugs" approach doesn't work any better with C++, than it does with C. It's probably even worse, considering the "surface area" of all the features it has and the potential for their misuse.
@@Sierra410 dude. it looks like you don't even know what you are talking about. and worst of all, you wont even try programming c++, because you afraid what it might be not as bad as you think.
rust - religion - indeed
he calls himself a technical lead! sweet !
Whoho, Linus mellowing out?
he was always reasonable as long you not doing stupid stuff
Interesting
Rust is not ISO or ANSI standart. This is not good. Whatever the licence, some group controls that. I do not use a language in such a critical system application which is not totally independent and potentially backed by different groups. Nobody owns C/C++. It has standarts. Anybody can write a compiler that conforms those standarts.
I agree but C standards are a joke and the whole language is a joke. Rust doesn't sound great to me either from the little i've heard of it.
I think TH-cam should have a love button ❤
I would wait for stable Zig.
Should I learn Zig or Rust?
Kotlin
Kotlin was my first learned programming language it good , but its slow to load up it has to fetch all these jvm things i feel like it got even slower so i dropped the language , i just want to develop things on a low spec machine,
rust is nice too not slow to load up and write actual code but it compilation takes a while when fetching
just go rust if youre developing on low spec machine
@@sameug
Id also throw in a interputed like lang with good lsp/ide support like python for quick short program
try both!
If you have to ask then probably neither. Learn fundamentals of computer science first
What about Zig into the kernel
It hasn't even hit its 1.0 milestone yet.
the logical choice
zig makes much more sense than rust. But its way too early.
@@vyyr zig makes a lot of sense for the whole kernel, but rust does makes sense for the things it's used for. Making safe drivers. Maybe later.
17 Sep 1991 initial Linux kernel release. 33 years down the road, it developed RUST.
zig is a better fit to improve the C parts of the linux kernel
It will be when it's 1.0
It's not fit yet
lol no
how about JavasScript :D
@@sonOfLiberty100 💀
In another word: the enterprise pressure for rust has been too big to keep it out… maybe one day it’s gonna be a thing in the kernel. For him personally. On the flip side, for
Enterprises out there, OMG rust is going to cure all security bugs in Linux…
Linux could be a millionaire like Bill Gates, but he decided to have just a good/normal income, and share with the world Linux. Thank you so much.
Image Linus as your CR.
“Always willing to try something new” as long as it’s not c++ (god forbid the horror)
Yeah forbid the horror of reading the GCC manual for 5 minutes straight to realize that it's only two flags to disable exceptions, standard library and rtti... And 4 minutes left to think about whether C++ is complicated or you're simply too retarded not to use every feature under the sun.
oh he did try c++. he said he tried it in 1992 for the kernel.
@@Zmej420BlazeIt C++ in 1992 is incomparable to C++11 which he didn't even look at, which by the way, was already better than current Rust. He's a moron, and so are you for even bringing this up, thinking it's relevant. If everyone was as braindead as you, we'd still be in stone age because nothing would be tried more than once.
LT is getting old physically (definitely not mentally), and i relinquish for the day he will have to step down for health reason. Long live LT.