Hacker News new | past | comments | ask | show | jobs | submit login

Hello friends, author here! Fun to see my project on HN again.

If you would like to see the system in action, I did a demo video in March[1] and one in April[2].

I’m happy to answer any questions you might have about the system. I’m not an expert on operating systems, but I can be pretty productive :)

[1] https://youtu.be/hE52D-zbX3g

[2] https://youtu.be/RBr5If8GrM4




I honestly cannot believe the massive scope of this project, it’s astonishing. What an accomplishment!

You singlehandedly created something that took many programmers many decades to build.


10% of this is knowing in advance what UI/UX paradigms you're matching/mimicking.

The original developers had to come up with the concept of, say, a taskbar from scratch.

They understood it has to run separately from other parts of the OS in case of crashes, it should support icons that are references to the same icons that windows have, etc.

But they were also limited by the resources of their day, and had to get clever about resource allocation. That's extremely time-consuming.

But that said, 90% of this project is simply a very good creator, being incredibly productive.

The mythical 100x programmer isn't always a myth.

I'm in awe.


You are absolutely right about the benefits of mimicking existing UI paradigms. It saves so much time already knowing basically how I want things to look and work. And not having to worry as much about resources as people did in the past is a huge load off. (Although I do all my development with 128MB of RAM or less, because I enjoy that sort of challenge..)

Serenity is an unapologetic remix/mash-up of all the things I like in software. Not just visually, but also code-wise. If you look into the sources, you'll find C++ heavily inspired by Qt and WebKit.


> I do all my development with 128MB of RAM or less, because I enjoy that sort of challenge

I remember being excited that I was able to splurge on a 486 with 4 Mb RAM.


I love working with 2kb of RAM. What is your point?


The point is that the device with 2KB RAM is a single-purpose embedded controller, and the device with 4MB RAM used to be a full-blown universal desktop daily productivity machine.


Though I remember that it was more or less necessary to have 8MB to browse the Web on those Windows 3.11 486s :)


I was browsing on Windows 3.11 with 4mb. Opera 3.62 + Trumpet Winsock could handle it.


Well, the first computer on which I wrote programs was a ZX-81[1]. The 486 DX4-75[2] with 4 Mb memory, however, helped me learn C using DJGPP and later build my first Linux kernel (on Debian 1.1), browse Gopher and WWW sites, read newsgroups, play with Cello[3]. I also wrote first versions of my economics experiments on it. Later, I upgraded to Windows 95 from Windows 3.11 WfW so I could have a decent Java experience.

I don't think I have much of a point except that you could do development on that machine in relatively modern ways in a way I could never imagine on a ZX-81 or ZX Spectrum.

[1]: https://en.wikipedia.org/wiki/ZX81 [2]: https://en.wikipedia.org/wiki/Intel_DX4 [3]: https://en.wikipedia.org/wiki/Cello_(web_browser)


Awesome, this looks really exciting!

Will it be possible at some time to compile Qt based applications in SerenityOS?


Anything is possible! It would take quite a lot of work to bring up a Qt port, so it's not really a priority right now as there are many other important things that need attention. But some day.


Looking forward to this day :) I'll be watching the project, keep up the great work.


This is seriously awesome work. Productive is an understatement, damn.


Second that statement. I don’t know how you have time or money to develop something mine this. Shock and awe!


Thanks Phil, that warms my heart.


Whenever I see these kinds of videos, I’m struck by how much time and work it must have taken to be able to announce a new slider component.

From the state a month ago, it’s very reasonable. From scratch however...

How do you even start building an OS?


You can actually see how much work the slider took, because I recorded the process :) https://www.youtube.com/watch?v=lMRJClRrGps

I don't know if any two operating systems started out the same.. Serenity came into this world because I found myself with a lot of free time and in need of a programming project.

The first three components I wrote were an ELF parser, an Ext2 filesystem dumper, and a GUI library (on top of SDL.) They all ran independently on my Linux box. Once they worked well enough, I glued it all together with a simple x86 kernel and just kept going.


"How do you even start building an OS?"

Probably not the answer you wanted, but I assume from a poc/toy bootloader. I wasn't disciplined enough to go further, but I did play around getting a toy OS working, and stopped a little bit past that part.

This effort, from a one man show, is amazing.


I decided I wanted to try this about a year ago.

So far I've learned C [0], x86 asm [1], read OSTEP [2] and begun hacking on xv6 ...and I still feel like I have years to go.

[0] http://www.knking.com/books/c2/index.html

[1] http://opensecuritytraining.info/

[2] http://pages.cs.wisc.edu/~remzi/OSTEP/


What's the future goal for this project? Will it ever reach a point where you say "it's done"? I quite like the idea of loading this onto an old laptop I have laying around for the purpose of using it as a distraction free portable editor (if it won't crash and lose everything).

Now that you have networking and a compiler, you could build a "simple" package manager. It could be just a list of supported Git repositories that are downloaded (downloader) and built (gcc), that would at least allow people to write stand-alone applications (no libraries) for your system that others could use.


The goal is basically open. I would like to make this system good enough that I can spend most of my time on it. Without losing track of the original ideas.

A package manager is definitely coming sooner or later. There's actually an SDL port in the works (done by a stellar contributor, not myself.) I suspect that we're gonna need some sort of ports system in the Serenity tree to be able to maintain it. :)


If the shell and compiler are posixy enough pkgsrc may well work with minor changes!


This is some awesome work! From the looks of it, your window server architecture is similar to wayland's, so would it be possible to port the GUI library to Linux/Wayland? Then someone could write a wayland compositor using wlroots that mimics the W95 aesthetics and there you have it: the ultimate 90's UI on a system that's actually usable for day to day tasks.


Sure, the GUI library could definitely be ported to anywhere POSIX-y. The IPC messaging is already based on AF_LOCAL sockets so that should "just work"

The bitmap sharing between WindowServer and clients is using a custom Serenity API ("create_shared_buffer") which is specifically tailored for this system. It can probably be replaced with some equivalent X11/Wayland mechanism in a few hours, if someone felt inclined to do that. :)


Just curious if you were familiar with Wirths work on the Oberon system and what he and another contributor were able accomplish, when starting this project? What were some of your inspirations?


I was not aware of the Oberon system. It looks interesting, I will read more about it, thank you :)

The inspiration for this system comes from using Visual Basic as a kid and just having fun trying to mimic the Microsoft Office look&feel of those days. It also comes from using Slackware Linux and realizing that everything can be done with text commands, and configured with text files.


I noticed the form designer and properties in the screenshot posted in the repo.

Does that system only design forms, and you have to manually "glue" them to code - or is there a visual programming system behind it?

I guess what I'm getting at is that you mentioned here being inspired by VB from your youth - so I was wondering how far you have taken that particular part?

I worked professionally with VB for over a decade (from VB3 to VB6) years ago; BASIC in general, and VB as well - both hold places in my heart, since that is where I started my coding journey to a career in it (I started when I was 10-11 years old, back in 1984, using a TRS-80 Color Computer 2, which ran a version of BASIC from Microsoft).

This is a great project, something I've seen posted before here and elsewhere, but it's always worth another look when it pops up.


Yeah, so far the form designer is just to help you create layouts which are then turned into C++ code. There's a bit of smoke & mirrors here though, I haven't even started on the tool that converts a saved form into C++.. but all in good time!

It would be fun to build a visual programming system in the style of VB6~, but it's not something I've started on. :)


Does it run on real hardware?

Any plans for 64 bit?

Any plans for SMP?

The old readme mentions a gcc patch. Is it still needed? What does it do? Just the final executable's format?

Is there an FAQ somewhere that I missed? :)


I haven't tried running it on real hardware yet, I'm too comfortable with my VM-based workflow at the moment. It'll eventually get there though, but I'm not in a hurry. :)

The answer is basically the same for 64-bit and SMP support. Some day I'll wake up with the burning desire to implement those things, and then I'll start on it. Or someone will show up with patches. We'll see! Nothing really depends on those features, although they would certainly be huge improvements to the architecture.

Yeah we still need patches for binutils and GCC. Any custom operating system does, you can see the patches here: https://github.com/SerenityOS/serenity/tree/master/Toolchain...

It's all about setting up the executable formats, providing the system names, and telling the compiler how we like things linked, etc.

There's no FAQ but maybe I should compile one..


You are wonderful, just wanted to say that.

I hope your OS finds a stable niche to live in, and you get lots of great contributors. Thank you for writing this, its existence makes me deeply happy :)


Thanks for replying! So no specific reasons not to do any of these, sounds good. Was thinking about taking some old hardware collecting dust for a ride with this. Maybe some day. :-)


what's the secret to being a 10x programmer?


Aiming for 100x.


> I’m not an expert on operating systems

understatement of the century


Did you mean to be insulting, or did you misspeak?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: