I highly recommend checking out his YouTube channel [0]. He's an _incredibly_ thoughtful person and provides good lessons in staying focused and keeping scope down.
I consider him a mentor and his approach to software is something I really resonate with. He has a keen focus on software quality but understands he can't make everything perfect in one sitting. This approach helped me get away from decision paralysis in my projects and at work.
This isn't even mentioning how much I've learned about software in general from his videos. Whether it's debugging kernel bootstrap assembly, porting doom, writing a live feedback GUI editor, implementing syscalls, to messing around with the dynamic loader. He's really got a video for it all.
And he tackles each video with such clarity and careful consideration. I really can't speak higher of the man.
Ed: i really enjoyed the video, but I feel it could have been even better (and shorter) if he used a proper debugger for the second part. But I don't know if that is available in the os.
The more I use a debugger, the more I realize I should use a debugger, and the earlier I should use a debugger.
Advice/directions to start early with a debugger might be the best part of Zed Shaws "Learn C the hard way". Eg:
(not a full featured chapter, but note that this is fairly early - exercise 4).
On a related note, it appears Shaw doesn't use the/any debugger at all in the ruby book, which is frankly quite crazy - ruby has great debuggers and repl. But that's a digression.
(Smalltalk and lisp does this very well - you can't AFAIK quite go that far with c++, but it's what all systems should aspire to, as a baseline (70s debug experience)
).
Debuggers are a great learning tool, but I’ve found they’re useless when diagnosing production issues. At best, you’re using C/C++ and after the crash, you get a minidump from a customer/server.
Eventually, I learned to write code that was so obviously correct and had such good error messages that I haven’t needed to use a debugger in a long time.
In fact, I don’t even know how to invoke a debugger for most languages I know.
Edit: The other good trick is to write your code so that it keeps enough state on the heap to extract useful information from core dumps. For instance, you can keep global references to lists of state that helps track issues down, and make sure they work as expected in -O3 builds. I have definitely played that game in the past.
Reminds me of the time needed to write an application that would be particularly hard to test (was critical, handled distributed state). Managed to write it so obviously correct, that I couldn't think of anything to test before releasing the clustered version. I only ever managed to find 2 bugs, both of which were silly and unimportant.
During development, I did use REPL to run/evaluate most of the functions, on 1-2 inputs, and found a couple of silly, immediately evident bugs. Development took a couple of days, testing was about as mentioned and I really didn't want to debug.
These days, I'm amazed how people can stand to write anything at all complicated in haphazard ways, but then get to spend similar or greater time playing whack-a-mole with bugs to maybe get most of the important bugs.
Yes, good tooling can make debuggers usable. OTOH, if you need debuggers, I would consider it a shortcoming of the programming methods/structures/styles and usually even entire stacks, where debugging is practically necessary.
Debuggers aren't quite as useful with C++ indeed. But that's a good reason to use C++ less. I diagnose issues drastically faster with a debugger all the time. Often I'll write a unit test that reveals a bug, but just looking at the code doesn't quite reveal where the bug is. But sticking a few breakpoints in the right places and examining the data structures directly makes it really obvious.
Eventually, I learned to write code that was so obviously correct and had such good error messages that I haven’t needed to use a debugger in a long time.
Nobody needs to use a debugger, just like nobody needs to use most tools. They're just very helpful when they work correctly and are used correctly.
I've spent much of my career debugging C++ in rather large code bases, after inserting said bugs myself usually. If you have a set if inputs that make the problem reproducible, a debugger usually makes finding the error trivial. The only times it has taken a while is when someone (not me in this case) has done something horrible with unsafe casts, ignoring data hiding to violate a class invariant, or memcpy, or... So basically old style C. Building for release with debug info helps. Debugging with a debug build is easier sometimes, but sometimes it masks or in rare cases, creates bugs.
Andreas has made a couple of videos about why he purposefully doesn’t use a debugger (which I can’t find now) but it’s related to how he prefers to focus on a whole programs behavior and work out what’s wrong from his understanding of what it’s doing by reading the source and logs.
Interesting. To each his own, of course - but in this one particular video, the print-debugging he does, might have been quicker and easier in a debugger (or perhaps with a core dump?). Then again, maybe not in c++.
I admit, I work mostly with ruby these days, which of course has a quite decent repl and debug experience (still whish it had full smalltalk style crash(missing method) > debugger > fix/add method > resume). Apparently someone did try that with python/rpython in the "topaz" ruby vm, but it seems abandoned. Maybe we'll get it for more languages via graal vm at some point?).
I'm used to fix and understand issues in big C++ codebases, and while eventually use a debugger, i feel that printing while passing is much better because you can see the bigger picture.
Is like putting a bell in each step so when the running bunny passes over it rings.
Later you see every place the bunny passes over and what it did, i feel its much faster to grasp and understand whats happening.
Debugging feels very slow, and i mostly use it to analyze core dumps. Also in multi-threaded/multi-process code it can change the result/output as other parts (like processes) might still run detached from the debugged thread.
Anyway, i don't like forced rules, you should use whatever works the best for you, because in the end we all have a intelligence to analyze things for our particular scenario much better than someone with a generalized point of view can.
We should always be open to learn and to see other perspectives but once we are settled we should also learn to trust ourselves and bend the "rules" when there's a need.
Multiple threads can change behavior, especially if it is a thread safety problem you are debugging. Debugging takes time mostly to reproduce the bug. If you had rr I think it might be as fast as using good logs.
There's a scene in Netflix's The Queen's Gambit where two skilled Chess players are driving to New York. During the monotonous drive, they decide to play Chess. But they do so entirely verbally, no board involved as they are skilled and are able to hold the boards state within their heads.
The best way to explain how I debug is through this metaphor. I don't need the debugger to know what's happening. I know exactly what's happening with my code. The only reason I use print statements is to know what's being returned to me through other people's black boxes. I don't want to be limited to one black box query per run, so I can add multiple statements exactly where I think the black box is being weird.
I use a debugger to step into libraries and other people’s code regularly. Irrespective of whether I can or cannot hold the logic in my end I don’t find it particularly useful.
I’m not sure why a useful utility is so polarising. It’s a helpful aid - like a chisel in a carpenter’s toolbox.
> Smalltalk and lisp does this very well - you can't AFAIK quite go that far with c++, but it's what all systems should aspire to, as a baseline (70s debug experience)
Actually that was were we were going to before Java took over the stage.
> I guess maybe maglev ruby on the gemstone platform does move the needle a bit closer:
For Ruby, "pry" gets you at least some of the way there with MRI. It's nowhere near the "full experience", but it has taken a lot of inspiration from Smalltalk, and it's just an entirely different world compared to IRB.
I should clarify; I specifically meant being able to do stuff like write a high level sketch of a module, then simply run it, and implement missing methods and classes as you go. Similar to writing a red/failing test - then filling in functionality.
I suspect a image-like (as in lisp/smalltalk image) view of the code is needed for this to work well (hence the link to "persistent code" for maglev/gemstone).
That said, I do use pry/byebug a lot - but I there might very well be features I'm not aware of.
Pry does allow that with some caution. You can dip into files from the pry prompt ("edit <methodname>" opens the right file at the start of the method definition) to add methods and reload a class ("reload-code" or "reload-method"), and if you want to you can relatively easily rig things up so you're thrown into a pry prompt on method missing, implement the missing method, and reload the relevant file and retry the call.
Though I'll usually have a "boot" file that loads all pre-requisites and just call functionality from a pry prompt and edit/reload as needed rather than try to continue from a method missing or exception.
This is why many IDEs have the workspace concept, as it allows to create a metadata database with the information that would otherwise be part of the image.
+1 on this! The game porting series is what got me into watching his videos.
Normally, I can't focus longer than 5 minutes on programming videos, but Andreas's are fantastic to watch! Porting Diablo was just inspiring to see, missing a syscall? No worries, we'll just implement it!
Not the person you're replying too, but I think you might find this video [0] interesting. He's describing his motivations and worries around making a web browser for SerenityOS.
A quote from that video (3:25) really stuck with me. He describes how he saw people joking online that the web-standards are so insane that it's impossible to build a new web-browser:
"The way I respond to that type of energy is to just really want show people that this is silly, not too complicated... mythologizing something that humans have done and humans will do again"
He clarified with a reflection on the hubris of it - new browsers can be made; not impossible; just takes an incredible amount of work taken a step at a time [1]. I really respect that.
Not exactly his thoughts on life _as_ a software engineer, but contains some thoughts on software engineering.
These are high praises and more than enough impetus to watch Andreas’ videos and check out SerenityOS. Thank you, all.
From tfa:
> With no drugs or other vices to pass the time, the days seemed impossibly long.
Is honest, resonant, and bodes well, but it’ll be work to convince myself this [0] is more like ol’ skool X than ~WinNT circa 2000 — it’s not making me serene atm.
Totally tangential, but I just checked out one of his "Cat Talks", looks like he's basically casting from his bed. BUT the sound was so well recorded I had to actually check to make sure the sound was coming from my headphones and not the computer or someone in the room even. Wow, really would love to read about his recording set up that he can do that from his bed.
Hey Andreas (assuming you're still reading these threads) I'm so happy to see you reach this point with Serenity. I remember seeing your project pop up here (early 2019 I think?) and just being absolutely blown away by the undertaking. What I love most about the project after following it since though is you've really shown it's absolutely doable, not only by you or superstar programmers but by folks willing to put the time in, and along the way made so many others realize this whether they contribute to Serenity or not. Your YouTube videos are absolutely great and there is just something about it all (probably the "under one roof" philosophy) that makes showing the "adding/fixing this little piece" so much more consumable. In short, thank you for doing all of this for not only yourself but everyone else now involved with the project.
Anyways I always told myself I should chip in for all of the great content over the years and so now I've joined your Patreon - here's to hoping more are able to as well and you can continue living the dream!
With all the FAANG and the Leetcodes and promotions and L6 - L7 TC and all of this nonsense, true hacker spirit and the fun of just building cool stuff with technology has gone from the hacker space. In fact, the hacker space is actually shrinking.
Projects like these and people like Andreas Kling, are a beacon of hope and light during these troubled times.
May more people be inspired with this and commit to the path of a true hacker.
Diversity and interesting things for one. It was just so much easier to find interesting things in the past, because everyone was trying to do something naughty in a good way.
Now you can't take a step without hearing people talk about how they are joining Slack or whatever with great comp as a Team Lead and building slow as hell software.
Pledge() and Unveil() in SerenityOS got me obsessed with using those syscalls in my software and moving my server to OpenBSD. Who knows, maybe soon I'll be able to host them on Serenity!
I just watched a couple of your video on participating in Open Source - like https://youtu.be/GU_ISkNml-A - and just read a ton of really nice things about you below and read your story.
And honestly I really have no idea how SerenityOS would relate to me or my company – but I do know that everything under the hood of our hosting and our clouds is Open Source.
So for sure I can say for just being an Open Source champion and an all around nice guy, for the next year at least, count on me personally at $100 a month (just did it in Github) and my company InMotion Hosting for another $100 month (just did it on Patreon).
Open Source constantly struggles with needing super talented professional but also struggles on how to make sure they make a good living. I know $200/mo isn't a lot when it comes to life, but hopefully it helps you know others out here believe in this kind of work and taking this kind of chance!
I also like those a lot, especially, Windows 2000, but the thing is that their aesthetic is also tied up in my memory with the period in my life when I was exposed to that interface, things I went through, hopes and aspirations and challenges and feelings... people didn't live through the 1990s or early 2000s don't have any of that emotional overlay; it's just another UI style for them.
Windows did have color accents, like the dark blue selection, it's just a bit muted and stale by modern standards.
It's a good idea to keep the chrome be chrome-like so color can be reserved for meaningful elements (like red for warning, green for safe, blue for selection etc.).
Notice that although end-user apps are all colorful and fancy these days, that most pro apps have remained very conservative, erring to light or dark gray and using color semantically only (think photoshop, 3dsmax, autocad etc.). This tells us something.
I really enjoyed the previous, more Macintosh-like Serenity design with the global menu.
I had genuinely freaked out when I rebuilt the system just after Andreas moved it to be more Windows-like: I ran Serenity browser and in the first moment it looked eerily like an old-school Internet Explorer.
XP and especially Vista looked sillier, with the constant need to update the UI to entice users to upgrade, but I think they did actually improve technically, "under the hood". And by the time we got the best Windows ever -- i.e, Windows 7 -- I couldn't even tell you what that looked like natively[1], because by then I was in the habit of installing Powertoys and using its TweakUI component to switch to a W2K theme[2] the first thing I did with any new Windows installation I got.
Versions 8 and 10 may be even better, engineering-wise -- 10 certainly crashes or hangs even less frequently than 7 -- but since they won't let you you fix the crappy GUI any more, their usability suffers much more than the increased stability can compensate for.
___
[1]: Pretty much like Vista, with that super-annoying "Glass"(?) transparency bumf as default... I think.
[2]: This, too, was whittled down over time. In XP, and I think in Vista too, you could set window border width to any value down to and including 0 in TweakUI. By W7, you needed to edit a Registry value to get this below 1.
"Windows NT/9x/2000 represented the high point for aesthetics."
I hope you are aware, that this is highly subjective?
(and maybe nostalgia related?)
Because I don't know any person who likes it, who didn't use it back then a lot.
edit: unsurprisingly notaware it seems. I advice to make a test : ask any person who did not use this aesthetic back then, and see if you find anyone who likes it
I'm unlikely to ever use this project, follow it closely or interact with the creator but it still makes me extremely happy to see someone working on a project like this, with the goals, motivations and context that Andreas discusses. Thank you for making the world a little bit better at a time when it feels so crazy.
He isn't against ISOs, the "there are no ISOs" is a Serenity-internal meme. The thing is that because SerenityOS moves so fast, it makes no sense to provide ISOs, they would be outdated within days. Also, Andreas and other top contributors have other things to worry about than keeping a nightly imaging system of some sort up and running. But if you (or me or anyone, even people inside the Serenity circle) were to make an ISO archive, nobody, including Andreas, would complain. It's just not a priority by any means.
Also, as mentioned previously, it's really not that hard to build it (even if you run Windows thanks to WSL 2). People are very willing to help you, and most of it is just waiting for the toolchain to compile (custom gcc and the likes).
Graphical Unix-like operating system for x86 computers.
SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.
Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.
It's generally aimed at being run on QEMU. But it can be installed on bare metal at your own risk. This [1] mentions:
> Current hardware support is extremely limited. [...] x86 [...] Most successful hard disk installations have been on Pentium 4 era hardware [...] 2 GB parallel ATA or SATA IDE disk [...] no support for USB but some machines will emulate PS/2 keyboards and mice in the BIOS via USB [...] having real PS/2 input devices is recommended [...] A minimum of 128 MB RAM and a Pentium III class CPU [...] No GPU suport [...] VESA BIOS [...] No wifi [...] only three network card chipset [...] The sole sound card supported is the SoundBlaster 16 ISA
The HW compatibility list [2] is pretty short also.
It runs pretty well on a Pentium 4. I wrote the Starfield screensaver for Serenity (poorly) and it pegs the P4, for what it's worth. It's runs great in QEMU on any modern CPU.
I've netbooted it on my ASUS A7N8X Deluxe motherboard with an Athlon XP processor and 1 GiB of RAM (~2003 era). I haven't tried older museum pieces, but the unofficial CPU requirement is a Pentium III-class CPU or better.
It warms my heart to see someone that is skilled, passionate and patient to pursue a project like this full time. True hacker spirit lives on.
The only other effort like that has been on my mind for a long time is bcachefs that is mostly churned on by a single developer slowly making progress and aiming high.
I could only wish the very best to people and projects like this!!
As someone who also traded drugs for programming, I find this incredibly inspiring.
Programming has become my purpose and the thing that brings me joy. Unfortunately, they way I have to program at work really sucks the joy out of it. I would gladly take a pay cut to be able to work on things and in a manner that bring me joy again.
Unless anyone can name a counter example it's probably the most advanced open source browser engine except for the WebKit family, the Gecko family, and NetSurf. Never mind the whole OS - that alone is worthy of Andreas being able to work full time on the project!
Don't know about SerenityOS' but Dillo (predating even NetSurf) is pretty nice minimal browser with independent layout engine and there's Abaco (for Plan 9) which supports most of HTML4. That said from your list you miss KHTML (WebKit's parent; have diverged significantly since), Trident, EdgeHTML, Presto, and of course, Servo. All without doubt advanced engines. It's disappointing that both Microsoft and Opera didn't open sourced their own after retiring them.
Edit: Oops, didn't see the "open source" clause. So Trident, EdgeHTML, and Presto don't count.
Not to make it sound any less impressive (because it truly is an amazing effort) but it's basically first place there simply because the criteria excludes every other like engine better and there is no remaining option that's worse. Well technically (the now deprecated) KHTML is missing many of the things now supported but that spawned the "WebKit Family" so I don't think that counts (and it supports other things Serenity's doesn't). Well Lynx might actually be behind in compliance... but it's not exactly aiming for the same goalpost.
I see your point. I guess I was trying to make the point (that perhaps everyone on HN is already aware of) that there really is an incredibly limited number of active browser projects even marginally capable of being used for the modern web so any new one deserves huge support.
But I've been told by Hacker News multiple times that developing an independent browser is impossible without the means of a multi-million dollar corporation.
I mean, it kind of is. You can make a basic browser, sure, but you'll have a hard time implementing video playback, canvas, JavaScript and everything else, while also delivering good performance and rendering everything accurately. Yes, I know his browser has JS support, but the performance is likely at least an order of magnitude slower than V8 or Firefox... And then there's CSS, and the fact that HTML, JS and CSS keep growing and having more functionality added every month. That's not to minimize his accomplishments, browsers are just immensely complex pieces of software. Complex enough that Opera killed their own browser engine because they didn't have the manpower to maintain it anymore, and are now using WebKit.
All of that being said, it all depends on your expectations. You can totally make a browser that is capable of going to web forums and posting on Hacker News, browsing the SerenityOS website and maybe even Wikipedia for instance. If you want to build something that supports pre-2005 HTML/JS, that's probably quite feasible.
Sure, but like I said, having some JS support is one thing, building a fast JS engine is another. The same goes for canvas, I mean, you have to realize, there is WebGL support on the web now, but also the Web Audio API, WASM, etc. It never stops growing. There's even talk about adding machine learning features to WASM.
Again, this isn't to minimize the accomplishment, this is great, it's just to say, while building a hobbyist browser must be fun for sure, and I'm sure this browser can be useful to browse many websites out there, particularly if said websites intentionally restrict which HTML features they use. However, it's probably not realistic to think you could compete with the commercial browsers. They have dozens of people who have been working full-time on those projects for two decades and they are constantly adding new features.
I think if Andreas Kling was here, he would probably agree. I'm sure his goal was never to replace Chrome/Firefox or compete with them, but rather to learn, educate, and have fun. I congratulate him on his success and for reaching the milestone of being able to sustain himself from his passion project.
Just a nitpick, but I'm pretty sure Opera was gutted of engineers as well after their acquisition fiasco with that Chinese outfit. I don't think they had as much manpower as the good ol days AND not enough manpower to compete with the old engine.
I'm on mobile or I'd go find a source, but I'm fairly certain some key people left before all that went down.
Not that maintaining a web browser is easy, but they WERE doing it, to varying success.
It's not just Opera though. Microsoft Edge is using also Webkit. I'm legit worried that if Mozilla ever tanks, we could have a complete WebKit browser monoculture.
Sure, I wasn't addressing that though. I just meant that it's a little inaccurate to say Opera couldn't do it because of the turmoil and turnover, and that's on top of the fact that browser engines are immensely technical projects.
I'm worried about that as well, but it's not really fair to attribute blame to most people at Opera, especially prior to the China thing. Things were okay there for a long time before that.
> if Mozilla ever tanks, we could have a complete WebKit browser monoculture
Not a risk. Chrome dominates, and it uses Blink, not WebKit. (Yes, the distinction matters, and no, it is not a distinction that is minor/negligible/insubstantial.)
Yes, it matters a lot. One of the reasons people want open source is to be able to "fork away" from a popular project, if the leadership team of that project takes a direction that people disagree with. Obviously this goal is impossible to meet, if the project is closed-source, or has an onerous license.
There is another cost that people don't talk about as much, and that is the cost to understand a large, alien codebase enough to be able to understand and change it. If the effort to contribute is too high, you can't get a second group of programmers to rally around the fork, and the new project will fizzle.
As an example, Google understands the economics of code very well. They know that there is little threat to market dominance for them to release Android or Chromium as open source.
It'd be quite a huge and significant step in the web becoming a single stack or implementation, rather than a set of open standards with various interoperable implementations.
Like telecomm, wifi, and USB standards, web browsing protocol standards are deliberately overcomplicated as a way to legally fend off competition. Anytime a big corporation gets its hooks into a Standard, one can expect its complexity to grow forever unless an individual at said corporation prevents it.
IMO, it's more that the standards are overcomplicated as a result of (unhealthy) competition. This is maybe less true now, but my impression has been that until recently, Firefox and Chrome were both always racing to implement some new proprietary feature before the other browsers could design an equivalent. There were no standards. In fact, even before that, the way JavaScript was created is that Brendan Eich, at NetScape, implemented it in two weeks. The same was true of many other browser features, they were rushed into production in order to outdo other browsers and have this new feature first, and then everyone was kind of stuck having to support every half-baked feature because some websites made use of them.
It’s probably not so much deliberate complexification, as reluctant simplification. The system will become complex all by itself when there is little pressure to streamline it.
Truly, while the web also now being better than at the time of activex and flash etc. I’d wager the only rescue for a new free non-WebKit would be simple ways to use external programs - maybe yet a challenge for language design.
Every time I hear V8 mentioned, people talk about it like it's some sort of sacred tablet given to us mortals by Lord Google. It's good, but its just another interpreter/compiler.
Just because you don't like cult around it, doesn't mean you have downplay V8. No, it's not just another interpreter/compiler. V8 is an incredible feat of engineering.
Depends on what is meant by "browser". Browsing HTML is not too difficult.
There is no rule that says a "browser" must match Google's in-house Chrome or its outsourced Firefox (all salaries of Firefox developers are currently paid with money from a deal with Google).
Look at how many browsers exist already for Gemini. How many were funded by advertising. Probably zero. The multi-million dollar corporations have a vested interest in keeping the notion of "browser" so complex that independent authors cannot even contemplate it.
Even if you somehow manage to fully implement all of JS with decent performance, you will finally hit the wall with video DRM - your users will never be able to watch Netflix, for example.
Widevine is the first DRM to be really open to be ported. They suck the least of all DRM systems. This is the DRM used in the Chrome browser and Firefox. I think it would be possible (not easy, or logical, but possible) that Serenity Browser gets Widevine at some point.
Eh, it kinda is. The Serenity browser has seen a huge amount of grassroots development work that most projects couldn't dream of and it's still quite a way off usable for what most people consider every-day browsing tasks.
It's so refreshing to see a from-the-ground-up built hobby project like this. We need more operating systems that don't track users, show ads, or have decades of accumulated ~~cruft~~ backwards compatibility. The design goals will appeal to anyone who was into computers back then. Well done. Doing all this in 3 years is impressive and inspiring. I think you won't have to worry about sustaining your family much longer ;)
Running this on real hardware would be great. Future weekend project...
> While at Apple, I really enjoyed how most of the software was made under one roof. Not only did this enable super tight integrations, but it made the system extremely hackable for its developers, and you could always find the experts somewhere nearby. I thought I could try bringing that same feeling to the open source world, so I decided that SerenityOS wasn’t going to be a patchwork of packages – no, we’re building everything ourselves! From kernel to web browser, and everything in between.
Following this for almost 3 years now, it really is an amazing achievement. His YouTube streams are very helpful in learning a lot about Systems, Unix and good programming methodologies. Cheers to him for taking the leap of faith!
The more I see those small graphical OSes like this one, Kolibri, etc. the more I wish they were ported (or better conceived from the beginning) to be run on ARM systems. Those small cheap boards with video output would find the best possible companion when bare metal programming is too hard and a full fledged Linux distro would be overkill. Give me a compiler, then libraries for gpio and hardware, GUI, low level networking, etc. and I can choose between a huge load of cheap boards to build a lab instrument panel, my new home IoT dashboard, a portable communication device, a music synthesizer, etc. It looks to me as those two worlds are in need of each other but they don't know that yet.
I've been working on a hobby OS for a while now; I don't expect to ever do any major graphics work[1], and I do want to run on ARM eventually, but it's just so much easier to get started on x86. x86 has a lot of baggage, but it also has a rather simple text mode, and easily accessed serial ports which get output easily. And there's a whole bunch of freely available documentation from Intel and the community that helps a ton.
[1] At some point, I probably have to do bitmapped text, but I'm trying to keep my scope narrow, and graphics aren't for me. :)
Some among the cheaper boards are much less capable than the RPi4; 256 or 512 MB RAM can indeed run a tiny Linux desktop, but for some uses it would struggle for lack of resources. A single user system with no layers of code devoted to security (which would be pointless in non connected devices) would probably be a lot faster on constricted hardware. The goal of such a system shouldn't be to replace BSD or Linux, which do what they do extremely well, but to offer a smaller tinier system for those contexts when the basic functionalities of an OS are needed without the inevitable bloat that comes with security and support for beefier hardware and/or more complex software. "It couldn't run LibreOffice? Who cares! If I wanted to use it for that I'd use Linux instead."
I mean, If I want to build say a fully autonomous portable software defined radio that boots in a handful of seconds straight to its GUI on a very small board, I'd have a hard time doing that with a full Linux distro, no matter how optimized it is, since it still is a full UNIX-like OS with all the bells and whistles that would make it runnable on a supercomputer.
I think that those small OSes could potentially fill a gap between smaller things such as no OS at all or smaller ones such as FreeRTOS and complete Linux systems, but to really appreciate them they should also run on hardware such as ARM, RISC-V, etc.
I'm somewhat skeptical of the usefulness of 16 and 32 bit software : 8-bit is simple and can do ASCII, sRGB... while 64-bit is enough for the foreseeable future, but in-between ? You're just hampering yourself for dubious gains...
Those are my own opinions as to why. Plenty of people are working on those systems, so obviously there are plenty of people that have different opinion.
They are too big, and well established projects.
I cant just plop down over a weekend and make some kind of meaningful contribution. Most of the low hanging fruit is already dealt with.
Those are great systems to work with, or if you want to build on top of. Not that great if you just want to hack on core system.
It's not that you can't because people definitively are. But expectations are bigger, scope is bigger, you need to keep multiple architectures in mind, people will use it on all kinds of hardware. You need to coordinate with dozens or more people.
> SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core.
More like a love letter to Windows 95 :) It doesn't really have much in common with the Unix GUIs available around that time, which were mostly Motif-based (think FVWM, CDE etc).
In fact it looks so Windows-like (including the applications) that my first impression was that this was another go at making something like ReactOS. But clearly it isn't.
It looks nice though I was never a big fan of the W95 UI. I'm interested to see what it's about. I'll give it a spin.
PS: Fair play for being so open about your addiction. It will help other people face the problem too.
Andreas is the best part about this project. He's just _nice_. He's a good person. It makes me want to contribute and work with him because I feel like I'll learn from him.
OMG. That reminds me of the Xen dude, of a potential hire at a startup who demanded "make it a big number" salary, and countless people who know some about one domain assuming their ex-food doesn't emanate odor.
Also, there's the sociological fallacy of assuming the biggest jerk must be the most talented, when it may well be a façade to impress people. There are some talented jerks, but all the talent in the world doesn't matter if no one will work with you.
you cannot be more correct. too many elite programmers are not only jerks, but also selfish egoistic masochists who deny any right to others to be wrong now and then, while still fit for work. yet - same jerks often complain having difficulties finding help (typically overseeing the quite obvious reason for it).
no, this is not a hate comment, but a sad one, as rarely people ask why so many opensource projects are led by single person, and very rarely by more than 3 active developers. maybe it has to do with the fact that arrogant top-notch jerks also like to showoff as they expose narcissistic traits and opensource is a good venue to do so.
perhaps also because is difficult to argue with total jerk (have you tried). or convince him/her/they/them that your not-so-up-to-the-standard code is still worth, and that in reality most of the code running the world is a total mess (for various reasons) but still runs (for various reasons).
the gift to be able to work with nice people that also develop nice code is close to blessing.
I think you're onto something about showing off. You just won't hear as much relative to their importance about the projects led by entirely uncontroversial people who don't care about attention.
Another aspect is that in a lot of disciplines, a certain level of maniacal persistence increases your chance of success. To take the "mythical" 10k hours to mastery, it's a lot easier to get to 10k hours if you're not spending time getting in 10k hours of socialisation.
I say this as someone who myself would much rather code than spend time socialising most days - it's certainly not meant to imply that everyone introvert or who spends most of their time coding are assholes (that'd implicate myself...), but that there's a level of correlation between being good and spending lots of time practising and not spending as much time thinking about social niceties, and not everyone manages to strike the right balance.
what i also tried to say, but maybe could not do so well... is that opensource is not about being open to people or acting democratic. surely there are many nice ppl behind opensource projects, but that does not make these projects inclusive.
also there is great number of great people that are very great at coding and not so great at communicating with other people.
so what is emphasized here in my comment is that the kind of opensource project that is inclusive and led by s.o. who knows how to express empathy and has time to also be involved with other people is more valuable as a community effort.
not going into discussion whether openssl is better of with one single dev or not, whether sqlite3 is more important than a serenityos etc.
Programming in assembly is like playing with Legos. Last year I started creating my own pet OS in a Bochs virtual machine, compiling with nasm. Created the boot loader and UI, but then realized what I really wanted to implement wasn't the low level layer.
For that reason I placed the project aside and moved to the highest level, creating a distributed command-line console in Javascript that connects to Node.js based servers. If I ever complete my dreamed OS then I can either translate it into assembly, or build a JS interpreter.
At this point the console allows creating programs with UI controls, launch processes without blocking the console, and terminating them just clicking a button, as well as connecting to other servers to perform tasks.
Wow that's freaking awesome. First time I saw this project was years ago on 4chan's technology board. I remember the progress reports and videos on the Daily Programming Thread. Now it's here and has become a full time job for the developer. Must be awesome to be able to work on stuff like this.
Not many hobby projects of any kind for that matter. IMO he gets this kind of support not just because of the value added by SerenityOS itself, but because of the value he adds by making YouTube streams and other content. People feel like they can learn a lot about programming from him.
It doesn't. He says it brings in $2000/month and that this is not enough to sustain his family, but he hopes to increase it.
It's nice that he's able to indulge in this kind of hobby programming, but he must have an incredibly generous and understanding family. Clearly he can hold down programming jobs at major tech firms and could therefore give his family a much higher quality of life than $2k/month will bring, but chooses not to. Well, OK. I'd like to write an OS too, but my family has slightly higher expectations ...
While I'm hit heavily by nostalgia looking at this UI and I actually appreciate the simplicity and utility of it, I think it would've been nice to bring it in the 21-st century by making it vector-based and scalable, so it works on modern displays. Gone are the days when all displays had the same DPI around 100, and we could craft things out of single pixel bevels.
We just need good, legible displays. And modern tech delivers. But the software needs to match.
Hello. Something to consider is that for some people big, or even medium-sized, projects and goals aren't a great fit. Some people are wired to constantly be dabbling and exploring. If you're failing to meet the goals that you're setting for yourself and then beating yourself up about it then it's worth considering a different approach.
Of course this can be easier to do in your personal life than in your work life; often at work someone else is setting the goals...
On the other hand, maybe I'm reading way too much into a couple sentences from a stranger on the internet and this doesn't apply to you...
There is a popular book that talks about accepting and embracing life as a dabbler and explorer called Refuse to Choose. (Personally I wouldn't buy it because then I would just feel bad about not reading it, but my wife told me about some ideas in it and it seems reasonable...)
From 3 months rehab to build an os and more. That is just outright incredible. Maybe the boring day job before lead to the addiction. Anyway an insane comeback.
I’ve been following Andreas and SerenityOS since the very beginning and this is absolutely very cool news. I am so psyched to see where SerenityOS will go!!
Don't know if I am hacker minded enough to take a look. But he has a point though... no-nonsense and a straight forward GUI back on the menu would be great. I hate how I am held hostage by shitty designer ideas. I am a power user.
Haven't heard of this project till seeing this post.
Checked out his youtube channel and the video on porting Diablo to SerenityOS in an hour is pretty interesting to watch if you've ever wondered what its like to port software.
i was surprised about the c++ choice, considering all i've read on the subject about its supposed issues related to memory management ( i think related to destructor ?) or complex features that made it unfit for OS development.
i've reed a bit of the faq and it seems Andreas originally thought about using C and then realized it wasn't a good idea.
Hi Andreas, I'd love to interview you sometime about addiction. Sounds like you have a strong perspective and are comfortable sharing your story. I'm still rebuilding things so I won't be launching my media production company for another year or so but I'll probably reach out on Twitter someday ;)
Congratulations Andreas, I've been working my way through your entire history of videos and loving it. I just doubled my monthly sponsorship, can't wait to see what's to come!
Congrats. It's really heart-warming to see the community supporting someone like this who is working on interesting projects and who is generous with sharing their knowledge and their code right back.
Watching even half of one of the videos, it's clear that Andreas is thoughtful individual with a talent for explaining things, who has managed to gather a vibrant community around him. This is such an inspiration that I headed right on over to patreon and signed up, too :)
Bit by bit indeed! The birthday posts here give a nice overview of how much the system has evolved over its couple years of existence: https://www.serenityos.org/happy/
The monthly progress videos are also nice in that regard.
Apart from lack of coo-processor (which I understand), I do not understand why nearly ALL modern operating systems(Including Linux since 2.4 I believe) are hard-coding the kernel to not boot under 4/8 MB of RAM, even if it could in theory.
Why there is hard-limit of 4, 8, 64 MB of RAM in many kernels of various operating systems?
Is it fail safe "just to be safe" or because there some internal routines, vector tables that REALLY requires 4MB ram to work?[memory partitions/blocks ?!]
Possibly because the ISA memory hole starts at the 15mb mark? So if you want your kernel to be contiguously loaded to real memory, then as soon as it becomes possible for it to be more bloated than 14mb, loading it at the 1mb address becomes less appealing? I'm not sure why it matters though since a kernel can be loaded directly to virtual memory, in which case it doesn't matter how much ram there is, so long as there's enough ram.
Thrilled Andreas has managed to receive enough community support to be able to take this big step and is able to focus on Serenity OS fulltime.
SerenityOS is an inspiring from scratch grassroots OS effort which plans to build the entire POSIX OS, Kernel and core Apps from scratch, one of the Apps their is their LibWeb browser engine complete with their own LibJS JS VM which already passes the ECMAScript test suite. One of its USPs is that the entire OS is contained within its single source tree where anyone can make changes to its code-base and instantly reboot the OS in seconds with the changes, never seen this done for an OS before, the turn around time allows for some impressive dev iteration speed.
A good preview of this hackability is in his Diablo port, whether it's missing C++ APIs, unsupported lang features, missing SDL port impl, toggling kernel features - it all gets done in 1 sit down session to produce a shiny new Diablo port:
Andreas videos on developing LibWeb/LibJS is one of the best resources I've found explaining how to implement a multi-process web browser, e.g. in this video he goes through the HTML Specs which have enough info in them to develop a HTML spec parser whose behavior is the same across all browser engines:
It's been awesome to see LibWeb/LibJS evolve over time, every time he sits down it gets a bit more capable. Typically it's to implement features for rendering a different website. Here's a nice example where LibWeb gains missing JS APIs (including eval) to render "Canvas Cycle" JS demos:
With full control over the entire OS, Kernel, GUI, etc. It's got lots of tightly integrated innovative features like its GUI GML language for creating native UIs where he creates a GML Playground in this video https://youtu.be/1QYBvTy9QKE then uses it to be build the OS's new Font UI Picker dialog in the next https://youtu.be/Fa9SwYfH2NI which is now so sophisticated that the WidgetGallery has been converted to using it https://github.com/SerenityOS/serenity/pull/5741
Since Andreas is so productive he's the only developer who I'm able to watch live coding which makes for an inspirational background score whilst coding, his commentary explaining his thoughts whilst he codes is so informative that they're basically HowTo's on how to implement each OS/App/Browser feature.
The OS work is fantastic, and a feat for sure. But his personal story of triumph over vices is more compelling to me. I recall his interview on the C++ podcast, he's got an amazing story.
1. Start with a QEMU emulated device. QEMU is more forgiving than real hardware and you can study, understand, and debug the "hardware impersonation side" of the QEMU code to see what happens when you set a bit in some register.
2. Pick a simple device. Don't start with the USB stack or Ethernet. Maybe try to reimplement the UART driver first.
3. Don't freak out about "device driver architecture" stuff like whether you need lock-free queues or allocation-free algorithms or ring buffers or... whatever. Just get it working.
4. Write a userspace program that uses the driver you'd like to see working. That'll motivate you to finish it.
5. Repeat. Until eventually you know how to write device drivers. :)
> 2. Pick a simple device. Don't start with the USB stack or Ethernet. Maybe try to reimplement the UART driver first.
A UART driver is great; then if you want to do Ethernet, virtio-net is a good start, and then carefully pick your physical ethernet card; something descriptor based will let you reuse the descriptor concepts you already learned. Realtek cards get a lot of shade, but aren't too bad to interface with and they're very popular; if you've got a bunch of computers, you've probably got at least a few realtek nics. Ethernet is cool, because then you can start communicating with the world (although there's a lot of stuff to get tcp going)
It seems to only target very commonly ported and generally understood hardware, and not many things. 32bit Intel, no arm. Bochs VBE and Intel graphics, e1000 and rtl8192 nics. They're very sensible targets as they'll let you run with event performance on most virtual machine platforms as they're commonly emulated and mature.
It would be cool to have something similar but specifically targeting Raspberry Pi these days. There you don't have a lot of variability either, and it might even turn out useful relative to its "bigger" (or "bloated"?) competitors.
Sadly Pi has some significant IP blocks that don't have open manuals or permissive drivers to work from, so targeting it for a home brewed OS is extremely hard work.
Here's an example with the NE2000 network card (PCI only). I've tested it both on QEMU and with a real RTL8029AS card. Probably the most important thing is quality, RTL-level reference documentation. When you hit a dead-end, having a battle-tested Linux or BSD driver to peek at helps a lot, because hardware has quirks and the documentation might not tell the whole story.
SerenityOS currently doesn't have a lot of tooling to help debugging drivers aside from kprintf() and kubsan. Other operating systems may offer more advanced capabilities, such as NetBSD's rump kernel where you can run drivers in userland for example.
I'd like to give it a spin but not sure I want to build this from source. Would be nice to include a downloadable boot image (let me know if there is one I couldn't find).
> Whilst it is possible to run Serenity on physical x86-compatible hardware, it is not yet ready to be used by non-technical users who aren't prepared to report bugs or assist with its development. For this reason, there are currently no pre-built install images so a bare-metal installation requires that you build an installation image from source.
> There are no ISO images. This project does not cater to non-technical users.
And I also found the reason for it being 32 bit, which feels rather quaint..
> Why is the system 32-bit?
> That's what Andreas was most familiar with when starting out. There's some interest in supporting 64-bit systems and that will eventually happen, but it's just another feature.
Sure, I'm not a non-technical user but I feel like setting up a build environment and building from scratch is more than the time investment I'm willing to make to evaluate this project.
Just want a disk image to plop in Qemu or VirtualBox or Hyper-V to see what this feels like before I delve in the code.
> SerenityOS does not have nightly builds or ISO images.
> This is a simple proof-of-work system designed to prevent low-quality bug reports and tire-kicking.
> The build is completely scripted and can be performed by anyone familiar with the command line. [Smiling Face with Smiling Eyes emoji][Lady Beetle emoji]
I'm surprised that either anyone actually uses such an OS (beyond toying with it), or that there are enough people willing to pay without using the OS.
Andreas has been making videos (https://www.youtube.com/c/AndreasKling/videos) sharing his journey: technical ones working on some part of the system, as well as more personal ones talking about his philosophy, struggles and moments of joy.
I'm just one of many but I'm guessing his sincerity combined with his technical abilities make it all very compelling to watch and contribute with money or code, even though the system isn't at a point where you would want to use it.
Basically: it's a fun, open, ambitious project whose story is being told mainly through videos, with a kind and interesting person behind it.
Personally I want to encourage a very talented developers continued development of his ambitious SerenityOS vision whose journey is thoroughly documented in his YouTube channel which is an amazing treasure resource for learning how different parts of the OS/Kernel/GUI/Browser/JS VM/x86 Emulator/etc are implemented.
At first I never expected SerenityOS would ever be advanced enough to use, but seeing how much it has progressed and the active community that's garnered around it has made me a believer.
Up until now he's been developing as a side project, I'm excited to see where he can take it working on it full-time.
Probably not much practical use, but that's not really the point. Some may learn from it, some will draw inspiration from it, some just want to support the author and some probably just think the world is a better place with projects like this in it. Think of it as the technical version of supporting the arts.
Edit: unfortunately it looks like that's basically all you've been posting to HN. We ban such accounts, so I've banned this one. If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future.
I'm a relatively vocal atheist, but Serenity Prayer is a pretty useful/accepted creed to live by if you can get over the very first word, so I can't say it bothers me much; and while I realize there's one other OS that's much more explicitly religion-oriented, I'm not sure it's quite a significant pattern yet...
"(God), give me grace
to accept with serenity
the things that cannot be changed,
Courage to change the things
which should be changed,
and the Wisdom to distinguish
the one from the other."
He opened with the explanation of doing this after coming out of rehab for drug addiction - I wouldn’t say it is related to “religion”, rather a nod/reminder for himself in why he’s doing it. Nothing beyond that it seems.
"You know the secret? The difference between heaven and hell? It's, like, doing your work. You feel really shitty if you don't do your work. If you do your work, it's fucking awesome."
The majority of the human population is religious. Software is generally created by humans so it doesn’t seem unlikely that some of that influence would rub off on their work (same as any other work of art really).
Fair enough Dan. I do have a tendency to walk the line but I like to think I'm reasonable enough to know when to backpedal. Apologies to yourself and Jagger. I'll try and be nicer.
I'm not sure what you consider bold about the assertions so it's difficult to expand. I am certainly not the sharpest tool in the shed, and I'm religious, so that provides at least circumstantial evidence for my initial statement.
Do you think I should consider that atheists could be dumb too? Most of the ones I've spoken to seem fairly convinced that they're reasonably smart.
It’s clearly not about the money and more about the accomplishment. Serenity isn’t centered around commercial objectives, the entire project is about promoting the community hacker spirit for fun and exploration.
Because SerenityOS’s single, young modern C++ code base is so hackable it’s a lot easier to understand how everything works.
Here’s an interesting analysis by Live Overflow who discovered a kernel exploit with ptrace explaining that SerenityOS’s code base is ideal for learning about OS’s because it’s much more readable than Linux’s code base. The whole analysis is very interesting and provides great insight into how kernel exploits are discovered:
It’s just a token amount that qualifies as a bounty.
No one is doing it for the monetary value, it’s a token prize offered when succeeding in discovering a vulnerability. Did you watch the video? LiveOverflow is a YouTube channel dedicated in discovering security vulnerabilities who explain why SerenityOS’s code base is a great code base to study for this.
I consider him a mentor and his approach to software is something I really resonate with. He has a keen focus on software quality but understands he can't make everything perfect in one sitting. This approach helped me get away from decision paralysis in my projects and at work.
This isn't even mentioning how much I've learned about software in general from his videos. Whether it's debugging kernel bootstrap assembly, porting doom, writing a live feedback GUI editor, implementing syscalls, to messing around with the dynamic loader. He's really got a video for it all.
And he tackles each video with such clarity and careful consideration. I really can't speak higher of the man.
[0] https://www.youtube.com/c/AndreasKling/videos