News for hackers. Stuff that matters.
Re:Servo, the parallel browser engine written in Rust by smarkov on Saturday May 27, 2023 @07:58AM (#36093974)
Without downplaying all the effort being put into this, I think we're just digging a deeper hole.

Websites do more or less the same thing they did 15 years ago but they are now 20 times more complex to develop and maintain. A good amount of developers would rather donate a kidney than write CSS. Accessibility is a hack. Performance is getting worse despite us having better than ever hardware. We're spending large amounts of time reinventing the wheel. JS is a horrible, bare bones language which is why you can't get anything done without 100 packages.

It's time to move away from HTML/CSS/JS. They worked great for as long as they did but instead of further contributing to the mess that they've become, we should be looking into alternatives.

Re:Servo, the parallel browser engine written in Rust by o1y32 on Saturday May 27, 2023 @08:28AM (#36094176)
The second paragraph is just simply plain wrong throughout. You should actually learn the web stack and look at how things work in 2023 instead of reading other people's rants or secondhand opinions to form your own opinions. CSS is not hard. Performance talking is meaningless without benchmarks. No, you can definitely build a decent small website with a few or even no package dependencies. Maybe do a reality check first.

> It's time to move away from HTML/CSS/JS

Just meaningless empty talks over and over on HN. People who don't understand web stacks ranting about web without knowing the complexity and nuances. What alternatives do you have? Are they going to provide enough features and customization as the status quo? Will this new thing achieve at least 80% of development speed? Many companies adopted web stack for their application because of the flexibility and time to deliver. They make products, instead of being a purist

Re:Servo, the parallel browser engine written in Rust by tjoff on Saturday May 27, 2023 @09:15AM (#36094561)
Alternatives we have?

Regular good old html without or with minimal amount of javascript. Absurdly fast compared to todays site. Many orders of magnitude less power.

Faster to develop and better user experience too.

But I also think we should think about alternatives. Things like gemini are interesting but will have a hard time go mainstream. But I do believe we need something completely new because the user hostile nature of the web today is so devastatingly toxic that I see no hope for the future.

Re:Servo, the parallel browser engine written in Rust by pferde on Saturday May 27, 2023 @10:16AM (#36095002)
The best thing would be to split webpages and webapps. Webpages can keep using HTML with some minimalistic, gracefully degrading javascript, while webapps need something better than hacks upon hacks upon hacks upon ... on top of technology that was meant to display static interlinked documents.
Re:Servo, the parallel browser engine written in Rust by elementalest on Saturday May 27, 2023 @01:45PM (#36096643)
Isn't that whats happening to a certain extent with wasm?
Re:Servo, the parallel browser engine written in Rust by solarkraft on Saturday May 27, 2023 @06:16PM (#36098936)
I don't see how
Re:Servo, the parallel browser engine written in Rust by ttfkam on Saturday May 27, 2023 @11:17AM (#36095478)
> Regular good old html without or with minimal amount of javascript.

You just described Svelte. All the JS minimalism and speed without sacrificing the power.

Re:Servo, the parallel browser engine written in Rust by emptysongglass on Saturday May 27, 2023 @04:09PM (#36097786)
(Not a web developer just curious): does Astro also offer this?
Re:Servo, the parallel browser engine written in Rust by ttfkam on Thursday June 01, 2023 @03:17PM (#36155998)
I know next to nothing about Astro.
Re:Servo, the parallel browser engine written in Rust by ttfkam on Thursday June 08, 2023 @10:16AM (#36242253)
I looked into this and here are my thoughts:

Astro is a static site generator, which is different from a full dynamic component library and rendering/routing framework.

Looks like a stripped-down version of SvelteKit with prerender = true. https://kit.svelte.dev/docs/page-options#prerender

I wonder if Astro will remain a simple static site generator. If it tries to add dynamism (and complexity), I think it will lose some of its luster. But if all anyone needs from it is a static site generator, it looks very clean.

A lot of the functionality and minimalism leads me to believe it was inspired by Svelte and other recent web tools. That said, the complete lack of JavaScript in the output seems to me like a stylistic—even ideological—choice rather than an established use case. Still, it's easier to make a simple solution elegant than a complex one.

Astro fits into its intentionally small niche very well.

Re:Servo, the parallel browser engine written in Rust by LeFantome on Saturday May 27, 2023 @11:58AM (#36095765)
It depends on what you mean by user hostile.

Gemini is cool but probably just repeating the pattern. If companies and users wanted that, HTML use would have gone a different way.

The truth is that both consumers and producers of even “simple”, “static” content want a lot more than these kinds of solutions offer. We have web fonts, animated gradients, SVG logos, responsive layouts, and the like because people want them. Choosing another tech that lacks them will only result in them all getting added back again.

Re:Servo, the parallel browser engine written in Rust by tjoff on Sunday May 28, 2023 @03:26AM (#36101906)
I really, really, don't think the consumers care about that at all. They were never asked and they have no choice in it.
Re:Servo, the parallel browser engine written in Rust by akarlsten on Sunday May 28, 2023 @04:05PM (#36107259)
Yeah, that's why absolutely nobody bought color TVs back when those first became available.. /s

People care about things looking nice. In particular, people who pay others to create websites also obviously want their stuff to stand out, look nicer, and "pop" more than the competition - and the things the person you replied to listed is part of that.

Re:Servo, the parallel browser engine written in Rust by tjoff on Sunday May 28, 2023 @04:11PM (#36107320)
And then they put on full page banners and autoplay videos? Bullshit

Todays pages do not "pop", they abuse.

Re:Servo, the parallel browser engine written in Rust by akarlsten on Monday May 29, 2023 @05:29AM (#36112244)
That's not the fault of the underlying technology, if anything it will be EASIER for predatory adTech to display such things when the entire UI is rendered in an opaque <canvas>-equivalent. How do I get uBlock to block specific elements (like a video player) when there is no longer a discrete video element to block?
Re:Servo, the parallel browser engine written in Rust by tjoff on Monday May 29, 2023 @06:44AM (#36112630)
It isn't, but the sad state of affairs is that if it exist it will be abused.

... yes, and welcome to this thread which is about alternatives that tries to avoid that.

Re:Servo, the parallel browser engine written in Rust by solarkraft on Saturday May 27, 2023 @06:14PM (#36098925)
> I do believe we need something completely new because the user hostile nature of the web today is so devastatingly toxic that I see no hope for the future.

Capitalism ate the HTML web and it's native to expect that it wouldn't eat the gemini web given there's a profit to be made. The thing that makes an alternative technology non-hostile is simply that it's too unpopular to make a profit from making it suck.

Re:Servo, the parallel browser engine written in Rust by tjoff on Sunday May 28, 2023 @03:27AM (#36101914)
I know Microsoft tries their hardest to change this we barely see this on the destkop.
Re:Servo, the parallel browser engine written in Rust by smarkov on Saturday May 27, 2023 @09:40AM (#36094753)
> You should actually learn the web stack and look at how things work in 2023 instead of reading other people's rants or secondhand opinions to form your own opinions.

I didn't base my response on anybody else's words. I've been around the web since the good old days where jQuery was the norm and everything had a phpBB forum. It's coming from my own experience and observations.

> Will this new thing achieve at least 80% of development speed?

You're so concerned with development speed, yet you're rewriting the same thing in a new framework every 2 years.

Re:Servo, the parallel browser engine written in Rust by refulgentis on Saturday May 27, 2023 @10:21AM (#36095039)
OPs right, and it's sort of immature to pretend its all broken and say wildly false things like "you're rewriting the same thing in a new framework every 2 years." Who is? That sounds like a management problem, not a...I don't even know, language problem? Package manager problem?
Re:Servo, the parallel browser engine written in Rust by ori_b on Saturday May 27, 2023 @11:01AM (#36095355)
Stack maturity problem?
Re:Servo, the parallel browser engine written in Rust by ttfkam on Saturday May 27, 2023 @11:15AM (#36095452)
I've been around the web since document.write() and <font color=red> were cutting edge.

You're wrong.

There is no way, shape, or form where 2008 web technology is comparable to today. (IE6!!!) Not in styling. Not in consistency. Not in performance. Not in accessibility. Not in security. And certainly not in management of complex sites.

A cursory look at caniuse.com should disabuse you of any notion of stagnation or lack of capability.

Folks rewrite "every two years" because it gets better so quickly. Svelte/Solid/Qwik are clearly steps forward from React. Were you advocating for sticking with older stuff simply because you don't like change? Or did you think C, Unix, et al technologies were born fully formed as they exist today with no evolutionary steps (and missteps) in between?

Re:Servo, the parallel browser engine written in Rust by nirvdrum on Saturday May 27, 2023 @03:28PM (#36097449)
I think the charitable interpretation is there are a whole class of web sites/applications (news sites, e-commerce, etc.) that haven't appreciably changed in the last 15 years. Yeah, there's been some incremental improvement, but the core experience is the same. However, the versions today are generally resource hogs. It's not rare for me to leave a browser tab open and find it grows to > 2GB RAM. I had one hit 28 GB and it would have kept going if I hadn't killed it. One thing I miss on the M1 is the fan kicking on so I know when a browser tab has run away.

I think the OP has a point. We've been building a massively complex ecosystem on a very shaky foundation. The web has indeed advanced, but most of the time it feels like duct taping something onto this monster of a creation. Between backwards compatibility and competing browser vendor concerns, it's hard to push meaningful change through. So many security (especially supply chain) and dependency issues in JS would go away if there were a reasonable standard library. But, there isn't, so we're doomed a large graph of inter-related dependencies that break regularly. The constant churn in frameworks is mostly related to novel ways to work around limitations in the web platform and bridging behavioral differences across browsers.

It's more than just churn in frameworks though. It's depressing how many person-years have been spent on build systems and bundlers or CJS vs ES6. Participating in the open source ecosystem means needing to be familiar with all of it, so it's not enough to pick one and run with it.

Prior to flexbox, people struggled to center content with CSS; it was bad for layout. There's a ton of old CSS out there, much of it accomplishing the same thing in different ways, often with vendor-specific options. You still run into this if you have to style HTML email. Given the difficulty in mapping CSS back to its usages, it's incredibly challenging to refactor. It requires familiarity with the entire product and a lot of guess work to intent since comments don't exist.

Moreover, there have been massive changes in "best practices". React and Tailwind violate the previous principles of unobstructive JS and semantic naming that were the prevailing practices not too long ago. My cynical take is a lot of that is driven by consultants looking to stand out as thought leaders. Regardless, it adds to the complexity of what you need to know if you do have to work with older (often other people's) code.

I'm fairly confident that if we had today's use cases in mind when designing the foundational web technologies we'd have a very different platform to work with. It almost certainly would be more efficient, less error-prone, and likely more secure. It'd be nice if we could take a step back and revisit things. A clean break would be painful, but could work. Developers are already building web apps that only work on Chrome, so much as it pains me to say, having to get all the vendors on board isn't entirely necessary.

Re:Servo, the parallel browser engine written in Rust by solarkraft on Saturday May 27, 2023 @06:07PM (#36098845)
> React and Tailwind violate the previous principles of unobstructive JS and semantic naming that were the prevailing practices not too long ago. My cynical take is a lot of that is driven by consultants looking to stand out as thought leaders.

You're missing that people are adopting this on their own because they enjoy the benefits during development.

This is also my explanation for why apps with the same complexity as 15 years ago are now slower: What Andy Giveth, Bill taketh away. Developers (or rather their management) are choosing to make "lazy" trade-offs, i.e. prioritizing programmer productivity over execution performance. Which makes economical sense.

I wish there was a way to shift the economic incentives because that would change things very quickly. Maybe some browser performance limits.

Re:Servo, the parallel browser engine written in Rust by ttfkam on Sunday May 28, 2023 @11:46AM (#36105080)
The point you appear to be making is the same point made at every step in computing history. It's an old and predictable refrain going back to assembly programmers complaining about the laziness and bloat of C development.

Yes, bad software can suck up all your RAM and CPU time. This was a concern on the family's XT clone with 1MB of RAM. The only reason the bad software back then didn't suck down 32GB of RAM was because they hit the system's limit far earlier than that.

That said, there have always been efforts to reduce the overhead of individual apps. Docker for all its bloat was a dramatic memory and CPU boon over full virtualization. New languages like Go and Rust have much better memory profiles than Java and C# before them. Qwik, Svelte, and Solid are all worlds better in terms of efficiency than React and Angular.

There are clear improvements and also clear highlights of waste within our industry as there has always been. But if you can only see the waste and bloat, you are sadly missing large parts of the whole picture. The truth lies somewhere as a mix of the two extremes, and the overall capabilities of the current landscape are unambiguously more advanced than they were 5, 10, and 15 years ago.

Re:Servo, the parallel browser engine written in Rust by nirvdrum on Thursday June 01, 2023 @08:07PM (#36159183)
I think your summary is a bit too reductive. I laid out a fairly comprehensive list of issues that are unique to the JavaScript ecosystem and you highlight one point I made about wasting resources. I don't see as many parallels with the past as you. Certainly software has bloated. But, few application platforms are as difficult to optimize for as the web. Working with HTML fragments, the shadow DOM, reducing unnecessary renders, figuring out the most efficient way to find nodes, etc. are things you don't have to deal with with most GUI toolkits. The closest thing I've seen is avoiding a full window repaint by only painting a region that's changed.

To tackle that complexity we keep creating new frameworks, but those often bring their own bloat. So, we create new frameworks. Any time a new framework comes out, there's a light-weight variant that follows (e.g., React and Preact). There's potentially money to be made by building an influential library or framework and I think that has had an adverse impact as well. The entire JS ecosystem is built around a commercial package management system. That's virtually unheard of. I guess Maven Central gets kinda close?

My contention is that if we took a step back and re-evaluated the platform and added a real standard library, I posit we could cut a lot of this out. You could take everything that's good and make it better.

Re:Servo, the parallel browser engine written in Rust by ttfkam on Friday June 02, 2023 @10:12PM (#36173033)
> My contention is that if we took a step back and re-evaluated the platform and added a real standard library, I posit we could cut a lot of this out. You could take everything that's good and make it better.

Many have tried over the years, including in the early years before we had a neutron star's worth of code built on top of it over the decades that followed.

To be pedantic, browser APIs are already a standard library. The behavior of the HTML parser is 100% defined even in the case of imperfect (to say the least) input. Things like classlist, dataset, history, tab index, event handling... they're all there. If you don't LIKE the standard library or you think it is insufficiently elegant, that's your prerogative, but it's a standard library (emphasis on published standard) with multiple implementations.

As a counterpoint, Qt, GTK+, Tk, Swing, Godot, Kivy, FLTK, etc. are not standards nor are they faster for development, more secure, or easier to start working with. Sure, after you get past the (much larger) barriers to entry and actually get something working on one platform like Ubuntu Desktop, you have to refactor/rewrite for MacOS, Windows, and... other flavors of Linux. And no cheating! A Qt app running on MacOS needs to look like a Mac app, not a Linux app that happens to run on MacOS. Every UI toolkit out there with a "better" API just has one implementation (aka not a standard) and does not handle all of the use cases the web has grown into. And the toolkits that approach all of the browser's use cases is inevitably not a cleaner API.

This problem is deceptively hard and hasn't been solved over and over again as folks stepped back.

As for fragments, shadow DOM, unnecessary renders, efficient ways to find nodes, etc., I strongly encourage you to try Svelte, especially as a PWA. You might be pleasantly surprised how many of these issues are addressed and surprisingly cleanly.

Re:Servo, the parallel browser engine written in Rust by nirvdrum on Monday June 05, 2023 @10:53PM (#36207486)
> To be pedantic, browser APIs are already a standard library. The behavior of the HTML parser is 100% defined even in the case of imperfect (to say the least) input. Things like classlist, dataset, history, tab index, event handling... they're all there. If you don't LIKE the standard library or you think it is insufficiently elegant, that's your prerogative, but it's a standard library (emphasis on published standard) with multiple implementations.

By standard library, I mean the comprehensive libraries that are shipped out of the box with modern languages. Hundreds of module dependencies (including transitive ones) are added to modern JS applications in order to perform operations that you get out of the box in C++, Java, C#, Go, Rust, Ruby, Python, etc. That means having to pull in 3rd party dependencies just to get a basic app running. It introduces a ton of headaches around compatibility of transitive dependencies, supply chain security concerns, upstream availability, and so on. Yes, ECMA has been progressively adding stuff, but it's a depressingly slow process and often insufficient.

As for the web, I'd barely consider what we have a standard any longer. The W3C was largely cut out of the process. Many "web apps" really only run on Chrome. Google implements what it's going to implement and puts out a token document as a standard. If Apple doesn't like it, they say "no" and developers have to accommodate.

> As a counterpoint, Qt, GTK+, Tk, Swing, Godot, Kivy, FLTK, etc. are not standards nor are they faster for development, more secure, or easier to start working with. Sure, after you get past the (much larger) barriers to entry and actually get something working on one platform like Ubuntu Desktop, you have to refactor/rewrite for MacOS, Windows, and... other flavors of Linux. And no cheating! A Qt app running on MacOS needs to look like a Mac app, not a Linux app that happens to run on MacOS. Every UI toolkit out there with a "better" API just has one implementation (aka not a standard) and does not handle all of the use cases the web has grown into. And the toolkits that approach all of the browser's use cases is inevitably not a cleaner API.

I don't understand the limitation you're imposing on look and feel. It's not like web applications look like native applications in the slightest. It's a big usability problem since you can't learn one set of widgets and consistently use them. I think that was a major step backwards with CSS. While sites can look nicer today than the stodgy look of Netscape, way too often I have to play "guess where the link is" because some intrepid designer removed the underline and coloring so the link looks like normal text. Now that we've decided scrollbars are bad, whole UI elements are completely hidden unless you stumble upon them. All of this has bled into the desktop space since we now have Electron apps and to me it's decidedly worse than what GTK apps look like on macOS.

I'm going to have to disagree on the cleanliness of the API as well. A good UI toolkit provides the ability to layout and scale elements. The also come with a stock set of widgets. It's incomprehensible to me that we don't have a standard tree or tab widget in the browser. I've been pleased by what Shoelaces is doing with web components, but I'd rather just have a standard set of elements that match what I can get on any other platform.

The layout story is a bit better with flexbox and grid layouts, but it took a long time to get there. And good luck if you need to support HTML email; you're back to using tables or a limited subset of inlined CSS. That's stuff Win32 solved and shipped with decades ago. I wasn't part of the design discussion, but I'd imagine it's because CSS wasn't designed for what it's used for today. It was solving the proliferation of display-centered tags, like <font> and <b>. Using the browser as an application platform just wasn't anything seriously considered until MS added XMLHttpRequest for Outlook Web Acces.

Consequently, we have a plethora of ways to layout stuff in the web. Much of that CSS doesn't actually work if you try to resize things so we dropped fluid layouts for fixed ones. Responsive design rectifies some of that, but still often works in discrete fixed-width chunks. Moreover, many developers have no idea what the box model is so they just throw CSS at the page until it looks roughly correct on their browser and never bother testing it anywhere else. Without the ability to use comments or use variables (finally being addressed as well) and CSS is just a mess to work with. And since you can't be sure where a stylesheet is used, they're hard to refactor and hard to detect dead code in. None of those are problems you generally have when working with a platform designed for application development from the outset.

> As for fragments, shadow DOM, unnecessary renders, efficient ways to find nodes, etc., I strongly encourage you to try Svelte, especially as a PWA. You might be pleasantly surprised how many of these issues are addressed and surprisingly cleanly.

Much of the discussion on this article is about the huge churn in the JS world. Every year or two I'm urged to learn a new toolkit that's going to fix all the sins of the previous ones. Maybe that works great if you're maintaining one project. In practice, it means I've needed to learn React, Angular, Svelte, Backbone, ExtJS, and others. That's not time that was well spent. Some of it I still need to keep in my head to work on open source projects that can't afford a rewrite.

I've tried the whole PWA thing out. It's unnecessarily complicated and stymied by iOS limitations. I got it working, but I had to work around some major libraries. Offline GraphQL cache access is an exercise in frustration. I ended up using IndexedDB and custom replication. I needed to add another auth system because JWTs aren't secure to store in the browser storage. Debugging service workers wasn't fun. Debugging in a mobile browser even less so. I'd love for PWAs to supplant all these simple mobile apps. Although, the irony that mobile app development might be the great app reset I'm looking for isn't lost on me. I just wish it didn't come with 30% tax.

I've worked extensively with the web. For about five years I ran a TechStars-backed startup that detected rendering difference is pages across browsers and over time. A sort of automated visual regression testing (called web consistency testing), but did so by analyzing the DOM. I became intimately familiar with the major browsers of the time and had built up a comprehensive knowledge base of how they render things differently. I had to write native browser extensions to work around JS performance issues or interface with the browser in ways not exposed via the DOM. I ended contributing pretty heavily to Selenium in the process as well. I don't mean to say I know everything, but I get the sense you think I'm arguing in the abstract and haven't actually tried working with all of this stuff.

I've also worked pretty extensively with the web building sites and applications over the past 25 years. Initially I was excited by it. No more minimum system requirements! Now I'm dejected to see what we actually have compared to what could have been. I've been burnt out on side project because I'm invariably fighting the dependency graph. I've been told I need to upgrade constantly for security reasons. Semantic versioning doesn't mean much when you have to constantly upgrade because very few projects maintain more than one line of development. TypeScript helps, but I've also had to debug and deal with libraries shipping incorrect TypeScript definitions, undermining the whole system. I've been working to remove dependencies, but in general you run into NIH objections.

I'm happy to keep discussing, but I think we're probably going to have to just agree to disagree. We'll collectively continue to incrementally improve things. We'll almost certainly make backwards steps as well. It's what we have and it's almost impossible to replace. That doesn't mean it couldn't be better with a comprehensive rethinking.

Re:Servo, the parallel browser engine written in Rust by revelio on Monday May 29, 2023 @04:48AM (#36112035)
> Svelte/Solid/Qwik are clearly steps forward from React

<sigh> I thought you were going to take the, "Everyone settled on React and now it's all super stable" line.

Re:Servo, the parallel browser engine written in Rust by ttfkam on Monday May 29, 2023 @01:07PM (#36115782)
I'm sorry, I couldn't hear you over the sound of React Hooks and how classes should all be functions now.
Re:Servo, the parallel browser engine written in Rust by BSEdlMMldESB on Saturday May 27, 2023 @12:25PM (#36095952)
> good old days where jQuery ...

do you remember IE6? that's before jQuery, the time of ActiveX and java applets

you're right that it got better by the time of jQuery...

when I started on this (highschool time for me), we was writting HTML by hand. PHP 3 was used in production; PHP 4 was brand spanking new. CGI was a thing, imagine that! C code used to dynamically make HTML stuff, exposed on the web! (through C? gateway interface)

Re:Servo, the parallel browser engine written in Rust by slater on Saturday May 27, 2023 @12:30PM (#36096002)
*Common gateway interface
Re:Servo, the parallel browser engine written in Rust by TheCoreh on Saturday May 27, 2023 @01:41PM (#36096612)
> You're so concerned with development speed, yet you're rewriting the same thing in a new framework every 2 years.

I think that meme gets thrown around a lot, and it used to be true, but the framework churn of JS has largely stopped at this point. A lot of us (me included) have been just using the same stack for several years now.

Sure, React has evolved since 2015/2016 (e.g. the move to function components and hooks) but the old code still runs, with minimal to no changes. Patterns and best practices have largely been established. You can entirely avoid the bleeding edge stuff and still be productive.

Re:Servo, the parallel browser engine written in Rust by nirvdrum on Saturday May 27, 2023 @02:56PM (#36097234)
Elsewhere in this thread there are comments about needing to continue pace to move beyond React. I don't think we've seen the end of the churn. I agree that React is a pretty stable base these days and you can just work with that, but it's gotten long in the tooth in places so new frameworks are still sprouting up.
Re:Servo, the parallel browser engine written in Rust by revelio on Monday May 29, 2023 @04:52AM (#36112060)
Old code continuing to run isn't what people mean by churn though. jquery still runs. The underlying browser APIs are stable. But you can't say React has stable patterns and best practices when the classes->hooks thing has happened so recently.
Re:Servo, the parallel browser engine written in Rust by lvass on Saturday May 27, 2023 @11:58AM (#36095766)
>What alternatives do you have?

Gemini for pages and if you really need an app, wasm and webgl/webgpu. HTML/CSS/JS can definitely be replaced by better, already existing things, but browsers will still need to understand those for many years going forward, even if everyone suddenly stopped developing with them.

Re:Servo, the parallel browser engine written in Rust by FireInsight on Saturday May 27, 2023 @03:35PM (#36097509)
WebGPU/GL can't replace HTML on the web, even in webapps, because it has zero accessibility or semantics
Re:Servo, the parallel browser engine written in Rust by lvass on Saturday May 27, 2023 @04:53PM (#36098192)
Webapps don't really have semantics. Accessibility is the toolkit's job, leaving that to the web platform invariably generates half baked results in an app.
Re:Servo, the parallel browser engine written in Rust by kitkat_new on Saturday May 27, 2023 @12:03PM (#36095803)
> CSS is not hard.

CSS is more difficult than C++

Re:Servo, the parallel browser engine written in Rust by Y_Y on Saturday May 27, 2023 @02:39PM (#36097106)
The tone of this post really rubbed me the wrong way. I know nobody reads the guidelines, and that this post violates them even more, but I really like the civilised interaction norm here and when otherwise earnest and substantive replies come in form that appears to me combative and unempathetic then it's quite disappointing.
Re:Servo, the parallel browser engine written in Rust by forgotmypw17 on Saturday May 27, 2023 @08:40AM (#36094273)
The beauty of the Web stack is that all of what you are describing is optional.

You can write simple, accessible, performant websites, which use JS as a bonus and have all the basic features without. And as a bonus, it works across all the browsers, not just Chrome/Firefox. As a bonus, it works for all the accessibility scenarios, not just the standard ones in the test suites. And as a huge bonus, it's much easier to maintain and less fragile.

I'm personally on the extreme end, what with trying to support not just today's browsers but also the retro mainstream such as Netscape and IE, but you don't have to go that far to have an enjoyable experience with this platform.

Re:Servo, the parallel browser engine written in Rust by lapinot on Saturday May 27, 2023 @09:41AM (#36094761)
> The beauty of the Web stack is that all of what you are describing is optional.

The problem is not that you cannot write lightweight accessible and beautiful websites, you can. The problem is that this is now all part of the "default web browser" and so many people are taking advantage of its widespread availability to use it without a good reason to. Most commonly fingerprinting, tracking, following corporate dev fads, etc. And because of that it is now impossible to have a decent experience using a lightweight browser because so many websites make crucial use of stuff they should really not.

Re:Servo, the parallel browser engine written in Rust by forgotmypw17 on Saturday May 27, 2023 @11:06AM (#36095406)
I don't have a strategy for fixing the entire ecosystem, but for my little corner of the world, I guess I've constructed a mental venn diagram where I only browse at the overlap of "content I'm interested in" and "sites which are accessible to me", and leave the rest of it alone. There is more than enough for me to browse in that space, especially combined with my own websites, that I rarely even think about the horrors you mention.

One of the coolest things about it is that I have noticed over time that obnoxious frontend correlates very strongly with crappy content, so the average quality of what I read and watch has improved drastically. I try to practice a "mental diet", and it has helped tremendously with that.

In some ways, it's not unlike IRL, where there are places I would rather not be, and they have certain tells, and I'm OK with them being there, I just don't go inside if I can help it, and I leave as quickly as possible if I do.

I think the Web is still very young, and now that we have can have ML-assisted markup generation, accessibility will be coming around, just like wheelchair ramps became the norm. Pretty soon, we won't be dismissing a 0.01% browser as not worth supporting, because it will be so much easier to just tell the server, "please remove JS and all but the minimal markup from your pages".

If you want to see a PoC of what this may look like, here is a quick demo video. The NoJS bit is at about 2:30. https://vimeo.com/828698165

Re:Servo, the parallel browser engine written in Rust by cdogl on Saturday May 27, 2023 @08:29AM (#36094181)
> Websites do more or less the same thing they did 15 years ago

As a tech enthusiast, I’ve paid close attention to what tasks I can achieve on my PC (and eventually smartphone) over the past 15 years. In my experience, this is simply not true.

Re:Servo, the parallel browser engine written in Rust by ThunderSizzle on Saturday May 27, 2023 @10:25AM (#36095070)
What has changed significantly on the website side?

My bank website did a full re-design to be modern looking, but it's slower, no longer supports multiple tabs, and links don't work well, especially if you go through the sign in flow. The ones that didn't redesign into a JS heavy spa are still faster and links tend to be more reliable for e.g. bookmarking. They don't look great, but they tend to be more functional.

Re:Servo, the parallel browser engine written in Rust by cdogl on Sunday May 28, 2023 @04:54AM (#36102304)
I can buy something, pay using a number of different standardised mechanisms (debit card details, Apple/Google Pay, other web services like PayPal) and have it quoted for shipping from almost anywhere in the world to my house with just a few presses in a mobile browser or on my laptop. There are a huge number of moving parts involved in providing that experience and it is fairly consistent between large tech players and small.

It might not be flashy stuff like a nice replacement for JavaScript to make developers' lives easier, but a lot of my story above depends on significant advancement in web standards plus industry experience and consolidation. The web (as well as walled gardens like Apple and Google native) has been critical in enabling that. It's the bedrock for the entire digital economy, including many transactions that drive the physical economy. 15 years ago you couldn't even trust that the average user's browser had a decent fetch API.

edit: I do agree that things have gotten slower and everything is terrible.

Re:Servo, the parallel browser engine written in Rust by franklampard on Saturday May 27, 2023 @08:37AM (#36094247)
> A good amount of developers would rather donate a kidney than write CSS. Accessibility is a hack.

Name one :)

Re:Servo, the parallel browser engine written in Rust by satvikpendem on Saturday May 27, 2023 @09:13AM (#36094538)
People who write Flutter, for one, including me to some extent.
Re:Servo, the parallel browser engine written in Rust by ohgodplsno on Saturday May 27, 2023 @01:49PM (#36096679)
Depends. What browsers do I have to support ? The amount of kidneys I donate is directly proportional to how much I have to target IE6, at which point I donate both and would rather die.
Re:Servo, the parallel browser engine written in Rust by capableweb on Saturday May 27, 2023 @08:04AM (#36094019)
> Without downplaying all the effort being put into this

> Websites do more or less the same thing they did 15 years ago

That is a huge downplay if anything :) Websites certainly does the same they always done, the difference nowadays is that there are web apps too, interactive applications, which existed 15 years ago sure, but they didn't have the same scale as today.

But, most web apps today should just be websites, but there are some use cases for web apps too, although they are few.

Once you start to understand there is a difference between websites and web apps, things start to make sense. There is still a huge misuse of making things into web apps, but at least you start to understand why the ecosystem moves in a direction you seemingly don't grasp.

> It's time to move away from HTML/CSS/JS. They worked great for as long as they did but instead of further contributing to the mess that they've become, we should be looking into alternatives.

There is huge efforts into this already, which you also seem to have missed. The whole WASM effort is about being able to write code for browsers in any language you want, and it's already usable today. It's missing some vital things like DOM manipulation to be 100x more useful, but again, still useful today. Lots of games are written in Rust and deployed as WASM for example, runnable in the browser.

Re:Servo, the parallel browser engine written in Rust by SanderNL on Saturday May 27, 2023 @08:48AM (#36094347)
I actually think you have a point. Sure, it’s missing nuance and there are certainly things 2000s tech will not do properly, but to be honest I’m not quite hundred percent sure what the past two decades brought other than funky frameworks and libraries. Useful, but funky. I know for example CSS animations and layout possibilities are off the charts nowadays but they do not strike me as fundamental improvements although the QoL is certainly appreciated.

What happened last two decades is browsers getting their act together though, that made a huge difference.

I’m a webdev. I work with React and Angular. Again, missing nuance but I’m not completely sure we are on the right track at all. Not sure what we should do.

I made a comparison between crystal meth and wordpress before. I’m not sure getting us all on the web (crystal meth) train is the way to go. Sure it’s standard and lots of people like it. It’s cheap.. but yeah. The alternative might be painful (aka not do it).

Re:Servo, the parallel browser engine written in Rust by jeroenhd on Saturday May 27, 2023 @09:02AM (#36094459)
CSS has become much easier. CSS grids and flexbox have removed all the stupid layout hacks from long ago. No more need for HTML tables to get two elements to align. The CSS spec has also improved a lot.

JS has also improved massively, though it can't rid itself of its original flaws it has solved a lot of problems in fifteen years.

Accessibility has become trivial. You really don't need all that much knowledge about screen readers anymore. If you follow the standard even just a little, screen readers will already Just Work.

HTTP/3, WebP, Brotli, and a whole range of technologies have made some of the worst pain points of web development go away for free. No more messing around with connection pipelining, ordering resources to work around the browser load order, minifying text resources manually, you just let the tech stack do its thing and it'll work fine.

The problem isn't the web stack, it's the framework of the week throwing out the last five years of development as "bloat", redefining how things Should Be, and then growing to a form where it's considered "bloat" and replaced again.

I've started my web dev career with PHP on the server. It's really not that bad. The web works fine.

Things that work fine are boring, though. Writing HTML and wiring basic actions to it is tedious work when there are all of these interesting frameworks and methodologies to try out.

Or, in some cases, people skip the basics and start with learning React or another heavy Javascript framework. Who needs to know the difference between a <nav> and a <div class="nav"> when you only have two weeks to get through the bootcamp?

It's really not all that difficult to make websites. Web apps are even easier because you can demand Javascript and all of its tooling to be present.

We've tried replacing the web with apps on phones. As it turns out, that's just as hard, often even harder. The actual problems that make web development hard just aren't easy problems to solve. Throwing complex layers of other people's code over them sometimes helps, but in most cases anything that promises to make web development easy just moves the complexity some place else.

Re:Servo, the parallel browser engine written in Rust by twobitshifter on Saturday May 27, 2023 @09:14AM (#36094545)
Websites do the same thing as 15 years ago? Not true, websites can now exceed desktop apps. Was their figma 15 years ago?

20 times more complex - this comes with doing more. 15 years ago there was no CI/CD.

Write CSS - don’t have to given Sass, components, and bootstrap.

Performance is worse - look at v8 benchmarks, look at webgl and Wasm. The browser itself can run much faster today, and people are doing more with it.

JS barebones - just one package. https://github.com/stdlib-js/stdlib. - and the node ecosystem is a feature not a bug.

Look elsewhere - every other UI framework we’ve tried before has been worse in terms of compatibility, functionality, flexibility, and available prebuilt tooling.

Re:Servo, the parallel browser engine written in Rust by lapinot on Saturday May 27, 2023 @09:37AM (#36094724)
Nothing you say is wrong per se. But what GP is saying i believe is that most website should not need these features to provide value to users. And indeed most website useful to me are still mildly interactive documents. The problem is that web browsers, standards, ecosystems inflated to cater these few webapps needing advanced control over the machine. In a sense web is just the new java: a new environment said to be "cross-plateform" where it is in fact just a new plateform that got its vm ubiquitous.

The web-as-vm has nothing wrong, but it has eaten the web-as-interactive-documents. And now to have a lightweight web experience not focused on webapps i am stuck with the heavyweight runtimes with even more stuff on top just to disable features, lock down invasive websites that grabbed the newly available features to implement invasive anti-features, etc.

Re:Servo, the parallel browser engine written in Rust by speed_spread on Saturday May 27, 2023 @09:43AM (#36094774)
In the late 90's we had native apps with UIs more complex than Figma that ran fine with 1/100 the CPU, RAM and storage we have now. The online rush buried a whole class of development tools that has to be painfully reinvented over the next 20 years and are still bogged down by the incidental complexity of using the web as an application platform.
Re:Servo, the parallel browser engine written in Rust by ptx on Saturday May 27, 2023 @10:30AM (#36095115)
One example of this, I think, is that modern UIs are seemingly no longer able to display large lists. The native win32 API had virtualized list views 27 years ago, since Windows 95 OSR2 [1][2].

[1] https://learn.microsoft.com/en-us/windows/win32/controls/lis...

[2] https://www.geoffchappell.com/studies/windows/shell/comctl32...

Re:Servo, the parallel browser engine written in Rust by aranchelk on Saturday May 27, 2023 @11:38AM (#36095637)
IIRC they were: * Often Windows-only. * Infrequently updated, with bugs bad enough to crash the app, sometimes the system * Dependent on the user to install new versions * Able to access everything on your computer * Non-collaborative * Dependent on you for data backups

These are non-trivial things.

Now that I’m thinking about it, I still don’t have convenient sandboxing of desktop apps.

Re:Servo, the parallel browser engine written in Rust by speed_spread on Saturday May 27, 2023 @01:14PM (#36096395)
We have online package managers, garbage collected languages, containers, unit testing, memory protection, remote backups, cross platform UI toolkits - None of the issues you mention required having to serve everything through a browser window set in motion by a subpar language written over a weekend with cosmetic considerations as first design principle.

BTW you can have easy app sandboxing today using flatpak, works like a charm on Fedora.

Re:Servo, the parallel browser engine written in Rust by ptx on Saturday May 27, 2023 @06:49PM (#36099190)
Is the Flatpak sandboxing actually secure, though? Or does it work like a charm because most of the security enforcement is disabled in practice?

Allegedly [1] a lot of popular packages use "--filesystem=host", which completely defeats the security of sandbox by granting access to the user's home directory (i.e, allows arbitrary code execution through modification of configuration files).

I think I would rather trust the browser's sandbox, where sandboxing has been in place from the start and applications are designed for it.

[1] https://flatkill.org/2020/

Re:Servo, the parallel browser engine written in Rust by speed_spread on Saturday May 27, 2023 @11:13PM (#36100828)
It's true many flatpaks are still leaky to match usability expectations. We don't know how to devise proper information partitioning schemes or aren't willing to accept the ones we come up with it.

Ultimately it comes down to who you trust the most. Do you trust your cloud provider to not look at your data and sell you off or do you prefer trusting your local application to not fuck around where it shouldn't?

Re:Servo, the parallel browser engine written in Rust by ori_b on Sunday May 28, 2023 @11:53PM (#36110478)
> Dependent on the user to install new versions

Yes please! Is there a way to prevent tools I use from changing under me without my consent?

Re:Servo, the parallel browser engine written in Rust by satvikpendem on Saturday May 27, 2023 @09:14AM (#36094550)
Indeed, this is one reason why Ian Hickson (who helped create the HTML5 spec) is advocating for moving towards an application platform based on WASM instead. He has some good comments on this thread.

https://news.ycombinator.com/item?id=34612696

Re:Servo, the parallel browser engine written in Rust by imbnwa on Saturday May 27, 2023 @07:07PM (#36099335)
>In theory, HTML is device independent. In practice, we can't even get web apps to work on desktop and mobile, to the point where even sites like Wikipedia, the simplest and most obvious place where HTML should Just Work across devices, has a whole fricking separate subdomain for mobile.

Does he actually know why the cases are separate? Asserting this without any historical analysis is meaningless. For all we know, Wikipedia split desktop and mobile domains before responsive tooling in the browser got good and they just never changed it cause, like most businesses, they have better things to work on as the current solution still works.

Re:Servo, the parallel browser engine written in Rust by zelphirkalt on Saturday May 27, 2023 @09:19AM (#36094591)
While I agree with websites being 20 times more complex, I don't agree with:

> A good amount of developers would rather donate a kidney than write CSS.

If I was doing web development, I would most definitely use modern CSS to make responsive websites. I would prefer it and use it in almost all cases over using JS.

> Accessibility is a hack.

If one uses HTML semantically, and does not resort to hacks, it actually offers a lot of accessibility. More than most "modern" JS-only websites.

> Performance is getting worse despite us having better than ever hardware. We're spending large amounts of time reinventing the wheel. JS is a horrible, bare bones language which is why you can't get anything done without 100 packages.

Yes. Most of that performance loss is due to JS bloat (need to download that framework first), ads, and unwanted tracking.

JS itself has actually improved, at least the APIs for events, DOM access, AJAX, and probably more. What has not improved is the mindset and development practices of developers and companies. Probably 90% of the websites using big frameworks would not need any of it and could live on server side rendered templates like we had more than a decade ago already. Sprinkle in some interactive components only on pages that need them and most of a website's pages would not be affected by that at all. Done.

Sometimes we should take a step back and really ask ourselves what kind of website we are building. What is the character of that website? Is it merely a website that shows some information about a company? It can probably live on server side rendered templates. A blog? Same. Not every website needs to be a "web app". Most of them actually do not.

> It's time to move away from HTML/CSS/JS. They worked great for as long as they did but instead of further contributing to the mess that they've become, we should be looking into alternatives.

I don't agree. It is time to embrace standard and good usage of HTML and CSS and eschew heavy JS frameworks and JS on the server as much as possible. I would not put HTML/CSS and JS into one basket here to throw out things. HTML and CSS have made great progress. JS too, but as I said, the mindset and practices of the ecosystem and people are not there.

Re:Servo, the parallel browser engine written in Rust by HollowEyes on Saturday May 27, 2023 @09:45AM (#36094792)
Agree a load of old crap that could have been achieved in the most part with a better implementation of html frames. Sames sucky problems like publishing barriers, Devs holding sites to ransom. Etc. Etc.

A good open source app for a shop, a church, a school would be a better focus of a million monkeys on MacBooks.

Re:Servo, the parallel browser engine written in Rust by liveoneggs on Monday May 29, 2023 @08:53AM (#36113463)
"good" is a stretch but I think you just described the wordpress ecosystem ;)
Re:Servo, the parallel browser engine written in Rust by kome on Saturday May 27, 2023 @10:21AM (#36095048)
we should go back to hand written html and css, and php when needed. i'm not even ironic.
Re:Servo, the parallel browser engine written in Rust by LeFantome on Saturday May 27, 2023 @11:13AM (#36095441)
It has been educational to watch the SerenityOS / Ladybird team implement browser features. As they make real websites work, you can see how the technologies for even simple brochure sites have changed. For example, logos may be SVG instead of simple images which makes sense given the range of screen sizes and resolutions that need to be supported.

You can also see that CSS continues to grow but in pragmatic ways that actually reduce the amount of JavaScript to do the kinds of things that users expect these days.

On the performance and capability front front, WASM is a game changer.

Regardless of what JS framework is in vogue, I do not think it is fair to say that we are doing the same thing on the web as we always have or even to say that the base technologies are getting more complex for no reason. At least, it is no more fair than any other programming domain. I mean, we can look at Excel and VisiCalc and say that we are creating the same apps that we always have with more complexity and bloat. I mean, people do say that but there is an awful lot left out of that analysis. Even more so if I compare VisiCalc and Excel via Office365 in a browser.

Regular people are routinely accomplishing far more with their computers than they have in the past. More and more of that is being done in web browsers.

Re:Servo, the parallel browser engine written in Rust by smarkov on Saturday May 27, 2023 @11:23AM (#36095528)
> Regardless of what JS framework is in vogue, I do not think it is fair to say that we are doing the same thing on the web as we always have or even to say that the base technologies are getting more complex for no reason.

Certainly. The things you can do on the web have vastly increased, but the things we actually are doing are mostly the same. Read some text, make an account, login, submit a form, make a payment, upload a file. That's what the vast majority of the web has been and still is, yet the path you take to get there is many times more complex and the user experience hasn't proportionally gotten that much better. Arguably, it's gotten worse.

Re:Servo, the parallel browser engine written in Rust by LeFantome on Saturday May 27, 2023 @12:49PM (#36096161)
Well, I think you can break it into two parts. I see the underlying tech getting better, making it easier, and making it faster. Look at the HTML dialogue element as an example.

So, “the path you take to get there” CAN be much improved as a developer.

Now, as a user, you may find that sites that could be simpler are much heavier and complex than you want them to be. My question is why? My argument is that both users and producers of these sites WANT them to be more complex. Which means blaming the technology is misplaced.

Certainly we CAN still make the sites that ran in Netscape 4. Why don’t we?

Re:Servo, the parallel browser engine written in Rust by stjohnswarts on Saturday May 27, 2023 @11:24AM (#36095535)
HTML/CSS are fine, as is javascript, but yeah I don't understand why web pages get bigger and bigger and bigger and slower. Just because we have more bandwidth, I don't know why we have to chew through with ever more complicated webpages. I get stuff like slack or gmail, but showing a company webpage? Why does that take 10 seconds to download and render?
Re:Servo, the parallel browser engine written in Rust by Tagbert on Saturday May 27, 2023 @12:38PM (#36096074)
Ads and all of the frameworks that each ad network include.
Re:Servo, the parallel browser engine written in Rust by LeFantome on Saturday May 27, 2023 @12:57PM (#36096238)
Because users want that? As a result, sites that deliver that deliver more value to their owners than sites that don’t?

I do not subscribe to the view that it is all just collectively worse because we are cooperatively moving things away from our preferences.

I use ancient hardware. I wish the web was much lighter. That said, I do not see the fact that it ( and everything in computing ) keep becomes more and more resource intensive as evidence if some kind of incompetence or collective failure.

It just means I represent too little demand to dictate the supply.

Re:Servo, the parallel browser engine written in Rust by jupp0r on Saturday May 27, 2023 @11:30AM (#36095578)
It always boggles my mind how people on HN keep claiming that websites are slow because of JS when every 10th headline is about raytracing in WebGPU at 60fps or running LLM inference locally in the browser or similar.

Let me open your mind up to the possibility that no language can prevent unperformant applications being written in it and that the vast majority of web apps don't treat performance as their primary concern as long as it's good enough for their particular definition of "good enough".

If you are so motivated, creating high performant web apps is easy. The tooling to make improvements is among the best for all programming languages.

Re:Servo, the parallel browser engine written in Rust by satvikpendem on Sunday May 28, 2023 @01:50AM (#36101528)
Those examples are both using...the GPU. No wonder you can make websites fast if you offload everything to a separate processing unit. Which unironically is one reason why people are pushing for WASM and GPU rendering for canvas as an application platform.
Re:Servo, the parallel browser engine written in Rust by jupp0r on Tuesday May 30, 2023 @04:48PM (#36130536)
Modern browsers use GPUs extensively in their rendering engines. Here's a nice overview presentation on Chrome's rendering pipeline, for example: https://docs.google.com/presentation/d/1i1Brb5FTmjStDpnUeKBp...
Re:Servo, the parallel browser engine written in Rust by FpUser on Saturday May 27, 2023 @12:49PM (#36096162)
>"JS is a horrible, bare bones language which is why you can't get anything done without 100 packages."

BS. I use JS for front ends without any frameworks Just some of domain specific libs. Works fine and I "get the shit done". Sure I prefer compiled type languages like C++ but code in anything if it makes the the project completed faster given whatever constraints.

Re:Servo, the parallel browser engine written in Rust by marcosdumay on Saturday May 27, 2023 @01:54PM (#36096718)
What do you mean? HTML is just a hierarchical document format, and CSS is just a logical document styling language. Those two are about as simple as they can be.

Accessibility is a very hard and complex thing where half of its outspoken "promoters" fight against every gain because they have money invested on the status-quo. That's why it doesn't improve fast.

Most developers avoid CSS exactly like most developers avoid SQL, to avoid logical programing. That doesn't mean that logical programing isn't the best known paradigms for data querying and document styling, it just means that most developers are bad and will avoid learning something as hard as they can. Honestly, I have no idea how to fix this, but conceding our tools to the preferences of the worst of us isn't going to lead to anything good.

JS indeed can be improved. But guess what, many people are working hard to replace it.

Re:Servo, the parallel browser engine written in Rust by kitkat_new on Saturday May 27, 2023 @06:59PM (#36099261)
> Most developers avoid CSS exactly like most developers avoid SQL, to avoid logical programing.

I avoid CSS and don't avoid SQL nearly as much, because the latter is logical, simple and easy to learn.

Re:Servo, the parallel browser engine written in Rust by dathinab on Saturday May 27, 2023 @04:03PM (#36097735)
> Websites do more or less the same thing they did 15 years ago

no not at all

and the browser internally diverge far far more then that in their handling of things