Live data from Hacker News

Show HN: X86CSS – An x86 CPU emulator written in CSS

lyra.horse

61–70 of 99 posts

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#61

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)

It's really easy, I was considering adding it.

The easiest way is to make an @property that's animated at ridiculous speeds that can be sampled to get (sort of) random bits.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#64
post #63

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...

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#65
post #63

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…

> Turing completeness is notorious for showing up in systems unintentionally

Greenspun's 10th law.

https://wiki.c2.com/?GreenspunsTenthRuleOfProgramming

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#66
post #63

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…

* 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.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#67

Whoa! 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)

That was in the C++ implementation of the CSS interface that gets exposed to JS, though, there wasn't an exploit from CSS.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#69

So is this x86 compatible, or 8086 compatible? Because those are different things

8086 is x86 https://en.wikipedia.org/wiki/X86

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".

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#70

Definitely in the "they didn't stop to think if they should" category.

They probably did, and just determined that it would be fun. 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, bec…

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
Post reply on HN