> A hover-based clock, such as the one in Jane Ori's CPU Hack, is fast and stable, but requires you to hold your mouse on the screen, which some people claim does not count as turing complete for whatever reason, so I wanted this demo to be fully functional with zero user input.
That hover clock post is from 2023 and the "some people claim does not count" post is 2022. They were probably talking about the ones that make you check thousands of boxes to drive the logic forward.
I wasn't sure whether to address the disconnect in the FAQ - I wanted it to be short and readable.
The idea is that, since a long time ago, there has always been demos that prove turing completeness and other programmy qualities in CSS, but that which people dismiss as requiring user inputs. The ones around by the time the comment got made were definitely at the "keep on clicking on the same spot on the screen" level - essentially just providing a clock.
And seeing discussion from after Jane Ori's hack, many still claim that even as much as hovering your mouse on a specific part of the screen makes css not a programming language.
This is a cool demo, but it tells me that CSS might be too complex now. Why should you be able to emulate a CPU with a styling language? I’m not sure what you get by using a Turing complete language for visual styling.
I don't know much about CSS, but Turing completeness is notorious for showing up in systems unintentionally.
It doesn't take much to be Turing-complete - if a system provides unbounded read/write memory plus branching or conditional recursion you're usually there.
As an example, Magic The Gathering (the card game) is Turing-complete: https://arxiv.org/abs/1904.09828 . You can use creature tokens as memory and various game mechanics to do flow control. Was this intentional by the designers? Most likely not...
* MOV x86: using memory mapped lookup tables, you can simulate logic gates and branching using only MOV.
* PowerPoint (Without Macros): using On-Click Animations and Hyperlinks, shapes on slides act as the tape and clicking them triggers animations that move the head or change the state of the slide.
* find and mkdir (Linux Commands): find has a -execdir flag executes commands for directories it finds. By using mkdir to create specific folder structures, you can create a feedback loop that functions as a Tag System (aka universal computation).
* Soldier Crabs: Researchers showed that swarms of Mictyris guinotae can be funneled through gates to implement Boolean logic. While a full computer hasn't been built with them, the logic gates (AND, OR, NOT) are the building blocks for one.
Even water is Turing Complete:
* Fluidic Logic Gates: the Coandă effect is the tendency of a fluid jet to stay attached to a convex surface. By using tiny air or water jets to push a main stream from one channel to another, you can create the fluid equivalent of a transistor.
* MONIAC (Monetary National Income Analogue Computer)
* Navier-Stokes equations describe how fluids move are TC.
* In 2015, Stanford researchers developed a computer that operates using the physics of moving water droplets. Tiny iron-infused water droplets moved by magnetic fields through a maze of tracks. The presence or absence of a droplet represents a 1 or a 0. By colliding or diverting each other, the droplets interact perform calculations.
Very cool. The horsle demo made me think, how hard would it be to add a virtual memory address (or a non-8086 RAND instruction) that returns a random byte (that would allow it to pick a random value and get a standard wordle working in principle)
I see CSS random() is only supported by Safari, I wonder if there's some side channel that would work in Chrome specifically? (I guess timing the user input would work)
Interesting idea. This will be useful only when the CSS communicates with a server. Maybe it can make requests indirectly by setting background image URLs or something and send data piece by piece for each byte. Not sure.
wasn't a lack of networking what made it a temple, untouched by the influences of the corrupt internet or something like that? idk I'm not like a Terry Davis scholar by any means but I always figured he did that limitation with some kind of reason in mind
I don't think it's that unrelated. If you make a system way more complex than it should be (clearly the case with CSS) it's obvious the risk of vulnerabilities increases exponentially.
I'm curious to know what you would rate as the most important features to make this work? It seems like calc+if do a lot of the heavy lifting, but the new function syntax is what makes instruction lookup tractable.
> There is absolutely no reason for CSS to be turing complete.
I'd push back slightly — not on the practical point (obviously yes), but on the "why bother" question. The interesting thing about projects like this is that they force you to identify exactly which CSS features cross the Turing-completeness threshold.
CSS got there almost by accident: selectors give you pattern matching on state, pseudo-classes like `:hover` give you reactive state change, and sibling/descendant combinators let you propagate that change spatially. The minimum viable Turing machine emerges from features designed for something else entirely. That's the same reason people build computers in Minecraft redstone or Conway's Game of Life — the exercise reveals something about what "computation" actually requires.
Also, the engineering to get a stable clock without any hover interaction (as mentioned in the README) is legitimately clever work.
Can an argument be bade that CSS only exists becuase javascript failed to develop a styling component to displace it?
I like to think webassembly is the right track. But ECMAScript and CSS alike need(ed) to devolve into a simpler byte-code like intermediary language syntax.
Browsers supporting complex languages has always been a bad idea, what they need to support is capabilities, and access and security primitives. wasm hasn't displaced javascript, because afaik, the wasm spec for browsers doesn't require them to implement javascript (and ideally, CSS) via wasm.
Instead of distilling, simplifying and speccing CSS and Javascript, browsers caked on layers upon layers of complicated features. The idea that browsers should define and regulate the languages developers use to write front-end code needs to die.
The complex parts of JavaScript are the semantics, not the syntax. You could reasonably easily spec a bytecode for JS to get rid of the syntax part, but nothing would change in the complexity (almost all modern engines parse to bytecode as the first step and operate on bytecode from then on).
If you wanted to implement JS in wasm, you'd either need a bunch of wasm extensions for JS semantics (dynamic object shape, prototypal inheritance, etc), or you'd need to implement them in wasm from scratch and basically ship a JS runtime written in wasm. Either that, or you need to change the language, which means de facto adding a new language since the old JS still has to stick around for old pages.
> CSS only exists becuase javascript failed to develop a styling component to displace it
there is no sortage of projects that do it (especially during the react era, people wanted to get rid of both html and css) but they get pushed down by dogma/inertia mostly. There was iOS constraint layout language ported to js. Seemed pretty cool, but the guy behind it decided to give up and everyone was like welp we tried, didn't work.
The instruction matrix they provide only includes 8086 instructions, not 186, 286 etc, which are all x86, hence the x at the start. From that wikipedia article, "The term "x86" came into being because the names of several successors to Intel's 8086 processor end in "86", including the 80186, 80286, 80386 and 80486. Colloquially, their names were "186", "286", "386" and "486"."
The point is that the 8086 doesn't have anything close to the instruction set now referred to as x86_64 or even x86_32. Asking which it is is asking which instruction set it implements. The answer is that it implements the 8086 instruction set.
Saying this is an "x86 CPU emulator" is misleading, even if technically an 8086 is an example of the x86 family. To avoid the misleading ambiguity you'd have to say something like "emulates a member of the x86 family", at which point you may as well just say "8086 emulator".
I think x86 is still good because it's easily understandable. If I say it's an 8086 emulator, people who aren't familiar with the 8086 aren't gonna go "oh so like an older version of the same x86 on my computer". And "Show HN: CSS program that emulates a CPU that's a member of the x86 family" doesn't roll off the tongue.
I don't think calling it x86 is misleading, and this is coming from the perspective of someone who dabbles in rev and pwn of x86.
They write both. They write x86 repeatedly in the article and title, then show an instruction matrix that doesn't include, for example, the 468 CMPXCHG instructions or the crypto extensions PCLMULHQHQDQ instruction. Best I can guess, they mean 8086, which they think is equivalent to x86
Why is the 8086 not equivalent to x86? PCLMULHQHQDQ is from the CLMUL extension, which only began appearing in CPUs in the early 2010s - are CPUs from before then not x86?
x86 is an overarching group. Each processor is backwards compatible, I believe, so a 486 can run 8086 code, but they are not equivalent. If I download an x86 version of a program, I don't expect it to be written only in 8086 instructions
When you download an x86 program you're making a lot of other assumptions too, such as what the target operating system and hardware are. Even 8086 MSDOS software won't directly work in this emulator because it's not emulating DOS nor an IBM compatible, it has it's own addresses for the I/O. It's still x86 though.
Go look at any web proposal. The Mozilla team consistently rejects proposals then relies on WebKit to piggyback on their decision.
This is what I mean by holding the web back. Don't even get me started with WebGPU still not being stabilized in Firefox, or the myriad of features WebKit has not implemented yet with respect to PWAs and service workers.
Really, the situation is more like "Chrome vs two modern IEs".
Don't look at the end destination, look at the journey to the destination
* Learn low-level details of a basic but real-world CPU
* Practice the brain gymnastic of programming an atypical Turing-complete computer
Your created new connections in your brain, put to use some of the old established connections. Having a machine spit-out the emulator would rob you of all that. Like, you can drive from A to B, but running for A to B can do you much good.
That hover clock post is from 2023 and the "some people claim does not count" post is 2022. They were probably talking about the ones that make you check thousands of boxes to drive the logic forward.
Anyway, very cool advancement.
The idea is that, since a long time ago, there has always been demos that prove turing completeness and other programmy qualities in CSS, but that which people dismiss as requiring user inputs. The ones around by the time the comment got made were definitely at the "keep on clicking on the same spot on the screen" level - essentially just providing a clock.
And seeing discussion from after Jane Ori's hack, many still claim that even as much as hovering your mouse on a specific part of the screen makes css not a programming language.
It doesn't take much to be Turing-complete - if a system provides unbounded read/write memory plus branching or conditional recursion you're usually there.
As an example, Magic The Gathering (the card game) is Turing-complete: https://arxiv.org/abs/1904.09828 . You can use creature tokens as memory and various game mechanics to do flow control. Was this intentional by the designers? Most likely not...
* PowerPoint (Without Macros): using On-Click Animations and Hyperlinks, shapes on slides act as the tape and clicking them triggers animations that move the head or change the state of the slide.
* find and mkdir (Linux Commands): find has a -execdir flag executes commands for directories it finds. By using mkdir to create specific folder structures, you can create a feedback loop that functions as a Tag System (aka universal computation).
* Soldier Crabs: Researchers showed that swarms of Mictyris guinotae can be funneled through gates to implement Boolean logic. While a full computer hasn't been built with them, the logic gates (AND, OR, NOT) are the building blocks for one.
Even water is Turing Complete:
* Fluidic Logic Gates: the Coandă effect is the tendency of a fluid jet to stay attached to a convex surface. By using tiny air or water jets to push a main stream from one channel to another, you can create the fluid equivalent of a transistor.
* MONIAC (Monetary National Income Analogue Computer)
* Navier-Stokes equations describe how fluids move are TC.
* In 2015, Stanford researchers developed a computer that operates using the physics of moving water droplets. Tiny iron-infused water droplets moved by magnetic fields through a maze of tracks. The presence or absence of a droplet represents a 1 or a 0. By colliding or diverting each other, the droplets interact perform calculations.
Greenspun's 10th law.
https://wiki.c2.com/?GreenspunsTenthRuleOfProgramming
I see CSS random() is only supported by Safari, I wonder if there's some side channel that would work in Chrome specifically? (I guess timing the user input would work)
The easiest way is to make an @property that's animated at ridiculous speeds that can be sampled to get (sort of) random bits.
The other week I had a fun project to implement IPv6 support in TempleOS. I did stop to think whether I should, and determined that absolutely not.
I asked Claude to start planning on doing it. It started referencing ZealOS, which is a fork of TempleOS and already has a functioning TCP stack.
That's when I determined that it would no longer even be fun, because someone else had already done all the heavy lifting, and gave up.
Completely unrelated but somehow unsurprising:
Zero-day CSS: CVE-2026-2441 exists in the wild - https://news.ycombinator.com/item?id=47062748 - February 2026 (233 comments)
[0] https://chromereleases.googleblog.com/2025/06/stable-channel...
I'm curious to know what you would rate as the most important features to make this work? It seems like calc+if do a lot of the heavy lifting, but the new function syntax is what makes instruction lookup tractable.
I'd push back slightly — not on the practical point (obviously yes), but on the "why bother" question. The interesting thing about projects like this is that they force you to identify exactly which CSS features cross the Turing-completeness threshold.
CSS got there almost by accident: selectors give you pattern matching on state, pseudo-classes like `:hover` give you reactive state change, and sibling/descendant combinators let you propagate that change spatially. The minimum viable Turing machine emerges from features designed for something else entirely. That's the same reason people build computers in Minecraft redstone or Conway's Game of Life — the exercise reveals something about what "computation" actually requires.
Also, the engineering to get a stable clock without any hover interaction (as mentioned in the README) is legitimately clever work.
I like to think webassembly is the right track. But ECMAScript and CSS alike need(ed) to devolve into a simpler byte-code like intermediary language syntax.
Browsers supporting complex languages has always been a bad idea, what they need to support is capabilities, and access and security primitives. wasm hasn't displaced javascript, because afaik, the wasm spec for browsers doesn't require them to implement javascript (and ideally, CSS) via wasm.
Instead of distilling, simplifying and speccing CSS and Javascript, browsers caked on layers upon layers of complicated features. The idea that browsers should define and regulate the languages developers use to write front-end code needs to die.
If you wanted to implement JS in wasm, you'd either need a bunch of wasm extensions for JS semantics (dynamic object shape, prototypal inheritance, etc), or you'd need to implement them in wasm from scratch and basically ship a JS runtime written in wasm. Either that, or you need to change the language, which means de facto adding a new language since the old JS still has to stick around for old pages.
there is no sortage of projects that do it (especially during the react era, people wanted to get rid of both html and css) but they get pushed down by dogma/inertia mostly. There was iOS constraint layout language ported to js. Seemed pretty cool, but the guy behind it decided to give up and everyone was like welp we tried, didn't work.
[0]: https://caniuse.com/wf-function
https://wpt.fyi/interop-2026
CSS should NOT be becoming turing complete. Nor any other DSL.
Hasn't it been so for a while? I mean I agree with you but it's a bit late
https://en.wikipedia.org/wiki/X86
Saying this is an "x86 CPU emulator" is misleading, even if technically an 8086 is an example of the x86 family. To avoid the misleading ambiguity you'd have to say something like "emulates a member of the x86 family", at which point you may as well just say "8086 emulator".
I don't think calling it x86 is misleading, and this is coming from the perspective of someone who dabbles in rev and pwn of x86.
They did write 8086 in the text, but x86 in the title.
Also: wow.
Can it mine bitcoins or run worms?
Sorry to see internet regressing to Internet Explorer days.
Edited to add: This is the message I get when using Firefox.
It was popular on Mac Os (classic and X). It was also released for Solaris and HP-UX.
(I swear at some point my brain will run out of space because it’s full of useless things like this.)
This is what I mean by holding the web back. Don't even get me started with WebGPU still not being stabilized in Firefox, or the myriad of features WebKit has not implemented yet with respect to PWAs and service workers.
Really, the situation is more like "Chrome vs two modern IEs".
* Learn low-level details of a basic but real-world CPU
* Practice the brain gymnastic of programming an atypical Turing-complete computer
Your created new connections in your brain, put to use some of the old established connections. Having a machine spit-out the emulator would rob you of all that. Like, you can drive from A to B, but running for A to B can do you much good.