News for hackers. Stuff that matters.
Re:Hobby x86 kernel written with Zig by CDSlice on Monday January 06, 2020 @12:10PM (#21970829)
The Rust code you wrote seems to be extremely heavy on boilerplate. A couple of macros could have drastically reduced the line count.

I don't think what Linus wrote in 2004 on C++ has much relevance for 2020 Rust, especially for a new kernel that doesn't have a ton of contributors. Most of his complaints seem to be on how C++ abstractions can make it hard to review unknown code and how 2004 C++ code bases often had extremely messy code. Rust IMO doesn't suffer from those problems near as much as 2004 C++ did.

Also, Google is using Rust for part of their new Fuchsia kernel so at least they think Rust has something good to offer kernel dev.

Re:Hobby x86 kernel written with Zig by roblabla on Monday January 06, 2020 @12:29PM (#21971007)
Small nitpick: Google isn't using Rust for the Fuchsia kernel. The kernel, Zircon, is written entirely in C and is based on Little Kernel. Google is using Rust for some userspace drivers (Fuchsia being a micro-kernel).
Re:Hobby x86 kernel written with Zig by loeg on Monday January 06, 2020 @05:57PM (#21974442)
> The kernel, Zircon, is written entirely in C

No, it's written in C++[1]. They're very different languages.

That said, Google seems to think C++ has something to offer to all kinds of development. It seems to work for them, but they are a heavily C++ shop. I wouldn't read too much out of their use of C++ anywhere; it'd be more surprising and interesting to see them use anything else.

[1]: https://fuchsia.googlesource.com/fuchsia/+/master/zircon/ker...

Re:Hobby x86 kernel written with Zig by roblabla on Monday January 06, 2020 @06:31PM (#21974766)
Oh that's interesting. Zircon is based on LK[0] which is in C, which is why I thought it was still written in C. I wonder how much is left of the original LK code then.

[0]: https://fuchsia.dev/fuchsia-src/concepts/kernel/zx_and_lk

Re:Hobby x86 kernel written with Zig by loeg on Tuesday January 07, 2020 @01:22AM (#21977458)
Interesting, I didn't know about LK. Thanks for sharing :-).