Recent submissions

Comment · 8 years ago
Seems to work quite well!
Comment · 10 years ago
This is an updated version of my previous benchmark with more recent compilers (GCC 5.4 and Clang 3.9). The results are almost the same as before, zapcc is about 2 times faster than GCC and 3.3 times faster than clang. This is only a comparison on a very template-heavy library, but this shows interesting results for zapcc (still in beta and will be commercial).
Comment · 10 years ago
Normally, it should make almost difference compared to the code generated by the same version of clang on which zapcc is based. It may make a difference in the long term if they don't keep up to date with clang trunk.
Comment · 10 years ago
It's not free for commercial use. And it's probably the slowest compiler there is although the generated assembly is generally of incredible quality.
Comment · 10 years ago
You're right, I should emphasize on this on the conclusion ;)
Comment · 10 years ago
Unfortunately, it's quite inconvenient to use precompiled, there are a lot of limitations in each compiler. For instance, only the first header include a source file can be precompiled and other things like that, this is a more general approach. But PCH can bring a really good speedup too and are free ;)
Comment · 10 years ago
It's probably highly subjective to make a description of what needs an OS to be an OS. For me, it would be to be able to boot on hardware, to be able to execute applications and to give these applications an abstract layer to the hardware.
Comment · 10 years ago
That would be impossible, Thor cannot be brought down by any other than Jörmungandr. More seriously, I'll try to avoid reproducing the ping of death issue :)
Comment · 10 years ago
You can write a kernel in pretty much every language. There are some experiments with Rust: http://www.randomhacks.net/bare-metal-rust/

There are several reasons to choose a language rather than another. I personally don't like Rust at all, so I don't see any reason to use it, neither do I see any advantage in using it. But that's only my opinion. A lot of osdev currently is made by hobbyist (not counting the handful of really succesful kernels), so the main argument is simply personal and there is nothing wrong with it. Moreover, keep in mind that Rust is pretty new while C/C++ are decades old, this means more support, more portability, more people that know how to use it, ... This is not negligible at all.

Comment · 10 years ago
I'm using a few classes and some class hierarchy as well. I've reimplemented std::vector and std::string and a few other features from the STL and use them both in kernel space and user space (the STL is not standalone, need the glibc and I didn't want to port everything). I'm using quite some templates in the library part. I'm using auto from C++11 and a few constexpr functions. I have disabled exceptions and RTTI. I'm using RAII principle as much as possible (but this can be improved a lot still). I'm using references when I can remove pointers.

On the other hand, a lot of code is clearly very close to C. When you're doing some low-level things, parsing memory structures, paging, ... there are not a lot of features from C++ than can help. Moreover, there is a lot of code that could profit from some refactorings:P

Comment · 10 years ago
They are pretty good indeed to begin with. However, the best resource there is is clearly osdev.org, both the forums and the wiki are full of information!
Comment · 10 years ago
Nice :) I didn't know this project. I'll definitely read about this project.
Comment · 10 years ago
Hello.

I'm the author of the mentioned project. It's indeed a very annoying opinion. Although there are indeed some difficulties in writing an operating system and quite some runtime support to implement, I would say that it's worth it only to have a more powerful language. I'd rather use a language that I really like rather than be forced to use one I don't really care about.

I cannot say that C++ is the best language to develop an operating system, but I would definitely say that it's possible if you really know the language. And you don't have to use the complete language (I didn't enable exceptions nor RTTI in my OS).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton