Rust Will Help Linux Succeed and Makes Coding Fun, Says Greg Kroah-Hartman (zdnet.com)
- Reference: 0184517312
- News link: https://developers.slashdot.org/story/26/07/20/0417244/rust-will-help-linux-succeed-and-makes-coding-fun-says-greg-kroah-hartman
- Source link: https://www.zdnet.com/article/greg-kroah-hartman-linux-kernel-rust/
> Kroah-Hartman said in his keynote that "the [Linux] kernel is moving toward Rust. Git is moving toward Rust. Lots of projects are starting to move toward Rust."
>
> He didn't always feel that way. Kroah-Hartman added, "A number of years ago, when a friend of mine said, 'Ah, you got to try this new language. It's called Rust.' I was like, 'What? No, C is great.' His friend continued, "'No, no, no! It makes programming fun again.' I'm like, 'Nah, programming is fun in C.' He was right. I should have done it then. Rust is actually fun. It makes programming fun. It takes a lot of stuff away from having to worry about the compiler, which can fix a lot of your problems for you, and it makes code a little bit better."
>
> So, Kroah-Hartman has moved from being a Rust skeptic to one of its strongest champions inside the kernel. He now regards Rust as a permanent part of Linux, not an experiment. His case is straightforward: Rust's ownership and type system can eliminate most of the "stupid little tiny things" that dominate kernel Common Vulnerabilities and Exposures (CVEs), while making life easier for overworked maintainers. "Rust," in short, "makes my life so much easier...." In India, he said Linux sees "about 13 CVEs a day" and has been running at "almost nine changes an hour" for a decade or more. Most of those vulnerabilities, he argued, are not exotic attacks but simple C mistakes — unchecked pointers, forgotten unlocks, and sloppy cleanup paths: "This is what we're fixing 13 times a day. Small, trivial, little bugs like this all the time.... I've seen every CVE the kernel has done in the past 25 years. I think 80% would be gone, just because they would be caught by Rust." The remaining 20% are the logic bugs he'd prefer to focus on...."
>
> Moreover, Rust is becoming the default for new work in key subsystems. "New drivers for some subsystems are only going to be accepted in Rust...." he said. Binder, the Android IPC mechanism at the heart of billions of devices, now has parallel C and Rust implementations in the kernel. The C version "will go away soon," leaving the Rust version "as the bedrock of all Android devices going forward."
[1] https://www.zdnet.com/article/greg-kroah-hartman-linux-kernel-rust/
[2] https://www.youtube.com/watch?v=1nYl_9wBBhE&list=PLEAGIV5X5B1U&index=19
Fun (Score:4, Interesting)
I like Rust, but if you don't like programming in C, you won't like programming in Rust.
If you have fun programming in Rust, you will have fun programming in C.
"Fun" is something manager types tell you when they are trying to convince you to do something. If something is fun, you don't need to tell people. [1]It's also what you tell toddlers [youtube.com].
[1] https://www.youtube.com/watch?v=_L4qauTiCY4
Re: (Score:2)
Liking programming will be beside the point in a few years when the bots have totally taken it over. In a way, it is poetic justice to see those Silicon Valley types who think computation is all anyone needs to know booted out on their asses; hoist on their own petard.
Re: (Score:2)
If you have fun programming in Rust, you will have fun programming in C.
Programming in C is a bit of a slog, frankly. You have to do every. little. thing. by. hand, even though there's a perfectly good computer sitting right there you could (in principle) use to automate away tedious stuff.
Rust is a tech debt killer (Score:3)
When I make things in rust, the earlier modules just work. Later modules don't turn into accidental integration tests for the first modules. Obviously, I could screw up some business logic, but even that seems to be rare with rust, as I am spending way less time wondering why this or that threading bug can't be replicated, and can focus on the business logic, not the tool.
Re: (Score:2)
Rust catches bugs early by language design, enforcement at compile time and if necessary with runtime panics. So issues that would follow C/C++ into executable code and may not trigger until the code is in the hands of customers aren't even allowed to happen.
It's still very easy to write application level bugs in Rust but having the door closed on so many by design means less overall. Other niceties like not having to write headers and sources, integrated unit testing, package management, cross compilatio
Coding? (Score:2)
Who does that anymore?
Re: (Score:2)
One still has to direct the AI. I was an "AI supervisor" recently that directed it to write me a very complete game with Rust. I described it in English, it gave the rough draft, and I smoothed out the details with basic prompts. It was a few hours of my time but I could see that back in the day it would have taken a team of coders a few months to write. It gave me the Rust code base when done. To me the language was English, but I can see how the English to AI to the executable code has to be done
Rust is only fun (Score:2)
if you do not write the code.
Rust's let reminds me of Spectrum or ZX-81 basic (Score:2)
So yeah, I guess it's fun in trying to reach those bygone years of by 80's childhood.
let foo = bar;
Re: (Score:2)
All of the languages just boil down to syntax to me. I'm an assembly/C guy myself, but I guess Rust prevents stupid things like buffer overflows/memory leaks in some 'magical way' that probably inhibits creative coding, but with AI, all that low level stuff really turns into blocks to create in a minute, and then assemble them together. The language that seems to matter is the one that can interface with the AI the best.
I've heard this one before (Score:2)
"$Coding_Language" will make coding fun!
Since, but not including COBOL.
It's fun if it makes coding it fun for you. And it scratches your itch. But no one language is either fun, nor is suitable for all use cases.
Now, get off my lawn.
AI makes programming fun (Score:2)
When you don't have to build a toaster to make toast it becomes fun.
Very few people enjoy the art of craft. Programming is no different.
Getting the benefit of craftsmanship is a lot more appealing than making the effort to learn how to produce that benefit yourself.
As AI becomes more capable, accessible and cheap the limits will be our understanding and creativity. I do believe the best AI today can code in Rust too...and as Linux lends itself we'll to AI and headless automation it will continue to do
And it has (Score:3)
...blueberry marshmallows!