Hacker News new | past | comments | ask | show | jobs | submit login
SerenityOS: From Zero to HTML in a Year (serenityos.org)
354 points by akling 7 days ago | hide | past | web | favorite | 52 comments





This is the first time I hear of SerenityOS so I'm honestly amazed to see that the warm gray of the 1990s is back in style! There's definitely something to be said about the simplicity of that old school UI.

But more importantly, I really wanted to commend the author on their truly inspiring approach to criticism (valid or invalid)

I was left with this impression just by looking at his comments on this thread, but then later came across this video¹ which was posted as a response to armchair critics on OS News... and the tongue-in-cheek tone is just too nice for what I'm used to seeing on the internet these days! Congrats on this huge feat after 1 year of development but above all kudos on being such a nice person even in the face of seemingly pointless criticism

1. https://www.youtube.com/watch?v=EoScn0X2DFM

2. Original thread https://www.osnews.com/story/129716/serenity-a-new-unix-like...


I actually brought in the warm gray after spronkey suggested it here on HN: https://news.ycombinator.com/item?id=19988813

I ended up loving it so it's stuck since then!

As for handling criticism.. it's something new I've been trying in the last year. I decided that I don't want to get sucked into negativity anywhere near this project, so I strive to maintain a positive outlook 100% of the time. It can be a bit taxing, but I'm convinced it's better than the alternative. :)


> As for handling criticism.. it's something new I've been trying in the last year.

Well, I hope you can handle praise. :- )

I unironically love the visual stylings and choice effects of Windows NT 4.0/2000, and where CUA menu bars exist, I often prefer the Mac-style centralized ones (especially the new ones, with the global search keybinding). I feel like the obvious idea of making buttons look iconically like buttons should not have been abandoned so hastily, even if it makes it harder to choose colours for dark backgrounds.


Thanks microcolonel! (Love your nickname btw, the idle task in the Serenity kernel is called the "colonel" process :))

Obviously I really dig this GUI style as well. It might seem petty, but part of what motivates me to work on a browser is wanting to build one that doesn't cede control over things like button appearance to the web. Not to mention greater invasions like allowing sites access to desktop notifications, and other things that should have ended up in a WHATWG trash can.


One thing I noticed with Piano is that it relies on the keyboard layout. As a Dvorak typist, I've often wondered if there's some way to do input handling better, such that applications which are more interested in the position of a key than its associated symbol (e.g. FPS games looking for "WASD") can just get the key at that position, instead of looking for a "W". Another gripe I've had with keyboard layout systems is that there's usually no way of indicating to the OS that US Dvorak is the natural layout of a keyboard, so instead of doing nothing when a "US" layout is selected, it translates it from US Dvorak to US, and does nothing when a US Dvorak layout is selected in software.

Added clarification:

There are at least three important things about keyboards in my view of things: the symbol or intent of the key, the "position" of the key in a set of cultural contexts (e.g. typewriter-style keyboards, left hand character movement controls, etc.), and the actual physical position (relative to other keys) and form/scale (relative to the world).


That's interesting. It could be neat to include key position as a field in the system keyboard events, along with the character, shift states, etc.

In fact, the keyboard scan code is basically position information :)


Key position it’s something I never thought about! Interesting idea, that should be a thing.

I actually wish it was more like Classic Mac OS - I miss a spatial Finder and the UX affordances, and as much as I loved the NeXT I don’t actually go in much for the Windows 95 look...

I was watching an 8 Bit Guy video where he was demoing a Classic Mac OS machine running a complex UI, and it was interesting how elegant and obvious it was. I believe it was this: https://youtu.be/tvZ43JqrvXA?t=404

The plain 90s look is what I like about Haiku OS. Makes it really nice to use, coupled with it being incredibly fast and responsive because there's not much to update on the screen:

https://www.haiku-os.org/slideshows/haiku-1/


Hello friends! Thanks for checking out my project, it's always fun to have visitors :)

If you would like to hear the story behind the "Serenity" name, and what led up to the creation of this OS, I spoke about it a few days ago: https://www.youtube.com/watch?v=j3JkNGKZtqM

Also check out this 1 minute video of the Serenity Browser in action: https://www.youtube.com/watch?v=Cu9wONA1MHc

Ofc I'm happy to answer any questions about the system!

Previous HN discussions:

https://news.ycombinator.com/item?id=19537807

https://news.ycombinator.com/item?id=19986126


Hey, I'm really glad to see you've continued to work on this - it's one of those projects that is just naturally fun to watch be made.

How far has the GCC port come? Is the project anywhere near self hosting being a feasible task?


Hey zamadatix! I’m glad too, it’s been tons of fun making it.

The GCC port is pretty decent. You can build about 90% of the system inside itself but you eventually hit some kernel bug that crashes the build, ironically usually while building the kernel itself. There’s debugging to be done, but that’s true of the whole system.. We’ll get there eventually.

The fs/disk performance is also quite terrible and, which you can really feel during builds with GCC. I need to look into what’s happening there as well :)


does your browser support forms?

i,m working on ultra compatible web forum system and curious if it would work...

even without form support, it is possible...

would you be interested in trying?

your objectives for the user study would be to read, vote, and comment.

link is in my profile. tia


Hello there. The Serenity Browser does not support forms yet. It also does not support HTTPS. It barely supports anything other than parsing well-formed HTML and CSS, and doing some basic CSS2.1-ish layout. It's far too soon to be testing compatibility with anything :)

no forms and no https is needed.

you can make a new submission by putting it in the url.

anything not existing already becomes a new post.

thank you for responding.

it would mean a lot to me to be able to claim compatibility with serenity browser. maybe i,ll just try it myself, if i can figure it out.

already compatible with ncsa mosaic 1.0 ))


Once I saw the screenshot with wallpaper, I felt like "he's done! It looks done!"

The time commitment is impressive, and there's something reassuring in an age of consolidated power to see individuals building various levels of software, particularly where many of us probably haven't ventured due to the unknowns.

Very cool!


Thanks neogodless! Every now and then I start to feel something like "oh yeah, this is starting to look almost done" but before I can slow down, I find some new aspect to work on and improve.

I've finally found a project big enough that even if I'm bored of it, I still just go and work on some other part of it instead ;)


This is incredibly interesting. How much time are you working on it?

While i'm not that interested in a full blown OS, some times i find myself really wanting to work on a new GUI stack for Linux (above X) but the time i'd need to put on it to become as i like it (which, incidentally, is very close to what you have here in your OS) makes me think that i'll need to basically do nothing else - and there are too many games i'd like to play :-P.


Hi Crinus! As you might guess, I've spent a large percentage of my free time over the last year on this.

Early on, I was unemployed and living alone, so I was putting 8+ hours a day into it, every day of the week. Progress was very swift.

Over time I've scaled it down as I've moved to a new place, rejoined civilization and started a job. Nowadays I'd say I'm doing 3-4 hours on weekdays and 6-8 on weekends.

I regularly record screencasts of my work and post it to YouTube. I find that it works amazingly well for staying focused and serious, sometimes I end up solving something I would like to give up on, simply because I don't want to abandon a video I've started recording :)


Yeah, one of my "plans" was to just wait until i'm between jobs again :-P.

I had't thought about using YouTube to help with focus. Though i wonder if it'll also "help" with making things feel more like work than fun :-P


I am curious - what motivates you and drives you to contribute so much to this?

I have been having a hard time motivating myself to do anything really


It's a blend of a couple things.

First off, it's really fun(!) and I'm learning a ton of things about software, hardware and even a little bit about people from working with the contributors who want to help out.

Secondly, I'm building an operating system that I want to use. The contemporary OS'es don't really appeal to me anymore, for one reason or another. I realized that if I just focus for a long time, I could probably build a replacement that looks and works exactly the way I would like instead. So that's what I've been doing.

Thirdly, it keeps me sane. I've had some serious problems with addiction in the past, and having something meaningful to dump all of my excess time, energy and attention into, instead of drugs, has dramatically improved my life over the last year. :)


What resources did you use to learn how to build something like this?

My previous pet project (for 15+ years) was an x86 PC emulator, so I had a very good understanding of IA32 and how an x86 operating system works, since I had written a CPU that could run many of them. I just never wrote my own.

With that knowledge, it was pretty straightforward to bring up my own little system. The rest of it comes from my experience in C++ systems programming which I've learned on the job while working on KDE, Qt and WebKit over the last ~15 years.

It's a bit hard to explain how it feels, but I'm building this system "from memory" much of the time. Visually, I'm recreating what I thought were the most beautiful things I've seen in computer interfaces. Architecturally, I'm building the best "Unix" that I can, while making use of modern C++ and other recent concepts like JSON, etc.


I've been following Andreas on Youtube for a few weeks now. His video on porting DOOM was my first foray into his work. His videos are very interesting if - like me - you have done plenty of web and app development, but less systems-level work.

Keep at it Andreas :)


Glad you've been enjoying the content! Porting DOOM was pleasantly straightforward yeah, here's the video if someone is curious what that looked like: https://www.youtube.com/watch?v=a0P_bB6wjhY

Amazing progress! Something I've always wanted to do but lacked the time, so i'll have to live vicariously through your updates.

I like the VB inspired editor, I have yet to find one that matches the ease of ise and power of old VB. Does your networking stack support UDP (and multicast)? Looks like a fun thing to tinker with as a VM :)


Thanks mysterydip! The networking stack supports UDP but not multicast (yet.) I'd like to think it's pretty hackable though, if you're interested in that sort of thing :)

>> I have yet to find one that matches the ease of ise and power of old VB

Delphi and Lazarus (open source)?


This is absolutely incredible!! Inspiring and awe inspiring. This is art and more. Thank you for sharing!

Looks like a fun project, all power too you for doing finding something that has kept you excited for an entire year!

How far have you gotten into bootstrapping Serenity OS? Is there a public "roadmap" for what feature you want to work on next?


Hey daxterspeed! I'm not sure what you mean by bootstrapping.. if you mean building Serenity inside itself, it's almost possible. You can build most of the libraries and userspace programs but the kernel panics when trying to build the kernel itself.. I need to look into why that happens, but it's just one many many things that need looking into :)

There's no roadmap of any kind, I'm just doing whatever seems interesting and useful at the moment. I've been working on LibHTML and the Browser app for over a week now though, and I suspect that's gonna be what I'm doing in the immediate future as well!


MAD PROPS to you!

Everything has been said by the other commenters but I still want to tell you that you're doing some highly inspirational work. An antidote to cynicism. It's nice to see someone doing something out of sheer love of the job.


This is a piece of art. I bow and take my hat off to you, sir!

Great job! Can someone please make a series of DIY CPU that can have a casual performance? I know this one is hard, but would be very satisfying.

RocketChip would be the obvious choice. You can run it (somewhat slowly) on an FPGA.

https://github.com/chipsalliance/rocket-chip


Thank you, I also like these projects built with ttl. They sound slow but still enough to render a non-js/html4 web page I guess.

Hi Andreas, thanks for sharing!

Do you have a mailing list? I don't have any social media and while I've subscribed to your YouTube and starred the project, it would be easier to keep up with a monthly digest vs. searching through commits and 20+ minute videos for the salient bits.


This is amazing. Truly impressive.

I know you said you post the YouTube progress videos, do you ever livestream the development work on something like Twitch, Mixer, or YouTube live?

Hey c17r! I'm not able to stream live at the moment due to my living situation, but I do regularly post recorded development sessions to my YouTube channel: https://www.youtube.com/c/AndreasKling

Check out the "OS hacking" and "Browser hacking" playlists for 20-60 minute videos of random development tasks all over the system. :)


Looking at the timeline, that's some rather impressive productivity, especially with only being worked on in spare time. Well done!

[flagged]


How much of "writing an OS from scratch" do you think you could've done within 1 year using all the tutorials available on the Internet?

Please provide links to some of these magic tutorials that makes developing an OS from scratch as easy as creating an iOS App. Like which part of "creating an OS" would you have tackled first, using which tutorial and how much time do you think it would take you?


So... To be clear, I agree that the task is monumental, and on this scale no tutorial will help (much like there is no "how to write a complete web browser" tutorial).

However.

> Please provide links to some of these magic tutorials that makes developing an OS from scratch as easy as creating an iOS App. Like which part of "creating an OS" would you have tackled first, using which tutorial and how much time do you think it would take you?

https://wiki.osdev.org/Tutorials > follow in order, take a few months, and you absolutely can write an OS.


I feel like I could pretty comfortably write sizeable portions of an OS if I invested as much time as the author of Serenity did. I'm not trying to talk up my own capability or downplay the Serenity author's achievement, I just think a lot of people don't realize that low-level programming isn't really harder, it's just different.

You totally could!

The individual tasks are not inherently difficult or challenging. It's something I'm frequently trying to explain to people, and a big part of why I started showing my programming sessions on YouTube: to demystify "OS development" as a concept.

The actual challenge is staying consistent and persistent, day in and day out, for a long period of time :)


Second that.

In my life I did everything from programming in pure machine codes (big device control, data processing an presentation system) to modern firmware to desktop apps with multimedia and high performance graphics to back end enterprise grade middleware like business process servers, publish subscribe, NoSql, etc. etc, To me they were not that different in difficulty. Just different scope techniques and tooling. For example by concepts message passing part in that machine code system and large publish subscribe looked very close.


You are underestimating the information that was available in the late 90s on the Internet. If anything, thanks to DOS game development and demoscene still being active, you could find stuff much easier than it is nowadays (there is a lot of material over the years that is sadly lost - especially when it comes to making some arcane "official docs" more understandable). In the late 90s as a teenager i wrote a small OS at my free time for my PC (running on real hardware) with its own assembler, compiler, primitive text-based UI (think TUI, not command-line) and documentation system (growing up on Borland tools i always liked how everything was documented and made a simple hypertext system since this is how i perceived real serious software to be - though in hindsight it had atrocious UX since there was no mouse as my PC had no mouse). My two main limitations were my lack of experience and limited understanding of English. But the knowledge available to me was abundant.

To be clear, I didn't build all of it myself, I've merged a couple hundred awesome patches from other people as well. :)

That said, you are definitely overestimating the usefulness of the available tutorials.


> non-Linux OS from the boot-loader to a running HTML browser

Actually he build from scratch a Unix like OS kernel (like Linux), TCP/IP stack, the userland, services, window server, window manager, 2D drawing library, UI toolkit, the HTML rendering library, the HTML browser and other apps.


Well it seems you are in agreement with me :). I have already implied that getting a web browser or some other user-space application running on a new OS requires writing all the other low-level components you have listed. Otherwise it might as well been a Linux distro, which I'm pleased that it isn't one.

A non-Linux OS is a OS that doesn't use Linux as its kernel. The BSDs, Redox, Haiku, TempleOS, SerenityOS and Fuchsia fall under this category which again also implies that it is done from scratch.




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

Search: