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

lyra.horse

215 points by rebane2001 14 hours ago


mbreese - 4 hours ago

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.

Dylan16807 - 10 hours ago

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

Anyway, very cool advancement.

btdmaster - 4 hours ago

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)

senfiaj - 6 hours ago

I have mixed feelings. On the one hand, it's impressive, but on the other, it's concerning that CSS is turning into "JavaScript 2".

RedShift1 - 5 hours ago

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

notpushkin - 12 hours ago

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)

ebolyen - 5 hours ago

The moxy of this is inspiring.

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.

dmitrygr - 12 hours ago

There is absolutely no reason for css to be turing complete. None. That being said, well done

csmantle - 12 hours ago

I think we can look forward to running this on more non-Chrome browsers once @function [0] gets wider support?

[0]: https://caniuse.com/wf-function

freakynit - 10 hours ago

Incredible achievement. Horrible development on CSS front.

CSS should NOT be becoming turing complete. Nor any other DSL.

hudecekdev - 9 hours ago

This is absolutely horrible... in a good way. Kinda like Doom in a PDF. Well done.

voidUpdate - 8 hours ago

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

Aloha - 10 hours ago

This feels like... just because you can, doesnt mean you should.

andrewstuart - 12 hours ago

Abomination! (Makes sign of cross)

Also: wow.

warpspin - 6 hours ago

Next step: Start Chrome in emulated X86CSS and start X86CSS in emulated Chrome.

NoiseBert69 - 2 hours ago

Bruh...

Can it mine bitcoins or run worms?

MetaMonk - 12 hours ago

this is incredible

nottorp - 6 hours ago

Next logical step is to compile the CSS to webassembly, of course!

_s_a_m_ - 9 hours ago

Only Chrome ..

desdenova - 6 hours ago

[flagged]

gurjeet - 11 hours ago

> Your browser is unable to run this demo. Please try with an up-to-date Chromium-based browser.

Sorry to see internet regressing to Internet Explorer days.

Edited to add: This is the message I get when using Firefox.

zenon_paradox - 13 hours ago

[flagged]

nsonha - 10 hours ago

I realy hope an AI did this intead of human, such a waste of time (the css part, not the x86)