Live data from Hacker News

Forking HTML into a static language doesn't make sense

robert.ocallahan.org

11–20 of 94 posts

Re: Forking HTML into a static language doesn't make sense

#11

HTML doesn't need to be simplified to reign in the complexity. Rather, it needs to be completed as a hypertext, so that people can build complete software systems using (only or mostly) that language. See the htmx examples page for stuff that should be doable in plain HTML: https://htmx.org/examples/ The fact that only anchor and forms, only clicks and submits, only GET and POST and only full page replacement is avai…

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web.

We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because browsers did not offer features like "Save event to my calendar". And boy, have I been promised for a long time I might someday be able to sort HTML tables by click.

Just a non exhaustive list of my pet peeves, but there are many more examples.

Re: Forking HTML into a static language doesn't make sense

#12

Forking HTML might not make sense indeed, but I think this post doesn't make a compelling point as to why or why not.

If you step back a little what we have today is a combination of a common browser implementations (aka. the DOM tree + render logic) and bunch of standardized parsing and interpretation logic that maps textual versions of CSS and HTML to this.

For better or for worse, this stuff is standardized via WhatWG & W3C as well as the three remaining browser engines (chromium, gecko, and safari) whose intersection of behavior is the de-facto reference and also what is driving standardization forward. Forking those definitely does not make sense unless you are the size of Apple or Google and more than one big company has backed out of pushing their own implementation (e.g. MS).

Most so-called full stack apps bypass the business of parsing of html5 & css in favor of just directly driving the DOM api. This provides greater flexibility and generally sidesteps a lot of complexity, bugs, etc. related to subtle differences between the 3 implementations. A typical index.html contains little more than the bare essentials to load the javascript; which then drives the DOM directly. This annoys some purists/traditionalists on the web definitely not in a position to fork or support their fork of any browser but makes little difference to search engines, users, or browser implementations.

So now having established that this is mostly an academic discussion of forking something that is highly unlikely to be ever actually forked (successfully), we can look at the underlying question.

This would be whether the DOM still an appropriate way to represent highly complex and dynamic applications that are not primarily documents and increasingly cover the whole range of any kind of interactive application possible (terminal UIs, windows based UIs, games, VR/AR, voice driven chat bots, etc.). For better or worse, most web development is about providing an illusion of more interactivity than a typical document would provide. The business of rendering static text to a browser is kind of a solved problem. It's everything else that's kind of hard to deal with via a DOM api. WASM is breaking this discussion wide open as suddenly people are porting decades worth of native code to run in a browser. Just because you can doesn't mean you should of course. But there's a lot of UI that can run in a browser that doesn't need or completely bypasses the DOM these days. Accessibility is a good remaining reason to still use it. But beyond that?

Re: Forking HTML into a static language doesn't make sense

#13
post #3

Seems easy to define such a fork: disable JavaScript, and load all resources immediately and unconditionally to disable tracking based on what is visible. To prevent custom UI, also disable CSS and use a decent default stylesheet (e.g. the reader mode one or a Markdown one).

Yes, the post says exactly that - forking the HTML is easy, the hard part is convincing developers to use that fork instead of the more featureful "mainstream" version. Consider that these are the same devs complaining about the feature differences between Chrome and Firefox, let alone the vast majority of developers would consider targeting something like Internet Explorer 11 (which already contains A TON of functio…

A browser doesn't have to win a beauty contest in front of developers; that would be futile anyway, given how inherently generational web development is. It only needs to win over users (let's call them readers, because that's what a browser is for in the end).

Re: Forking HTML into a static language doesn't make sense

#14

HTML doesn't need to be simplified to reign in the complexity. Rather, it needs to be completed as a hypertext, so that people can build complete software systems using (only or mostly) that language. See the htmx examples page for stuff that should be doable in plain HTML: https://htmx.org/examples/ The fact that only anchor and forms, only clicks and submits, only GET and POST and only full page replacement is avai…

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web. We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because brow…

not to mention certificate authentication...

Re: Forking HTML into a static language doesn't make sense

#15
post #5

Earlier quoted context omitted.

You don’t need to convince existing developers to adopt it. Remember the early web spirit, where people imagined that everyone would run their own server and publish their own homepage? Turns out it was way too complicated to do, and required you to be a tech enthusiast. Largely, I would say, because HTML was not designed to accommodate for a lot of the things people immediately wanted to do. Even a basic thing like…

Honestly, this 'entirely new set of users' sounds like wishful thinking for a problem that does not exist as you describe it. Back in the early web people couldn't run their own server not because HTML was hard (WYSIWYG editors not only existed since the Windows 3.1 days, but they were very widespread at the time - Netscape Gold even came with one included and that could do pretty much everything you'd see in most pa…

I think we are imagining very different things! For what I tried to describe, I think a dedicated native mobile client would be the most natural way to use it. I don’t think it’s a strange idea at all - consider how popular dedicated apps like Instagram, TikTok, YouTube, Facebook etc are. It’s not confusing or a burden in any way.

Publii or anything you could one-click-install on a web host is nowhere near fully featured for what people actually want to do on the web. Again, look at the type of activity that happen on most social networks - liking, sharing, commenting, replying, bookmarking, retweeting, remixing, curating playlists and galleries, etc. Those communal space-building activities have become as foundational concepts for the internet as linking, but are exceptionally difficult to implement on the current web.

Re: Forking HTML into a static language doesn't make sense

#17

HTML doesn't need to be simplified to reign in the complexity. Rather, it needs to be completed as a hypertext, so that people can build complete software systems using (only or mostly) that language. See the htmx examples page for stuff that should be doable in plain HTML: https://htmx.org/examples/ The fact that only anchor and forms, only clicks and submits, only GET and POST and only full page replacement is avai…

I think this is an interesting and important argument, because I always felt many shortcomings of the modern web were actually caused by browser vendors and their reluctance to improve their platforms and the web. We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because brow…

I find the projects that the W3C chooses to work on incomprehensible.

Re: Forking HTML into a static language doesn't make sense

#18
Remember XML/XSLT?

You were supposed to write your webpage in pure XML -- this way the content was pure, and can be indexed, processed by other programs, etc. -- and then styled by XSL transformations.

I spent a lot of time learning this. It never caught on. Browsers still support it.

http://xml.silmaril.ie/browsers.html

Re: Forking HTML into a static language doesn't make sense

#19
post #5

Earlier quoted context omitted.

You don’t need to convince existing developers to adopt it. Remember the early web spirit, where people imagined that everyone would run their own server and publish their own homepage? Turns out it was way too complicated to do, and required you to be a tech enthusiast. Largely, I would say, because HTML was not designed to accommodate for a lot of the things people immediately wanted to do. Even a basic thing like…

Honestly, this 'entirely new set of users' sounds like wishful thinking for a problem that does not exist as you describe it. Back in the early web people couldn't run their own server not because HTML was hard (WYSIWYG editors not only existed since the Windows 3.1 days, but they were very widespread at the time - Netscape Gold even came with one included and that could do pretty much everything you'd see in most pa…

> Really, these are not practical solutions for practical problems. That doesn't mean you shouldn't try to make something like this, but they'll just be toys for fun, not real solutions to real problems and if you expect them to be anything like that you'd be disappointed.

I agree. I like the idea, but there's no way it would get traction without solving a concrete (rather than aesthetic) problem.

It is possible though: the more expressive/powerful a system is, the less we can know/guarantee/figure-out about it. Adding features does have downsides. For example, people are starting to pay attention to pure functional programming, since the restrictions it requires (e.g. immutability, referential transparency, confluent evaluation, etc.) provide lots of nice solutions for things like concurrent, distributed systems.

The classic example on the Web is search: if sites didn't work with dumb, lightweight user agents (search bots), it could have a real commercial impact. These days the big search engines use browser-derived bots, which has changed the dynamics a little; but the core point remains the same. If people find concrete problems or opportunities faced by Web sites, which would be useful to solve automatically, but where the complexities of the current Web prevent that, then perhaps people could be convinced to use a restricted subset of the Web.

Re: Forking HTML into a static language doesn't make sense

#20

Remember XML/XSLT? You were supposed to write your webpage in pure XML -- this way the content was pure, and can be indexed, processed by other programs, etc. -- and then styled by XSL transformations. I spent a lot of time learning this. It never caught on. Browsers still support it. http://xml.silmaril.ie/browsers.html

Our hackerspace's website is written in XML/XSLT that renders HTML during `make`. I haven't been around when it was built. All I know is that there are only 2 people who know the guts of the XSLT stuff. Everyone else just copy-pastes XML snippets from somewhere else and edits them to publish a new news item or calendar entry.

(I don't know how much of that is attributable to XSLT's nature, and how much of it is due to its relative obscurity. But it's certainly not a stack that I would choose for a new website based on that experience.)

Post reply on HN