An unofficial, read-only Hacker News reader.

Ladybird is now in alpha (opens external site)

2474 points by janvdberg 5 days ago | ladybird.org | 747 comments on HN

View full thread · View on Hacker News

Comment thread (106)

  1. This actually worked amazingly well.

    I tested a lot of sites.. a few that were already opened in my firefox, and a few many others.. Every single one of them rendered correctly.

    This is truly amazing.. a new browser written from scratch that actually works!

    The only minor issue: page scrolling is a bit jerky.. not much.. just a little bit.. it's noticeable.

    A huge lots of congratulations to the Ladybird team. What a wonderful accomplishment truly this is.

    Replies (12)
    1. Also mine is sipping on 53mb of memory with multiple tabs open - pretty awesome. I hope it avoids eventually turning into the type of experience I have with chrome and firefox where the browser ends up consuming 20gb of memory and has to be restarted periodically so I don't run out of system memory.
      Replies (6)
      1. According to the Ladybird Discord, you're likely only measuring the root process there. Each tab is a separate process.
        Replies (3)
        1. at least in osx i havent noticed other processes - have you?
          Replies (3)
          1. I can't find them in the Activity Monitor, but if you open Ladybird's own task manager from the inspect menu they are there.
            Replies (1)
            1. Ah ok... I must have been mistaken then - in Lady Bird with 5 tabs open (one of them a youtube video playing) - Lady Bird's task manager says it's using 2.2gb of memory.
          2. Here's a script that shows the process tree for Ladybird: https://gist.github.com/simonw/b9162f1741b96fea72b11c300b749...
          3. you have to put activity monitory into `All Processes, Hierarchically` to have the children nested, you can then see all of them. (assuming you are using activity monitor on osx)
            Replies (1)
            1. TIL ... Why is this not a button/dropdown...
        2. Yeah I get about 500MB for an Instagram tab (don't use it but just tried if that opens and it does) and 200MB for the Hackernews tab. Still pretty impressive.

          And the base UI needs 250MB of which 120MB are shared mem.

        3. Yea, my testing shows ~1.1GB ram used by YouTube (relative to ~330MB for the same tab on Firefox). Though this isn't a fair comparison by several dimensions (since Firefox ~1GB used shared memory for stuff like the GPU process, while Ladybird was only at ~200MB ram), and I had an adblocker installed on Firefox but not Ladybird.
      2. Browsers are runtimes and webpages are apps. They just happen to be apps that are dynamically fetched over the network and are packaged as HTML/CSS/JS instead of as PE/ELF/Mach-O binaries.

        Runtimes can have bugs or inefficiencies that cause them to use more memory than strictly necessary, but by and large most memory problems are the product of the apps (or webpages) themselves.

        Replies (6)
        1. > Browsers are runtimes and webpages are apps. Surprised to see that.

          I've been championing this mind set for nearly 20 years now. The message was more clear in the Flash era, but once you realize that your webpage is an (/a desktop) application that only happen to live in a browser - it makes a lot of reasoning and designing a lot easier.

          Replies (1)
          1. > I've been championing this mind set for nearly 20 years now.

            I don't want to tell you you've wasted your time but it's fairly obvious that webpages are sometimes documents, sometimes apps and sometimes a hybrid between the two. For example, YouTube is clearly an app, but a webpage written predominantly in HTML and CSS is much more of a document than an app.

            Replies (2)
            1. You sir, you would be fairly dumbfounded to find that most people think that webpages are for showing trivial things founded on the backend side of them applications. Like when you want to change a filter on your amazon page and it suddenly give you a different page altogether, you know?

              Continue this thread (2 replies) →

            2. how do you define a document?

              i'm not trying to be glib, i get what you mean, i just wonder if you have an actual criteria. I've been struggling with this from time to time over the years.

              Continue this thread (4 replies) →

        2. I am not following the logic.

          Say I write a static html page that loads a series of images down the page where one image will fit on your screen at any time. If the browser loads them all into memory at once without releasing the memory or maintains the a fully rendered virtual page out of sight, is that bloat the app or runtime fault?

          Replies (3)
          1. Both.

            Runtime can certainly be optimized, but the app can also virtualize or force unloading if it needs to.

            Replies (1)
            1. I am just talking about a page that is something like a descriptive document for the browser to deal with, probably less than 500 bytes.

                   <html>
                   <body>
                   <img...>
                   <br>
                   <img..>
                    ...
                    </body>
                   </html>

              Continue this thread (1 replies) →

          2. It's a difficult question because there are so many factors in dom/css that change the answer to 'is there a chance that the image should be rendered the next frame?' that it becomes really hard to implement a strategy for what content to offload to disk and when

            If the runtime fails to load the offloaded data back in time there will be visible rendering artifacts so you really have to make sure your strategy is robust

          3. If the static page is badly written and does not instruct the browser to use lazy loading (using the loading="lazy" attribute on the img tag) and the browser loads them all at the same time, is that a problem with the page or the browser?
            Replies (1)
            1. The whole ecosystem.

              Lazy loading for images was only introduced around 2019, not every website out there will have been updated since (and retroactively become “badly written”).

              It is also not on by default, because the platform itself is too conservative and the implementation doesn’t allow zero breakage changes of defaults like that.

              The tooling culture around HTML also isn’t such that you’d be prevented from deploying a site if you can use it but don’t, at least you’re not railroaded towards that.

              Lazy should have been the implicit default and we should have gotten loading=“eager” instead. Same with having sane calendar controls, dropdown and collapsible controls, video controls so good we wouldn’t need vendor equivalents, light boxes for images and so on.

        3. The view of web pages as apps and browsers as runtime environments/OSes is reasonable but in my opinion it even reinforces the idea that it should be the browser duty to contain bad behavior from web apps/pages. Browsers are well positioned to do so, as they know exactly which resources are used by each tab , and how those grow over time. Also browsers already treat web content as untrusted (sandboxing, isolation), so it would be a natural next step to extend that approach to resource usage. It would match how Operating Systems work, where it's the OS acting as an "arbiter", not the userland application.
          Replies (3)
          1. It is non trivial to determine if ressouces a site is using is reasonable or not. A web game may use lots of ressources and will crash if the OS suddenly decides to take some memory away.
          2. I would love it if all the major browsers would agree on this. "Every tab is only allowed up to 100mb of memory, if a page needs more than that, optimize it." - Though a setting from the user to allow it for, say, online videogames or streaming sites or something, would be a good idea.
            Replies (2)
            1. Using more RAM could be a permission request.

              Continue this thread (2 replies) →

            2. I remember when I was a Safari user, any instance of Slack I had open would get reloaded after 5 – 10 minutes with the message "this web page was reloaded because it was using two much memory", interrupting whatever I was doing.

              My computer had many gigabytes of memory, so I always found this very annoying. Like, yes, Slack is a giant memory hog and that really sucks, but I can't exactly do anything about that.

              Maybe Google would have the clout to actually enforce a memory limit like this, but I'm not sure whether anyone else does at this point. Apparently even Apple wasn't big enough.

              Continue this thread (1 replies) →

          3. Edge and Opera GX already have an option to limit RAM usage, it's called Resource controls.
        4. Should browsers enforce per-tab memory budgets?
          Replies (1)
          1. Maybe not by default but it'd be good to have the option, yeah.
            Replies (2)
            1. If you use a 32-bit browser, each tab is limited to 2 GiB. Firefox still publishes 32 bit builds for Linux.
            2. Edge and Opera GX provide adjustable memory limit.
        5. > Browsers are runtimes and webpages are apps.

          The internet was a better place when webpages were not seen as "apps."

          Replies (1)
          1. Though I agree, I am grateful that services such as my banking and national insurance are available via the browser and do not require me to install their own apps on each device. I have no banking apps on my phone nor desktop, Firefox is my window to all those services. I can put my trust in Firefox, I would not put my trust in each outsourced app each for each service I use.
            Replies (1)
            1. Back in the days we've had generic interfaces to banking, e.g. HBCI, and there were optimised apps from reputable companies written in actual programming languages that compiled into optimised code. Running on the actual operating system without any weird abstraction layer in between. And it all even worked with a few MEGAbytes of RAM. AND that one app could talk to ALL of your banks. (And if you didn't like that one app, there was another one with a similar feature set.)
        6. Youtube is the most memory guzzling website of them all.
      3. IIRC the Ladybird creator said that the Chrome memory footprint is largely a tradeoff of cache-sizes vs. speed. I still hope they will let users control that tradeoff manually in Ladybird
      4. There is a simple fix for that in existing browsers - enable unloading of some of those tabs. Does Ladybird have such an option?
      5. > Also mine is sipping on 53mb of memory with multiple tabs open

        Finally a browser for the Ozempic era. Time to get healthy (message to the incumbents).

      6. RAM is there to be used, unused ram is useless ram. It’s only a problem when the browser fails to react properly to shortages.
    2. Very cool. Someone has been working on bot detection. I was curious if they had to deal with it. It turns out yes, they have. Apparently they have to pretend to be Chrome or some websites will let them in.
      Replies (2)
      1. Every browser will forever be KHTML, like Gecko.
        Replies (1)
        1. And Mozilla 5.0, still waiting for it!
      2. > or some websites will let them in.

        Will *not -- I presume?

    3. > The only minor issue: page scrolling is a bit jerky.. not much.. just a little bit.. it's noticeable.

      This actually gives me confidence that the important things are being done first.

      Sounds like a great alpha!

      Replies (1)
      1. Sounds opposite to me. iOS targeted framerate, Android targeted Java. iOS has a butter-smooth rep. Android is still janky AF.
        Replies (1)
        1. I can't tell.

          I use Linux (mainly on X.org) and macOS (on Intel) and Android. I support others' iOS devices though. I can't see all the smoothness stuff people talk about. I am old, not a gamer, and with my glasses on, I have good vision, but it's all literally invisible.

          I dismiss all talk of framerates and smoothness and all that as hype mingled with audiophile-style self-deception. I cannot sense it myself so I don't care and don't really believe in it.

          You do you. I merely want to say that for all the talk about "buttery smoothness" etc. there is a contingent of us who can't see it and don't care.

          Replies (1)
          1. And, even a $200 Android does 120Hz these days.

            Apple was gatekeeping this for the "Pro" range for years. 18e still doesn't even have it.

    4. >a new browser written from scratch that actually works!

      Big Browser wants you to believe that coming up with one is impossibly hard. It's not, even less in the age of AI.

      Replies (3)
      1. Writing a browser is easy. I wrote one in the 90s that only supported a subset of the standards so I could browse warez sites without having to risk drive-by attacks and pop ups.

        The hard part is writing a modern browser that’s feature-capable while being performant and which renders all those broken sites “correctly”

        People have already tried throwing tokens at this problem and yet nothing usable has emerged from the effort.

        Replies (2)
        1. You mean “until now”, don’t you?
          Replies (1)
          1. Ladybird is not a "throw tokens at the problem" project, and has been going much longer than doing so was even possible.
            Replies (2)
            1. Just to be clear I do not mean to discredit Ladybird but the opposite, encourage others to take a stab on projects like this one :).

              I am aware Ladybird is not an AI-driven project, but I'm quite sure you can get a very decent browser these days just "throwing tokens" at it, and at a much lower cost than the billions spent on Chrome etc.

              Continue this thread (2 replies) →

            2. They never released anything before doing so was possible, so it's not a convincing argument.

              Continue this thread (3 replies) →

        2. This. Creating something that will render a subset of html/css/js that you care about is easy. Creating something that will render all of the standards, and all of the broken shit that has accumulated over the past ~30 years is incredibly hard.
      2. I’m relieved to read this. Would love the link to your easily made, secure, feature rich browser that my Banks’s website sees and says “come on in”. Glad the problem was solved already, AI ftw again and again
      3. As an application security engineer, I thank you for your continued support of my job security.

        I wouldn't touch a vibe-coded web browser even in disposable VM. It would be absolute swiss cheese in terms of security.

        Replies (1)
        1. I would be more convinced if you pointed at a vulnerability. To be clear, I am sure there are some. Maybe not as many as Chrome.
    5. Yeah I'm actually surprised how well it's working on complex multimedia sites given that it's only in Alpha...
    6. It’s really beta quality, not alpha. I would have been comfortable saying it was alpha quality prior to this.

      Very solid work.

      Replies (1)
      1. My guess is they are alpha because they feel it has the features it needs now. What they need now is exposure to more of the web to drive out the remaining compatibility and performance issues.

        Basically, this is the moment where they are ready for us to report problems instead of simply working through their own backlog.

    7. It's not fully written from scratch anymore they are using Chrome libraries. Edit: Nevermind, the kinds of libraries it uses are used by Firefox too.
      Replies (1)
      1. I don't think this is true. Their FAQ page states the following

        > The focus of the Ladybird project is to build a new browser engine from the ground up. We don't use code from Blink, WebKit, Gecko, or any other browser engine.

        And I was unable to locate any chrome library references in their github repo.

        They do of course use third party libraries like ffmpeg for video parsing and skia for image parsing so its not entirely "from scratch" but afaik the actual browser part, html, javascript, css, is entirely from scratch. As their FAQ page continues:

        > we make use of 3rd party libraries for common functionality (e.g. image/audio/video formats, encryption, graphics, etc.), including some of the same libraries used by other browsers.

        Replies (1)
        1. They use ANGLE now which whole original purpose is a library for Chrome.
          Replies (1)
          1. That's a graphics abstraction layer. How would you implement webGL? Reimplement it for direct3d, metal, opengl and vulkan? Would you not think of a way to abstract those right away?
            Replies (1)
            1. Your right, Firefox uses all the same shared libraries too.
    8. A web browser feels more amenable to AI than most other software projects.

      You have great specs for prompting. You have great test suites that you can use as verification criteria. Literally all meaningful implementations of these specs are open source, baked into the weights to some degree, and have many people writing publicly about their internals. You aren't really designing your own features from scratch; a lot of your work is of the "this site doesn't work, please fix site" kind, and that, given decent enough tooling which browsers do have, is also relatively easy for AI to do.

      This is very different from game dev for example, where you're working with an engine which hasn't been designed for headless operation from the outset, and your actual goal is max(fun), not max(correctness), which is a lot harder to quantify and requires taste, human testing and many shots on goal.

      Sure, you still need human devs in charge to take care of the architecture, tech debt, code quality and such, you can't vibe code a truly great web browser, but those humans can be significantly accelerated by AI.

      I know the Ladybird folks realize this and this certainly isn't news to them; Andreas seems plenty AI-pilled to me.

      I think AI is what's finally going to break the web browser monopoly.

      Replies (1)
      1. great comment, web browsers used to be kind of a doomed project. I wonder if there are any other types of programs that are optimal for AI.

        First thing that came to mind is the age-old advice to never roll your own crypto, it likely still holds but I wonder if the risks of that have changed, I guess it did but because it is adversarial and both sides have AI it evens out.

        Maybe we start to see more completely new Operating Systems?

        Replies (2)
        1. I would guess crypto would be the worst type for just blindly using AI, it was never hard to roll your own crypto following a spec and get indistinguishable inputs/outputs from the battle tested libraries.

          The danger on rolling your own, on the application side was always holding the library wrong, using primitives that depend on premisses your application doesn't hold, like passing a predictable nonce to a function that needs a random one to be safe. On the library side was always the risk of leaving a side-channel open, a function that is a bit too fast/too slow depending on the input, that leaves some critical memory or file exposed to other parts of code.

          Luckily for us, most AIs worth their salt should catch these problems now.

        2. I think emulators and reverse-engineering are definite examples — the latter more because it's so easy to RL on it, not necessarily because the end-result is verifiable. Exploits and vulnerability finding also qualify.

          I'd say crypto is probably relatively unfriendly, there is no way to "verify" that an implementation is correct (LEAN???). The way I understand "don't roll your own crypto" is as "use the crypto that hundreds of independent eyes have looked at and 0 of those eyes have found unfixable problems in." This is not really something you can fix with AI.

          I think operating systems would go great. A lot of OS work is drivers, and AI is very good at figuring out hardware, thanks in no small part to the above-mentioned reverse engineering skills. There are also a lot of public and well-known examples of techniques that LLMs can learn from.

          I think what won't go so great is proprietary software, written in proprietary languages, in domains where the documentation says to ask Mike when he's back from vacation, where all the important secrets are on brains and maybe on paper, but definitely not on the public internet, and where testing involves precious time in a very expensive lab, and is observed by a team of expensive auditors in expensive suits. In other words, what PRE-AI people would have called "dead end careers that barely pay a living wage in a third-tier city."

          Replies (1)
          1. I think that drivers are a great example of what AI is great at. You see people that have created dozens of drivers for old operating systems for example.

            It makes sense. There is real hardware that you can probe and discover behaviour. It is totally clear if things are working or not. There may be other implantations (for other operating systems) to reference (even binary only proprietary ones). This kind of tedious and iterative work is what humans sucks at and where AI thrives.

    9. I tried to use it as well and most things seemed to work, but as soon as I tried to login somewhere using a passkey that didn't work. With more and more accounts I have being behind a passkey that is quite the limitation for actually using it. Looks like there are already multiple issues open for it so I'm sure they will eventually get to it, especially as more and more people and services switch to passkeys.
      Replies (1)
      1. How do you manage your passkeys across devices?
        Replies (1)
        1. Using a password manager. I think most of them should support passkeys now.
          Replies (1)
          1. Thanks. I use Keepass on Debian and Keepass2Android, I'll check if they've updated both for passkey support.
    10. Trialing Ladybird right now as I type this comment. I'm trying it with all my own web apps, news sites, and hacker news. So far, everything is working stunningly well using the Flatpak build for Linux.

      I'm completely dumbfounded -- I've been told for decades that creating a new browser is like tilting at windmills, but Ladybird not only seems to be rendering everything I care about correctly, but the onboarding experience was incredibly smooth (light/dark, tab position, search engine, theme) all cleanly presented from the get-go. I'm only five minutes into using it, but I can tell I'll keep this around as a default for my own webapps, and gradually adopt it more as it matures. It's pretty much the same approach I used to adopt Linux back in 1997 -- I could use Linux for half my needs, and then I'd switch to windows, but by 1999 I'd switched completely to Linux. Hopefully I can do something similar with Ladybird!

      This is amazing work: thank you to the devs!

      EDIT: Spoke too soon! Visited my local CopyParty server (self-signed cert) and there doesn't seem to be a way to get LadyBird to accept the self-signed cert (served over the local LAN). Not that surprising given the Alpha tag, but maybe worth mentioning for folk using homelabs.

      Replies (2)
      1. > I'm completely dumbfounded -- I've been told for decades that creating a new browser is like tilting at windmills, but Ladybird not only seems to be rendering everything I care about correctly,

        I half wonder if this is a truism from the older days of the web when browser compatibility between browsers was much less common. I.e. from the IE days before chrome really kind of replaced everything else. There's now a browser that basically everyone targets for compatibility and everything in the last 15 years of development has been done with that in mind so getting the 90% of the web that people want to use is no longer "I have to support quirky XML behavior from IE 6 because Bank X requires it to render correctly and people need that to work". It's still not going to be simple but I wonder if it's less of a sisyphean task anymore because of how things have shifted.

        I'd bet if we tried pointing Ladybird at some of the old enterprise hardware that does funky crap and says it's only compatible with IE6 on 800x600 screens it'd probably show some issues simply because those aren't normally accessed or focused on anymore. And largely I think that's a good thing if it means we can now get a browser engine that's from scratch and doesn't have to focus on those things to become usable as a daily driver for basically everything a normal user is going to encounter.

        Replies (1)
        1. Browsers are difficult to write because the web is kind of a moving target. Firstly, the standards expand (and rarely shrink). Secondly, browsers are allowed to make proprietary extensions, which risk becoming popular, forcing further expansion of the standard. Thirdly, browsers were built in the era of "be liberal in what you accept and conservative in what you send" protocol design, which is (IMHO) anathema to good software (and which meant that browsers had to basically heuristically render malformed web-pages, which is a _kind_ of special casing, which in turn gave large, well-capitalized orgs the ability to differentiate on how many wrong pages they can render correctly, creating a perverse incentive). Fourthly, browsers are performance sensitive, but every leap in JS-engine performance, or in rendering performance, gets eaten up by leaps in the indulgence and excess of web-designers, creating yet another thing that has to be chased. Browsers, and the web, have far too many misaligned incentives to be worth pursuing (most browser projects wrap around webkit, and there is a reason that Google is one of two companies that has not given up on browser-engines: it helps them protect their ad-revenue (e.g. chrome cannot run ublock)).

          Perplexingly, most browsers try to hide the abuse (of the machine) that a web-page is inflicting, behind arcane developer tools. If browsers were able (by default) to show exactly how much RAM and CPU time (prominently in the tab) each page was using, that would put at least some pressure on the designers to write better front-end code, because ordinary users could see (and compare!) how many resources each page was using. A similar thing can be done with standards compliance (e.g. how many nonstandard features is the page using, or how malformed is the page itself (if I recall, the original KHTML used to do this)).

          Also, note that I used the term "web page" and not "web site", even though most people use them interchangeably. The original term (from 1990) is "web page", and it predates "web site" by a few years (1994). The original intent of the web was to be a web of _pages_, not _sites_. A common defense is that a _site_ is a collection of pages. This is insanity: a collection of pages is obviously a _book_ or a _binder_. I think that they chose to use the word _site_ as the metaphor, because they saw each domain as a kind of storefront in a mall or city or bazaar. A thing that is physically anchored and owned and managed. It is no wonder that the web had no link-preserving functionality (e.g. like the internet archive today) built in (physical storefronts sometimes shut down or get bought and renovated or get demolished etc).

          And I believe that because we chose this metaphor, people and companies have internalized the idea that a browser is just a generic platform, for hawking wares and spying on customers, instead of a hyperlinked web of written text, with the occasional image or video.

          The web is cool. It is a monumental achievement. Yet, it was designed by _children_, and is used by rapacious psychopaths to enrich themselves, by monetizing the creativity and curiosity of others. We deserved a better web, and that meant a better browser. Unfortunately, I doubt that Ladybird is it. I doubt that it is possible, without a clean sheet of paper.

      2. > I've been told for decades that creating a new browser is like tilting at windmills

        Yeah, that was when you had to actually write code yourself.

    11. Indeed, it works exceptionally well!
    12. So what 'alpha' means then ? :)