< Back

Layers

I first started thinking about software in terms of layers after reading swyx's post a couple years ago. I'm a very visual person — art major 👋 — so condensing meaning into powerful (like contain a lot of meaning, idk a word for this) words or imagery is super helpful for me.

I was thinking (and tweeting insufferably) about this recently.

thinking about how the web is basically three browsers running on three operating systems running on three protocols

I kinda went off the rails later in the thread, but I kinda think it's all related, so maybe not really.

My point is that the world runs on a tower-of-babel made of software. Layers collapse all the time, but we continue to build up. When's it gonna fail?

1. Operating systems

We've been running with the same 3 operating systems for about 20 years. I don't know the half of it, but I know that various estimates put Windows at ~50M lines of code, macOS at ~90M, and Linux at 28M.

A lot goes into that, especially drivers for all the different hardware out there, so I'm sure that most of it is needed. But I do think that even a smooth brain like me could hypothesize that maybe we've got an issue with driver/firmware interoperability and general software bloat. Actually smart people are thinking about this.

We need to break down the incumbent gatekeeping of OSs and hardware/firmware.

2. Browsers might die

Browsers are kind of a operating system running inside another operating system. Truthfully, I think there there are even more OS layers to that cake.

The portability that DOM and HTTP bring needs to be reimplemented at a lower level, just inside user-space of an OS.

Urbit I think is leading the way here, delivery peer-to-peer applications running atop a thin kernel layer. Programs in this model could be as simple as a calculator, or as complex as another operating system entirely, if I understand correctly.

And hypertext was designed for documents. We're out here tryna build native-like applications and holding onto Moore's Law by a thread.

Describing a UI, networking, persistent storage logic, etc could probably be rewritting in Rust or similar, and compiled to native code. Guessing people are working on this but don't have any links atm. I hope to fill this in sometime.

3. Gaps emerge

More open, readily-available ways to compose hardware and software will mean faster, lower energy products. Carrying around entire PCs in our pockets might seem silly at this point: why pack an entire desktop operating system with a mobile skin into such a large (I know, pretty small, but still) brick we forget at home half the time.

Energy wil go down, speed will go up, size can also probably go down. I think we'll see devices decompose into smaller more specified use cases that all comunicate as one. We kinda see this already with Google Glass (RIP), smart watches, etc. More of that.

4. New compute

I think crypto and web3 will play a role as well. I'm still hesitant to say a large one, but it's an entirely new paradigm that feels like a toy, and that's typically a good thing. But definitely public ledger stuff like finance, plus auth, identity, and ownership models.

5. Whats next

No fucken idea, mate. But I have this hunch that it'll be important to know how to land on my feet when (if) stuff starts to break down and there are opportunities to clear new paths for hardware and software. And staying smooth brained at the top of this stack of layers ain't gonna cut it.

I need to spend more time reading and learning. I think my 5-10 year goal right now is to contribute to a kernel. Shorter term, definitely get into hardware. Definitely learn some Rust, maybe some C for fun.

Someone please tweet at me and tell me I'm a dumbass.

P.S.

2021-12-20

Small visualization idea for where I think we could get to with a new mode of programming user-land applications. I'm aware I'm probably incredibly naive about this.

~~~   b  a  r  e    m  e  t  a  l   ~~~
          |                 |
          v                 v
       kernel             kernel
          |                 |
          v                 |
      user-land             |
          |                 |
          v                 |
       browser              |
          |                 |
          v                 v
       web app           new mode

2021-12-20

But then, it's true that computers are getting faster (Moore's Law might be slowing down though) and hardware cheaper. If all that continues, what's the motivation for optimizing layers so far down the stack that we take them for granted? Might as well throw an entire OS/browser at it as long as it runs Well Enough™.

At their lowest level, computers are mechanical. Code written 50 years ago will still run today. So maybe we just pave over ancient Rome for a while longer.