News for hackers. Stuff that matters.
Re:Linux Rust Support by bitL on Tuesday July 06, 2021 @08:02AM (#27747259)
Beginning of the end of Linux I guess... Mixing multiple languages deeply in the core rarely works due to different requirements and limited interoperability. 5 years later we are going to read about how to migrate existing Rust code to C, like what's happening to Scala projects these days.

It seems to me like a Trojan horse from G and MS that pursue their own interests with their own OSes.

Re:Linux Rust Support by kafkawatcher on Tuesday July 06, 2021 @08:37AM (#27747631)
> like what's happening to Scala projects these days.

I don't know much about Rust so can't comment on that part. But agreed on the Scala part. Having seen Apache Kafka use Scala in the early days, when Scala was considered "hip", alongside Java code in the same codebase, I can relate to the mess it created and continues to be even today. At some point there was a plan to move away from Scala in Kafka, not sure where that reached, I stopped following that project since a few years now.

Re:Linux Rust Support by mmis1000 on Tuesday July 06, 2021 @01:28PM (#27751654)
But another jvm language (kotlin) seems mixed with java just fine.(did it designed to do so?) Two way calls just work as is. Interfaces just maps to interface in each other. The only problem is probably the gradle config, but it is a one time thing.
Re:Linux Rust Support by bitwize on Tuesday July 06, 2021 @12:51PM (#27751095)
> 5 years later we are going to read about how to migrate existing Rust code to C, like what's happening to Scala projects these days.

Just the opposite. We're going to see C deprecated for new code and efforts to move the existing C codebase to Rust. C is pretty much unsafe at any speed; Rust allows even junior front end developers to fearlessly contribute bare-metal code once they've learned the language.

Re:Linux Rust Support by phendrenad2 on Tuesday July 06, 2021 @08:39AM (#27747652)
Ah, but Rust will help reduce security problems! Even if the number of potential Linux contributors is cut to a fraction due to the difficulty in learning two languages with steep learning curves, better security makes it all worth it.
Re:Linux Rust Support by bitwize on Tuesday July 06, 2021 @12:55PM (#27751165)
The Linux developer pool will increase. C programmers are mostly old hands these days, and they're a dying breed. Rust opens the possibility of kernel development to younger or less experienced programmers, many of whom only have had experience with modern languages and frameworks.
Re:Linux Rust Support by 0x77617472 on Tuesday July 06, 2021 @04:22PM (#27753744)
I program in C and I'm in my early 20s now and still create new projects or write C on a regular basis.
Re:Linux Rust Support by gnzoidberg on Tuesday July 06, 2021 @08:42PM (#27756121)
This is false
Re:Linux Rust Support by Kelamir on Thursday July 08, 2021 @08:28AM (#27771049)
Thanks for sharing the opinion. However could you elaborate why you think it's false?
Re:Linux Rust Support by goodpoint on Tuesday July 06, 2021 @01:18PM (#27751511)
...even worse.
Re:Linux Rust Support by bitwize on Tuesday July 06, 2021 @06:42PM (#27755298)
If you can't see how having inexperienced programmers writing code that is guaranteed memory-safe beats having world-class expert programmers writing dangerous code because even world-class expert programmers cannot wield C safely then why are you working in the field?
Re:Linux Rust Support by bitL on Wednesday July 07, 2021 @07:39AM (#27759900)
Is this a joke? Is the existing infrastructure built by countless geniuses in C not working at all? Do you think inexperienced programmers could build it given a "safer instrument"? How many junior devs understand intricacies of basic OS-level locking, not mentioning Paxos and other scary algorithms whose formal correctness can't be even proven in theory?
Re:Linux Rust Support by bitwize on Wednesday July 07, 2021 @10:52AM (#27761783)
> Is this a joke? Is the existing infrastructure built by countless geniuses in C not working at all?

Given all the CVEs that arise due to buffer overflows and UAF, it's not working very well. Safe Rust makes those classes of problems Just Go Away.

> Do you think inexperienced programmers could build it given a "safer instrument"?

Inexperienced programmers can get started without the near vertical learning curve C presents. Just wrapping your head around pointers scares many programmers off, and even once you grok pointers, attempting to use them correctly is a minefield. This makes kernel hacking daunting for the average dev. Rust gives them an onramp.

> How many junior devs understand intricacies of basic OS-level locking, not mentioning Paxos and other scary algorithms whose formal correctness can't be even proven in theory?

Not very many... but junior devs don't need to work on that stuff. They can make more peripheral contributions -- fixes to device or file system drivers, etc. -- while they're building their skills, completely confident that they will not make a class of stupid but very common and dangerous memory errors. Not so with C! As I said, not even great programmers can be relied upon to write safe C code -- the model presented by C is just that abstruse.

Re:Linux Rust Support by vips7L on Tuesday July 06, 2021 @08:19AM (#27747454)
Scala actually reminds me a lot of Rust. It’s at about the same complexity level in my eyes.
Re:Linux Rust Support by refenestrator on Tuesday July 06, 2021 @01:28PM (#27751651)
Scala doesn't care about efficiency or cost of what it's doing, all the fun fancy features allocate like crazy.
Re:Linux Rust Support by divs1210 on Wednesday July 07, 2021 @03:54AM (#27758514)
Not in my experience. To me, Scala feels like a kitchen sink language - like C++.