6 ms·
Each time this comes across my feed, there's a brief period of excitement - "oh yeah, we're getting a new not-Unix microkernel backed by a major company!" A few
by Sir_Cmpwn 9y ago
Each time this comes across my feed, there's a brief period of excitement - "oh yeah, we're getting a new not-Unix microkernel backed by a major company!" A few moments later I remember that it's being written in C++ and is basically the evolution of Chrome OS and the mood dampens. I'm still be waiting for the next truly innovative OS to show up and poise itself to become ubiquitous. Unfortunately I don't have much faith in Fuschia, especially after poking around in Chromium.
In the spirit of HN though this comment basically guarantees its success, right?
- pstuart 9y agoWhat language would satisfy you?
- Sir_Cmpwn 9y agoJust C. Rust has a lot of problems for serious low level work imo and suffers from a lot of the same classes of problems C++ does, and there aren't many other candidates. A simple microkernel should be fairly straightforward to write in C without any big security concerns, especially in the hands of a multi-billion dollar company. You offload most of the security work to the architecture.
- bluejekyll 9y ago> Rust has a lot of problems for serious low level work Could expand on where it suffers? I've been playing around with Rust in the embedded space (nothing serious at all); I find it to be as elegant in a nonstd situation as it is in standard high level app development. > and suffers from a lot of the same classes of problems C++ does, What are those classes of problems? C++ never offered a safe alternative to C, but did offer some eases of use and stronger typing over C. Rust on the other hand has a huge amount to offer over C. At no point in my Rust work do I ever wish I was working with C, quite the contrary. But I like strongly typed languages, Rust is definitely not for those that dislike types.
- Sir_Cmpwn 9y ago>Could expand on where it suffers? I've been playing around with Rust in the embedded space (nothing serious at all); I find it to be as elegant in a nonstd situation as it is in standard high level app development. By "the embedded space" do you mean "devices running Linux with Rust in userspace?" Because that's much higher level than what I'm talking about, and has very different design concerns from those of a general purpose operating system. My main beef with Rust for low level development is that Rust is way more complicated than it should be. IMO for serious low level programming Rust should have 1/10th the featureset. It also has issues dealing with the weird data structures that tend to come up in low level contexts in my experience. Rust also has the shiny fad status working against it IMO. If, say, 5% of C hackers understand low level programming and/or kernel hacking, then maybe 0.5% of Rust hackers do (if that). >What are those classes of problems? C++ never offered a safe alternative to C, but did offer some eases of use and stronger typing over C. It comes back to complexity and typing. There's nothing wrong with strongly typed languages (of which C is a member), but I strongly dislike object oriented languages and paradigms. Especially in low level contexts it's like forcing a square peg into a round hole. Other features C++ brings to the table like operator overloading and templates are antifeatures, doubly so in a kernel hacking context. Many of the same patterns of unnecessary complexity introduced by C++ are also present in Rust. C is boring, but it's also transparent and straightforward. Ergonomics takes a backseat to simplicity in C, which is a compromise I'd take any day.
- aeleos 9y agoI have been working on writing my own OS in rust for the past few months, and the main thing I have had the most difficulty with is Rust itself. The package management is so much better than C, dependencies are easier, and it was honestly easier to get working compared to C++. The fact that they nicely have separated rust core and std so that I don't have to deal with things randomly breaking because of something I haven't implemented. The abstractions that Rust offers I don't feel suffer the same problems as C++ because they are much more straightforward to use and just make sense from an object oriented programming perspective. Rust itself is so inherently different from other a language like C that it takes a long time to truly understanding lifetimes and the borrow checker to the point where you are actually making use of the languages features. The straightforwardness of C is really where it shines, and for me at least Rusts biggest upside is also its biggest downside, because learning to write good Rust is not an easy process.
- deleted 9y ago[deleted]
- bitmapbrother 9y agoIt's actually written in a variety of languages. The kernel is written in C/C++, but other languages such as Go are used for the networking stack. https://fuchsia.googlesource.com/netstack/+/master https://fuchsia.googlesource.com/netstack/+/master
- xearl 9y agoAssuming that the C++ bit and the not having faith b/c of Chromium bit are related, would you mind expanding (briefly) on the problems you saw?
- Sir_Cmpwn 9y agoChromium is a huge mess of intertwined, overengineered, and opaque code IMO. It's hard to make large-scale projects well, and Google seems to lack the discipline if Chromium is any indication. Given that the Fuschia team is closely related and they have already made questionable choices (C++), I'm not holding my breath.