I used to like rust, but I feel like I’m being Pavlovian-conditioned to recoil at its mention now.
Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
31–40 of 147 posts
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#32I used to like rust, but I feel like I’m being Pavlovian-conditioned to recoil at its mention now.
Of all the tools in software engineering to be overpopular and overused, Rust is an instance where that is a very good thing. Atleast people aren't AI rewriting things into PHP.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#33I 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?
* https://github.com/yuan-xy/Linux-0.11/blob/master/kernel/for...
* https://github.com/Poseidon-fan/linux-0.11-rs/blob/420152fdf...
The Rust is slightly shorter, though it also isn't organized in exactly the same way. The code isn't that different overall, creating and copying some data structures around, as you'd expect for a fork implementation of this vintage.
Maybe I got lucky, but I would expect that it's more of what other people said: this repository includes far more than the kernel.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#34Earlier quoted context omitted.
Stop trying to make fetch happen
They actually did make fetch happen. Once upon a time it was usual in Javascript to use a thing called XMLHttpRequest which despite its name isn't actually for XML, it's just that XML was a big deal when it was created. The replacement API for making normal HTTP requests is just named fetch, and it was "new" so long ago that popular web browsers had versions like 40 rather than 150. That movie is so old it's entirely…
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#35Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#36Earlier 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.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#37Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#38Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#39I used to like rust, but I feel like I’m being Pavlovian-conditioned to recoil at its mention now.
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.