Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
|
|

Just wait

Just wait

Posted Jun 25, 2024 13:36 UTC (Tue) by zuki (subscriber, #41808)
In reply to: Just wait by liw
Parent article: Rust for filesystems

I find the attitude of "I don't care about Rust, I'll not learn Rust" annoying and destructive.

There's also the distinction that there are different levels of "knowing" a language. It's quite easy to get to the level where one can do small modifications to existing code, or to copy existing functionality and extend it to cover additional cases. It's much harder to know which of the many possible ways of structuring code and which abstractions to use for a new problem. But fortunately, for ongoing maintenance, this first easier level is all that is needed. The second higher level is only necessary e.g. to implement or review new Rust abstractions in the kernel or new drivers, but a different set of people can handle that.

I think it's entirely reasonable to ask maintainers to also care about the Rust code.


to post comments

Just wait

Posted Jun 25, 2024 14:36 UTC (Tue) by pizza (subscriber, #46) [Link]

> I think it's entirely reasonable to ask maintainers to also care about the Rust code.

I agree in principle -- but we're a long, long way from the "ongoing maintenance" phase.

The current status quo is that, in order to meaningfully contribute to kernel-Rust, you have to essentially be an expert in all-things-Rust, including living on the bleeding edge of Rust language/feature development.

> I find the attitude of "I don't care about Rust, I'll not learn Rust" annoying and destructive.

You may find it annoying but it is an entirely rational (and reasonable!) attitude to take given that hyper-unstable nature of kernel-Rust and the already-overwhelming "just maintaining existing stuff" workload.

After all, "Let those who care about X do the work" has been the kernel development philosophy since approximately forever.

Just wait

Posted Jun 25, 2024 14:51 UTC (Tue) by somlo (subscriber, #92421) [Link]

Having never used the Go language, I managed to "cut'n'paste" my way into writing a useful (and also stylistically and functionally correct) patch against Docker. So in principle you *should* be right about your first level of "knowing" a language concept.

However, unlike Go, I find Rust hard to skim over -- for the lack of a better word, it's too "syntax-y" for my brain :) So your "anyone should be able to deal with it" statement is actually a much bigger ask than you think, depending on the actual language's legibility to newcomers.

I then tried working my way through "The Rust Programming Language", and was mostly able to follow along and understand what's going on, and even managed to write ok-ish small programs in the process.

But without being a real, $DAYJOB Rust programmer, when I look at production code a few months later, it's back to a wall-of-syntax "foo::bar => <blah:::xyz>" incomprehensible gibberish... :D
This may be just an undiagnosed learning disability on my part, or it might be that Rust syntax is simply less legible to a large swath of the otherwise OK programmer population.

I'm also constantly high-key annoyed at how compiling a program involves downloading crap off the Internet, as part of the compilation process (this is the part where I might just be old and grumpy, and the whole download-crap-from-the-Internet thing is interfering with my lawn care routine).

Anyhow, if kernel maintainers' experience is anything like mine, I can't blame them for putting a "low pass filter" on this thing: maybe it goes away if they ignore it long enough, and they won't have to waste time on it.

Now, if based on the description of my pain points above there's a more targeted way of learning Rust in a way that sticks, I'm happy to take hints and advice...

Changing code when you barely understand the language

Posted Jun 25, 2024 15:40 UTC (Tue) by farnz (subscriber, #17727) [Link]

The other thing to bear in mind is that different languages have different challenge levels when you're not very good at them. At one extreme, you have languages where just about everything you could reasonably consider "language source code" is accepted by implementations as "valid" code, and if you barely understand the language, it's really hard to avoid making mistakes.

At the other extreme, you have languages where the compiler will definitely complain if you make a change that won't work, and thus it's a lot easier to avoid making mistakes because the compiler tells you that what you've implemented is not going to work.

And in the middle of those two extremes, we have real languages, where some things that won't work cause the compiler to complain (such as including a file that doesn't exist like #include <linus/asm.h>), while other things that won't work compile and fail later.

The interesting question is whether Rust is strict enough that someone with good C skills and minimal Rust skills can be confident that the Rust toolchain will complain if they make the "obvious" fix, but it's wrong, or whether they have to learn more Rust so that they can do the checks themselves (or ask someone else to check their work).

Just wait

Posted Jul 4, 2024 2:23 UTC (Thu) by mrugiero (guest, #153040) [Link]

> I think it's entirely reasonable to ask maintainers to also care about the Rust code.

I'm not sure if I'm inventing this, but I believe the deal was that maintainers got to decide whether Rust made it into in their subsystems? If that's the case, it's only reasonable to expect them to either reject the patches or commit to keep them working. Otherwise we're in a kind of Seinfeld's car reservation situation.

Just wait

Posted Jul 17, 2024 12:19 UTC (Wed) by that_kca (guest, #172467) [Link] (2 responses)

> I find the attitude of "I don't care about Rust, I'll not learn Rust" annoying and destructive.

I mean is it any more annoying or destructive than the "Everything must be written in rust" evangelism that many of the rust fans parrot?

I imagine if rust spent less of the design/engineering points in being hard to learn the language might find more people willing to pick it up.

But then the majority of the rust internet community would probably run to something else.

Just wait

Posted Jul 17, 2024 13:40 UTC (Wed) by Wol (subscriber, #4433) [Link] (1 responses)

> I mean is it any more annoying or destructive than the "Everything must be written in rust" evangelism that many of the rust fans parrot?

Rust FANS, or Rust PROGRAMMERS.

Generally you'll find the people who make the most noise, are the people who do the least work. That's not always a bad thing, you need your evangelists (after all, I make a heck of a lot of noise about Pick/MV), but there are too many people who think it's a silver bullet when they've never really used it.

It DOES sound great. And given that all the evidence says it's not vulnerable to a huge class of errors that regularly bite C/C++, there's good reason to - as a minimum - try it out. But it's noticeable that a lot of people are too busy using it to evangelise it. That to me is a good sign.

Cheers,
Wol

Just wait

Posted Jul 17, 2024 16:55 UTC (Wed) by andresfreund (subscriber, #69562) [Link]

Wol. You regularly post close to half of the comments here. I'd appreciate if you could try to appreciate the perspective of the readers of the comment section into consideration a bit more. Nobody writes *that* much interesting stuff.


Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds