News for hackers. Stuff that matters.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @08:51AM (#43159545)
"C so obviously outdated now" lol...

People could have spawned another kernel branch focused around Rust, but know the predictable outcome:

https://en.wikipedia.org/wiki/Second-system_effect

Thus the novelty bias hijacks peoples ability to reason, and everyone gets upset as the Polyglot rots apart.

Polyglot projects by their very nature inject unstable dependencies into the build tree. This also makes the core feature of bootstrapping Linux on new hardware more difficult.

If someone says it is about learning yet another language, than they are disregarding peoples valid concerns. The kernel should be forked eventually with or without foundation support, if people refuse to isolate a branch with the extensive refactoring mission written in hype.

YMMV =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @09:00AM (#43159635)
Polyglot projects by their very nature inject unstable dependencies into the build tree

What does this mean?

This also make the core feature of bootstrapping Linux on new hardware more difficult.

If by this you mean that Rust doesn't support all the architectures that gcc does:

- that didn't stop people from making sure Linux could be compiled with LLVM as well

- gccrs should make this issue moot anyway, as that will allow Rust code to be emitted for exactly the same architectures as gcc proper

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by bronson on Monday February 24, 2025 @09:12AM (#43159743)
> This also make the core feature of bootstrapping Linux on new hardware more difficult.

No, Rust is currently only for drivers that aren't on that hardware anyway. You can continue to build and use the kernel without Rust just fine.

For now... Maybe one day that discussion will become relevant.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:22AM (#43159849)
The drama started because of the core memory API argument.

That day is today my friend =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:50AM (#43160211)
You’re simply incorrect, in a way that Linus himself very clearly stated.

The drama started because Rust used an API written in C. It doesn’t contain any Rust at all. Nothing has changed in this regard.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by oskarkk on Monday February 24, 2025 @11:21AM (#43161318)
Yes, and that API is needed for drivers written in Rust. So it's not like core parts of the kernel are being now written in Rust, it's still just specific Rust drivers.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:03AM (#43160335)
It was my understanding the request was to have the core maintainer take on the additional task of supporting the rust API on top of the existing wrapper.

I could be wrong, but a branch or fork seems like the easiest solution. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by dralley on Monday February 24, 2025 @10:10AM (#43160401)
Your understanding is completely wrong. There was no such request, and that concern was almost immediately addressed by spelling out very directly that no such expectation existed.

https://lore.kernel.org/rust-for-linux/2b9b75d1-eb8e-494a-b0...

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:10AM (#43160399)
You misunderstood.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:21AM (#43159835)
"What does this mean?"

In general, mixing languages has serious long-term consequences. Unless you have done refactoring of large legacy systems... you probably wouldn't understand fully.

Perhaps ask why folks didn't create an isolated kernel branch for such a massive refactoring?

"Rust doesn't support all the architectures that gcc does"

Assuming a bootstrap compiler can even bring up Rust or the cargo monstrosity. People will just switch to other options, and maybe someone will get around to a Rusty Linux Fork if the working system needs entertaining drama.

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by tremon on Monday February 24, 2025 @10:28AM (#43160628)
Unless you have done refactoring of large legacy systems... you probably wouldn't understand fully.

The reason I don't understand fully is because you don't explain yourself. I'm not convinved it has anything to do with my work experience.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:39AM (#43160770)
"I'm not convinved it has anything to do with my work experience."

I can see how that could be challenging, but some lessons are universal. This talk touches on the problem at an organizational level:

https://www.youtube.com/watch?v=GWgRw5jiYy0

Best I can do for you right now. Good luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by bdhcuidbebe on Monday February 24, 2025 @11:15AM (#43161236)
Just stop with the sarcasm, it doesnt belong here.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @11:33AM (#43161477)
The talk covers how polyglot projects tend to fail.

Most folks can disagree on things, and remain respectful. Have a glorious day =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Monday February 24, 2025 @06:03PM (#43165994)
Except... Most companies offer products built in multiple languages. Google notoriously has a multilingual monorepo and a uniform build system. Every company of non-trivial size uses multiple languages. Even Asahi Linux does!

Polyglot projects are harder, but definitely not as hard as OS development in C.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @06:45PM (#43166318)
Not sure employee attrition rates and canceled project metrics are a positive aspect of Google.

https://en.wikipedia.org/wiki/List_of_Google_products#Discon...

"definitely not as hard as OS development in C"

Depends what you are doing, as complexity is often a sign of poor communication.

https://en.wikipedia.org/wiki/Conway%27s_law

The talk pokes fun at the excuses folks make when kludging something they intended to replace later. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Monday February 24, 2025 @08:16PM (#43166916)
Google does not cancel projects because they're technically unwieldy, and if you ask pretty much any ex-Google engineer what they think about internal tooling they will generally praise it because it's very good.

Complexity is a consequence of dealing with the real world. An OS talks to hardware, which might have errata or just straight up random faults.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @08:47PM (#43167129)
Googles initial technological success was due to the design assumption individual systems were never reliable, and should fail back gracefully. It was and still is considered a safe assumption...

Indeed, on average 52% of all IT projects at any firm end up failing, or were never used as designed. What exactly does a glorified marketing company have to do with successful OS design? The internal Android OS they planned to replace Linux with was canceled too. "All software is terrible, but some of it is useful" =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Tuesday February 25, 2025 @01:53PM (#43175805)
I would suggest actually reading what engineers who have worked at the company say about it. Many of these statements you've just made are irrelevant or factually incorrect (e.g. Fuschia might be cancelled, but Google remains one of the major contributors to Linux and is certainly not a "marketing company.")

Have a good day!

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @02:38PM (#43176307)
'certainly not a "marketing company."'

So you think they publish free services out of charity? Perhaps the technology business is not for you...

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Tuesday February 25, 2025 @03:23AM (#43169464)
Yep. Even small companies.

The majority of companies doing web is doing "something plus Javascript".

And then if there's some AI in the mix, there's also almost always Python. Often maintained by a super small team.

What about apps? Java and Swift. The migration to Swift included a lot of Obj-C and Swift living side by side for a while. Same with some apps migrating to Kotlin.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @06:57AM (#43170812)
In general... it is often a skill issue with labor pools, as firms accepted Java/JavaScript is almost universally known by juniors.

Apps are in user space, and are often disposable-code after 18 months in most cases. Projects like https://quasar.dev/ offer iPhone/Android/iOS/MacOS/Win11 single code base auto-generated App publishing options, but most people never hear of it given a MacOS build host is required for coverage.

The talk pokes fun at the Ivory tower phenomena, and how small-firm logical assumptions halt-and-catch-fire at scale. =3

https://en.wikipedia.org/wiki/Ivory_tower

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by SR2Z on Tuesday February 25, 2025 @01:51PM (#43175766)
How the can it possibly be an issue with the labor pool when JS is the only truly supported web language and Python is the main language for ML tooling?

I think that you are handwaving away differences in runtime environments. All languages (almost) are Turing-conplete. Many of them, if used in the wrong context, will get you stuck in a Turing tarpit.

Languages succeed or fail on the strength of their runtimes. If you seriously think that mixed-code codebases are trash after 18 months, then I think I'm wasting my time - that statement is so fundamentally detached from reality that I don't even know how to start.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Tuesday February 25, 2025 @02:35PM (#43176276)
"that statement is so fundamentally detached from reality that I don't even know how to start."

It is the statistical average for Android, but again it depends on the use-case situation. Apps are a saturated long-tail business that fragmented decades ago.

Python sits on top of layers of C++ wrappers for most ML libraries, and doesn't do the majority of the heavy computation in Python itself (that would be silly). Anyone dealing with the CUDA SDK for Pytorch installs can tell you how bad it is to setup due to versioning. That is why most projects simply give up to use a docker image to keep the poor design dependencies operational on a per project basis.

"then I think I'm wasting my time"

Than just let the community handle the hard part, and avoid having to figure it out yourself:

https://github.com/dambergn/ai-stack

I think you are confusing ML work with end users playing with other peoples algorithms.

Best of luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Thursday February 27, 2025 @04:49AM (#43192794)
Sorry but apps being disposable and "JS-only frameworks" existing doesn't change reality. Nor do juniors only knowing only one language.

Single-language codebases are the exception rather than the rule in a lot of industries, which includes apps and web. Ditto for operating systems: the Linux Kernel might be majorly C, but both Windows and Mac mix C and C++ in the kernel but a lot of userland is in C#, or a mix of Swift and Objective-C.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Thursday February 27, 2025 @10:37AM (#43195338)
"Explanations exist; they have existed for all time; there is always a well-known solution to every human problem -- neat, plausible, and wrong." ( H. L. Mencken )

Probably conflating popularity with good design. The talk covers the financial incentives for naive code choices, and perceived job security in ivory towers.

It might work for you, but in general is bad for the firm long-term. Best of luck =)

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by whstl on Thursday February 27, 2025 @09:32PM (#43201067)
Please don't put words in my mouth. I'm not conflating popularity with good design, in fact I haven't said anything of the sort.

And sorry but the other half of your message has nothing to do with what I wrote.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Thursday February 27, 2025 @11:04PM (#43201575)
"Single-language codebases are the exception rather than the rule in a lot of industries"

And indeed >52% of those Polyglot projects end up failing in more than one way, and are refactored or abandoned. I didn't like that the talk rips on Elixir/Phoenix either, but factually his insights were not inaccurate.

On average it takes around 2 to 3 years to understand why... As it takes time to see why Tacit knowledge is often ephemeral. Tantalizing bad ideas reverberate on the web, and the naive recycle them like facts. YMMV and it usually doesn't matter if you have under 38k concurrent users... and spend $3m/month in transfer fees to AWS. Perhaps your part of the world works differently than mine. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:48AM (#43160190)
The kernel doesn’t use Cargo, by the way.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:58AM (#43160291)
Indeed, its actually worse because "x.py" has a lot more dependencies. lol =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:11AM (#43160408)
The kernel doesn’t use or interact with x.py either. The Rust code uses build to drive rustc, just like the rest of the kernel.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @10:19AM (#43160526)
I think you are operating under the assumption a fully compatible cross-compiler environment is already available in both languages. =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @10:44AM (#43160826)
Drivers are hardware specific, and so it's not a problem that Rust has support for a subset of the platforms that the kernel does. If you want to write a driver for a platform Rust doesn't support, just write it in C.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @11:02AM (#43161066)
"If you want to write a driver for a platform Rust doesn't support, just write it in C."

¯\_(ツ)_/¯ Or a separate branch for Rust in the first place. We are falling into the circular reasoning logic loop. lol =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Muromec on Monday February 24, 2025 @08:21PM (#43166946)
Drivers are usually hardware specific but are not always platform specific. For example all the usb device drivers (but not host drivers) from x86 work just fine on arm and risc. And kernel isn’t just device drivers, but also stuff like network — higher level abstractions are decoupled from platform quite good.

I don’t think there is practical intersection of platforms not supporting rust and running USB host, but by the time rust will creep into something line network subsystem code you will either not have network (which was working before) or you make yourself a rust compiler.

This can mean dropping platform support. Maybe those are dead platforms, but somebody will make the argument that adding rust made things objectively worse.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by steveklabnik on Monday February 24, 2025 @09:01PM (#43167223)
Sure. The point is, this is for new code where you know Rust supports the platform. It “creeping in” to something Rust can’t support won’t happen, because then the rust-less build will break.

You are right that there are other policies that could work in a different way, but these policies were chosen specifically so that Rust doesn’t make the kernel sacrifice old platforms.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:32PM (#43167409)
'It “creeping in” to something Rust can’t support won’t happen'

The exact same argument could be made for future architectural changes, as OpenBSD/FreeBSD/NetBSD build requirements will now beat Polyglot Linux in every metric of porting complexity moving forwards.

We can't have it both ways... Best regards =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by marcosdumay on Monday February 24, 2025 @11:40AM (#43161569)
> People could have spawned another kernel branch focused around Rust

Linus already decided his one will be a mixed-languages fork. You are perfectly free to fork your own C-only kernel and maintain it.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @02:16PM (#43163658)
The hobby kernel I work on is only 68KiB in size, and won't work with most von Neumann machines. Probably a waste of time, but a fun odd architecture given the relative simplicity. =3
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Monday February 24, 2025 @09:36AM (#43160035)
C already felt outdated in 1993, that is why since then I rather use C++ than C, when the choice boils down to these two languages.

Exception being when there is really no way around C, like UNIX clones related development, or some kinds of embedded development.

Even when using TypeScript, we sometimes have to occasionally get dirty with JavaScript. :)

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:53AM (#43160241)
"I rather use C++ than C"

Depends what you are building, as some language specific features make specific tasks more difficult.

Unfortunately, often we must deal with the infrastructure we are given. =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by pjmlp on Monday February 24, 2025 @11:02AM (#43161074)
Agreed, that is why "Exception being when there is really no way around C,..."

The first startup I worked on, back in the crazy 2000's, we were replicating AOLServer at our own way, and all the Tcl extension modules were written in C, because multiple reasons, including writing portable C across several UNIX variants was already complicated enough, e.g. the HP-UX aC we were using was still not C89 compliant, no need to add C++ into the picture.

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by braiamp on Monday February 24, 2025 @08:59AM (#43159627)
And yet, the powers that be, understand that, and have reasoned that the upside of preventing new code with bugs into the kernel is way too attractive to ignore.
Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by Joel_Mckay on Monday February 24, 2025 @09:07AM (#43159702)
People didn't build a new kernel branch option for staging a massive refactoring did they... Instead idealists hijacked a successful project, and told the people with valid concerns to pound sand. Forks are part of a healthy ecosystem...

Good luck =3

Re:Torvalds: You can avoid Rust as a C maintainer, but you c... by imtringued on Monday February 24, 2025 @10:32AM (#43160690)
Linus torvalds is the biggest idealist here.