News for hackers. Stuff that matters.
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:29PM (#24171581)
Does anyone think it would make sense to create a drastically simpler set of web standards, so that making web browsers would become much simpler?

Such a simpler web spec would be relatively fast moving, not focused on backwards compatibility, but instead on simplicity of implementation. HTML would have to be written correctly (eg. balanced tags), old styling mechanisms would be removed so that layout engines wouldn't have to accommodate them. Everything would be pared down.

I believe this would open the playing field for many people to create browsers, would breath life into the now basically empty browser space and the Web in general.

Of course adoption would be a big issue, but that's always a big issue. I wonder why this wouldn't make sense to try, given the current state of affairs. It doesn't make sense to just give up on the Web. Why not re-invent it a litte?

Re:Kosmonaut: web browser from scratch in Rust by userbinator on Saturday August 15, 2020 @05:29PM (#24172572)
a drastically simpler set of web standards, so that making web browsers would become much simpler

Yes, yes, yes!

would be relatively fast moving, not focused on backwards compatibility

No, no, no! Constant churn is precisely the problem with the web today, as it is what creates all that complexity and bloat. What you really need is a simple and stable set of standards, ideally something that won't change in decades (somewhat like how ASCII has been) so that any implementors don't have to engage in mindless trendchasing.

In fact, we already have a simpler set of web standards. It's called HTML4 and CSS2. Browsers like Dillo and NetSurf handle them well, and site like HN and Craigslist are an example of what the resulting format is like.

Re:Kosmonaut: web browser from scratch in Rust by bzbarsky on Saturday August 15, 2020 @11:55PM (#24174920)
Unfortunately, HTML4 and CSS2 are severely underspecified, so actually implementing them interoperably without reverse-engineering is impossible. Oh, and some places where they _are_ clearly specified that specification is more or less broken. For example, implementing comment parsing per the letter of the HTML4 spec is extremely not-web-compatible, and I doubt that either Dillo or NetSurf do it...

Now if you know which things to avoid (e.g. never put "--" inside your comments) and don't care about "pixel-perfect" rendering or any sort of interesting layout, HTML4 and CSS2 are not terrible. But if you care about any of that, watch out for dragons.

And before someone brings up "tables" for "interesting layout": table layout is unspecified. In CSS2, and CSS3 for that matter. Not only is it unspecified, it's not entirely interoperable across browsers even now, after literally decades of reverse-engineering each other. And for extra fun, WebKit/Blink's implementation is definitely not interoperable with the IE (Trident) implementation most table-based layouts targeted... As one example, changing the order of rows in the table can change the column widths in Blink but not in Trident.

Anyway, if one wanted to start with HTML4 and CSS2, one _could_ try to turn them into proper standards that can be interoperably implemented. It would take quite a lot of effort to do that, I suspect. 50 person-years is my initial guess, but there are a _lot_ of unknowns involved and a lot would depend on how much of the HTML5 and CSS-post-2 work that defined things rigorously could be leveraged.

Re:Kosmonaut: web browser from scratch in Rust by userbinator on Sunday August 16, 2020 @12:51AM (#24175240)
and don't care about "pixel-perfect" rendering or any sort of interesting layout

A common theme in all these "reinvent the web/browser" discussion is going back to the web as a hyperlinked document library and not an application platform, in which case pixel-perfect rendering is neither necesary nor even a goal.

For example, implementing comment parsing per the letter of the HTML4 spec is extremely not-web-compatible

HTML5 parsing is completely specified and definitely compatible, even the error cases. Any stream of bytes will turn into a DOM. (Philosophical question: are they even errors anymore, if all implementations will produce the same output?) Perhaps that would be a good starting point.

Re:Kosmonaut: web browser from scratch in Rust by bobthepanda on Sunday August 16, 2020 @03:02AM (#24175849)
> A common theme in all these "reinvent the web/browser" discussion is going back to the web as a hyperlinked document library and not an application platform, in which case pixel-perfect rendering is neither necesary nor even a goal.

And how exactly would one even put this genie back in the lamp?

Re:Kosmonaut: web browser from scratch in Rust by taneq on Sunday August 16, 2020 @06:32AM (#24176707)
Have HTML5 as an application platform and markdown or something as a hyperlinked document format?
Re:Kosmonaut: web browser from scratch in Rust by dredmorbius on Sunday August 16, 2020 @07:21AM (#24176888)
Which Markdown? There are so many to choose from....

In seriousness: Most Markdowns are 1) fairly similar and 2) sufficient for the vast majority of documents. If the goal is a stable, mature, and complete markup language, I'd be inclined to give LaTeX top billing. Markdown can of course generate LaTeX.

Re:Kosmonaut: web browser from scratch in Rust by majewsky on Monday August 17, 2020 @06:34AM (#24185877)
(La)TeX is a bad fit because its document model is based on paginated documents with a fixed page size, whereas HTML documents are intended for variable viewport size. LaTeX is to HTML as PDF is to EPUB.
Re:Kosmonaut: web browser from scratch in Rust by dredmorbius on Monday August 17, 2020 @02:21PM (#24190127)
No it is not.

LaTeX can, whether through the old model of dvi, or modern tools such as xlatex and pandoc, directly produce numerous document formats or "endpoints" as I consider them, including HTML, ePub, plain ASCII (or UTF-8) text, or paginated formats including ps, PDF, and djvu. LaTeX is not itself fundamentally print-oriented. The fact that it can and does produce excellent print-formatted output is a feature, not a bug.

What it is, and pointedly in ways that HTML lacks, is capable of intrinsically handling document-centric (not merely "print") elements including footnotes, endnotes, and formulae, all of which still require kludges after over a quarter century on the Web.

Markdown itself does not address several typographic or document conventions, including formulae, but also odd omissions such as underline and coloured text. Whether those get shimmed into Markdown, or an alternate (light- or heavy-weight) markup language is adopted, isn't clear, but those are very annoying lapses.

For the vast majority of documents, this does not matter. Most online content, say news media, use little more than paragraph, italic, and anchor elements. Even bold and list are rarely used. Authoring in Markdown should be almost wholly sufficient, but it's (La)TeX which has sufficient richness of expression to serve as the common underlying document format language.

Late edit: It also occurs that another principle angle of attack on HTMK alternatives, raised elsewhere in this thread, is that these cannot guarantee pixel-perfect presentation. That results in rather a "damned if you do, damned if you don't" situation: propopsed markup alternatives either cannot guarantee layout or over-guarantee layout. These objections rather want for consistency.

Re:Kosmonaut: web browser from scratch in Rust by bobthepanda on Monday August 17, 2020 @04:41AM (#24185289)
And how would one exactly get users to actually go with less featured browsers that only show hyperlinked documents, rather than sticking to the jack-of-all-trades browsers that they are using today?
Re:Kosmonaut: web browser from scratch in Rust by cookiengineer on Thursday August 20, 2020 @01:55AM (#24220328)
> HTML5 parsing is completely specified and definitely compatible, even the error cases.

Counter argument: then why do conditional comments behave differently in each browser engine?

I am not talking about trident, but about CSS hacks for presto, gecko, webkit and blink as well.

If every browser would render as specified, we wouldn't have that outcome.

As developers test on webkit/blink primarily, chances are very likely things will not behave the same in other engines, and if blink violates the spec then everybody will also have to violate the spec.

The internet is built on such bad standards that you cannot even rely on HTTP to work correctly. 206 partial content headers behave differently among all web servers and proxies, and even nginx violates the spec there when it comes to multiple ranges, let alone chunked transfer encoding support.

Re:Kosmonaut: web browser from scratch in Rust by dragonwriter on Thursday August 20, 2020 @06:13AM (#24221685)
> > HTML5 parsing is completely specified and definitely compatible, even the error cases.

> Counter argument: then why do conditional comments behave differently in each browser engine?

They don't. IE5-9 sees conditional comments specially, others don't.

> I am not talking about trident, but about CSS hacks for presto, gecko, webkit and blink as well.

CSS isn't HTML5, and those hacks aren't conditional comments, and don't rely on parsing differences.

> If every browser would render as specified

The claim was about parsing HTML5 and generating a DOM, not rendering.

Re:Kosmonaut: web browser from scratch in Rust by tannhaeuser on Sunday August 16, 2020 @01:40AM (#24175501)
Regarding your philosophical question: a markup language that accepts any byte sequence is clearly useless and a travesty of the concept of markup languages as an authoring format.
Re:Kosmonaut: web browser from scratch in Rust by cookiengineer on Thursday August 20, 2020 @01:51AM (#24220310)
A little fact I wanted to add here: tables are unspecified when it comes to their display model. All display models have been changed to reflect the flow model (e.g. display: inline-block means display: inline flow-root behind the scenes).

But the funny thing is: they forgot to specify display: table and everything in it.

If you're interested in all the values that are only buried down somewhere in the specs, I'm building a CSS parser [1] that probably will never be completed.

[1] https://github.com/tholian-network/stealth/blob/X0/stealth/s...

Re:Kosmonaut: web browser from scratch in Rust by tannhaeuser on Sunday August 16, 2020 @01:28AM (#24175433)
HTML4 is specified as SGML vocabulary so I don't see the problem with parsing it, especially if you leave out the script element which introduced irregularities. Yes SGML was seen as complex in 1996, but it's relatively sane compared to the 2020's web stack. Developing a core SGML parser (with mandatory automaton construction and tag inference) can be done in about 0.5 man-years. And developing a CSS 2 renderer should be possible in less than 49.5 years.
Re:Kosmonaut: web browser from scratch in Rust by dathinab on Saturday August 15, 2020 @07:32PM (#24173380)
> ASCII has been

Which of the view tens or so ascii's you mean? Probably us-ascii right? I.e. a thing so limited that it's only supports english and not even most of the other Latin writing based languages.

On the other side if we speak about plain text it hasn't be that stable at all for many years and only somewhat stabilized now with Unicode + utf-8 and utf-16 for legacy reasons. And even now we still frequently get Unicode updates.

The idea that us-ascii is enough/usable/acceptable for anything interfacing with users is IMHO a bubble limited to (small? part of) IT people from certain english native countries.

> In fact, we already have a simpler set of web standards. It's called HTML4 and CSS2.

CSS2 isn't simple. It's also fundamentally unsuited for web applications, which IMHO was still also true for CSS3 until recently (css gid). I mean think about how frameworks (e.g. bootstrap) for years did all kinds of tricks to emulate a css gird like features.

Also HTML5 tags like header/footer/article etc. are a must have IMHO and something like custom elements for better composition and reuse are a must have, too.

The problem with the current complexity of the web lies in my opinion in the combination of how all kind of features where bolted on top of a foundation which wasn't designed for given use cases and many of this features being over engineered.

So I believe such an approach needs to fundamentally revamp or replace both the DOM API and CSS.

Re:Kosmonaut: web browser from scratch in Rust by Uther on Monday August 17, 2020 @02:32AM (#24184561)
The only real charset we should call ASCII is the 7-bit original standard. The 8-bits charsets are ASCII extensions.
Re:Kosmonaut: web browser from scratch in Rust by Aeolun on Saturday August 15, 2020 @06:16PM (#24172899)
There is no chance in hell that you’d get the general web to move back to floating divs to manage layout.
Re:Kosmonaut: web browser from scratch in Rust by core-questions on Saturday August 15, 2020 @07:28PM (#24173359)
No problem, you don't need that. Just use tables.
Re:Kosmonaut: web browser from scratch in Rust by dathinab on Saturday August 15, 2020 @07:37PM (#24173410)
No just css grid, that's all we ever wanted ;=)

(But honestly tables suck bad time, I did wrote some table base hobby website back in 2009? or so and it wasn't nice (the experience, not the website which was quite fine). Sure basing a GUI on a grid is the best thing to do in many cases but tables are no grids. Grids are more flexible.)

Re:Kosmonaut: web browser from scratch in Rust by koolba on Saturday August 15, 2020 @07:58PM (#24173528)
The biggest problem with tables was that they worked.
Re:Kosmonaut: web browser from scratch in Rust by bluejekyll on Saturday August 15, 2020 @09:12PM (#24173935)
Except if you need to support different device sizes and dynamic layout.
Re:Kosmonaut: web browser from scratch in Rust by laumars on Saturday August 15, 2020 @09:34PM (#24174061)
I’m not defending table based layout but in fairness different device sizes was less of an issue back then because almost all browsing was done on a PC or Mac and thus dynamic layout wasn't even something you needed to considerate.
Re:Kosmonaut: web browser from scratch in Rust by chriswarbo on Sunday August 16, 2020 @09:16AM (#24177500)
> different device sizes was less of an issue back then because almost all browsing was done on a PC or Mac and thus dynamic layout wasn't even something you needed to considerate.

It saddens me when Web sites assume they are in a full-screen window :(

Re:Kosmonaut: web browser from scratch in Rust by bluejekyll on Saturday August 15, 2020 @10:07PM (#24174244)
Well, my point was more that it’s not a great option today.

You’re right, back in the day when everyone’s screen sizes were somewhat consistent, it worked, though still had many quirks.

Re:Kosmonaut: web browser from scratch in Rust by inopinatus on Saturday August 15, 2020 @07:56PM (#24173517)
Not sure if you’re joking, because CSS Grid does provide 99% of my layout needs.

(or it would if 5% of my users weren’t still using IE11, but that’s another story.)

Re:Kosmonaut: web browser from scratch in Rust by _underfl0w_ on Saturday August 15, 2020 @08:13PM (#24173613)
Impressive that you remembered having two sets of nested parentheses going by the end of your comment and closed them correctly. Perhaps that's part of the problem...
Re:Kosmonaut: web browser from scratch in Rust by Aeolun on Sunday August 16, 2020 @04:06AM (#24176109)
I’m sure if we still had to use tables someone would have built a React wrapper by now.
Re:Kosmonaut: web browser from scratch in Rust by Grumbledour on Monday August 17, 2020 @12:29PM (#24188766)
I never really understood what people have against float. I think it works fine for most use cases and is not to difficult.

Now table layouts where quite a pain because they got very complex very fast. Flexbox and Grid are fine I guess, but I always found them a bit harder to understand than float and did not so much they offered that I needed.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @09:00PM (#24173860)
Tables should be used for data, not for layout.
Re:Kosmonaut: web browser from scratch in Rust by wildrhythms on Saturday August 15, 2020 @10:16PM (#24174289)
This is true, <table> elements are for tabular data. But look at almost any web layout, and you will notice things are in a table layout most of the time. Even flexbox conceptualizes the flow of children as flex-direction: row/column. I think tabular concepts like rows and columns just make sense to humans making websites, and our 2D x/y axis conditioning.

The real issue with using <table> is semanticism, breaking DOM flow (sometimes creates issues for screen readers), and separation of concerns wrt data and style like you mentioned. Also, <table>s are hard to style over, like wtf is display: table-cell? Nobody seems to know.

But the number of times I see a colleague or fellow frontend cretin re-creating a tabular interface with a bunch of <div class="row"> etc... or wondering how to dynamically size the nested columns to fit the largest cell, I remind them: just use a table. Please.

You might notice that Hacker News layout uses <table>.

Re:Kosmonaut: web browser from scratch in Rust by core-questions on Tuesday August 18, 2020 @03:36PM (#24203304)
All I can say is whatever, man. The semantic web and all the RDF tuple goodness we were supposed to get is mostly a dead dream. Make whatever works for your users. Accept that things aren't going to be pure and perfect. If tables gets me to where I need to be, then that's what I'll use. Worked 20 years ago, works now, will work 20 years from now too.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @07:18AM (#24176880)
I can't imagine any actual web designer wanting to trade flexbox/grid for tables.
Re:Kosmonaut: web browser from scratch in Rust by core-questions on Tuesday August 18, 2020 @03:37PM (#24203314)
What if I told you that there are people who make "web applications" that aren't beautiful or "designer" quality?
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Wednesday August 19, 2020 @04:24AM (#24208313)
Good for them - but a browser which only cater to them is not going to be successful.
Re:Kosmonaut: web browser from scratch in Rust by p4bl0 on Saturday August 15, 2020 @06:14PM (#24172891)
What you say makes me think of the gemini project :).

https://gemini.circumlunar.space/

Re:Kosmonaut: web browser from scratch in Rust by kybernetikos on Saturday August 15, 2020 @07:01PM (#24173173)
That's the key problem - everyone who thinks the web is broken thinks it's broken in different ways.
Re:Kosmonaut: web browser from scratch in Rust by inopinatus on Saturday August 15, 2020 @07:52PM (#24173500)
Bring back DSSSL. After all, what language has a better ratio of fundamental simplicity to expressive power than Scheme? Much of the emergent complexity of styles is due to CSS selectors being intentionally non-Turing-complete.
Re:Kosmonaut: web browser from scratch in Rust by dllthomas on Saturday August 15, 2020 @07:55PM (#24173512)
> better ratio of fundamental simplicity to power

That's an odd ratio to consider. Is high better or low? Or is there some particular positive optimal value we want to target?

Re:Kosmonaut: web browser from scratch in Rust by inopinatus on Saturday August 15, 2020 @08:04PM (#24173558)
Ah, that’s meant as a qualitative figure of speech, not a measurable objective function. Intended to express that Scheme is a simple language that remains apparently simple even when you build tremendously powerful constructs within it and upon it.

In this case by contrast with CSS where no matter how much sophistication one tries to introduce into the styles its capabilities seem to be horizontally asymptotic or very substantially sublinear.

I reach for the word ratio because the concept (of two parameters whose magnitude varies and that would be meaningful in some relation) is a friend, and the word “better” is a writing trick to avoid having to define exactly what those are whilst still expressing the sentiment.

Re:Kosmonaut: web browser from scratch in Rust by dllthomas on Sunday August 16, 2020 @02:43AM (#24175777)
> I reach for the word ratio because the concept (of two parameters whose magnitude varies and that would be meaningful in some relation) is a friend, and the word “better” is a writing trick to avoid having to define exactly what those are whilst still expressing the sentiment.

The use of ratio is entirely appropriate for conveying this, even in non-technical settings (and such use is pretty common). But to my ear, there's a definite implication that the relationship involves the two things typically moving in the same direction (and roughly linearly) such that it's notable when they've moved in opposite directions. (It's still very much qualitative - we're not really going to be able to assign meaningful numbers). Had you spoken of complexity/power, I wouldn't have noticed anything unusual.

Even so, I only really commented because I was enjoying playing with the idea of a simplicity/power ratio being somehow informative.

Re:Kosmonaut: web browser from scratch in Rust by inopinatus on Thursday August 20, 2020 @07:17PM (#24230145)
Rich Hickey could probably make an hour-long conference talk out of it.
Re:Kosmonaut: web browser from scratch in Rust by mikorym on Sunday August 16, 2020 @06:12AM (#24176614)
Wouldn't the first stable release of HTML count as "a drastically simpler set of web standards" together with the fact that any browser should support it?

Everything else is to me a matter of compression. Netflix's success seemed to me 50% good marketing and content and 50% compression and data handling.

It is wrong to think that a webpage has some sort of canonical view on it. And FB, Twitter and even Forbes is all about generating the impression of group perspective being one thing as opposed to be views on one, perhaps elusive, thing.

Re:Kosmonaut: web browser from scratch in Rust by om2 on Saturday August 15, 2020 @08:42PM (#24173766)
HTML4 and CSS2 are drastically underspecified. Even for sites where that's a sufficient feature set, you need to reverse-engineer browsers to figure out error handling and such.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @06:58AM (#24176802)
> HTML4 and CSS2

So no flexbox and grid? Back to using tables and floats for layout? (And reintroducing framesets and font tags!)

Good luck getting web designers on board.

Re:Kosmonaut: web browser from scratch in Rust by efojs on Saturday August 15, 2020 @09:39PM (#24174093)
Maybe something like Pipfile.lock for a site and browser knows what standards to use?
Re:Kosmonaut: web browser from scratch in Rust by Taek on Saturday August 15, 2020 @03:43PM (#24171708)
The challenge with standards is feature creep. Example: amd64

One day Intel goes and implements instructions which support video decoding. And then Microsoft takes advantage of them, and now users have a better experience. Now open source compilers have to implement them and AMD has to implement them and the cost of competing with the giants goes up.

Same thing with browser DRM. Either Firefox implements it, or Netflix tells all of their users that chrome is a requirement.

I don't know how to stop this type of creep.

Re:Kosmonaut: web browser from scratch in Rust by dvt on Saturday August 15, 2020 @03:48PM (#24171763)
> I don't know how to stop this type of creep.

For one, it would've helped if Firefox didn't drop the ball in the late-00s, when Chrome became the de facto best browser around. Google + Chrome did more bad for the web than Microsoft + IE ever dreamt of doing. Having the very same companies that make browsers vested in certain web features is a big no-no, but that cat's already out of the bag.

I'm not really sure if we can put it back in.

Re:Kosmonaut: web browser from scratch in Rust by cure on Saturday August 15, 2020 @04:08PM (#24171948)
> Google + Chrome did more bad for the web than Microsoft + IE ever dreamt of doing.

I'm not sure that's really true. Do you remember the bad old IE days? Half the web was simply broken on non-Microsoft operating systems, because Microsoft refused to follow standards.

They built proprietary extensions to the web, which the rest of the world - and particularly the open source world - had to reverse engineer and spend ridiculous amounts of effort to implement. And despite all that effort, we often never managed to do it - cough _ActiveX_ cough.

The situation back then was much, much worse than today in terms of open standards and cross-browser (let alone cross-OS) compatibility. And that was pretty much Microsoft's fault.

Google and Chrome have lots of problems. But they build on top of Chromium, which is completely open source. It does not have 100% of the features of Chrome, but from a practical perspective that seems to be mostly a non-issue, at least for me.

Re:Kosmonaut: web browser from scratch in Rust by ahupp on Saturday August 15, 2020 @06:43PM (#24173071)
"They built proprietary extensions to the web, which the rest of the world - and particularly the open source world - had to reverse engineer and spend ridiculous amounts of effort to implement."

One example is XHR, which is probably the single defining feature of the modern web.

Good standards simply codify whatever "proprietary" features we've found are useful.

Re:Kosmonaut: web browser from scratch in Rust by mulmen on Saturday August 15, 2020 @04:26PM (#24172088)
Microsoft broke the web in more spectacular ways than Google. Even IE6 itself didn’t always work properly.

But Google has done more lasting damage I think. The effects are more subtle, things work. ...The way Google wants. We may never know what was crushed or lost by submitting to Google’s will. So the harm will be less visible.

Re:Kosmonaut: web browser from scratch in Rust by ksec on Monday August 17, 2020 @03:33AM (#24184888)
Remember most people shit on Chrome and Webkit as the new IE think of IE era as IE 7.

It is like a kid just a saw a few rounds of cross fire than ran and tell the world how is was like World War 2.

Re:Kosmonaut: web browser from scratch in Rust by masswerk on Saturday August 15, 2020 @06:57PM (#24173159)
Talking oft the late 00s, it was actually about Webkit. Nowadays Chrome collects all the merits for the foundation it was once built on.
Re:Kosmonaut: web browser from scratch in Rust by jashmatthews on Saturday August 15, 2020 @11:18PM (#24174682)
It's crazy how much dev mindshare Google captured with Chrome and V8 to the point where WebKit and JavaScriptCore are almost forgotten despite Safari making huge progress in JS performance before Chrome was even released.
Re:Kosmonaut: web browser from scratch in Rust by projektfu on Saturday August 15, 2020 @03:58PM (#24171877)
IIRC, Netflix used Silverlight until DRM in the browser was good enough for their purposes. If it weren’t for web standards, Flash and Silverlight would probably still be in use, and any browser that deprecated plug ins would get the “this site doesn’t work here” message.
Re:Kosmonaut: web browser from scratch in Rust by dvt on Saturday August 15, 2020 @04:03PM (#24171913)
Honestly, and I know this isn't a popular opinion, but I'm okay-ish with DRM (Netflix has to prove, legally speaking, they're at least trying to protect IP). What I'm not OK with is the current Google AMP-page/hiding-URL shenanigans, Chrome limiting/banning ad-blocking plugins, etc. These are all very clearly Google-centric "features."
Re:Kosmonaut: web browser from scratch in Rust by kelnos on Saturday August 15, 2020 @08:45PM (#24173778)
DRM is just security theater that makes us all culturally poorer. Give me the name of a movie on Netflix or any of the other mainstream streaming services, and I'll find you a high-quality copy of it, often with subtitles in many different languages, for the cost of a usenet subscription (you don't even need to worry about a DMCA notice from your ISP for torrenting). DRM is not stopping anything. The studios and streaming services have made it just convenient enough to pay, with nice UI/UX on top.

The reason people pay is the convenience! The DRM isn't required for that. If they dropped all DRM tomorrow, they would lose far fewer subscriber dollars than they spend on DRM implementations, license servers, key management, etc. They're just greedy, want control, and want to keep it illegal to break out of that control.

Meanwhile, any media "purchases" you make are gone in a blink if the company you bought them from goes out of business or just decides they don't feel like offering the service anymore. The funny thing is that most of the buy-to-"own" (where you don't actually own it) prices are similar to the cost of a DVD or blu-ray disc. Ditto for Kindle books and their paperback counterparts. All the promises of digital distribution giving consumers lower prices were predictable lies.

Re:Kosmonaut: web browser from scratch in Rust by mekkkkkk on Sunday August 16, 2020 @07:28AM (#24176919)
I despise DRM as much as the next guy, but its existence makes perfect sense. The moment someone explains to a C level at a studio how easily the content could "leak" from a site without it, it's out of the question to not have it. As the parent poster implied, yes it's security theatre to a large extent, but it does block the very easiest forms of content sharing (i.e. just sharing the video manifest or simply saving segments).

Regarding purchases and licensing, those are still stuck in the same business model and pricing as in the analogue days, this is true. But saying overall consumer prices are the same is ridiculous, since all-you-can-eat content subscriptions is a massive transition with no comparable offerings in the analogue past.

If you want to culturally enrich people, there has never been a better time to consume huge amounts of quality stuff for barely any money.

Re:Kosmonaut: web browser from scratch in Rust by arpa on Monday August 17, 2020 @02:37PM (#24190321)
Thanks to napster and co., who forced the fat cats to look for a solution mind you.
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:50PM (#24171779)
I think feature creep is the #2 issue after adoption, and I think the solution is to adhere to a strong set of priorities, namely: simplicity.

Take your example. In 2020 there are already many ways that video can be decoded simply, efficiently and with excellent quality. We don't need to accept marginal user experience improvement at the cost of simplicity. So we don't accept changes to the standards at the expense of cost implementation complexity.

It's about having a different mantra. Instead of an emphasis on backwards compatibility and bleeding edge user experience, there's an emphasis on a democracy by simplicity.

Re:Kosmonaut: web browser from scratch in Rust by tmd83 on Saturday August 15, 2020 @03:56PM (#24171850)
Right after a comment I realized #3 or perhaps #1 Most popular sites won't adopt the simpler web even if they can afford to do 2 version of their site, even if users like it. Because the lighter web most certainly will be worse for ads and tracking.
Re:Kosmonaut: web browser from scratch in Rust by ghayes on Saturday August 15, 2020 @04:21PM (#24172047)
FWIW, check out CNN's light page [0]. It's an amazing experience for a text-only page that loads blazingly fast.

[0] http://lite.cnn.com/en

Re:Kosmonaut: web browser from scratch in Rust by acjones8 on Saturday August 15, 2020 @10:55PM (#24174535)
If you like CNN's, also check out NPR's and CSM's pages! VoA also has a Gopher mirror and an RSS feed with actual content instead of just a link. I'm still looking for more text only sites like these, but so far these 4 cover general news pretty well.
Re:Kosmonaut: web browser from scratch in Rust by vikiomega9 on Saturday August 15, 2020 @04:40PM (#24172190)
Brilliant. There should be some way to incentivize lite pages, even if only for news websites.
Re:Kosmonaut: web browser from scratch in Rust by tux1968 on Saturday August 15, 2020 @07:35PM (#24173396)
Using them instead of the main page is a good start.
Re:Kosmonaut: web browser from scratch in Rust by DarthGhandi on Saturday August 15, 2020 @08:40PM (#24173757)
Wow, that's such a pleasant experience for a news site.
Re:Kosmonaut: web browser from scratch in Rust by Aeolun on Saturday August 15, 2020 @06:25PM (#24172961)
I think any version of a simpler web would still be 100% compatible with the full version of the web. So you’d really only need to build one version.
Re:Kosmonaut: web browser from scratch in Rust by jefftk on Saturday August 15, 2020 @07:34PM (#24173393)
Perhaps AMP? A declarative specification for websites that is fully backwards compatible with the traditional web via a JS runtime.
Re:Kosmonaut: web browser from scratch in Rust by mofeien on Saturday August 15, 2020 @05:09PM (#24172417)
Maybe the right approach (feature creep beware) would be to bundle this lite web standard tightly with a pay per view API or some other monetary distribution scheme for web content.

Each of the two standards might not receive enough attention on their own, but they complement each other: getting rid of the necessity of ads means going lite is an option for website owners, and the lite web will allow for many different lite web clients (that might finance itself through in-app ads shown to the user). In combination these two might overcome some threshold and gain traction!

Re:Kosmonaut: web browser from scratch in Rust by aleksjess on Sunday August 16, 2020 @03:46AM (#24176034)
That's sadly the thing - you can't. Not until you have community-owned companies providing services being directly competing against tech giants.

Which might not happen, ever. Sadly.

Re:Kosmonaut: web browser from scratch in Rust by pjc50 on Saturday August 15, 2020 @04:59PM (#24172353)
I'm reminded of WAP: https://www.wapforum.org/what/technical_1_0.htm (no, not the Cardi B version)

It was never terribly popular, because who wants to make two sites? Really, that plauges all such plans; everyone wants to build the fanciest, most "modern" site possible, and not do it again for a more constrained version. That's why few sites offer a JS-less version. Only AMP has made some headway, with the weight of the Google hegemon behind it.

Re:Kosmonaut: web browser from scratch in Rust by Brakenshire on Saturday August 15, 2020 @07:26PM (#24173347)
The obvious target is apps, develop a simplified layout/styling model for properties which can be scoped within a component, and build a layout engine which can calculate the layout within those components independently, and then you could radically improve the performance of web UI.
Re:Kosmonaut: web browser from scratch in Rust by om2 on Saturday August 15, 2020 @03:45PM (#24171730)
The limiting factor on making a new browser isn’t specs, it’s existing websites. Very few people want to use a browser that doesn’t work with existing websites, which actually use all the existing complexity.
Re:Kosmonaut: web browser from scratch in Rust by kybernetikos on Saturday August 15, 2020 @03:58PM (#24171873)
This is true for my daily website driver, however there are a lot of situations we might want to use browsers or browser like things where this doesn't have to be the case.

One natural place is for packaging apps. I have a lot of modern web apps packaged so they run as if they were separate applications rather than my main browser. A browser that was focussed on doing this well would still be very useful even if it only worked with the most up to date sites.

Lots of game UIs use internal browsers, which again could be another niche.

And, especially for languages with limited UI capability, a good embeddable browser could provide a decent way to build UIs. Again a niche where backwards compatibility is not so important.

I'd be pretty happy to make a split where I use one browser for document consumption and a totally different one for applications, and perhaps yet another for really old school sites. In an ideal world they could launch each other for the appropriate sites.

Re:Kosmonaut: web browser from scratch in Rust by om2 on Saturday August 15, 2020 @08:39PM (#24173754)
There's browser engines made for niche uses like you describe, where they are intended to serve custom content only, and not real web content. Doesn't seem like they need a different set of standards to be built, though.
Re:Kosmonaut: web browser from scratch in Rust by niutech on Tuesday August 18, 2020 @08:41AM (#24197911)
There are already: Sciter (https://sciter.com) and Ultralight (https://ultralig.ht), not to mention QtWebKit/QtWebEngine.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Saturday August 15, 2020 @04:12PM (#24171972)
Ask web developers if they would like to loose flexbox and grid again.

The thing about balancing tags is a red herring. The HTML parsing logic is not the complex and slow part in a web browser.

Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @04:14PM (#24171989)
I'm thinking the opposite: lose floats. I definitely want to keep flex and grid.

A team at FB implemented flex to power React Native. I'm thinking that effort was made much easier given that they didn't have to account for floats, etc.

Re:Kosmonaut: web browser from scratch in Rust by ptx on Saturday August 15, 2020 @04:46PM (#24172241)
If you're writing a document (not an app) and using floats for their intended purpose, they are useful - and can't easily be replicated with grids or flexbox, I think.
Re:Kosmonaut: web browser from scratch in Rust by dathinab on Saturday August 15, 2020 @07:41PM (#24173430)
Which is the root of the problem, the web was designed for linear top-to-bottom mostly static documents.

But most websites have diverged from this since a long time ago, even such which represent mostly immutable content.

Re:Kosmonaut: web browser from scratch in Rust by quickthrower2 on Wednesday August 26, 2020 @10:36PM (#24289637)
It’s ok we can make a float polyfill
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @07:40PM (#24173429)
Yeah that's a good point. I've always thought pages should, then, specify if they're a document or an app. If you're a doc, you use all the various semantic tags. If you're an app, just use div/span. Maybe the spec could have something like that, app mode and doc mode.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @06:51AM (#24176766)
What would be the benefit?
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @06:48AM (#24176754)
Losing float but retaining flex and grid would not significantly simplify CSS though. Flex and grid are much more complex that float logic.

And floats are useful for primary-textual content. Wikipedia uses it a lot for example. Probably less useful for application-like interfaces.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @04:41PM (#24172194)
I would be OK to get rid of all CSS and other styling, and make it up to the user preferences instead how big a <h1> text is, how big a <h2> text is, how big the normal text is, what colours to use, what fonts are in use, etc. Make a more user-oriented specification, designed primarily for the user to control, assuming the user is an expert at it, rather than the author of the document.
Re:Kosmonaut: web browser from scratch in Rust by warkdarrior on Saturday August 15, 2020 @05:31PM (#24172586)
> assuming the user is an expert at it, rather than the author of the document

But the user is NOT an expert at styling a website, this is why we have designers to figure out which combination of layout, fonts, and colors work well together.

Re:Kosmonaut: web browser from scratch in Rust by calvinmorrison on Saturday August 15, 2020 @07:20PM (#24173307)
Users generally don't give a shit about styling as much as UX designers justifying thier salaries. There are probably more people who suffer daily from accessibility on the web than UX designers in total
Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @05:33PM (#24172605)
Well, they will make styles that are slow and/or that many users do not like. Instead, let it be subject to the user configuration; the web browser designer can put in suitable default settings.
Re:Kosmonaut: web browser from scratch in Rust by yoz-y on Saturday August 15, 2020 @06:11PM (#24172876)
Expert users can already do this using extensions though.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @04:39AM (#24176233)
CSS was supposed to work like that - a user style sheet can override the site stylesheet (which in turn override the built-in browser stylesheet).

Of course this assumes users are competent designers. I think reader mode and similar is a much better solution to the problem.

Re:Kosmonaut: web browser from scratch in Rust by userbinator on Saturday August 15, 2020 @06:03PM (#24172813)
Some browsers have (had) user stylesheets, which can do exactly that.

Firefox (barely) still has that option but it's disabled by default, Chrome had removed it many version ago, and Edge never had it from the beginning. IE11 still has the option.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @07:59PM (#24173532)
I think it may be helpful to have some privileged commands which are only allowed in user stylesheets.

(Additional unprivileged commands may also be useful, such as ability to specify colours by index number, and ability to specify the names of user configuration values where other values are expected.)

Re:Kosmonaut: web browser from scratch in Rust by Razengan on Saturday August 15, 2020 @04:31PM (#24172126)
Being able to develop web pages with something like SwiftUI would be heaven.
Re:Kosmonaut: web browser from scratch in Rust by andrewnc on Saturday August 15, 2020 @04:32PM (#24172132)
Does Flutter fill that niche?
Re:Kosmonaut: web browser from scratch in Rust by cjaybo on Saturday August 15, 2020 @05:21PM (#24172512)
Flutter for web still has quite a few issues that many consider to be deal breakers when considering it for real world use.
Re:Kosmonaut: web browser from scratch in Rust by fils on Saturday August 15, 2020 @05:44PM (#24172695)
what are they.... I would be interested in them as I have been wanting to get time to look at flutter for the web
Re:Kosmonaut: web browser from scratch in Rust by pjmlp on Sunday August 16, 2020 @02:22AM (#24175696)
Flutter for the Web is basically Flash without the tools that made Flash great.

WebAssembly + Skia engine via WebGL.

Using a programming language that only matters in the context of Flutter applications.

Re:Kosmonaut: web browser from scratch in Rust by hinkley on Saturday August 15, 2020 @03:54PM (#24171832)
The last browser I worked on was xhtml-basic, meant for cellphones.

We got most of the standard including CSS compressed down to 85K, using every trick I’d ever heard of and a few we invented.

By far the most fun I ever had at work, and top 2 for nostalgia.

But it got cancelled, and I’m not sure anyone else made a real go of implementing it, alas.

Re:Kosmonaut: web browser from scratch in Rust by kodablah on Saturday August 15, 2020 @04:57PM (#24172341)
This is something that I had envisioned [0][1]. I haven't really worked on it lately, but one thing quickly became apparent: were it not for the Google-ification of AMP (e.g. how it's used, tags for ads, etc) they had the right idea. I think you can go a long way with a backwards compatible subset of HTML and CSS only taking the latest/best of both, disallowing JS, and having an explicit goal of ease of implementation.

0 - https://github.com/cretz/software-ideas/issues/92

1 - https://github.com/cretz/narrow

Re:Kosmonaut: web browser from scratch in Rust by elcritch on Saturday August 15, 2020 @05:09PM (#24172415)
Exactly, just a subset of only the modern elements of HTML & CSS with perhaps a simplified layout could go a long way. For example, if you're building a electron type application you don't need the whole gamut of HTML/CSS, but only a fast well supported subset, especially a subset that works well on GPU's. I've wondered if Servo could be useful for something like that.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Monday August 17, 2020 @05:24AM (#24185499)
I note you want to support table markup in HTML but you don't want to support table layout in CSS. How are tables supposed to be rendered then?
Re:Kosmonaut: web browser from scratch in Rust by ufmace on Saturday August 15, 2020 @05:04PM (#24172390)
It seems sort of cool, but I don't see how anyone would ever agree on what should and shouldn't be included in the "simplified" standards. Instead, you'd have Andy's custom browser implementing 15% of the web, and also Beth's custom browser that implemented a different 15% and so on. Then Chris tries to build a website. If he uses only the stuff that Andy's browser supports, then it'll work there, but probably not in anybody else's custom browser, so what's the point? Just build to the real full web and let everyone use conventional full browsers. Each custom browser implementer would then be incentivized to implement more and more stuff to try and gain a bit more adoption. They'd either just give up, or try to match the real browsers, fail, and then give up.
Re:Kosmonaut: web browser from scratch in Rust by gix12 on Saturday August 15, 2020 @05:14PM (#24172456)
It would be lovely if the whole firefox's html/css/js engine was compilable into webassembly. A new browser could implement webassembly compiler and use firefox rendering engine as a fallback for when their novel rendering engine doesn't support some feature on a website.

Taking it further - the website author could possibly specify rendering engine it prefers to be rendered with(as specific version could simply be downloaded on demand from cdn, like common js/css libraries are). And pure webassembly apps (ie flutter) could skip the html/css/js bloat altogether.

Re:Kosmonaut: web browser from scratch in Rust by rini17 on Saturday August 15, 2020 @05:22PM (#24172514)
This won't do, from the myriad issues I'll pick one: you might encounter an unsupported feature seconds into page loading, or even later, after user already entered some data.
Re:Kosmonaut: web browser from scratch in Rust by gix12 on Saturday August 15, 2020 @05:53PM (#24172751)
That is if you allow dynamic code loading or such dom manipulation to allow it. But for such cases, you should have already started the fallback engine the first time you scanned through the website code.

But fair enough. In the wild you would have to use fallback pretty much always.

Still, webassembly-able gecko would be handy and would allow for experimenting with above mentioned streamlined 'web standard'. Web author could simply sign it's compliance to the 'standard' using meta tags, http headers or some other way.

Re:Kosmonaut: web browser from scratch in Rust by R0b0t1 on Sunday August 16, 2020 @01:11AM (#24175342)
I find it hilarious that you've basically arrived at what Java tried to do so many years ago.
Re:Kosmonaut: web browser from scratch in Rust by htmlproplus on Saturday August 15, 2020 @04:01PM (#24171903)
>I believe this would open the playing field for many people to create browsers

That's why it's not going to happen. Even if you managed to reset the cycle it will just happen again but this time even faster. EEE/standards corruption is just too powerful, I haven't read a single successful strategy to stop that long term. So even a parallel subset of the web doesn't seem immune to that. Like the other day I was reading about KaiOS and you can guess who's already investing in that platform.

Google (and the subsequent overlords) are cancer and there's no cure.

Re:Kosmonaut: web browser from scratch in Rust by MaxBarraclough on Saturday August 15, 2020 @06:53PM (#24173134)
> Such a simpler web spec would be relatively fast moving, not focused on backwards compatibility, but instead on simplicity of implementation.

To mirror userbinator's comment: why would it be necessary for the standard to be fast-moving, if the intention is to offer a radically simplified subset of the web stack?

If the aim is to make it much easier to implement a browser, stability should be a top priority.

I'm reminded of a recent HN discussion on whether it makes more sense to define a minimal subset of HTML, or to use an entirely different language, like Gopher and Gemini. [0] I see several others in the discussion here have already mentioned these two.

[0] https://news.ycombinator.com/item?id=23165029

Re:Kosmonaut: web browser from scratch in Rust by m00x on Saturday August 15, 2020 @08:48PM (#24173796)
No it doesn't.

Web browsers have evolved to basically be an OS. You could essentially revert to the old days where it was simple, but why would you?

Users want more features in their web apps, and the standards/web browsers make it possible.

We don't need tons of web browsers, just like we don't need 100s of operating systems. We just need a few really good ones.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @09:08PM (#24173906)
> Users want more features in their web apps, and the standards/web browsers make it possible.

Well, more features in web apps isn't what I want; it is instead more and better features in the browser itself, such as:

- User stylesheets and user scripts.

- Ability to save and recall form data using local files.

- Ability to load animated GIF/PNG as videos.

- Request/response overriding (this can also be used to add the Do Not Track header).

- ARIA view (even for display on screen, not only for visually impaired).

- Better keyboard commands.

- Table of contents view (displaying the list of <h1>, <h2>, etc).

- Developer console (which I think newest versions of Chrome and Firefox already have, anyways).

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Friday August 21, 2020 @03:26AM (#24232834)
Another feature would be "meta-CSS", which would be only for user stylesheets (and not usable in web pages), and can apply CSS in CSS, for example:

- Apply an animation (or other style) to any CSS styles that specify "text-decoration: blink".

- Specify what colour to use when a CSS rule specifies "background" as the colour name.

- Make all transitions (or animations) twice as fast or twice as slow.

- Prevent certain CSS commands from being used entirely, or change their meaning to a different command.

- Select elements by the CSS rules that the document applies to them (even if those CSS rules are disabled, and even if class names are unpredictable).

- Define exactly how big a "in" or "px" or whatever unit is.

Re:Kosmonaut: web browser from scratch in Rust by Grumbledour on Monday August 17, 2020 @12:37PM (#24188856)
I want to add my personal bugbear, sortable and filterable tables. And Lists of all links on a page. Oh, also expose RSS feeds again. And what about standard form controls that actually could be styled completely with css? Really, the more I think about it, the more come to mind.

While it sounds like it would make browsers more complex, I think it would actually reduce complexity, because the browser would not need even more programming capability and APIs just to enable web developers to create these kind of features themselves in a thousand variations of Javascript that adds bloat to every connection and slows down end user devices.

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Tuesday August 18, 2020 @12:39AM (#24195318)
I agree with these things. I forgot about sortable and filterable tables, but it is correct it should be having. (I would also like the ability to override the browser's default styles without overriding those of the web page, in addition to the ability to override the styles specified in the web page.) If the browser uses SQLite databases for anything (such as bookmarks and cookies), let the user enter SQL commands to sort/filter HTML tables (and export them too, since the commands are entered by the user rather than the web page author, they are privileged).

And, yes, it would reduce complexity in the ways you specified, in addition to improving efficiency and allowing the user more control, and these are good things to have.

Maybe someone will make a web browser program that can do these kind of things.

Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @10:56PM (#24174540)
I didn't mean to suggest we should revert to old days. My vision would be a significant paring down of modern standards, updating relatively quickly even.

As OSs browsers are really bad. You don't have access to the underlying computer, the security model is broken. Just recently Apple announced that Webkit will clear local storage every 7 days (and why? Because the security model is broken). That's not very OS-like.

> We just need a few really good ones.

There is literally only one really good one: Blink. And it's not even that good.

Re:Kosmonaut: web browser from scratch in Rust by dahfizz on Saturday August 15, 2020 @11:27PM (#24174736)
> Users want more features in their web apps

Do they? Or do web developers just chase after new, shiny things?

Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @07:42AM (#24177001)
> Does anyone think it would make sense to create a drastically simpler set of web standards, so that making web browsers would become much simpler?

Everyone wants simplicity but nobody agrees which parts are the superfluous ones. As long you pose the question vaguely enough people on HN will agree because any engineer knows "simplicity is good". But if you get more concrete about what to remove, watch the pushback:

- Lets remove https, http is much simpler. (The privacy and security people will protest: We wanted simplicity but not like that!)

- Lets remove all accommodations for accessibility - who cares about that stuff anyway? (Well at least the people who needs it does!)

- Lets remove flexbox and grid - table tags and spacer gifs were good enough for everyone when I was young! (The law of conservation of complexity: You move the complexity from the browser implementation to the design implementation. Since there are more web designers than browser developers these days, it is not a good tradeoff.)

- Lets remove colors and fonts and interactivity, the web is only intended for reading science papers! (Yeah just like the printing press was only intended to print the Bible, doesn't mean it it wrong to use it for other stuff.)

- Lets remove HTML - people can just download PDF's!

Re:Kosmonaut: web browser from scratch in Rust by y04nn on Saturday August 15, 2020 @08:08PM (#24173582)
A new web stack would be awesome. Using latest technologies available and suppressing backward compatibility. Replacing everything from HTTP to HTML, CSS and JavaScript.

But 2 big issues:

1. You have to get the specs right from the beginning and for the long term

2. You have to get traction to move the whole web to the new standard

Hackers can do it, starting with a small user base, writing blogs on the new stack and improving it day after day, adding new features. Then more people start to use the new stack and Hackers start to build services on it and more people come because it's faster and better structured than the old web. Mission accomplished.

Re:Kosmonaut: web browser from scratch in Rust by qwerty456127 on Saturday August 15, 2020 @03:57PM (#24171866)
> Does anyone think it would make sense to create a drastically simpler set of web standards, so that making web browsers would become much simpler?

Yes, I bloody do!

And by the way there is a less radical alternative option: just give up support for all the legacy features, quirks and redundancies - perhaps this might simplify the code significantly already.

Another fact to keep in mind: there already are Gemini and Gopher.

Re:Kosmonaut: web browser from scratch in Rust by SyneRyder on Saturday August 15, 2020 @04:52PM (#24172299)
And those Gopher browsers can be really tiny. I think both Jaruzel's Gopher Browser For Windows [1] and Phetch [2] are under a megabyte.

Rather than a new web standard or ignoring "legacy", I'd point out that there are even web browsers for the Commodore 64 and Apple II. You don't need to implement every tag, the point of HTML is to ignore tags you don't understand and it should still render. Pages with correct markup are still readable in ancient browsers that don't understand CSS. If your page isn't readable in Lynx and Links, you didn't code it properly.

You can't support every site obviously, but Links [3] has shown you can go a long way by just supporting a subset of web features. The speed when you're not trying to render pixel perfect layouts is astonishing.

[1] http://www.jaruzel.com/gopher/gopher-client-browser-for-wind...

[2] https://github.com/xvxx/phetch

[3] http://links.twibright.com/

Re:Kosmonaut: web browser from scratch in Rust by qwerty456127 on Saturday August 15, 2020 @05:01PM (#24172371)
> the point of HTML is to ignore tags you don't understand and it should still render.

IMHO it could help a lot if a browser could let you configure the way it treat a particular unknown tag: just ignore it with its entire content or treat it like another kind of tag it knows.

Re:Kosmonaut: web browser from scratch in Rust by remram on Saturday August 15, 2020 @08:25PM (#24173683)
I was thinking this. The canvas tag displays its contents if the canvas API is not supported, while the script tag is ignored. This means the browser still has to know about the tag to be able to not-implement it the right way.
Re:Kosmonaut: web browser from scratch in Rust by SyneRyder on Sunday August 16, 2020 @04:09AM (#24176123)
That's a great idea - displaying the contents of a script or a style tag would be a terrible experience. Letting the user configure it would help future-proof the browser too.
Re:Kosmonaut: web browser from scratch in Rust by qwerty456127 on Saturday August 15, 2020 @07:51PM (#24173495)
> If your page isn't readable in Lynx and Links, you didn't code it properly.

Lynx/Links could really use an update (excuse me if they already have it - they didn't the last time I checked). There is nothing hard nor improper in supporting/using most of the HTML5 semantic tags.

Re:Kosmonaut: web browser from scratch in Rust by hliyan on Saturday August 15, 2020 @10:09PM (#24174253)
Gopher would have been great with a facelift.

Another thought: what if browsers develop the ability to render markdown natively (in addition to HTML)?

Re:Kosmonaut: web browser from scratch in Rust by qwerty456127 on Sunday August 16, 2020 @04:03PM (#24180753)
Markdown would need a better specification then. Today we have a number of extended implementations, want even more extensions and most of the implementations won't even handle the trailing double space (soft line break) the way it is meant to.

But indeed I'd love Markdown or something like that (AFAIK AsciiDoc is better) to be everywhere.

I actually evangelize Markdown on daily basis encouraging everybody to use Typora instead of MS/Libre Office in every case when there is no practical reason to use the latter.

Re:Kosmonaut: web browser from scratch in Rust by hliyan on Sunday August 16, 2020 @09:44PM (#24183041)
My biggest regret is that Google Drive not only does not seem to natively support plain text editing, it seems to go out of the way to make it harder. I wish it could be more like Dropbox.
Re:Kosmonaut: web browser from scratch in Rust by II2II on Saturday August 15, 2020 @08:57PM (#24173844)
> Of course adoption would be a big issue, but that's always a big issue.

Choose an audience that is disenchanted with the modern web, choose a subset of HTML/CSS that reflects their needs, create a prototype that demonstrates the idea, then watch people adopt it.

This is more-or-less what is happening with Gemini. It is a bit different in that they modelled their ideas on Gopher then addressed the shortcomings of Gopher, but there appears to be some adoption now that a specification has been produced: multiple clients and servers have been created, while others are creating content. Since the community shares may common interests, growth will probably continue for a while even if popularity is forever beyond its reach.

Doing something similar with the web will certainly produce a different outcome. It may even exert enough pressure to create a "clean" subset of HTML/CSS for specialized applications that is easier to implement.

Re:Kosmonaut: web browser from scratch in Rust by Lerc on Saturday August 15, 2020 @04:06PM (#24171933)
I think the adoption issue could be managed by the fact that Current browsers are sufficiently monolithic that you could implement a version of the simple standard as a WASM host module. It makes the huge things a little more huge but the light weight things more light weight.

I don't think it would ever replace the browser but I can certainly see it finding a niche for things like small communities like single board computer enthusiasts where resources are at a premium.

I have plenty of ideas that I have doodled over the years of how things could be done in the browser space, and I'm fairly sure I'm not unique in that respect. There must be some pretty good ideas out there.

Re:Kosmonaut: web browser from scratch in Rust by tamrix on Saturday August 15, 2020 @05:58PM (#24172780)
The Web will fork at some point in the near future.

The WWW will become the world wide app server. Focusing heavily on an app like experience.

Then there will be a push for a text only implementation to bring back the good ol' days when people actually want to read something on the internet treating it more like a book.

Re:Kosmonaut: web browser from scratch in Rust by krapp on Saturday August 15, 2020 @06:08PM (#24172847)
But there's no reason for that to happen.

There's nothing stopping anyone from publishing a primarily text-based site if they want, or an "app" site. The web isn't a zero-sum platform, there's room for everything, and no objective definition of what separates "documents" from "apps" to base such a division on to begin with.

No one wants the web to be forked except for people on HN who wish everything done with it since the 1990s could be sent into quarantine where they can't see it, but this isn't something the public wants, or that anyone is working towards.

Re:Kosmonaut: web browser from scratch in Rust by yoz-y on Saturday August 15, 2020 @06:09PM (#24172855)
Who will make this push?

The problem with adoption of the text only standard would probably be that the generic browser will support that use case just as well as the simple browser. In general it would be hard to choose between one or the other world.

Rather than that, how about offering a very simple CSS on top of RSS? So that feeds could be personalized a bit, should the clients choose to support this?

Re:Kosmonaut: web browser from scratch in Rust by limomium on Sunday August 16, 2020 @02:15AM (#24175665)
More likely, an emergence of curated and policed search/indexes [sic] of sites voluntarily subscribing to a particular web philosophy.

Simultaneously, blacklists of domains and browser extensions to scrub viewed pages of any references to sites not subscribing to particular philosophies.

Re:Kosmonaut: web browser from scratch in Rust by kelnos on Saturday August 15, 2020 @08:25PM (#24173685)
> not focused on backwards compatibility

You lost me there. If you want any kind of adoption, you need to be backwards-compatible as much as possible. Otherwise you're just building a toy for geeks to play with, and you end up only attracting "spec perfectionists" to work on it (that is, people who care so much about the spec/implementation being beautiful and elegant that they never successfully ship something people can use).

> HTML would have to be written correctly (eg. balanced tags)

This is a common misconception, unless you're talking about XHTML (which was mostly a failure adoption-wise). HTML is a variant of SGML, which does not require balanced tags (though you can specify that certain tags must be balanced, of course). Certainly you'd prefer to enforce them in some cases where it makes sense (like <em>), but things like <br> do not need a closing tag (and do not need to be expressed as <br/>).

Anyway, I think the overall issue with the web today is that people want it to be a complete application development platform + document layout system. The goal seems to be to be able to build any kind of application as a web app, and allow them to do anything a native app could do (though hopefully with better security). Not saying this is a good or bad thing, but if that's the goal, complexity is inevitable.

Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @10:06PM (#24174237)
> Otherwise you're just building a toy for geeks to play with,

This is literally how anything every has started :)

> The goal seems to be to be able to build any kind of application as a web app

Been doing this for several years... it's really unpleasant... and I love programming.

Re:Kosmonaut: web browser from scratch in Rust by kadoban on Saturday August 15, 2020 @09:06PM (#24173885)
Balanced tags aren't really important, but _some_ sort of format that is understandaple and enforced is a good idea. The whole browsers guessing what the page actually meant thing isn't a great game to play.
Re:Kosmonaut: web browser from scratch in Rust by dredmorbius on Sunday August 16, 2020 @07:42AM (#24177002)
"Worse is better" suggests otherwise. HTML conquered numerous existing markup languages (notably SGML). Though it had relatively little content compatability to worry about in 1990.

There are numerous "HTML page simplifiers" (most based on Readability's engine AFAIU), which might shim behaviour and compatibility for legacy pages.

And content itself is text, not code. Slavish backwards compatibility is not a strict requirement.

Re:Kosmonaut: web browser from scratch in Rust by kelnos on Monday August 17, 2020 @04:32AM (#24185229)
> Though it had relatively little content compatability to worry about in 1990.

I think that's really the key to this that makes the "worse is better" argument miss the mark here. HTML succeeded because anyone could open up a text editor, learn a few simple rules, and have a web page in short order. It's fantastically more complicated now, but unlikely to be supplanted because we have two and a half decades of HTML+CSS+JS out in the wild. People work hard on cross-browser compatibility because it's not going away, not because it's fun.

Re:Kosmonaut: web browser from scratch in Rust by dredmorbius on Monday August 17, 2020 @02:41PM (#24190365)
That's where the simplifying engines come in. Grab the crap content, simplify the DOM to a bog-simple standard document format, and render that to the reader. Readability, Archive.org, Archive.is, Outline.com, beta.trimread.com, etc., are examples of these in various forms. Very nearly always their rendering is preferred to the original.

And all that fragile, brittle content out there will eventually break. The question is when compatability is lost, and in the name of what.

Keep in mind that I'm specifically targeting text and textually-oriented document content. The modern Web can be considered generally as having four principle modes, three ofwhich I'd treat separately: documents, as described, commerce (probably hived into a dedicated application), media (likewise), and apps (which want a VM engine, e.g., Chromium).

A surprisingly large set of apps, and certainly many significant ones, are principally document-and-discussion engines, for which lack of an intrinsic model within the document markup and client presentation is the raison d'etre of those apps. Either having a paired discussion platform, or integrating discussion into the browser itself, would address much of this.

Other content elements which have become significant online include both advertising and DRM. These have been mistakes.

Re:Kosmonaut: web browser from scratch in Rust by kortilla on Saturday August 15, 2020 @03:41PM (#24171689)
> Of course adoption would be a big issue, but that's always a big issue. I wonder why this wouldn't make sense to try, given the current state of affairs.

A huge issue. Nobody is going to use a browser that doesn’t work with 99% of websites.

Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:43PM (#24171711)
Right, it's a huge issue. Some really cool exclusive content would have to be found on this Web.

But, what's the alternative? Giving up the Web and giving it away to Google?

Re:Kosmonaut: web browser from scratch in Rust by ysavir on Saturday August 15, 2020 @03:49PM (#24171776)
The alternative is what most people don't want to accept: That we should become less dependent on the web.
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:55PM (#24171844)
And more dependent on what? Real life? Or some other technology?
Re:Kosmonaut: web browser from scratch in Rust by ysavir on Saturday August 15, 2020 @04:12PM (#24171967)
Real life. Most of what we do online is something we can do offline locally as well, but we've moved to an online version because of the short-term conveniences. But as the long-term consequences begin to show, there's nothing preventing us returning to a primarily offline world.
Re:Kosmonaut: web browser from scratch in Rust by jlokier on Sunday August 16, 2020 @12:11PM (#24178929)
I think the current pandemic is showing the opposite.

Right now I'm able to attend conferences I couldn't go to before the pandemic, because they have moved online, and some of the best ones are in far away countries.

Realistically, that can't happen in a primarily offline world. I'll miss them when they go back to offline, because I won't be able to attend any more.

But even before, many things I enjoy, as well as many opportunities, are not happening in any one location on the planet. They aren't local, and still won't be wherever I move.

Even reading & commenting on HN is not replicable offline. I've tried it: I've run real-life communities, places for people to meet and talk and make things together. As interesting as these are, the range of perspectives is narrow compared with the interestingness of an international community, even a niche-interest community like HN.

I think you may be right about "long-term consequences", but I don't think we'll find we can change most of what we do online to offline locally. Instead I think we'll find we just have to stop doing what we do online, and do something else instead. Hopefully something we enjoy, rather than something that feels forced upon us.

Re:Kosmonaut: web browser from scratch in Rust by ghayes on Saturday August 15, 2020 @03:47PM (#24171762)
What if you had a legacy or emulation mode where it ran Chromium or WebKit for non-compliant pages?
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:57PM (#24171862)
Twisted as it sounds, I think that would mess up adoption. On the contrary, those pages would need to appear broken.
Re:Kosmonaut: web browser from scratch in Rust by alicemaz on Saturday August 15, 2020 @04:44PM (#24172225)
definitely worth doing. would be a massive undertaking. I'm not webdev enough to comment intelligently on _how_ to do it, but I think the general _what_ to do is something like... a system that is simple and internally coherent, designed specifically to a) court devs to build on it instead, and b) enable all the optimizations that have eluded browser vendors so far because the existing standards are so absurdly complicated. "parallel layout engine" and "a tab doesn't use multiple gigs of ram" are good for starters

then you make a browser that is much faster for sites written in the new thing and build in blink for fallback. also make something in the same niche as electron, but only using the new thing. win devs over and try to cultivate another "this site best viewed in" phenomenon. gradually demote the existing paradigm to second-class status

the important thing is you probably need a well-heeled patron but you don't need to win over the existing browser vendors. (tbh I'm surprised facebook hasn't tried this yet, they'd benefit immensely from it even aside from being able to stick it to google)

make something better and people will gradually switch. reaching non-technical types isn't as hard as it's made out to be, there was a point where every early adopter geek type was going out of their way to install chrome (and firefox before that!) on their parents' and friends' computers for them. and if people switch, other browsers will have to follow

of course it's also likely that all the problems that necessitate a switch will come back even worse after. google made a js engine that was 1000x faster so people made sites that were 10000x slower. google sandboxed tabs so a bad site wouldn't crash the whole browser, and now complicated sites crash constantly because there's less consequences to it. but hey you have to imagine sisyphus happy after all

Re:Kosmonaut: web browser from scratch in Rust by xook on Saturday August 15, 2020 @05:17PM (#24172470)
Something like Gemini is what comes to mind https://gemini.circumlunar.space/

" [...] which explores the space inbetween gopher and the web, striving to address (perceived) limitations of one while avoiding the (undeniable) pitfalls of the other."

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @05:25PM (#24172541)
I had another idea. It is its own file format (independent of the transport protocol; HTTP works just as well, or you could use DVDs just as well, too), which is a Hamster archive containing several lumps. There is its own document format, which lacks support for styles and a lot of other stuff, but does include some commands (e.g. footnotes, data tables, emphasis, headings, hyperlinks, lists, fix-pitch), and there may also be lumps containing executable code (which is optional, as are the document lumps). The executable code is sandboxed and can do no I/O at all (including random numbers and date/time) without an extension. There are standard extensions, and the user is required to be able to configure the extensions, to enable/disable them, substitute their own implementation, or add a proxy to them. If there is network communications, a PROTOCOL.DOC lump (which is meant to describe the protocol in use, but may be blank) is mandatory, in order that the user can reimplement the protocol by themself. Extensions must be open source and fully documented (in order to be listed in the main documentation, and listed in the installation menu of the main distribution). (Some standard extensions would include the document view, a command-line interface, a terminal-based text interface, date/time, random number generation, network communication, and files.) Documents may also be stand-alone. Extensions are identified by a sequence of UUIDs.
Re:Kosmonaut: web browser from scratch in Rust by dukoid on Sunday August 16, 2020 @08:33AM (#24177242)
I wonder if it would be possible to distill the "rendering essence" of HTML+CSS, i.e. have a pre-processor that transforms a lot of redundancies / complexities out to just a hierarchy of spans+divs with style attributes.

For a modern browser, the two hierarchies would need to be dynamically linked, but specifying the "view hierarchy" in terms of a (very limited) HTML/CSS subset should yield the advantage that the correctness of the transformation step could still be inspected with a browser?

Re:Kosmonaut: web browser from scratch in Rust by goto11 on Sunday August 16, 2020 @11:08AM (#24178407)
This was the idea behind XSL (and DSSSL before that). You transform semantic markup into a pure presentation format. By moving the transformation to the server you can have all the complexity of selectors, rules, inheritance, cascade etc resolved on the server and have the browser just receive low-level rendering instructions.

Of course you can't have any form of dynamic HTML and accessibility would go out the windows.

Re:Kosmonaut: web browser from scratch in Rust by dukoid on Monday August 24, 2020 @02:30PM (#24263778)
I think there the presentation format typically would be a different language (such as xsl-fo)... I am suggesting a transformation to a subset of HTML+CSS
Re:Kosmonaut: web browser from scratch in Rust by jonny_eh on Saturday August 15, 2020 @03:31PM (#24171609)
Just don’t implement JS. Simpler!
Re:Kosmonaut: web browser from scratch in Rust by ghayes on Saturday August 15, 2020 @03:44PM (#24171721)
I mean, you might be able to get away with implementing a WASM VM and a small subset of JavaScript APIs, which might be significantly simpler than implementing all of JavaScript itself.
Re:Kosmonaut: web browser from scratch in Rust by tmd83 on Saturday August 15, 2020 @03:54PM (#24171827)
I talked about something like this in my comment. One solution I was thinking is that even if it's a parallel engine don't you still save on resources if some of the most popular sites use the simpler/faster layout because the memory/cpu overhead is significantly lighter on the new layout? And the bigger/popular website has a motivation to update if it's actually faster and more responsive.
Re:Kosmonaut: web browser from scratch in Rust by hinkley on Saturday August 15, 2020 @03:57PM (#24171858)
But you’d have to have both in one browser, and have it be popular, before something like that would catch on.
Re:Kosmonaut: web browser from scratch in Rust by kryptiskt on Sunday August 16, 2020 @07:27AM (#24176917)
I was thinking about breaking it down to just make a fun sandbox VM with some APIs for network, local storage and interacting with the user. No document format or anything, you get a screen to draw on and get events. And then I thought: "hmmm, everybody's going to be disappointed that the VM isn't for their pet language", so I came up with the idea of just using QEMU. Literally just give every site a bare machine it can load any image on. Make a virtual IO device for the system services (like exposing the path and query part of the URL, clipboard and linking to other machines). UI, storage and network get normal VirtIO devices.

Let's keep HTTP for metadata and cache control (don't want to download big images unnecessarily), with a bunch of headers for negotiating preferred CPU architecture and other hardware stuff.

It's different enough from the web that it might actually work, for some value of "working".

Re:Kosmonaut: web browser from scratch in Rust by kettlecorn on Saturday August 15, 2020 @05:40PM (#24172668)
I think it's a worthwhile endevour. But the key is to look at how systems like the web stagnate and to design a system that can avoid the same fate.

Every project that grows large suffers the same inevitable descent into complexity. Things become so complex that it becomes hard to try out new ideas, which leads to stagnation. Eventually a better and leaner successor upsets the incumbent and the cycle restarts.

The key to creating great ecosystems is speed up that cycle. Design a system that encourages rapid growth and failure.

The 'web' should become a minimal hardware abstraction layer that offers safe access to graphics, audio, filesystem, and basic networking. Everything else could be built on top of that.

If someone has a new great idea for HTML or CSS just build it on top of the abstractions and hope others become interested. If someone wants to build a new browser they only have to implement the more manageable core.

Re:Kosmonaut: web browser from scratch in Rust by jlg23 on Saturday August 15, 2020 @06:12PM (#24172879)
> Such a simpler web spec would be relatively fast moving, not focused on backwards compatibility, but instead on simplicity of implementation. HTML would have to be written correctly (eg. balanced tags), old styling mechanisms would be removed so that layout engines wouldn't have to accommodate them. Everything would be pared down.

No need for new standards, you just implement recent standards properly and don't pay attention to the real world (as in "what people thought was HTML at which time").

It might be more worthwhile to clean up some existing rendering engine, factoring out kludges (for the aforementioned "real world") into code that can be disabled at compile time so we are left with a FOSS "pure specs" implementation of current specs. I personally would be interested in seeing what breaks, betting on "not much".

Re:Kosmonaut: web browser from scratch in Rust by jefftk on Saturday August 15, 2020 @07:46PM (#24173455)
> No need for new standards, you just implement recent standards properly and don't pay attention to the real world

Unfortunately for your purposes, The specifications are defined in a layered way, and you can't just implement the recent ones without everything underneath. And then HTML5 codifies a lot of "real world messiness": early browsers did all sorts of strange things, and then layered on even more strange things to try and be compatible with each other. HTML5 threw away the approach of specifying the way things would ideally work, and instead focused on specifying the way things actually do work. Which means to implement HTML5 fully you really need to do quite a lot of work.

Re:Kosmonaut: web browser from scratch in Rust by specialist on Saturday August 15, 2020 @05:12PM (#24172437)
Agree and would go further.

#1 80/20 is more than sufficient. If your browser legibly renders Facebook, Bootstrap, and maybe a dozen others, call it good.

#2 Fidelity is overrated. With adblockers and reader view, who cares about pixel perfect? Twitter, Reddit, and most other popular websites already look terrible. A better web browser doesn't help.

#3 Sites that care about that extra polish should use bespoke layout managers.

For a while, I had a thing about design grids and ensuring text baselines were properly aligned. Spent way too much time wrestling with layout managers.

Finally gave up and rolled my own. Less code, easy to debug, got exactly what I wanted.

Always had a notion to "port" my design grid based layout manager to the web, but I just don't care any more. I consume most of my news via RSS. Assume my target audience would do the same. So any future content I publish will be as stupid simple as possible.

Re:Kosmonaut: web browser from scratch in Rust by jefftk on Saturday August 15, 2020 @07:49PM (#24173480)
> Twitter, Reddit, and most other popular websites already look terrible.

There's terrible, and then there's terrible. If you try to implement things in a much simpler way, you will get many completely unreadable websites. Images will cover text, some text will be off the screen, it will be a garbled mess.

Re:Kosmonaut: web browser from scratch in Rust by rini17 on Saturday August 15, 2020 @05:24PM (#24172530)
"Just render..." Clearly you have never looked under Facebook's or Twitter's hood.
Re:Kosmonaut: web browser from scratch in Rust by 1vuio0pswjnm7 on Saturday August 15, 2020 @05:09PM (#24172413)
Many times I have suggested this idea on HN. Always gets shot down. Perhaps the problem is that such a move toward simplicity is perceieved as benefitting users more than web developers.

There are certainly folks at hosting providers and similar service companies who advocate using different browsers for different purposes, e.g., for security reasons. For example, it makes little sense to use the same program to browse random sites on the web as you do to log in to your bank's website. However there are more reasons that just "security" (namely performance, IMO). If "security" is the only reason one would use a different program, then people just point to "sandboxing" and use one browser for everything.

As for paring down HTML, isn't that sort of what Firefox "Reader" mode or AMP does? If you try viewing some AMP urls in links text-only browser, they look particularly good, and the news site "paywalls" do not work. I have been using text-only browser and other, smaller programs to perform text retrieval from the web for many years and they work very well, much better than the gigantic omnibus everything-in-one programs supplied by the ad tech corporations.

Thus, the responses that claim "It would never work" make little sense to me because in my case it has already worked for decades. I doubt I am the only user who values speed and simplicity.

Re:Kosmonaut: web browser from scratch in Rust by allover on Saturday August 15, 2020 @05:18PM (#24172481)
The problem is that such a browser wouldn't be any use to users in the short-term, because most of the web simply wouldn't "work" in it.

So, I don't think it's developers that are the problem. As a web dev myself, I'd much rather have less, mostly unnecessary, complexity to deal with, but I can't see a rational path towards that.

Re:Kosmonaut: web browser from scratch in Rust by graiz on Saturday August 15, 2020 @03:58PM (#24171875)
I had a very similar idea and started to prototype a layout engine, tokenizer and parser. I was able to render things about 1000x faster in the basic case (rendering styled text, boxes and images). The problem I can't crack is mass adoption. If you have ideas on that, call me. :)
Re:Kosmonaut: web browser from scratch in Rust by mvn9 on Saturday August 15, 2020 @04:42PM (#24172204)
There is no need to aim for mass adoption. Make it a standard for whoever wants a simple html environment. It could be situated between gopher and the full html spec.

People use command line based browsers. A limited browser is usable, just not for full web apps.

To start it, offer a website that checks websites for their compliance. At the same time, let webmasters register their site so that you can offer a directory of available content.

If you want to monetize your project, offer a search engine with ads for all sites that passed the test.

The icing on the cake would be a proxy service that transcodes complex websites into the simple standard by analysing the site with a headless browser.

Re:Kosmonaut: web browser from scratch in Rust by qppo on Saturday August 15, 2020 @04:00PM (#24171894)
I'd backdoor it into a app framework. Don't have to call it native, just a framework for making apps that happens to have a way to serve them to a user over TCP.
Re:Kosmonaut: web browser from scratch in Rust by graiz on Saturday August 15, 2020 @04:25PM (#24172077)
Yep. This was one of the possible directions but it also has an initial startup problem. Right now only large app makers are making these types of frameworks because they don't make any money. (Facebook, Microsoft, Google, Twitter, Apple)
Re:Kosmonaut: web browser from scratch in Rust by qppo on Saturday August 15, 2020 @05:38PM (#24172647)
That's why you have to come up with a sick app as an excuse to develop/dogfood the framework first!
Re:Kosmonaut: web browser from scratch in Rust by kybernetikos on Saturday August 15, 2020 @04:00PM (#24171888)
What level of capability did you get to? Is it just for consumption of document like things, or could it be used for applications too?
Re:Kosmonaut: web browser from scratch in Rust by graiz on Saturday August 15, 2020 @04:22PM (#24172060)
I didn't get super far, but far enough to see that an alternative to HTML/CSS was very fast and certainly viable. I also haven't been able to figure out if it's a cool software project or a business. My sense is that it's a cool tech but Netscape & Mozilla never had a strong macro-business when compared to Google or Microsoft.
Re:Kosmonaut: web browser from scratch in Rust by Impossible on Saturday August 15, 2020 @05:26PM (#24172547)
This would be great. I also think there is the issue of HTTP being a good protocol and the web being a good distribution platform, and as a result browsers have to be complex because they are everything to everyone. It'd be cool to have a really optimized browser/game engine with WebGPU, WebXR, Gamepad API, audio and Wasm, and no or minimal HTML support as an application platform, for example. Or a browser that has a unified fixed UI for streaming video. I understand these aren't perfect examples and can be nitpicked and might not work in practice, but I strongly agree with this idea in a general sense.
Re:Kosmonaut: web browser from scratch in Rust by jeeeeb on Saturday August 15, 2020 @09:10PM (#24173914)
I cannot imagine it will ever happen but I'd like to see the spec precisely defined in terms of core "axiomatic" functionality (JS, layout engine, core CSS rules), and peripheral functionality built on the core functionality.

The core functionality would have a precise (as possible) and extensive definition with an agreed test suite encoding the expected behaviour (as much as possible).

This would allow development of a shared implementation of the peripheral layer, while browser innovation could continue on the core functionality (JS and rendering performance, battery usage etc), and on innovations in the UI.

Re:Kosmonaut: web browser from scratch in Rust by ForHackernews on Saturday August 15, 2020 @06:22PM (#24172938)
If you're not already aware, check out the Gemini protocol: https://news.ycombinator.com/item?id=23730408
Re:Kosmonaut: web browser from scratch in Rust by collinmanderson on Saturday August 15, 2020 @10:23PM (#24174323)
"create a drastically simpler set of web standards, so that making web browsers would become much simpler"

That was the goal of web standards with xhtml cira 2000-2008. It ended up having the opposite effect of being "relatively fast moving" and really slowed development down.

At some point they realized that figuring out balancing tags wasn't really all that hard for browsers to implement. For old styling mechanisms, browsers can just warn against using them.

Re:Kosmonaut: web browser from scratch in Rust by nixpulvis on Saturday August 15, 2020 @04:14PM (#24171988)
Remove JS, reclaim the back button!
Re:Kosmonaut: web browser from scratch in Rust by klyrs on Saturday August 15, 2020 @03:48PM (#24171764)
> old styling mechanisms would be removed

But... my beloved <marquee>!

Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @04:42PM (#24172209)
I don't really like <marquee>, and believe it should be user configuration to just display static or to manually scroll it; the user should also control the blink rate for the <blink> command too (including zero if they do not want it to blink)
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:53PM (#24171812)
No joke I was visualizing a marquee scrolling by as I was typing those words.
Re:Kosmonaut: web browser from scratch in Rust by klyrs on Saturday August 15, 2020 @07:20PM (#24173310)
My favorite stupid browser trick is nested marquee tags. It was quite easy to find awful edge cases last time I played with this.
Re:Kosmonaut: web browser from scratch in Rust by johannes1234321 on Saturday August 15, 2020 @05:15PM (#24172462)
If one does a simple version in my opinion it shouldn't move fast, but be extremely reluctant to move in order to enable creating archivable documents.
Re:Kosmonaut: web browser from scratch in Rust by juststeve on Saturday August 15, 2020 @05:58PM (#24172776)
Yep, super basic and reliable for decades.
Re:Kosmonaut: web browser from scratch in Rust by toper-centage on Saturday August 15, 2020 @07:32PM (#24173383)
I think you've just described Google's AMP
Re:Kosmonaut: web browser from scratch in Rust by bradgessler on Saturday August 15, 2020 @10:42PM (#24174447)
I’d love to have an Internet that’s a bunch of markdown files that link to a bunch of other markdown files (or a format that simple). No JavaScript, minimal CSS, and support for various image types.

Only problem is how to deal with navigation to other parts of a website.

Something like this would be hostile to advertisers and bloat. Ideally it only has essays, papers, and other stuff that makes you smart.

Re:Kosmonaut: web browser from scratch in Rust by niutech on Monday August 17, 2020 @07:33AM (#24186212)
This subset of web standards was proposed long ago: WML (WAP Markup Language). Do you remember WAP browsers?

Now we have AMP (Accelerated Mobile Pages). Why not build a web browser focused especially on this? Actually I made one: AMP Browser (https://ampbrowser.com)

Re:Kosmonaut: web browser from scratch in Rust by forgotmyp77 on Saturday August 15, 2020 @05:19PM (#24172490)
I'm doing it the other way, by testing with all browsers and only using subset of HTML which works in all.
Re:Kosmonaut: web browser from scratch in Rust by zzo38computer on Saturday August 15, 2020 @05:27PM (#24172558)
Did you test with Lynx?
Re:Kosmonaut: web browser from scratch in Rust by forgotmyp77 on Thursday August 20, 2020 @05:30PM (#24229247)
yes, and also links and w3m
Re:Kosmonaut: web browser from scratch in Rust by fspeech on Saturday August 15, 2020 @03:54PM (#24171829)
I can imagine this being used for a desktop app with limited web access: pages using only html and css will be correctly displayed; pages requiring js would be degraded. This way you can safely extend desktop app with access to web resources.
Re:Kosmonaut: web browser from scratch in Rust by arendtio on Sunday August 16, 2020 @02:23AM (#24175697)
Adoption wouldn't be a problem, if you use just a subset of the current standards.
Re:Kosmonaut: web browser from scratch in Rust by jlokier on Sunday August 16, 2020 @11:59AM (#24178818)
There are already numerous niche browsers implementing a subset of the current standards.

They don't achieve adoption.

Re:Kosmonaut: web browser from scratch in Rust by arendtio on Saturday August 22, 2020 @01:38AM (#24241874)
This is not about the browsers, but about the content the server delivers. When you use one of those limited browsers today, you will encounter a lot of broken pages.

But if there would be place in the internet where every page would stick to the same limited feature set, the new browsers could focus on those features and there users would new a place where they would not encounter broken pages. In addition, users of the traditional browsers (probably the majority of users), would still be able to visit that place too.

Re:Kosmonaut: web browser from scratch in Rust by jasonhansel on Saturday August 15, 2020 @06:06PM (#24172833)
I feel like AMP was a missed opportunity to create something like this. Unfortunately, Google was more focused on profitability...

Maybe we should go back to Gopher? (I almost mean this seriously--it was much more lightweight.)

Re:Kosmonaut: web browser from scratch in Rust by jefftk on Saturday August 15, 2020 @07:51PM (#24173493)
If Google had not focused on making it possible for publishers to earn money from their AMP pages, why would any of them have been willing to put in the effort to rewrite their pages?

With any sort of grand proposal like this, you need to think about all the different people in the ecosystem and why they're going to be interested in moving over to your system. I don't think AMP has really succeeded, but without having publishers on board it would have gone absolutely nowhere.

(Disclosure: I work on ads at Google, speaking only for myself)

Re:Kosmonaut: web browser from scratch in Rust by Chris2048 on Monday August 17, 2020 @01:39PM (#24189605)
The movers-and-shakers of web-tech are the large corporate (esp the two that control the browsers) and what are their incentives to simplify web tech, thereby lowering the bar for competitors.
Re:Kosmonaut: web browser from scratch in Rust by forgotmypw17 on Sunday August 16, 2020 @04:40AM (#24176237)
i'm approaching this issue from the other end: using a subset of html (and careful progressive enhancement) to build a site which works in every browser since the earliest days of the web.

i am pretty confident that, although i haven't tested it, it would work in both kosmonaut (if you download and save the files and submit content with something like curl, but use kosmonaut to display it)

i bet it would also work with that apple se / raspberry pi combo also in today's top page.

Re:Kosmonaut: web browser from scratch in Rust by wfdctrl on Saturday August 15, 2020 @04:41PM (#24172198)
Yes! I like the original idea of HTML, where the client chooses the styling not the website. That way the web cloud be completely consistent, just pure information.
Re:Kosmonaut: web browser from scratch in Rust by jbritton on Saturday August 15, 2020 @07:45PM (#24173450)
I sometimes wonder if the browser client should just be a video player. It wouldn’t be suitable for everything.

Or possibly a display renderer of some sort, like postscript.

Re:Kosmonaut: web browser from scratch in Rust by ummonk on Saturday August 15, 2020 @10:03PM (#24174213)
Would this include an implementation of JavaScript or alternative to it? Or just be a standard for static sites? What about media playback, rtc, etc.?
Re:Kosmonaut: web browser from scratch in Rust by hiccuphippo on Saturday August 15, 2020 @03:44PM (#24171725)
When I read about AMP for the first time I thought that's what it was going to be.
Re:Kosmonaut: web browser from scratch in Rust by Touche on Saturday August 15, 2020 @03:42PM (#24171700)
Isn't epub kind of this?
Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @03:54PM (#24171830)
I think so? But I can't decide whether this hypothetical simpler web should strictly be document-oriented. I don't think the issue is that the web is now half application, half document oriented. It can still be both?
Re:Kosmonaut: web browser from scratch in Rust by 13415 on Saturday August 15, 2020 @05:40PM (#24172670)
I think it should be an application programming language and only source code and assets should be transmitted. Crawlable content should be provided by a function in the language, if the author of the document/app decides so.

A good browser/server/IDE would both be easier and more powerful than any of the messy mixes of languages and document formats we use right now.

Re:Kosmonaut: web browser from scratch in Rust by gwbas1c on Saturday August 15, 2020 @07:47PM (#24173465)
IMO, it makes more sense to allow a web site to specify its rendering engine in one of the HTTP response headers. The rendering engine would be WASM, and the actual site could be HTML or whatever.

As long as the rendering engines are distributed via CDNs, it would be extremely fast.

Re:Kosmonaut: web browser from scratch in Rust by tingletech on Saturday August 15, 2020 @06:23PM (#24172949)
Like XHTML 4?
Re:Kosmonaut: web browser from scratch in Rust by scalatronn on Thursday August 20, 2020 @05:58AM (#24221614)
funny fact, that's how Google started experimenting with Flutter
Re:Kosmonaut: web browser from scratch in Rust by ninjapenguin54 on Tuesday August 18, 2020 @08:04PM (#24205778)
Might be insightful to look at the history of xhtml.

tl;dr an attempt was made and failed. Turns out there's not enough incentive for websites to convert to your stricter html replacement.

Re:Kosmonaut: web browser from scratch in Rust by blodorn on Saturday August 15, 2020 @07:21PM (#24173313)
xhtml?
Re:Kosmonaut: web browser from scratch in Rust by dependenttypes on Saturday August 15, 2020 @03:57PM (#24171864)
> HTML would have to be written correctly (eg. balanced tags)

This is an opinion regarding style. Adding support for unbalanced tags is one of the easiest things.

Re:Kosmonaut: web browser from scratch in Rust by dmitryminkovsky on Saturday August 15, 2020 @04:07PM (#24171945)
I'm speaking strictly from the perspective of complexity. It's significantly more difficult to parse unbalanced tags.
Re:Kosmonaut: web browser from scratch in Rust by goto11 on Monday August 17, 2020 @05:34AM (#24185556)
True, but is it is still completely trivial compared to the actually complex parts of a modern browser.
Re:Kosmonaut: web browser from scratch in Rust by dependenttypes on Monday August 17, 2020 @09:23PM (#24194351)
> It's significantly more difficult to parse unbalanced tags.

No, it is not.