r/programming • u/pimterry • Apr 11 '23
How we're building a browser when it's supposed to be impossible
https://awesomekling.substack.com/p/how-were-building-a-browser-when
1.6k
Upvotes
r/programming • u/pimterry • Apr 11 '23
122
u/voidstarcpp Apr 11 '23
Related article: Google Docs in a clean-room browser, which sounds like a nightmare to make work.
You can make "a browser" that works for some sites but that's not the same as providing users reliable access to the web. Many users already refuse to use Firefox the moment they encounter a website which insists it's only supported on Chrome.
While Kling's efforts have punched well above his weight, I don't think it will ever be possible for a small non-commercial project to maintain compatibility and keep up with web standards enough to provide a viable alternative browser platform. Of course, that's not the goal of the Serenity project, but it undermines the "impossible" headline.
126
u/cr8erbase Apr 11 '23
Probably easier to write a new standard that isn’t backwards compatible at this point! 12 million words - wow good luck!
970
u/KSRandom195 Apr 11 '23
This is ignoring the core problem of the web is building for bugs in Chromium.
If your new rendering engine doesn’t faithfully implement those bugs you have a web compatibility problem that will deter users from your product.
You would need significant market share, likely billions of users, to do differently. Microsoft and its rendering engine were the best shot we had because of the pull of Windows in the corporate environment, but they’ve moved to Chromium.
225
u/SocksOnHands Apr 11 '23 edited Apr 11 '23
I've said this in the past but had gotten downvoted for it. What people really want is to be able to easily and efficiently distribute up to date software. We had achieved that through bootstrapping a lot of stuff on top of a system that had originally been designed for static documents.
A new open source project should be made with this in mind, where it is essentially a thin layer between the operating system and the application that serves a small set of purposes. It should handle asset management like downloading and caching files. It will manage versions of dependencies used by applications. It has an efficient bytecode that can easily be compiled to machine code. It had an API designed to provide useful services while still being secure and safe for the user (limited features, sandboxed, etc.) Applications will have access to their own local databases if data needs to be stored on the user's machine. It handles network security details like encryption and keys. It will provide some system for both asynchronous message passing and also for socket like connections. The platform will have fairly low leval graphical capabilities, so if someone wants HTML/CSS it will need to be implemented through a module used as a dependency. There may be more details that I hadn't considered.
The point I am making is that there should be a much simpler option designed with application development in mind. HTML, CSS, and Javascript in a bloated browser that attempts to handle everything might not be the best way of doing this.
Edit: So far, the majority of comments I had seen are people saying this is already available and then go on to describe something completely different that doesn't meet the requirements. This is to fill the roll that web browsers currently have and intends to be just as user friendly. The key main difference is an architecture that allows for more flexibility, is easier to develop for, and is less resource intensive.
17
u/ZucchiniMore3450 Apr 11 '23
What all comments here miss is actually the best part:
Doesn't really matter if the make google products work in Ladybird, they have already made more progress than even people working on it expected.
Just take a look at one of the videos where Andreas is fixing some random bug, for example: https://youtu.be/21yRs2b9iEY and that's from a year ago. Just a feel how deep each fix is going will change your perspective.
Browser is not the goal, it is side effect of people having fun.
44
u/Illustrious-Scar-526 Apr 11 '23
I have recently felt that many companies that make commonly used apps, like Microsoft (excel, word, PowerPoint) just really want people to use the browser version instead of the desktop version, which is super annoying because the browser version doesn't even have all of the same features as the desktop one! (Looking at you, excel...)
Anyone know why a company would prefer that their users use the browser version? Are they able to collect more data through the browser? Or maybe it's because it requires an internet connection, and it seems that many (mostly gaming) companies want their users to be always online to use the product?
49
u/Zardotab Apr 11 '23 edited Apr 11 '23
Since there's already plenty of HTML browsers, instead explore an unserved need, such as a state-ful GUI markup browser & standard. HTML/DOM is missing or fouled up many expected GUI idioms, and has an inherent text positioning flaw.
GUI's, desktops, and mice are still needed for biz and productivity. HTML browsers have been a goofy mess for this, requiring bloated buggy JS libraries with long learning curves. Let's Make GUI's Great Again! (No, I'm not a Don fan, but his trollisms are admittedly catchy.)
It shouldn't take rocket surgery to make a typical office CRUD app over HTTP, being GUI's have been around 40-ish years, but it is, largely because web standards suck the big one at business CRUD. I didn't used to spend so much time babysitting UI and stack minutia in the 1990's, we de-evolved 🐵. Some claim the extra flexibility of web is worth the extra fiddling, but I'm not convinced it has to be either/or. Just needs some R&D. If you can prove it's either/or, please do! Otherwise admit we need a biz-friendly standard.
19
u/RobinsonDickinson Apr 11 '23
You can make the impossible happen, but I am still not going to give up firefox.
10
u/regeya Apr 11 '23
....and about five seconds in, Andreas' website wants me to sign up to be able to read a blog entry and suddenly I don't have a single fuck to give anymore. Thanks for the waste of time, whoever you are.
2
u/unixmonster Apr 12 '23
I think if you build the whole OS, you need to build a browser too.
2
u/dangerous_service Apr 12 '23
those people are wild
2
u/mindbleach Apr 11 '23
Compartmentalization would make it a lot less impossible.
... oh, I left the tab open and it decided it needs my e-mail to keep reading. Fuck you. I don't care if there's a button I can click to not do it. Fuck you for asking.
2
u/KimJongIlSunglasses Apr 11 '23
I really fucking hate it when people compare shit like this to the Apollo project.
1
u/python-requests Apr 12 '23
I can't fathom the complexity of writing a CSS rendering engine
Tho tbf I can't even fathom the complexity of even just writing lots of interacting CSS, but idk how anyone could thoroughly understand the priorities & whatnot
1
u/chrismsnz Apr 12 '23
Notice that there is zero mention of security in that post, not a great sign
1
u/bllndman Apr 12 '23
Why should anyone build new browser if I can just fork existing browser engine.
1
u/[deleted] Apr 12 '23
I welcome all challengers going against the Google monopoly. SerenityOS is pretty cool - a bit like Linux in the early years.
-19
u/saturn_since_day1 Apr 11 '23
Just bring back 90s Internet. No code java running code just html. Clean, fast, and secure.