back

browser apologetics

in defense of html


[hawk] consists of that [userspace] software which admits of
[ubiquitous html5 clients].


modern web development is not diamond perfect.

npm is malware, build systems suck, security is hard, & authentication is a hassle.

i agree.

but slow down a for second, there's a baby in that bathwater.


it turns out that html is a wonderful way of making interfaces.

most interfaces are just text, forms, buttons, and media.. nested in a visual tree.


to “stop worrying and love the browser”:
think not in html, but in the $manx.

$manx is the hoon represntation of html.

forget about the ugly syntax of XML:
none of that exists in the $manx.

it's just another noun. easily programmable in your hoon programs.


the manx is always rendered on the server.

server-side rendering is easy.

the typical post-redirect-get cycle is an intuitive programming pattern.

simply ignore the idea of client-side state.
build in the timeless and single-layered way.


objection 1: “but isn't latency bad on server-rendered applications?”

yes. there is network latency on all permanent actions.

however, modern “hypermedia” scripts like, datastar and htmx, allow progressive enhancement of this pattern.

you add reactivity to your interface via the attributes of your manx; without writing any javascript!

these hypermedia scripts are small and work without a build system.

objection 2: “but at some point you do need client state”

yes. at some point of interface complexity you do need client-side state.

luckily, in the context of browsers, i believe web components actually solve this.

you can make clean APIs to stateful abstractions, and use them just like all the other html elements.

they do not muddy your “diamond perfect single layered manx”, and you don't need a build system.

objection 3: “but native apps are better”

yes and no.

i am quite interested in server rendering for native platforms.

i hope one day something comes along and replaces chromium... but when this replacement arrives, i'm positive that it too will support the mighty $manx.

but currently the browser has some huge structural advantages:

  1. it is permissionless, unlike app stores

  2. every modern device has a web browser

  3. manx documents are simple to build and maintain (it can be as simple as markdown!)

  4. web browsers allow users to think in terms of “tabs viewing into a namespace” as opposed to “applications, where there is only one of each”.

    this is necessary for multitasking, explorability, and full programmability.