Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey guys, I'm the author of this project. Surprising to see it on HN but life is surprising sometimes!

I actually made a little demo video about this system just yesterday if you'd like to see it running: https://www.youtube.com/watch?v=hE52D-zbX3g



Can I share some observations? There are a few things I really love about this:

- You kept the end user in mind: You. The GUI looks like a mashup, in a good way: A Mac OS menu bar, Windows GUI feel and a NextSTEP launcher on top of a Unix like system. It shows that for every element, instead of simply recreating whatever system you decided to emulate, you took the parts you liked best from whatever system and simply recreated that. I haven't looked at the code too thoroughly, but I can probably find the same mindset there.

- You kept the scope tight. It's easy to lose sight of the bare minimum MVP, especially when working on a hobby project. The functionality showcased here tells me that whenever you started implementation of a feature, you built exactly what you needed, nothing less, nothing more.

- You also didn't get bogged down with premature optimizations. Yes, the PNG renderer is slow. But it does the bare minimum it's supposed to.

But most of all, this takes a crazy amount of time, skills and dedication. You've probably encountered quite some frustrating moments you had to chew through, but now you're here, presenting your work. And it's awesome!


Thank you for these observations, you've just distilled my personal programming philosophy into three concise points!

If you looked at the code, you would indeed find a similar "take what you like and leave the rest" style mashup. I spent many years working on WebKit, so you find a lot of WebKit-style patterns, containers and templates. I also spent some years working on Qt, so there's a huge bit of that in the GUI library. :)


But you rewrote it all from scratch in a “clean room” so as to not incur any license issues ;)


This is some seriously intense stuff to build from scratch. I barely was able to get into x86 protected mode before I decided OS dev was too intense of a hobby for myself :)

I'd say congratulations but I'm not sure what to congratulate as there's numerous accomplishments here worth doing so for. Compositing windowing? Complete and functional network stack? Seriously, kudos.


Two questions (pardon my ignorance on the topic, it's really exciting): - Can I write software for it? Is there a compiler or language included, or do I need to add it to the base code before compiling? - Would I be able to run it on bare metal someday (are any other drivers compatible?) or is this VM-only?


>Can I write software for it? Is there a compiler or language included, or do I need to add it to the base code before compiling?

At the moment you would need to add it to the base code before compiling. I've been working on porting GCC in increments. Last time I tried, GCC was able to build "Hello World" but somehow fell apart between assembly and linking for programs with more than a few functions. It's something I keep coming back to as it's quite draining to deal with the long build times of GNU tools for more than an evening.

>Would I be able to run it on bare metal someday (are any other drivers compatible?) or is this VM-only?

At the moment this is VM only. It could probably be made to run on bare metal relatively soon with a bit of hackery, but it's not something I've spent any time on since the VM environment is fantastic for rapid development.


Thanks for the info. Maybe a simpler scripting or interpretive language (self-designed?) would be easier, rather than trying to bring in something complex at first. Something like a bash or BASIC that could make use of your GUI or events?


Do you know about TCC (Tiny C Compiler)? Might be easier to port that and build up from there.

https://bellard.org/tcc/


Maybe another interpreted language could be an easier target?

- Ruby - Python3 or something else?

Does it support POSIX shell (yet?)?

- sh?

- Bash?

- zsh?


Bash was one of the first 3rd party apps I got running so it's pretty good. No job control though, and it sometimes gets confused about signals and TTY stuff. Haven't tried the others yet. It would be fun to get an interpreted language running.


Cool!


Just want to add a +1 this is incredible how much you've managed to do in such a short amount of time - a seriously impressive feat of engineering to even attempt, yet you've managed to come out with a working demo already.


This is just amazing, I'm very impressed with your OS. This also inspires me to begin creating things that at first thought might seem impossible.

How did you gain the knowledge to implement all these subsystems? Did you use any specific resources?

Just building a kernel and networking would have been awesome, but a GUI and all the applications is just mind-blowing cool.

Submissions like this is why I read HN. There are something intriguing about projects like this, that are small enough for you to have a chance of understanding how every part works.


>How did you gain the knowledge to implement all these subsystems? Did you use any specific resources?

I spent many years with a PC emulator (my other GH repo) being my only main hobby project. It's a reasonably correct 80386 with various peripherals and a BIOS. This project allowed me to take 80% of the skills acquired from the emulator, turn them inside out, and build an operating system from them. Of course, Serenity eventually outgrew the limitations of my emulator (no networking, no FPU, no VESA LFB...) and I've stopped trying to catch up for now.

Other than that, the OSDev.org wiki has been immensely helpful at times, and the vast number of open source operating systems you can look at for help/inspiration when stuck. :)


Nice, easy to read code from what I've looked at, and impressive to have assembled it so quickly.

Were there any ideas you wanted to prove with your implementation?


Thanks! I didn't really have any big ideas starting out other than "I don't know what my computer is doing 99% of the time, what if I could drastically change that number?"


Truly amazing work. I'm curious if you know why the ping time to 127.0.0.1 varies so much between pings.


Probably because pinging 127.0.0.1 is actually cheating. I don't have a loopback network interface inside Serenity, instead pinging "127.0.0.1" will go through QEMU's SLiRP backend, ping lo0 on my host machine and then plumb the response back.

I didn't think of this when making the video, I simply typed "ping 127.0.0.1" out of some reflex. So basically, I need to make a loopback interface. Putting that on my TODO list, thanks for noticing this!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: