Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

801–810 of 853 posts

Re: Rust in the kernel is no longer experimental

#801
post #491

Earlier quoted context omitted.

It’s an interesting list from the perspective of what kind of project Linux is. Things like PA-RISC and Alpha were dead even in the 90s (thanks to the successful Itanium marketing push convincing executives not to invest in their own architectures), and SuperH was only relevant in the 90s due to the Dreamcast pushing volume. That creates an interesting dynamic where Linux as a hobbyist OS has people who want to suppo…

There was a time when it came to 64 bit support Alpha really was the only game in town where you could buy a server without adding a sixth zero to the bill. It was AMD, not Itanium that killed Alpha.

HP owned Compaq already, which had previously bought DEC, when the Alpha was killed. HP chose Itanium for their servers. They settled some patent issues with Intel partly by killing Alpha instead of a more traditional cross-licensing agreement.

AMD killed Itanium. HP was pretty far along killing Alpha all on their own.

Re: Rust in the kernel is no longer experimental

#802
What does this practically mean for Linux? Will core parts of it depend on Rust? How closely linked are drivers?

Rust in Linux always worried me because there is currently only one stable backend (LLVM) and only one compiler implementation that doesn't yet have a spec. I like that you can at least compile Linux with Clang and GCC, but there aren't even two options for Rust right now.

Re: Rust in the kernel is no longer experimental

#803
post #793
post #37

C++ devs are spinning in their graves now.

C++ devs don’t care what the Linux kernel’s written in. But I did see an interesting comment from another user here which also reflects my feelings: Rust is pushed aggressively with different pressure tactics. Another comment pointed out that Rust is not about Rust programmers writing more Rust, but “Just like a religion it is about what other people should do.”. I’ve been reading about this Rust-in-the-kernel topic…

That's how it feels to me. There are crucial issues, namely that there is no spec and there is only one implementation. I don't know why Linus is ok with this. I'd be fine with it if those issues were resolved, but they aren't.

Re: Rust in the kernel is no longer experimental

#804

Not a system programmer -- at this point, does C hold any significant advantage over Rust? Is it inevitable that everything written in C is going to be gradually converted to safer languages?

C currently remains the language of system ABIs, and there remains functionality that C can express that Rust cannot (principally bitfields). Furthermore, in terms of extensions to the language to support more obtuse architecture, Rust has made a couple of decisions that make it hard for some of those architectures to be supported well. For example, Rust has decided that the array index type, the object size type, an…

Correct. C has a mostly standardized ABI, Rust does not. C has a spec, Rust does not. That matters in things like kernels.

Re: Rust in the kernel is no longer experimental

#805
post #198
post #53

Earlier quoted context omitted.

People can learn Rust at any age. The reality is that experienced people often are more hesitant to learn new things. I can think of possible reasons: Early in life, in school and early career, much of what you work on is inevitably new to you, and also authorities (professor, boss) compel you to learn whatever they choose. You become accustomed to and skilled at adapting new things. Later, when you have power to mak…

> experienced people often are more hesitant to learn new things I believe the opposite. There's some kind of weird mentality in beginner/wannabe programmers (and HR, but that's unrelated) that when you pick language X then you're an X programmer for life. Experienced people know that if you need a new language or library, you pick up a new language or library. Once you've learned a few, most of them aren't going to…

I agree that "programming is programming" but Rust feels very different with my background (some ML and many years of C, Java, some Python, a little Go, etc.) than for somebody whose only previous language is Java, or Javascript, or perhaps even C++

The "You can write Java in any language" mentality afflicts some languages worse than others, but if your programming is exclusively in a single language you will be tainted by that regardless of the language. C++ is perhaps worst for this because its proponents, and indeed its standards committee have their own terminology for everything. So there aren't "methods" but instead "non-static member functions" for example. This has the "Call a rabbit a smeerp" problem, where you can't tell whether you actually don't know a feature or if you just know the exact same feature by a different name.

I guess what I'm saying is that writing any language in an idiomatic way takes a bit more than just "programming is programming" plus a word-for-word translation guide, and some people might be weary of learning new idioms.

Re: Rust in the kernel is no longer experimental

#806
post #635

Earlier quoted context omitted.

Its in a talk about File systems in Rust for Linux. Basically the rust maintainer who I think stepped down was talking about how the C-code base for VFS has a lot of documented but complex orderings where you have to call a lock, or pin before accessing an Inode(or something) one way but not the other. They made a bunch of Rust Types so you basically could not produce an illegal ordering and got heckled pretty hard b…

IIRC, the point was actually that they were un documented in many cases, and that the Rust developers were willing to take on a lot of work, but they would need help with understanding all of the hidden and implicit "rules", but that they had received pushback for simply asking questions or asking for documentation to be comprehensive.

Okay I felt that they were undocumented but I was trying to be charitable to the bearded man :D. I didn't have time to watch the video again haha. But Yeah the push back at the suggestion was very surprising.

Re: Rust in the kernel is no longer experimental

#807
post #210

Earlier quoted context omitted.

[flagged]

Don’t spread FUD, you can check some example code yourself. https://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/l...

> Don’t spread FUD

Only in cryptocurrency and Rust do I see this kind of phrasing used.

Re: Rust in the kernel is no longer experimental

#808
post #14

Earlier quoted context omitted.

Every system under the Sun has a C compiler. This isn't remotely true for Rust. Rust is more modern than C, but has it's own issues, among others very slow compilation times. My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative.

> My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative. if only due to the Lindy Effect https://en.wikipedia.org/wiki/Lindy_effect

Sure, but the reason tends to be that if you want something to run everywhere, C is your best bet.

Re: Rust in the kernel is no longer experimental

#809

Earlier quoted context omitted.

One problem of Rust vs C, I rarely see mentioned is that Rust code is hard to work with from other languages. If someone writes a popular C library, you can relatively easily use it in your Java, D, Nim, Rust, Go, Python, Julia, C#, Ruby, ... program. If someone writes a popular Rust library, it's only going to be useful to Rust projects. With Rust I don’t even know if it’s possible to make borrow checking work acros…

Perhaps we can finally stop defining abis in terms of c structs!

If only Rust had a spec to do that with

Re: Rust in the kernel is no longer experimental

#810

Earlier quoted context omitted.

I think you didn't catch their drift C will continue to be used because it always has been and always will be available everywhere, not only places no one uses :/

> C will continue to be used because it always has been and always will be available everywhere Yes, you can use it everywhere. Is that what you consider a success?

Yes, that is success. A pretty large degree of success.
Post reply on HN