Andreas Kling, creator of SerenityOS and the Ladybird browser, writes about OS development, C++ patterns, and memory safety.
HN links it for the Ladybird browser announcement and his decision to quit his job for SerenityOS; commenters follow the project with admiration.
People can and have added extra annotations to C and C++ code for such things. Static analyzers can catch some use-after-free and iterator invalidation bugs at compile time. Problem is:
• They're opt-in instead of opt-out (meaning none of your system libraries or 3rd party dependencies have bothered using them.)
• What's been implemented in practice frequently fails to find bugs in relatively simple toy examples (I often confuse myself wondering why I've failed to turn some new bit of static analysis on, when in fact I have, and it's simply failed to catch even my demonstration bug.)
• The effective tools, on the other hand, tend to have "false" positives as well.
The conclusion I've come to is that to fully solve these problems in C or C++, you'd effectively transform it into a new language. And at that point, you might as well stop pretending that's not exactly what you're doing, and actually create said new language.
---
That said, when stuck using C or C++, static analysis and the compiler-specific half measures that are available are worth using, IMO.
• https://awesomekling.github.io/Catching-use-after-move-bugs-with-Clang-consumed-annotations/
• https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
• https://clang.llvm.org/docs/AttributeReference.html#lifetimebound
• https://github.com/MaulingMonkey/notes/blob/master/programming/cpp-inspired-by-rust.md
• `printf` type checking annotations exist, but don't necessairly work on MSVC. Often sanest to make your…
There are certainly "favorite" websites. You could use that as "sites that I use for professional work and track the latest features." Gitlab, Github, Gmail, and so on.
There are also the "Mom's cooking blog" that is running an ancient copy of Wordpress and mom still doesn't understand that <b><i>This is important</b></i> is not formatted correctly. Some browsers are able to handle this, but if you browse it with a "this browser only follows standard compliant html" you may get the entire page in italics or bold.
The article even acknowledges this - https://awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/
> Fidelity of modern websites in Ladybird is steadily improving, but you’ll often see lots of layout and compatibility issues. For example, here’s Reddit right now:
> (mangled layout)
We could put Reddit in that list of favorite sites that need to work. And so, is it the fault of reddit or the browser that the page isn't rendering right? As reddit works on other browsers, surely its the browser's fault and not something janky that reddit is doing that the other browsers happen to work with.
And thus my post - if a page works correctly in a different browser but incorrectly on Ladybird, to a user it is always the browser's fault.
It's not perfect (since its funding is mostly Google) but Firefox is my current browser of choice. It notably has very good support for blocking tracking and unwanted stuff thanks to uBlock Origin, which works best on Firefox according to its main developer [0]. And while it is funded with Google's money (which is a huge caveat), I still hope this changes in the future. Firefox could be funded differently. [By the way] maybe Mullvad browser is an interesting choice for this exact reason?
Other (independent) initiatives like NetSurf [1] and Ladybird [2] are on my radar. NetSurf has been around for a while; Ladybird seems impressive, achieving some great progress and result with little resources. I should actually try Ladybird more seriously when I get the chance, and maybe contribute if I find the time :-)
[0] https://github.com/gorhill/uBlock/wiki/uBlock-Origin-works-best-on-Firefox
[1] https://www.netsurf-browser.org/
[2] https://awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/
Hello friends! I'm the original author of SerenityOS and it's a lovely surprise to see it on the front page of HN :^)
This project has been quite the journey for me, from starting it from scratch ~3 years ago, to quitting my job ~3 months ago to focus on this full time. [1] It's also grown from a 1-man project into a bustling open source community with 475 contributors and counting.
If anyone has questions about the system I'm happy to answer them! I also have a huge library of content on my YouTube channel [2], where I've uploaded hundreds of videos of me working on the system in real time, and also monthly update videos (since April 2019) where I demo recent developments.
Our main community hub is over on Discord for anyone interested in joining development. [3]
1. https://awesomekling.github.io/I-quit-my-job-to-focus-on-SerenityOS-full-time/
2. https://www.youtube.com/andreaskling
3. https://discord.gg/serenityos
For more context see [1].
At first glance I felt that 100k wasn't really going to move the needle in creating a new browser engine but in fact (after reading the link below) it's not insignificant. There are a lot of contributers to this project, and funding the project lead is a big step in the right direction.
Realistically another browser engine really isn't needed. 2 is enough. Given the scale of the work involved it'll take a lot more than money to make this mainstream.
Bur that doesn't mean it's not important. These sorts of projects have value beyond main-stream use cases. While those uses are small, they can end up being significant.
[1] https://awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/
Have you been following Ladybird browser project?
From an early (2022) post:
https://awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/
> Q: Why bother? You can’t make a new browser engine without billions of dollars and hundreds of staff.
> Sure you can. Don’t listen to armchair defeatists who never worked on a browser.
...fast-forward to this month:
https://awesomekling.substack.com/p/forking-ladybird-and-stepping-down-serenityos
> Since then, SerenityOS has grown into a large OSS community with over one thousand contributors all over the world.
> Personally, for the past two years, I've been almost entirely focused on Ladybird