News for hackers. Stuff that matters.
Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @03:10AM (#37608860)
"Writing a browser" (from scratch) at this point basically means you are implementing a type of portable operating-system-in-a-box (the web platform) and that it will be compatible with whatever Google decides to add to theirs.

The browser is so comprehensive in functionality and APIs, and such a challenge to keep up with Google's constant churn of new features and total dominance, that not even Microsoft could do it.

Here is my somewhat related pet project: Tersenet. https://github.com/runvnc/tersenet It's just a concept, virtually no implementation. But I deliberately picked a set of requirements that are designed to be feasible for people to implement. Much less involved than a full web-browser.

Also related is the Gemini project which is a real thing and quite practical: https://geminiprotocol.net/ That inspired my ideas for Tersenet.

Re:I'm fed up with it, so I'm writing a browser by fsckboy on Friday September 22, 2023 @03:32AM (#37609020)
> and that it will be compatible with whatever Google decides to add to theirs

There are plenty of respectable people who maintain "home pages" with much simpler HTML than what is possible, and news.ycombinator.com gets a lot of love for keeping its classic look.

All this to say, I'd like if the people who have a lot of overlapping agreement on this would agree on a subset to use, and I'd be happy with a browser that didn't do everything google's did.

I run with uMatrix which shuts off a lot of google functionality, and I never whitelist google.com domains just to prove that I don't have to, the world doesn't end. It's a relatively small number of sites that just won't work.

Re:I'm fed up with it, so I'm writing a browser by GoblinSlayer on Friday September 22, 2023 @05:16AM (#37609759)
I have a similar idea of a minimal html browser, which was dismissed by the gemini authors. Should be reasonably doable if you don't implement all web 2.0.
Re:I'm fed up with it, so I'm writing a browser by prmoustache on Friday September 22, 2023 @06:51AM (#37610395)
Isn't it called `netsurf` already?
Re:I'm fed up with it, so I'm writing a browser by livrem on Friday September 22, 2023 @07:10AM (#37610485)
I would not want a simple browser to replace gemini, but I would be happy to use a simple web browser in addition to gemini. It would be nice to only have to fire up a big bloated real browser for doing banking and such things.
Re:I'm fed up with it, so I'm writing a browser by GoblinSlayer on Friday September 22, 2023 @10:15AM (#37612353)
Yes, in addition, maybe even 2in1. As a quick hack gemini can be converted to html on the fly.
Re:I'm fed up with it, so I'm writing a browser by deaddodo on Friday September 22, 2023 @04:06AM (#37609261)
I mean, LadyBird is extremely young and coming along at a pretty decent pace. Though, to be fair, the main author does have some extensive experience in the realm.

I, personally, would love to see some alternative engines to the monoculture of Blink and it's WebKit cousin, other than just Gecko/Quantum. Something to take the place of what KHTML used to have before being gobbled up into WebKit; or just another (ideally, open source) choice to experiment on.

Re:I'm fed up with it, so I'm writing a browser by adwn on Friday September 22, 2023 @04:17AM (#37609344)
Well, there's Servo [1], which I have high hopes for.

[1] https://servo.org/

Re:I'm fed up with it, so I'm writing a browser by webmobdev on Friday September 22, 2023 @08:26AM (#37611092)
I was interested in Servo, but its website is exasperating - any idea where I can find info on what HTML, CSS and JS standards it supports?
Re:I'm fed up with it, so I'm writing a browser by px43 on Friday September 22, 2023 @11:29AM (#37613341)
Quantum (mentioned by parent post) is what Firefox calls their Servo bindings.
Re:I'm fed up with it, so I'm writing a browser by hu3 on Friday September 22, 2023 @07:37AM (#37610666)
Re:I'm fed up with it, so I'm writing a browser by niutech on Saturday September 23, 2023 @01:37AM (#37620819)
Apart from Servo and Ladybird, there are also: NetSurf, Ultralight, Ekioh Flow.
Re:I'm fed up with it, so I'm writing a browser by davedx on Friday September 22, 2023 @04:53AM (#37609619)
> "Writing a browser" (from scratch) at this point basically means you are implementing a type of portable operating-system-in-a-box (the web platform) and that it will be compatible with whatever Google decides to add to theirs.

I'll bite... why? Most websites follow HTML and ECMAScript. Why do you need to do anything Google does? Isn't the whole point of this project to decouple from what big tech companies do?

The vast majority of websites don't want to follow whatever Google-only shit they've come up with most recently, whether it's adtech, AMP, DRM, or whatever.

Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @05:50AM (#37609993)
Study the Microsoft and Firefox projects to see why it turns out that way.

The basic thing I am saying is that if you call it a web browser and use the same core protocols etc., you have a practically infinite (for an individual) set of requirements to implement and will never be truly compatible.

What ideas like Tersenet and systems like Gemini propose is similar to what you say, except even simpler. HTML and ECMAScript are quite complex and have a lot of challenging expectations as far as performance and flexibility.

The idea is to try to break things off in a clean way that is feasible to implement without having to worry about a fuzzy and ever-expanding definition of what you have to support.

Re:I'm fed up with it, so I'm writing a browser by zdunn on Friday September 22, 2023 @10:49AM (#37612790)
> The basic thing I am saying is that if you call it a web browser and use the same core protocols etc., you have a practically infinite (for an individual) set of requirements to implement and will never be truly compatible

But what the parent is saying is you don't have to be compatible with 100% of websites. If you build a browser with good HTML/CSS/Javascript handling, you'll be compatible with the large majority of the web. Yes, there are other specs that are in use by a tiny portion of the web. But your browser can still exist if it doesn't support them. Users of that website will know or find out that they can't use your browser for that, but for every other user that browser could be exactly what they need.

> without having to worry about a fuzzy and ever-expanding definition of what you have to support.

It's only ever-expanding if you're trying to keep up with the Jones's. You can define a subset of the web you want to support and build a clean, small browser that supports that.

Re:I'm fed up with it, so I'm writing a browser by emodendroket on Friday September 22, 2023 @02:23PM (#37615700)
> If you build a browser with good HTML/CSS/Javascript handling, you'll be compatible with the large majority of the web.

Will you? I very much doubt this is the case.

Re:I'm fed up with it, so I'm writing a browser by labcomputer on Friday September 22, 2023 @05:03PM (#37617771)
> I'll bite... why? Most websites follow HTML and ECMAScript. Why do you need to do anything Google does? Isn't the whole point of this project to decouple from what big tech companies do?

Because Google is following the old Microsoft playbook of "embrace/extend/extinguish". They throw shit at the WWW consortium partially to see what sticks, but also in the hopes that websites will adopt the shit, forcing other browsers to add the shit to be able to display those sites.

Google is incentivized to do this because, since nobody else can keep up with the shit-flinging, users switch to Chrome. Then Google gets everyone's data for free, further strengthening their monopoly.

That said, I fully support people trying to build new browsers.

Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Friday September 22, 2023 @05:13AM (#37609746)
You're wrong about a few things. (1) A browser isn't an OS at all, it's a Javascript runtime and a constraint solver (to put all of the boxes in the right places per the CSS inputs). (2) Google doesn't constantly churn the web world anymore, they still do try, but it hasn't been effective for quite some time. (3) Microsoft was keeping up with web standards just fine, but they were falling behind in performance, and that's why they switched to Chromium.
Re:I'm fed up with it, so I'm writing a browser by Const-me on Friday September 22, 2023 @05:33AM (#37609869)
> they were falling behind in performance

They were only falling behind in performance on google’s web pages such as youtube. Read that comment: https://news.ycombinator.com/item?id=18697824

Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Friday September 22, 2023 @05:41AM (#37609932)
[delayed]
Re:I'm fed up with it, so I'm writing a browser by clucas on Friday September 22, 2023 @10:32AM (#37612580)
You are picking the least important detail of the story. The deal is, Google found a simple way to kill the performance of a rival browser... so they exploited it and immediately started advertising how slow the rival was. By the time the rival fixed the performance issue, the damage was done. If true, that's pretty dirty, and it directly contributed to the growing browser monoculture.
Re:I'm fed up with it, so I'm writing a browser by surajrmal on Friday September 22, 2023 @11:12AM (#37613103)
This is a wild conjecture. Whatever happened to innocent until proven guilty? The fact they jumped on it means that someone was paying attention to these metrics, but assuming chrome has any influence on YouTube is laughable.
Re:I'm fed up with it, so I'm writing a browser by rdlw on Friday September 22, 2023 @12:07PM (#37613800)
People are innocent until proven guilty. Corporations are driven by greed and profit until proven otherwise.
Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Friday September 22, 2023 @12:46PM (#37614301)
That's just a trite saying, that doesn't logically follow. "Driven by" is not the opposite of "innocent". If you want to blindly believe what random people say on the internet, simply because said thing was said about a corporation you dislike, that's fine by me. But don't get frustrated when people prefer to look at the available evidence first, and the available evidence is an (alleged) div breaking Edge around the same time as an (alleged) announcement that Chrome was faster. Also the original poster admits that they aren't 100% sure it was related. But you are, I guess?
Re:I'm fed up with it, so I'm writing a browser by rdlw on Friday September 22, 2023 @04:10PM (#37617110)
> "Driven by" is not the opposite of "innocent"

I agree, that's why I didn't say driven until proven innocent. I'm just pointing out that the concept of innocent until proven guilty does not apply, as we have no moral imperative to treat corporations fairly. We're not claiming that any person at Google did something immoral, but that the structure of the corporation resulted in an immoral act. An 'unjust conviction' (so to speak) would not result in a person being imprisoned without cause, so we are free to make the most reasonable decision without the burden of "beyond a shadow of a doubt".

For the record, I'm still not claiming that it was 100% done intentionally, I'm just explaining why I'm inclined to believe something based on circumstantial evidence. Courtroom procedure is designed to protect people (in a perfect world), so I'll only adhere to it if there's someone to protect. I don't think Google is deserving of my, or anyone's, protection.

Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Saturday September 23, 2023 @02:26PM (#37625949)
Well, you'll find it hard to argue with people if you let your philosophical beliefs get in the way of finding common ground. Many people don't agree that "innocent until proven guilty" does not (philosophically) apply to corporations.
Re:I'm fed up with it, so I'm writing a browser by ericjmorey on Friday September 22, 2023 @01:10PM (#37614659)
This isn't a court room.
Re:I'm fed up with it, so I'm writing a browser by clucas on Friday September 22, 2023 @01:22PM (#37614825)
I have no idea if the story is true or not, hence the "if true" clause in my post. I was just pointing out that focusing on the technical aspect is missing the point of the story... the degradation could have been triggered by any number of things, the point of the story was the allegation that Google purposely triggered it and disingenuously used that degradation to claim their browser was faster.
Re:I'm fed up with it, so I'm writing a browser by Calavar on Friday September 22, 2023 @04:13PM (#37617149)
I would be skeptical too if it was just a one time thing, but it wasn't. Around the same time as that HN comment, YouTube rolled out a redesign of their frontend that used the Polymer framework. At the time, Polymer depended on a deprecated web standard that was implemented in Blink and WebKit and used a polyfill elsewhere. This completely killed performance on Firefox and Edge. That isn't unsourced or anonymous information like the invisible div. You can search back and find people complaining on multiple forums that YouTube started running at a crawl out of nowhere and ID'ing Polymer as the culprit [1, 2, 3].

[1] https://hub.packtpub.com/youtubes-polymer-redesign-doesnt-li...

[2] https://news.ycombinator.com/item?id=17612139

[3] https://www.reddit.com/r/programming/comments/91i0mc/youtube...

Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @06:27AM (#37610250)
Think about the depth and breadth of Web APIs at our disposal: Fetch API for fetching resources, Service Workers enabling offline experiences and background scripts, Canvas and WebGL allowing powerful 2D and 3D graphics, respectively, while WebVR and WebXR bring virtual and augmented reality straight to our browsers. There's the Web Audio API providing rich audio processing, the vast array of device interaction tools like Geolocation, Notifications, Web Bluetooth, and Web USB, and even niche functionalities like Screen Capture and Page Visibility to enhance user experiences. The browser even offers robust storage solutions such as IndexedDB, Cache API, and Local Storage. For seamless communication, we've got WebRTC for real-time chats, WebSockets for persistent connections, and Service Workers again playing a pivotal role in background data sync and push notifications. On the performance front, APIs like Navigation Timing and Performance Observer ensure our web apps run smoothly, and for security, there's Web Authentication and SubtleCrypto.

Now, when you pivot to layout and design, the sheer versatility of HTML and CSS is evident. We've gone from classic float and position-based layouts to the modern and responsive techniques offered by Flexbox and Grid Layout. There's the multi-column layout mimicking newspaper designs, the older table layouts now reserved for tabular data, and the extremely vital responsive designs tailored through media queries and adaptive or fluid strategies. This ability to create almost any layout imaginable, combined with the impressive array of APIs, really emphasizes the parallel between browsers and traditional OSes, with the browser now serving as a robust platform for intricate and expansive applications, just like an OS would.

Furthermore, when we talk about traditional OS features, IPC (Inter-Process Communication) is one that stands out – and browsers have their own spin on it. Web Workers and Shared Workers, for instance, enable concurrency by allowing scripts to run in the background without blocking the main thread, which is eerily reminiscent of how OS processes function. The Push API and Server-sent Events can be viewed as a form of "message-passing" mechanism, fostering communication between the server and the browser. And the crown jewel: sandboxing. Browsers inherently sandbox web pages to protect the user, ensuring that potentially harmful code is isolated and can't wreak havoc on the user's system. This level of isolation and security is paramount in an OS, and the browser pulls it off with finesse. Combine this with the robust Web APIs and versatile layouts, and the case for browsers as modern-day operating systems becomes quite compelling.

Another striking resemblance between browsers and operating systems emerges when we consider the world of programming languages. Just as multiple languages can be compiled to target a specific OS, an impressive variety of languages are designed to compile down to JavaScript or WebAssembly for execution in the browser. TypeScript, CoffeeScript, Elm, Dart, and even Kotlin and Scala have flavors that target the web, reflecting the vastness and diversity of this ecosystem. WebAssembly (or wasm) further elevates this paradigm, acting like a low-level bytecode, and welcoming languages like C, C++, and Rust to the web arena. This proliferation of languages and the ability to compile them for a unified runtime environment (the browser) is reminiscent of how diverse programming languages compile to binaries for a specific OS. The flexibility and broad reach of the web's "compilation target" underscore the browser's position as a de facto operating system of the modern web era.

Re:I'm fed up with it, so I'm writing a browser by phendrenad2 on Friday September 22, 2023 @12:53PM (#37614411)
At least make your own argument, don't ask ChatGPT to do it for you. ChatGPT is really stretching to make your point though, as you can see from the laughable use of the phrase "Another striking resemblance between browsers and operating systems" after just listing a bunch of web APIs that no one cares about. (WebVR? Get out of here...)
Re:I'm fed up with it, so I'm writing a browser by ilaksh on Friday September 22, 2023 @02:08PM (#37615487)
People should care about WebXR. It's the closest thing to the concept of the metaverse. Or could be if people cared.

People care about quite a lot of those APIs.

And I asked it to list all of them because it helps make my point.

Re:I'm fed up with it, so I'm writing a browser by dang on Friday September 22, 2023 @04:59PM (#37617714)
Please make your points yourself. Generated comments aren't allowed on HN and we ban accounts that post them.

https://news.ycombinator.com/newsguidelines.html

Re:I'm fed up with it, so I'm writing a browser by ilaksh on Saturday September 23, 2023 @02:42AM (#37621105)
Ok. Sorry. I do find comments that are obviously AI-generated to be annoying also. I know you are busy, and please don't take this as some kind of back talk. I just think it is worth a moment of your time if you can get a little bit more detail on this issue from this "incident".

But just to clarify, this is the first time I have generated a comment, and it was a collaborative effort between me and GPT-4 that lasted like fifteen minutes. It wasn't just a lazy "here is the comment, reply to it".

I was trying to make a better comment. In particular the point I was trying to make was about the sheer scope of web platform functionality and APIs. Which there are so many web APIs that I was using ChatGPT as a research tool. Even GPT-4 said "wow, I can't list _all_ of the APIs, there are too many of them".

Also, I don't see anything on that guidelines page that says anything about AI-generated content being disallowed, so you might consider updating it.

Also, how do you determine if a comment is AI-generated or not? Because the previous version which I had asked it to refine to be in my voice was closer to my writing voice but actually less substantive.

So I had a slightly worse comment ready to go (didn't make the point as well) but I decided to reply with the comment that was better even though it was easier to detect as AI-generated.

I don't think you would have threatened me if you really wanted me on the site. I make a lot of comments on HN, probably spending too much time on here. And I can be fairly, lets say, bold about the content of the comments.

I do remember a recent incident where someone was advertising that they would spend two weeks to build out a basic chatbot for a minimum of $10,000. I can guarantee that person was hoping to spend a half-day or less if they found a customer for a truly simple bot. So the advertisement and business model was dishonest and borderlining on a scam because it misrepresented the time and effort involved and deliberately overcharged for a simple project. That's why I commented on that post.

But I understand that you don't have time to try to parse out how some comments that are obviously on shaky ground might be warranted in some cases.

If you do ban me then I will miss HN. But also, if I am investing a lot of time into this and the comments or submissions aren't appreciated overall, then even for myself, I should reevaluate the use. Maybe socializing just isn't for me, even on a web forum.

Re:I'm fed up with it, so I'm writing a browser by Sakos on Friday September 22, 2023 @06:21AM (#37610205)
Am I wrong in thinking the only thing we're missing for a rich ecosystem of browsers is a modular, independent Javascript runtime/interpreter similar to Java? Java has a bunch of JVMs: https://en.wikipedia.org/wiki/List_of_Java_virtual_machines

Maybe we need Mozilla (and others) to make an independent Javascript "VM" that everybody can use.

Re:I'm fed up with it, so I'm writing a browser by manicennui on Friday September 22, 2023 @07:21AM (#37610570)
Re:I'm fed up with it, so I'm writing a browser by nvm0n2 on Friday September 22, 2023 @09:42AM (#37611963)
That's V8.
Re:I'm fed up with it, so I'm writing a browser by december456 on Friday September 22, 2023 @10:06AM (#37612231)
Mozilla and Google each has one, both open source (iirc). NodeJS uses Chrome's, even.
Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @09:01AM (#37611452)
> The browser is so comprehensive in functionality and APIs

Not really. If you limit your scope by saying that you're building a hypertext document viewer, it suddenly becomes approachable. A lot of the functionality is all that PWA stuff no one asked for and no one is using for anything good anyway.

WebSQL? IndexedDB? Service workers? WebGL? WebGPU? WebBluetooth? WebRTC? Just act like it all doesn't exist. 99% of actual websites — not web "apps" — would not lose any functionality.

Re:I'm fed up with it, so I'm writing a browser by gen220 on Friday September 22, 2023 @09:19AM (#37611669)
In a world where UNIX-inspired systems run most software, I like to imagine that it’s possible for a UNIX-like browser to become dominant.

Recall that UNIX (and C) were built (and adopted) in response to perceived over-complexities in contemporary systems.

Maybe in 20 years we’ll recall + interact with Chrome like how people in the 80s recall + interacted with Multics or OS/360.

To complete the analogy, I guess you’d expect to see this browser come out of former Safari interns/engineers at Apple.

Re:I'm fed up with it, so I'm writing a browser by lib-dev on Friday September 22, 2023 @09:45AM (#37611990)
People interested in building browsers should look into WebKit. You can use that for HTML/CSS/JS rendering and save a lot of time/effort.
Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @10:09AM (#37612279)
But the thing is that if I were to build a browser, I'd start from the requirement that websites should be treated like malware that can't be trusted. Applying my ideas to a preexisting enormous codebase feels troublesome.
Re:I'm fed up with it, so I'm writing a browser by aktenlage on Friday September 22, 2023 @11:38AM (#37613455)
> To complete the analogy, I guess you’d expect to see this browser come out of former Safari interns/engineers at Apple.

Sounds like Andreas Kling: https://www.techgamingreport.com/new-ladybird-web-browser-wh...

Re:I'm fed up with it, so I'm writing a browser by rhplus on Friday September 22, 2023 @09:43AM (#37611973)
No true websites use service workers, just like no true Scotsman puts sugar in his porridge.
Re:I'm fed up with it, so I'm writing a browser by nfw2 on Friday September 22, 2023 @10:08AM (#37612272)
"PWA stuff no one asked for"

You don't speak for everybody.

Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @10:10AM (#37612295)
I've yet to see someone take a PWA seriously.
Re:I'm fed up with it, so I'm writing a browser by iudqnolq on Friday September 22, 2023 @10:34AM (#37612612)
I've seen (many) people use and appreciate Google Maps, for one
Re:I'm fed up with it, so I'm writing a browser by zdunn on Friday September 22, 2023 @10:45AM (#37612728)
Aren't you the developer of Smithereen (a fediverse server)? Nearly every other fediverse software has a web interface that can act as a PWA. I launch lemmy.ml and kbin.social as standalone PWAs from my homescreen. My pleroma instance also has some PWA features (though not standalone display mode). I don't use Mastodon, but @[email protected] did some amazing work years ago to make it a really fast and responsive PWA (which has since been undone ).

It's ok if you don't like to use PWAs but that doesn't mean nobody does or that they're worthless.

Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @11:27AM (#37613314)
> Aren't you the developer of Smithereen (a fediverse server)?

I am. But I'm biased because I'm primarily an Android developer who turned into a web and backend developer for some projects (I still do Android as well). So naturally, web app (not web site) development feels cumbersome to me. It's like trying to build a proper app UI with a souped up version of Word macros and layout engine. I much prefer native apps. Smithereen will have a client API eventually, when all features I deem necessary for version 1.0 will have been implemented. The large remaining ones are photo albums and discussion boards in groups. The yet-unreleased direct messages need some finishing touches as well.

> It's ok if you don't like to use PWAs but that doesn't mean nobody does or that they're worthless.

Well, that's my point — Chrome and Firefox and Safari, being "mainstream" browsers, try their best to satisfy everyone. They support PWAs, they have extensive accessibility support (that's scarily complex as well!), they implement all those APIs and standards that are complex but mostly unused, etc.

If I were to build my own web browser from scratch, it'd have a warning in the readme along the lines of "if you require accessibility and/or PWA functionality, this is not for you, use one of the more advanced browsers".

Re:I'm fed up with it, so I'm writing a browser by alex_suzuki on Friday September 22, 2023 @11:30AM (#37613343)
I’ve written many business process apps that are PWAs.

Install to homescreen is great for customers that don’t want to go through the app store yet still want their employees to have “an app” (something with an icon on the home screen).

Some are even offline-capable.

Re:I'm fed up with it, so I'm writing a browser by nfw2 on Friday September 22, 2023 @12:51PM (#37614386)
You've never met anyone who's used Slack, WhatsApp or Airbnb?
Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @02:09PM (#37615494)
As PWAs?
Re:I'm fed up with it, so I'm writing a browser by zdunn on Friday September 22, 2023 @10:39AM (#37612662)
I asked for it, and a lot of other ppl did too. These are great features and removing them would cause more than 1% of websites to lose some functionality.

But, importantly, they shouldn't lose their core functionality (if they're written well) because that's the "Progressive" part of PWA. If you don't use the feature or your browser doesn't support it, the website should still have basic functionality. One of the big ideas behind PWAs is "progressive enhancement", where you layer on features that may not be supported everywhere but add value when they are supported.

And a progressively built browser that doesn't implement every spec goes hand-in-hand with that. I think having more under-featured browsers like that would push webdevs into caring more about progressive enhancement.

Re:I'm fed up with it, so I'm writing a browser by Lord-Jobo on Friday September 22, 2023 @11:11AM (#37613089)
>99% of actual websites — not web "apps" — would not lose any functionality.

What percentage of user driven web traffic is done through 'web "apps"' and what percentage is 'actual websites'

Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @11:37AM (#37613441)
IMO most of what people do on the web is either reading articles (these don't even need JS), watching videos (no advanced browser functionality needed either), or writing comments and messages (some rather simple JS if any).
Re:I'm fed up with it, so I'm writing a browser by emodendroket on Friday September 22, 2023 @02:19PM (#37615661)
Yes, if you arbitrarily define “Web site” to exclude most Web resources it is easy to declare victory. Maybe you can even have fun browsing some archived versions of Geocities pages.
Re:I'm fed up with it, so I'm writing a browser by hutzlibu on Friday September 22, 2023 @04:03PM (#37617033)
"A lot of the functionality is all that PWA stuff no one asked for and no one is using for anything good anyway"

It is really hard to engage with your comment in a constructive way, if you start by insulting everthing on the web, that is not a simple document (with comments).

So I get it, you don't like the web as a plattform for apps. And it surely is not perfect. But do you have a better plattform independent alternative to offer?

Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @05:08PM (#37617818)
I despise cross-platform GUIs as a concept, but if you must make one, there's plenty of options usable from most languages. Java has Swing, C++ has Qt, there's things like Flutter and WxWidgets and a dozen different GUI libraries for Rust. Heck, you can even build GUIs in Python with tkinter. Every single one of these options is much better suited for an app than the web stack.

My main gripe with using the web stack for building apps is that, unlike proper GUI framework, your platform is not made out of the same kind of code that you're writing. For example, there's a number of predefined layout algorithms that you can choose from and then control some of their parameters, but you can't write your own layout algorithm. You can kinda draw your custom controls, but both <canvas> and SVG are not without their own shortcomings compared to real GUI frameworks. A web browser is a glorified scriptable word processor so it's not surprising that it acts like one.

Yes, there are "paint worklets" and "layout worklets" as proposals. That kinda makes it better but still feels like an ugly workaround. The declarativeness of HTML and CSS, extremely awkward for building app-like UIs with, is also never going anywhere.

Re:I'm fed up with it, so I'm writing a browser by hutzlibu on Friday September 22, 2023 @05:37PM (#37618120)
"but you can't write your own layout algorithm."

Of course you can - in javascript. What is stopping you? (except that you don't like it)

You can also ditch the DOM alltogether and only use the canvas/webgl and maybe your language of choice via emscripten and wasm, if you really cannot stand js/ts.

The web as a plattform is very, very powerful. The app you make, you can ship by simply sending a link. And people can just try it out without installing something and all quite save in a sandbox.

So none of your solutions are better suited than the web stack, if you intend to target the maximum audience with the minimum hazzle. You have to beat that, if you want to overcome the web.

Also, can you give me one example of a nice looking app in swing? Websites are optimized for enabling good UI and UX. Because the moment a user is confused - he is gone very quickly. And people can also customize their experience. I use dark reader and ublock.

HTML and everything around it is often a ugly chaotic mess, but a incredibly powerful one.

Re:I'm fed up with it, so I'm writing a browser by MisterKent on Friday September 22, 2023 @06:23PM (#37618535)
Forget all of that. If you can run actual video games in a browser at 120fps, you can definitely achieve pretty much any UI/ux you can dream. Obviously, within resource constraints. But I don't think there's many UIs you can build that are reasonable and slow on the web but fast in Java swing (or whatever other UI framework you're using)
Re:I'm fed up with it, so I'm writing a browser by grishka on Friday September 22, 2023 @07:12PM (#37618986)
> Of course you can - in javascript. What is stopping you? (except that you don't like it)

If you mean by setting `position: absolute` and then using left/top/right/bottom to position your element, that won't work. You can't plug your code into the browser's layout dispatching mechanism to correctly react to size changes, reflows and all that. You can do that in any native UI framework.

> The app you make, you can ship by simply sending a link.

Depends on what it does. If it needs to store data locally and/or work with files for example, doing that on a website that runs in a browser is a pain in the ass both for the developer and the user. Last time I checked, if you want to generate a file for the user to save, you have to encode it into base64 and "open" it as a data: URI. Isn't that utterly bonkers?

> Also, can you give me one example of a nice looking app in swing?

IntelliJ IDEs.

> Websites are optimized for enabling good UI and UX.

Is that the reason there's so much whitespace everywhere these days? Is that also why all controls are so confusing that you sometimes have to try interacting with them to understand what they do?

> Because the moment a user is confused - he is gone very quickly.

Not everyone's goal is to simply have as many users as possible.

Re:I'm fed up with it, so I'm writing a browser by hutzlibu on Saturday September 23, 2023 @03:14AM (#37621252)
"If you mean by setting `position: absolute` and then using left/top/right/bottom to position your element, that won't work."

Erm, but it does? You can listen to resize events and you can get the exact width and height values of all the elements in the DOM. I am using that technic since I switched to the web (when box layout did not exist yet).

The only problem with this is, that you can create performance bottlenecks easily, as reading clientWidth might trigger a forced reflow. So it might not be easy at first to get everything right, but it is totally possible.

Also you can just use a different GUI framework or build your own.

"Not everyone's goal is to simply have as many users as possible."

Mine neither, but those who do (the majority) made sure, the web is suitable to be used by even the most tech illiterate people. My mother can surf the web to get mostly what she wants - but she cannot use a file browser, nor does she really know what a file is (and she does not want to know).

"> The app you make, you can ship by simply sending a link.

Depends on what it does."

Sure, if you want native file system access, you would be breaking the sandbox. And yes, this is my biggest pain point with the web as well - that it often cannot decide whether it serves untrusted websites or enables app developement where the user trust the app. For example there is no (easy) way to get the pixel data from html elements, because of security. Which makes sense for malicious add filled websites, but not when developing something real, where the user could give permission. Here the focus on the dumbest users who just all allow everything, so the browsers have to protect them and allow no one to use proper permissions is really annoying. Because yes, I also would just like to have file access and other things permissions don't allow.

Re:I'm fed up with it, so I'm writing a browser by thiht on Friday September 22, 2023 @05:58PM (#37618341)
> no one asked for and no one is using for anything good anyway

Speak for yourself. This is a crappy attitude honestly, you might want to keep an open mind on things you don’t have an interest in

Re:I'm fed up with it, so I'm writing a browser by darepublic on Friday September 22, 2023 @11:11AM (#37613087)
> The browser is so comprehensive in functionality and APIs, and such a challenge to keep up with Google's constant churn of new features and total dominance, that not even Microsoft could do it.

I always suspect that it's not that they couldn't do what you describe per se, it's that they couldn't do that within other shareholder driver parameters to make them want to do it.

Re:I'm fed up with it, so I'm writing a browser by emodendroket on Friday September 22, 2023 @02:23PM (#37615707)
Well, sure, if they were happy to burn money with no tangible result they could probably keep going as long as people are buying other MS products.
Re:I'm fed up with it, so I'm writing a browser by hutzlibu on Friday September 22, 2023 @04:14PM (#37617166)
They just realized they didn't really needed their own rendering engine. It would have been a nice to have, like in the old days of IE6, where they could decide over the direction of the web.

But more valuable to them is that people are using a browser they control (no matter the tech within) - which is why they try to push you to edge however they can.

Re:I'm fed up with it, so I'm writing a browser by khimaros on Saturday September 23, 2023 @07:09AM (#37622160)
related, a subset of html supported by Qt: https://doc.qt.io/qt-6/richtext-html-subset.html
Re:I'm fed up with it, so I'm writing a browser by khimaros on Saturday September 23, 2023 @07:43AM (#37622375)
also, a related HN thread about minimal subset of HTTP and HTML: https://news.ycombinator.com/item?id=23731606