Live data from Hacker News

We're building a browser when it's supposed to be impossible

awesomekling.substack.com

41–50 of 349 posts

Re: We're building a browser when it's supposed to be impossible

#44

What we all REALLY care about: they went with C++ and Qt https://github.com/SerenityOS/serenity/tree/master/Ladybird

I thought unsafe language were a no-go in the context of extremely vulnerable pieces of software like the web?

Firefox has tons and tons of C++ to this day.

Re: We're building a browser when it's supposed to be impossible

#46

I'm finding it weird that unlike other non-trivial projects like OSes or compilers, people often discourage building web browser engine because it is "hard" or something like that like... how is it different from building a compiler? You gotta build HTML parser, CSS parser, figure out a fancy structure to represent those concepts and modify at fly. Also there's difference between making it work and making state of th…

It depends on how much of a browser you want to implement I guess. Comparing it with a compiler is a skewed comparison I think; compilers are built as part of many people's college/university education, but are only a small part of turning programming language into working software. Likewise, I'm sure most developers on here could feasibly write a web browser that can fetch websites and render the HTML.

But that's just one aspect, next you need to add support for CSS [1] and Javascript [2], each of which has had lifetimes of work invested in the standards and implementations.

So yeah, while it's doable to build a new browser, if you want to build a big one that has feature parity or is on-par with the existing browser landscape, you need a large team and many years of work. And that's just the practical aspect, the other one is, would a new browser actually be better? Could it compete with the existing market? So many players have just given up over time.

[1] https://www.w3.org/TR/css-2022/

[2] https://262.ecma-international.org/13.0/

Re: We're building a browser when it's supposed to be impossible

#47

Earlier quoted context omitted.

Son what i'm hearing is that you're looking forward to browser-in-a-browser as if that's somehow not the most depressing trend I didn't know about

Happy to admit it's a crazy idea, and it's not something that I would want to see as a usual way to built sites. But for small areas of web apps where compatibility is difficult it does make sense. Google Docs used to be contenteditable based, but moved to a custom rendering engine. They are a large enough company to be able to invest in that. Small businesses aren't, and have to rely on content editable. Ladybird as…

What is “content editable”?

Re: We're building a browser when it's supposed to be impossible

#48

I think a potentially interesting use case for Ladybird is as a "contenteditable" polyfill. With their dependancy free stack I'm guessing it's not out of the realms of possibility to compile it to WASM and HTML canvas. Having to only target one rendering engine when developing a rich text editor would be much better than the current nightmare it is. (There would be an accessibility problem to solve, we need some new…

Son what i'm hearing is that you're looking forward to browser-in-a-browser as if that's somehow not the most depressing trend I didn't know about

As an industry we’ve taken a long and windy path to delivering full applications (with a local cache) on every load to a sandboxed environment that is mostly compatible across environments.

While it’s easy to take shots at the current state, I find it hard to imagine another path to delivering a cross platform application over the network. What we have now is actually pretty rad.

We built it stone by stone, incrementally, and now I don’t have to package my application for N platforms unless I want to meet users in their app stores.

Re: We're building a browser when it's supposed to be impossible

#49
I think that there will be a new successful browser one day - and it will be disruptive. But it needs two properties:

1. A unique use case or feature that cannot be easily implemented in the existing browsers. Something that breaks the current architecture and turns the current use cases into afterthoughts. ("oh, yeah, right we actually need to render html somehow at some point, can the intern do it?")

2. A significant breakthrough in software engineering productivity, a major step in terms of abstraction and safety. Something like the combination of a LLM and formal methods.

This browser does not check these two boxes (using C++, albeit hopefully a more modern dialect, and targeting plain old browsing). So it is certainly great for the spec - and should be paid for by the W3C, IMO, great for the people developing this as an exercise, but it will never dethrone Chrome.

Re: We're building a browser when it's supposed to be impossible

#50

Others have already mentioned performance is one of the hard part. Another aspect is that for any complex, large-scale project like browser, lots of, if not most of, effort is actually in the long tail: to make 90% or even 99% websites work probably is as hard as making the rest 1%. So while the team probably could cruise through when working on current gen spec and popular sites like Discord/Twitter, it's what left…

Is this something you know from experience or are you armchair guessing?

If I recall correctly, the work Andreas did at Apple was mostly focused on performance, and Safari has long had a reputation for excellent performance. Maybe you’ve also done that type of work, but otherwise I’ll trust his judgement.

Post reply on HN