Live data from Hacker News

Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

github.com

61–70 of 147 posts

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#61
post #56
post #12

Earlier quoted context omitted.

If the readme is anything to go by, this doesn't look like it was written by hand. Codex if I were to guess. I wonder the coding agent "improved" the code. The readme hints at the prompt: > It keeps the original system's semantics — what it does — while rethinking how it's expressed: stronger types, clearer module boundaries, idiomatic abstractions everywhere. "idiomatic abstractions" would certainly bloat the line c…

kinda sad cuz 10klines you really get into "well I can just sit there and bang at the problem by hand" territory. Sounds like a fun project....

Linux at that point’s whole purpose was to bang at it by hand and learn something. There’s a ton of irony in having an LLM do it.

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#62
post #58

Earlier quoted context omitted.

Linus is supportive of Rust and uses LLMs. The reasons to not have a full-Rust Linux kernel are over more important, real engineering things. (Platform support being the big one.)

Since the Rust support in the kernel is not optional, it already has an impact on platform support, no? Or maybe they are using the gnu toolchain to avoid that?

Rust support in the kernel is still optional; it's currently only allowed in drivers, and drivers only use Rust if they can accept running only on current Rust targets (which is not a substantive limitation).

I expect Rust to eventually get used in the core kernel, or in drivers that everyone wants to use (e.g. some new bus or device on most new hardware), but I expect that by the time that happens the set of targets supported by the kernel and the set of targets supported by Rust (including through things like crustc and codegen_gcc) will have converged sufficiently.

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#63

Earlier quoted context omitted.

Linus is supportive of Rust and uses LLMs. The reasons to not have a full-Rust Linux kernel are over more important, real engineering things. (Platform support being the big one.)

> Platform support being the big one. And between rustc_codegen_gcc, projects like https://github.com/FractalFir/crustc , the ongoing addition of backends to LLVM and Rust, and the eventual removal of obsolete targets as hardware goes away, that's less and less of a problem.

I certainly don't think it'll be a barrier forever, for sure.

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#65

Earlier quoted context omitted.

Written by AI and not nearly as impressive at all. Such a shame because I thought someone had spent real time and effort producing this. The output is commoditised and now neither important nor precious. Damn near anyone could repeat it.

To paraphrase another comment ( https://news.ycombinator.com/item?id=48900086 ), this project is fun and fun should be encouraged, as experimentation is what leads to more innovative things. The existence of this project doesn't take away from anything.

I don't think it's wrong to do this and I'm glad it's fun for some, it's just not the same as seeing a project like this that was human authored

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#67
post #12
post #4

I just compared this Rust implementation against the original C sources. Some ~50k SLOC (Rust) compared to maybe ~8-12k SLOC of C (depending on if you count headers). Why is the Rust implementation so much more complex and onerous?

If the readme is anything to go by, this doesn't look like it was written by hand. Codex if I were to guess. I wonder the coding agent "improved" the code. The readme hints at the prompt: > It keeps the original system's semantics — what it does — while rethinking how it's expressed: stronger types, clearer module boundaries, idiomatic abstractions everywhere. "idiomatic abstractions" would certainly bloat the line c…

so, slop

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#68
rust evangelism is some people / youth of today trying to differentiate themselves from their parents, aka heavy metal of programming. its ok, its fun. i cant read their source code but i dont need to, theres a whole world out there of c/c++/python stuff that will get the job done faster and with less hassle.

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#69
post #39

Earlier quoted context omitted.

I have the opposite feeling; I am liking Rust more and more and thinking most of the world's C code should be rewritten. It seems like a sweet spot of enforced memory safety, performance, and human/agent readability.

why rewrite if you can check for and fix bugs? If you are thinking of AI fixing bugs is less expensive

> If you are thinking of AI fixing bugs is less expensive

Because I don't think this. A rewrite is cheaper to me.

Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

#70
post #26
post #8

Earlier quoted context omitted.

One of the tradeoffs of Rust is its verbosity I think (in return for which Rustaceans would say you gain explicitness).

I absolutely despise that C convention if abbreviating absolutely every single thing as much as possible. Yeah yeah, that was necessary back in the day when memory was scarce and editors were awful, but come on those days were almost half a century ago by now. Rust may be verbose, but at least you can read it without turning into a cynical greybeard subject matter expert first.

>"Rust may be verbose, but at least you can read it without turning into a cynical greybeard subject matter expert first."

Actually stuff like fn, mut etc. feels like mutilation to me. I guess it is highly individual.

Post reply on HN