Live data from Hacker News

Thor – A minimalistic operating system in assembly and C++

github.com

1–10 of 152 posts

Re: Thor – A minimalistic operating system in assembly and C++

#2
Last week I read the very good 'How to build an operating system from scratch' [1], and I'm glad I did. It meant that I could burrow into the files on this github project and understand exactly what was going on.

One day, when I finally have some free time, I am totally going to do this myself.

---

[1] https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures...

Re: Thor – A minimalistic operating system in assembly and C++

#6
post #4
post #3

An OS in C++? But Linus said... http://harmful.cat-v.org/software/c++/linus

That's Linus's opinion, yes. Not everyone has to share it.

It's a really annoying widespread opinion. I've been looking for people who really do write OSes in modern C++.

Re: Thor – A minimalistic operating system in assembly and C++

#7
post #3

An OS in C++? But Linus said... http://harmful.cat-v.org/software/c++/linus

I do believe that when programming at "machine level" your language needs to be as simple and straightforward as possible. It needs to obey you like a sword. Yes, you need some mastery, but you know that your every action is effective. No lost effort, no mind tricks, no unnecesary complexity.

I find that every abstraction level makes me more unhappy and somehow lost..

So yes, I do believe Linus knows something and for sure he's not trying to fool himself. When you really try to build something to actually be used, all those abstractions will bite you..

Re: Thor – A minimalistic operating system in assembly and C++

#8
post #4
post #3

An OS in C++? But Linus said... http://harmful.cat-v.org/software/c++/linus

That's Linus's opinion, yes. Not everyone has to share it.

Yes, but his opinion counts more than some John Doe's as Linus supports his case with solid arguments.

Re: Thor – A minimalistic operating system in assembly and C++

#9
post #6
post #4

Earlier quoted context omitted.

That's Linus's opinion, yes. Not everyone has to share it.

It's a really annoying widespread opinion. I've been looking for people who really do write OSes in modern C++.

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).

Re: Thor – A minimalistic operating system in assembly and C++

#10
post #6
post #4

Earlier quoted context omitted.

That's Linus's opinion, yes. Not everyone has to share it.

It's a really annoying widespread opinion. I've been looking for people who really do write OSes in modern C++.

IncludeOS? [0]

From the CppCon 2016 presentation description:

"Early in the design process we made a hard choice; no C interfaces and no blocking POSIX calls. We’ve done everything from scratch with modern C++ 11/14 - Including device drivers and the complete network stack all the way through ethernet, IP and ARP, up to and including UDP, TCP and recently also an http / REST API framework. To achieve maximum efficiency we decided to do everything event based and async, so there's plenty of opportunities to use lambdas and delegates." [1]

[0] http://www.includeos.org/

[1] https://cppcon2016.sched.org/event/d30a43dae4a490dce81a3dfc6...

Post reply on HN