News for hackers. Stuff that matters.
Re:Rust heads into the kernel? by Flex247A on Saturday May 22, 2021 @02:08PM (#27248910)
May I ask what is so bad about it?
Re:Rust heads into the kernel? by sprash on Saturday May 22, 2021 @02:25PM (#27249044)
The Rust compiler is very slow and has very high memory requirements. Compiling the Kernel on e.g. older Raspberry Pis is already barely possible and will potentially become completely impossible once rust enters the kernel.
Re:Rust heads into the kernel? by nine_k on Saturday May 22, 2021 @02:58PM (#27249287)
Both gcc and rustc are good at cross-compiling.

There are many MCUs that run Linux but definitely are incapable of compiling it.

IIRC most of the build time of a rust program is spent not in the rust compilation proper but in LLVM doing code generation and optimization. I hope both LLVM will become more efficient with time, and rust will learn to pass it such IR that it can process faster. There are obvious incentives for both of these things.

But of course it would be sad if the minimum requirements to compile the kernel grew again, and now excluded older RPis.

Re:Rust heads into the kernel? by Macha on Saturday May 22, 2021 @03:26PM (#27249557)
gcc and clang are pretty slow on the scale of all programming languages. Rust is basically the only thing that modern C/C++ compilers are faster than. Should we abandon C and C++ for something else then?
[dead]
Re:Rust heads into the kernel? by edg-l on Saturday May 22, 2021 @03:06PM (#27249373)
>There’s already an OS completely written in Rust called Redox. Nobody uses it.

I find it would be very difficult to convince anyone to use any other OS than the currently mainstream ones. You should instead see this as an accomplishment of what Rust can achieve.

I also think you are undermining Redox OS developers efforts, which is kinda sad.

>Rust code is guaranteed to be fast and guaranteed to be bug free

Nobody claimed this, what people claim is that it can be as fast as C, and it has some safety guarantees. You can still have bugs.

>Rust is for writing blog posts...

What's so wrong about people being excited about something? Personally I find it awesome that a programming language can bring so much enthusiasm to people. In my opinion, what you are seeing here is people being excited about progress being made.

>the compiler authors so wonderful and smart

I sense some envy here, people achieved a great thing through effort and collaboration, we should celebrate this.

Re:Rust heads into the kernel? by jhgg on Saturday May 22, 2021 @03:05PM (#27249357)
This is a ridiculous post.

My full time job is writing Rust for large-scale production systems. The language is great - and as an organization we're doubling down on our investment in Rust this year.

Re:Rust heads into the kernel? by sk1459 on Saturday May 22, 2021 @03:22PM (#27249536)
Somebody with an HN account said that they write Rust for a purpose and company he won’t disclose? Well, that shows me.
Re:Rust heads into the kernel? by aw1621107 on Saturday May 22, 2021 @03:39PM (#27249649)
I mean, you could click through to the profile and find out that they work for Discord. Or you could ask politely.

As for purpose, there’s this blog post [0]:

> At this point, Discord is using Rust in many places across its software stack. We use it for the game SDK, video capturing and encoding for Go Live, Elixir NIFs, several backend services, and more.

[0]: https://blog.discord.com/why-discord-is-switching-from-go-to...

Re:Rust heads into the kernel? by Cyph0n on Saturday May 22, 2021 @02:59PM (#27249294)
> I wouldn’t be shocked if this was all some conspiracy by Google and Microsoft to make a personal computing unusable so that everyone has to use their cloud offerings.

So you would rather believe in a ridiculous conspiracy than admit that large companies might just be choosing Rust for some valid reasons. Got it.

Re:Rust heads into the kernel? by sk1459 on Saturday May 22, 2021 @03:03PM (#27249345)
They aren’t.
Re:Rust heads into the kernel? by ncmncm on Saturday May 22, 2021 @03:58PM (#27249793)
Every sufficiently large company is using or has used literally any XYZ you can think of, whether Rust, Forth or even Haskell. Therefore, knowing that there are projects at Google, Facebook, IBM, and Apple using XYZ tells you less than nothing. People pointing at them are either deluded, or seek to delude.

A small company that has become a success based on a whole XYZ stack may count for something, depending on how ambitious the company was, how hard it was to do, and how much competition they face. Lots of companies could succeed equally well with Rust, JS, Java, C#, Kotlin, Python, Ruby, Erlang, or Perl; those successes don't count. Lots more potter along, neither succeeding nor failing, exactly. Those don't count either, unless you want to give Rust credit for their not exactly failing.

And, many fail. We are never told about those. They might well count, but there are a lot of ways to fail.

It is ridiculous to believe in a Google conspiracy to outcompete Linux by getting it to incorporate Rust, because a conspiracy requires a crime, and that would not be one. But anyway Google doesn't have that much influence.

Re:Rust heads into the kernel? by Cyph0n on Saturday May 22, 2021 @04:13PM (#27249898)
Firstly, I disagree with your argument about language adoption being irrelevant. When a language is picked up by a serious player, it helps signal to other users and companies that there might be practical benefits to using the language. Two good examples that come to mind are Erlang/WhatsApp and OCaml/Jane Street.

Secondly, there is a huge difference between a language being used in general and a language being used for serious, visible projects within a company. Think: writing a small utility in Zig at company X vs. rewriting the backend of a core product in Zig and pointing to measurable gains in performance and reliability.

> It is ridiculous to believe in a Google conspiracy to outcompete Linux by getting it to incorporate Rust [..]

Great, but you should be telling that to the user I was replying to.

Re:Rust heads into the kernel? by ncmncm on Saturday May 22, 2021 @04:51PM (#27250156)
I did not say language adoption is irrelevant. The examples you cite are exactly the kind I spelled out as being possibly relevant. So, you are agreeing me while saying you don't.

Similarly: you then agree that "BigCo uses XYZ" is, in fact, not compelling. A big company betting its future on XYZ would count, but no big company does that. Betting a substantial new business unit on XYZ could count, but that is not cited as "BigCo uses XYZ", that is "BigCo relies on XYZ for UnitX to succeed", a possibly stronger statement, according as how important UnitX is to BigCo.

Calling a claim ridiculous needs reasons why it is ridiculous, which I supplied, and you did not.

Re:Rust heads into the kernel? by Cyph0n on Saturday May 22, 2021 @05:06PM (#27250275)
No, I said that there is a difference between using a language and using it in a core product or area within the company. In the case of Rust, it is already seeing use in critical areas within several of the large tech companies. This is an excellent signal - in fact, it’s a much better signal than a small company relying on Rust exclusively.
Re:Rust heads into the kernel? by jorangreef on Saturday May 22, 2021 @06:24PM (#27250808)
I find that a better signal is simply the quality of the tool or technology.

It's like surfing. Some people want to see hundreds of surfers on the wave before they start paddling out. That's fine. There's nothing wrong with that. But I personally believe that a better way to surf, especially when it comes to technology which tends to have short cycles, is to learn how to spot the wave as it builds, while it's still a swell, before it breaks. I've seen time and again that there's incredible value to be had if you can learn how to do that.

One of the best examples of this value being that you're able to hire really talented people, because they form the critical mass at the beginning of a successful wave. Once the larger corporates come in, this advantage disappears.

Re:Rust heads into the kernel? by Cyph0n on Saturday May 22, 2021 @07:00PM (#27250993)
I think the challenge would be in defining "quality" in a way that allows you to compare between multiple different technologies. If the definition ends up aligning with what large companies look for when adopting a new technology, then the signal ends up being the same.

I definitely agree with the notion that the early adopter group is more often than not more talented than average. But, I'm sure companies also take this into account when deciding whether or not to pick a new technology.

Re:Rust heads into the kernel? by jorangreef on Saturday May 22, 2021 @07:19PM (#27251107)
Is it really a challenge if "quality" is a measure of being fit for purpose? You don't necessarily have to compare across every technology if you are able to recognize a great tool that does what you need.

"If the definition ends up aligning with what large companies look for when adopting a new technology, then the signal ends up being the same."

And even then, the signal is only the same, but it's not worse. Whereas if large companies don't always optimize for quality, but have other incentives at play, or if they are less nimble, or less efficient, then looking for what large companies look for might actually end up setting you back with worse signal. So there's no upside I think.

Re:Rust heads into the kernel? by ncmncm on Saturday May 22, 2021 @08:40PM (#27251512)
The value of the tool or technology is what is in question.

A notable project choosing it and succeeding is signal. But there is a lot of noise. An individual judgment about the value is noise unless that individual has demonstrated a pattern of picking winners early and correctly.

Early adopters are often smarter than the average bear, but are also much more likely to jump ship the moment the next fad breaches. That might be OK if you only need them for a short time.

Re:Rust heads into the kernel? by oblio on Saturday May 22, 2021 @04:12PM (#27249892)
AWS has written Firecracker in Rust: https://firecracker-microvm.github.io/

It's the foundation for Fargate and Lambda, so a <<ton>> of AWS customer code runs on top of it.

Considering Microsoft, Google, basically every big company backs it now, I'm sure there are other infra projects using it. They're just not all very visible because these companies only open source a small percentage of their infra.

Re:Rust heads into the kernel? by sk1459 on Saturday May 22, 2021 @02:56PM (#27249265)
Better yet, read the epic rant that Zed Shaw made about Ruby. It is certainly juvenile, but I don’t think it’s baseless. Now, consider that the core members of the rust community are exactly the same people he was talking about when rails was the new shiny.
Re:Rust heads into the kernel? by steveklabnik on Saturday May 22, 2021 @04:34PM (#27250023)
I don't think that's true. Yehuda and I would be the two people you're talking about (And Yehuda doesn't work on Rust anymore) and we both, as far as I know, appeared a few years after that rant.
Re:Rust heads into the kernel? by saagarjha on Saturday May 22, 2021 @03:53PM (#27249750)
A bit of an ad hominem, but Zed Shaw’s rants tend to not be the pinnacle of reasoning.