Live data from Hacker News

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

awesomekling.substack.com

51–60 of 349 posts

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

#51

The fact there are better specs doesn’t help if a large part of the work is handling things that are outside the spec. You better show every “buggy” page similar to how the major browsers show them or the new browser will be considered defective. That’s the unfortunate reality of web tech (I wish every page with an js error or incorrectky closed tag would be a big fat error message but it isn’t). And that’s still a l…

All this "quirks mode" stuff is part of the specification, no? It makes it all a bit more complex than it has to be, but I do believe it's specified.

I'm not really sure if "you need to be bug-compatible" is still true; it probably was 15 years ago, but Chrome, Firefox, and WebKit tend to be pretty decent these days.

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

#52
This is great. Refreshing to read something which talks about complexity as a real and important issue (not as a positive or neutral aspect of a system). I've been hoping for a browser like this since the day I tried to download the Chromium repo and found out how large it was. Also, I noticed that it had a large number of external dependencies which made it very difficult to actually dig into the code.

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

#53
> So instead of [building the browser one feature/spec at a time], we tend to focus on building “vertical slices” of functionality. This means setting practical, cross-cutting goals, such as “let’s get twitter.com/awesomekling to load”, “let’s get login working on discord.com”, and other similar objectives.

Seems similar to how Wine is developed: instead of just going down the list of API functions to implement, the emphasis seems more on "let's get SomeProgram.exe to run" or "let's fix the graphics glitch in SomeGame.exe". Console emulators (especially of the HLE variety) seem to have a similar flow.

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

#54

Earlier quoted context omitted.

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”?

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...

It's an HTML attribute that makes content (mainly text) editable by end users.

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

#56

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…

Big problem is the constant feature churn in the web space. Getting from zero to browser is probably doable. Staying at the mark with the ever shifting CSS standards and the constant deluge of web extensions is hard and expensive.

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

#57

Earlier quoted context omitted.

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.

But would they choose C++ if they were _starting_ today?

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

#59

Earlier quoted context omitted.

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”?

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...

Basically if you set the content editable attribute on an element then the user can edit the content of the element directly

Here is an example using it:

https://codepen.io/caraya/pen/ZyQMWd

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

#60

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…

I don't think anyone has argued that building a browser from scratch is impossible, it's clearly not, just that building a competitive engine from scratch is impossible. SerenityOS is a sort of very cool art project, it's not attempting to justify itself in any specific way. If they make an engine that's 1% as good as Blink, works OK for the sites the authors personally care about and eventually they lose interest, OK, so what, no big deal.
Post reply on HN