1. 87
  1. 18

    I remember watching the first video on building the js interpreter & subsequent videos, and at some point I was just like “oh you just consume tokens & do things? I can do this too!”

    It seems silly but seeing bits of something I thought was impossible getting done made me get started on my own language & I’ve been still working on it a year later. I really feel like I owe much of that to his videos, and really glad to see how far its gotten.

    1. 4

      Yeah one nice thing about C++ is that you can write pretty basic code and it’s surprisingly fast. And then you have great tools to profile and optimize it. So you don’t have to start out fancy and can just get going.

      So really basic C++ doesn’t look TOO different than Python in some cases. Although AK has lots of experience and I noticed his custom “AK” set of libraries, which every experienced and C++ programmer seems to have !

    2. 9

      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.

      Armchair defeatist here 👋 I don’t believe it takes “billions of dollars” to create a new basic browser engine (i.e. HTML, CSS, JS); after all, there are already multiple projects doing exactly that (e.g. Netsurf and Dillo). I’m unsure however that the newer technologies like WebGL, WebDRM, WASM, etc. can be implemented completely in a feasible timeframe. You’d wind up with a browser that’s nice for reading news sites and maybe watching Youtube, but anything more complex would be at least partially broken. Maybe someone more knowledgeable can correct me on this.

      1. 28

        You’d wind up with a browser that’s nice for reading news sites and maybe watching Youtube, but anything more complex would be at least partially broken.

        Sounds great to me.

        1. 22

          Worth noting that the SerenityOS browser has some support for JavaScript, WebAssembly, WebGL, websockets, and other “modern” Web features. They plan to eventually support web apps like Discord, since that’s where they chose to host their community (/me sighs).

          Wrote my thoughts over at https://seirdy.one/notes/2022/07/08/re-trying-real-websites-in-the-serenityos-browser/

          1. 7

            Sounds great to me.

            Indeed. Sites who qualify for 1MB Club would probably work well.

            Case in point: My own site is generated via Hugo. The markup is very very simple. I’ve added a splash of (ready-made) CSS, but that’s mostly to get a nice typeface and neat margins – the stylesheet is not at all required to read the text, and there’s no JavaScript in use.

            And I’m far from alone in building sites like this.

            1. 6

              While it may sound great to you, it’s going to kill adoption if a new browser doesn’t have sufficient parity. And given how much Google is driving the specs these days and forcing everyone else to play catch-up, I’m not really sure that independent browser engines can maintain meaningful parity.

              I also worry that the final Chrome/Chromium monoculture will arrive pretty soon regardless of what anyone does at this point.

              1. 19

                I highly doubt their goals or expectations are mass adoption. And if, like you say, there is no way to beat google anyways they might as well not worry about it and just make whatever they enjoy.

                1. 3

                  I also worry that the final Chrome/Chromium monoculture will arrive pretty soon regardless of what anyone does at this point.

                  ya me too. but efforts like these will do one of three things: 1) nothing at all to improve the march towards a chrome/chromium “death”, 2) delay it, 3) provide a viable alternative and a way out from it

                  #2 and #3 seem highly unlikely, but I’d rather not give up all hope and accept #1 as our fate. But I’m one of those crazy people who would rather use/promote webkit, even if it’s not perfect, since its survival is absolutely necessary to reach #2 or #3 (even if #1 is much more likely at this point…). Ya, it’s a sad situation out there.

              2. 18

                The author worked on WebKit / Safari for a long time, so I’d trust his judgement a lot more than mine on the amount of work. I wonder how many of the older web technologies can be implemented in the newer ones. Firefox, for example, decided not to implement a native PDF renderer and instead built a PDF viewer in JavaScript (which had the added advantage that it was memory safe). It would be very interesting to see if you could implement the whole of the DOM in JavaScript, for example.

                1. 17

                  You could have said the same thing about Linux. How is it possible for a hobbyist who had never had a real job to create an operating system that’s fast and portable? That’s for companies like Sun, IBM, and HP, which were huge Unix vendors at the time.

                  I also found it funny that as recently as ~2009 there were knowledgeable people saying that Clang/LLVM were impossible. You could never re-do all the work that GCC had built up over decades.

                  1. 2

                    Or KHTML…

                  2. 10

                    That’s completely alright. Ladybird is a system made by its developers, for its developers. It does not intend to compete with other web browsers, and that’s okay. It’s the epitome of the https://justforfunnoreally.dev/ mindset.

                    1. 5

                      I also have a defeatist stance here. Various streaming services such as Netflix and Co are a hard wall since the web was made non-free and gatekeepers like Widevine (Google) don’t even grant pretty successful browser projects entry.

                      But then maybe it’s time to just leave that stuff behind us anyways.

                      1. 4

                        While this is certainly true, using a browser as a user agent for hypertext documents and not as a cross-platform application runtime is a worthy exercise on its own. IMO, of course.

                        1. 2

                          WebDRM is likely the killer because it’s stupid :-/

                          But Kling spent many years working on webkit and khtml, so the layout and rendering of the bulk of html and css shouldn’t be a problem for him alone. Bigger issues I suspect will be xml, xslt, and xpath :-D