Live data from Hacker News

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

github.com

51–60 of 152 posts

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

#51
post #31

Earlier quoted context omitted.

I will! I'm guessing you mean these..? http://www.brokenthorn.com/Resources/OSDevIndex.html

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!

The OSDev wiki is the best think to hit the internet since sliced bread (with cats faces pushed through them?) but it's far from a tutorial. It's a wiki.

While it is one of the best repositories of knowledge on the subject of low level development, it's not a step by step guide.

In the same way I don't recommend that people read Wikipedia to learn about human history I'd also not recommend reading osdev to learn about low level development.

It at it's heart is organized as a reference, not a text book.

I wish that someone would go through and accumulate all the knowledge, put it into a series based textbook with chapters, throw in some example code and VMs for many architectures, and sell it to me because I'd pay. I'd also push for those at my university to construct a class around the book as it would be one of the most fascinating and knowledge packed classes I'd think you could take. (Hint hint, nudge nudge writers and professors!)

But yes to date NOTHING beats osdev.

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

#52
post #31

Earlier quoted context omitted.

Check out the broken thorn tutorials on the subject. They are far more complete.

I will! I'm guessing you mean these..? http://www.brokenthorn.com/Resources/OSDevIndex.html

Yes sorry, I had just woken up and was on mobile. Couldn't gather my whits to find the link. Now that I've got a cup of joe in me I'm much more chipper and ready for this!

Yes that's the link. They walk you through everything! Top to bottom. It's a great starter that will teach you what OS development actually involves. It's like a hand holding experience through a forest of strange practices, you'll love it when you get a chance.

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

#53
post #46

Can an operating system be developed from scratch using a safe language such as Rust? If yes, why people still even think about doing it with unsafe languages?

> Can an operating system be developed from scratch using a safe language such as Rust? We don't know. > If yes, why people still even think about doing it with unsafe languages? Because it works.

> > Can an operating system be developed from scratch using a safe language such as Rust?

> We don't know.

Sure we do. Redox[0] boots into a desktop environment with a filesystem, etc etc. What we don't really know is how performant/portable/etc you could make it if you put the same amount of manpower into it as went into .

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

#55

Earlier quoted context omitted.

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!

The OSDev wiki is the best think to hit the internet since sliced bread (with cats faces pushed through them?) but it's far from a tutorial. It's a wiki. While it is one of the best repositories of knowledge on the subject of low level development, it's not a step by step guide. In the same way I don't recommend that people read Wikipedia to learn about human history I'd also not recommend reading osdev to learn abou…

What would be a good step-by-step tutorial in your opinion?

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

#56
post #5

Earlier quoted context omitted.

I agree 100% with Linus, especially the boost comment. It was heavily used in a project I worked on and "boost" soon became a curse word.

I don't agree with Linus, but yes, boost is horrible.

I don't agree with you, boost is great.

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

#57
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++.

I don't write OSes in modern C++ at the moment (most of my day job is embedded Linux nowadays, go figure...) but I've seen a lot of sane, OS-level C++ code. Even C++ code that I have bad memories about (uh, Symbian) is partly justifiable.

The only real beef I have with C++ is its complexity. As I did less and less high-level programming, I forgot about many of C++'s pitfalls and nowadays I'm always tiptoeing when I have to write C++ code. I think a lot of it is unwarranted, or at least not needed when you're writing system-level code (but my impression may be distorted by the fact that I'm used to embedded systems and high-reliability applications; my sight may be narrow here).

Edit -- oh, by the way: it's worth pointing out, in the context of a thread that mentions Torvalds' opinion on the matter, that the whole thing was written a while ago.

The Internet endlessly recycles some of these arguments, e.g. STL still gets a lot of criticism that hasn't been true in a while. Yes, STL was terrible, terrible fifteen years ago, but that's, like, 50 years in computer years.

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

#58
post #46

Earlier quoted context omitted.

> Can an operating system be developed from scratch using a safe language such as Rust? We don't know. > If yes, why people still even think about doing it with unsafe languages? Because it works.

> > Can an operating system be developed from scratch using a safe language such as Rust? > We don't know. Sure we do. Redox[0] boots into a desktop environment with a filesystem, etc etc. What we don't really know is how performant/portable/etc you could make it if you put the same amount of manpower into it as went into .

We do know some prototype can boot. We don't know about operating system being in use in any environment for any purpose.

Damn, we don't know could the browser engine written in Rust work or not, despite the fact writing a browser engine was the goal of Rust from the day one.

By the way, network card driver can be written in LuaJIT (and perform well) too[1]. Shall we do it?

[1] http://lukego.github.io/blog/2013/01/03/snabb-switchs-luajit...

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

#59
post #3

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

What kind of C++ are you writing? That's the real question. My friends and I that work on bare-metal talk about "embedded C++". Yes, it is C++, and you can take advantage of some C++ features, but some things are not in the mix. Like, for instance, if you have 8K of physical SRAM and no virtual memory manager, new and dispose aren't going to do a lot for you.

C++ has it's place in OS development, but you need to know exactly what code is being generated, and you need to understand with excruciating precision how memory is being allocated.

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

#60
And the latest commit message is "Prepare ICMP message type decoding"

It seems we have not learned from the mistakes of prior operating systems and instead of a "Windows NT ping of death" we'll have a "Thor ping of death", which is a curious image, Thor brought down by a puny ping.

Post reply on HN