News for hackers. Stuff that matters.
Re:Show HN: A new hobby OS from “scratch” in C# by skybrian on Sunday March 05, 2017 @02:39AM (#13795014)
I'm surprised C# is suitable for this. How does that work?
Re:Show HN: A new hobby OS from “scratch” in C# by amaneureka on Sunday March 05, 2017 @02:42AM (#13795021)
Because It is not possible to run C# executable without .NET framework. I had to work on a compiler first. Source: https://github.com/amaneureka/AtomOS/tree/master/src/Compile... Which works on the top of Microsoft's IL Builder. Then it add compiler stubs to support .NET code and convert code into native x86 assembly. The assembly file is then passed through NAsm and proper linking chain to produce final Kernel ELF binary. Build.sh produces an ISO image which can be used to boot OS in either virtual machine or on real hardware.

I explained it here: https://www.reddit.com/r/programming/comments/5xlmc6/a_new_h...

Re:Show HN: A new hobby OS from “scratch” in C# by pjmlp on Sunday March 05, 2017 @02:48AM (#13795040)
Good luck with the project, we already have too many kernels written in straight C.

Only thanks to this kind of work one can prove it is possible.

Re:Show HN: A new hobby OS from “scratch” in C# by ianai on Sunday March 05, 2017 @03:20AM (#13795089)
As a guy who really thinks *nix is awesome, I welcome new additions, too.
Re:Show HN: A new hobby OS from “scratch” in C# by djsumdog on Sunday March 05, 2017 @10:42AM (#13796406)
That's a lot-o-work! Pretty impressive man. I think projects like this are awesome.
Re:Show HN: A new hobby OS from “scratch” in C# by pjmlp on Sunday March 05, 2017 @02:46AM (#13795031)
Haven't you heard of Singularity or Midori?

http://joeduffyblog.com/

https://www.infoq.com/presentations/csharp-systems-programmi...

There are quite a few OS projects written in system programming languages with GC, all the way back to Mesa/Cedar at Xerox PARC.

If you want to have an idea, check the Project Oberon book.

http://people.inf.ethz.ch/wirth/ProjectOberon/index.html

This is the 2013 re-edition, it was originally published in 1992.

Re:Show HN: A new hobby OS from “scratch” in C# by bad_user on Sunday March 05, 2017 @05:23AM (#13795381)
Also a library for building special purpose operating systems (unikernels) in OCaml, which is actually used: https://mirage.io/
Re:Show HN: A new hobby OS from “scratch” in C# by apotheon on Sunday March 05, 2017 @12:22PM (#13797072)
Let's not forget other more recent stuff that still happened before AtomOS, like Redox. I seem to recall seeing a couple others recently as well, but for some reason I'm drawing a blank now. I think the big deal about this is mostly just that it's an effort outside of Microsoft to do this, and compile it to machine code rather than just use some kind of "higher order" OS that needs to run on top of something else -- and even there it's not unique, even if it looks more interesting than FlingOS (which is evidently just a new take on the "toy kernel/OS for teaching" idea).
Re:Show HN: A new hobby OS from “scratch” in C# by contextfree on Sunday March 05, 2017 @04:58PM (#13799004)
Midori was still built on a C++ microkernel though.
Re:Show HN: A new hobby OS from “scratch” in C# by pjmlp on Sunday March 05, 2017 @05:17PM (#13799124)
Which doesn't diminishes its value.

No one would though of writing an OS in C++ in the 90's, it was too slow and everyone knew that microkernels could only be possibly written in C.

Re:Show HN: A new hobby OS from “scratch” in C# by JdeBP on Monday March 06, 2017 @03:11AM (#13801396)
I thought of writing an operating system in C++ in the 1990s. I didn't achieve it until after the turn of the century. But I definitely thought of it.

The "everyone" who knew these things about C++ was a small set of vocal people largely from the Unix and C worlds. Other people who were at the time developing Windows NT device drivers in C++, to pick one example, knew that a lot of the received, and loudly recirculated, wisdom about systems programming and C++ was just bunkum.

Re:Show HN: A new hobby OS from “scratch” in C# by pjmlp on Monday March 06, 2017 @07:28AM (#13802239)
Me too, I never liked C.

What I was trying to convey with that comment was that C++ was looked down for systems programming, it required Symbian, BeOS, OS X IO Kit to change that mentality.

Even Windows that you mention, which always was a more welcoming place for C++ tooling, Microsoft only started to officially support it with Visual C++ 2012 when the /kernel flag was introduced.

So even that microkernel could have been eventually written in System C#, if there was enough management support to keep developing Midori and improving the language to the point C++ wouldn't be needed.

Instead the project was canceled and since in IT, seeing is believing, there will be idea for many, that there wasn't any other way to accomplish it.

I love the way Alan Kay and others like him think, it is not what the technology give us today, but what it can give us tomorrow in a few years time.

Re:Show HN: A new hobby OS from “scratch” in C# by willvarfar on Sunday March 05, 2017 @02:43AM (#13795023)
How does that work? Surprisingly well :)

Many hobby kernels (as mentioned in these comments) have used C#, as well as bleeding-edge research kernels e.g. Microsoft's Singularity project: https://en.wikipedia.org/wiki/Singularity_(operating_system)

Re:Show HN: A new hobby OS from “scratch” in C# by nickpsecurity on Sunday March 05, 2017 @11:28AM (#13796704)
Bleeding-edge was VerveOS:

https://www.microsoft.com/en-us/research/publication/safe-to...

It's legacy will be in their IronClad Apps. Look into those if you want to see how far they've gone. Also, Microsoft Research & HLL vs Nix and C in security are a gap that's ever widening. ;)