Video yükleniyor...
Video Yüklenemedi
i built an entire x86 CPU emulator in CSS (no javascript) you can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS
1,077,051 görüntüleme • 7 ay önce •via X (Twitter)
53 Yorum

check it out here: :3c

but can it center a div?

everyone who makes this joke should be forced to read my blog post

I don't know how long you've been around, but since you're not addressing it in your blog: there was a time before flex boxes were at thing. Centering a div was exceptionally hard, unless you resorted to using tables. Which everyone did before the semantic web.

@zelimir__ yes - and i think the history of html/css/browser hacks is really cool! but joking about centering a div these days is just admitting you don't know anything

@zelimir__ No, it's just a meme. Like "can it run Crysis".

@zelimir__ maybe its just because i do so much css stuff, but hearing it over and over again kinda feels like this

@zelimir__ Well I can get that someone in your position hears it a lot and can get tired of it 🙂. Back in early 00s I made a raycaster in html4 using vertical <img> slices (canvas didn't exist at the time). Now I wonder if this is doable without javascript 😄

@zelimir__ that's pretty sick! and i think it is :)

Your bio says "CSS noob", but I think you're at least a CSS sophomore.

hmm yeah i think i've earned that title by now

So at this point, should security-paranoid people who disable Javascript also be switching off CSS?

@humng392546 depends on your threat model, i use noscript and disable js by default, but don't see css as a threat i need to worry too much about (despite having a css-only chrome cve)

@humng392546 You reported it. Right?

@humng392546 yes, that's why i have a cve

you deserve to know you only need `mov` to be Turing complete. In CSS. Pls report back if you do this

i am aware of that (and the movfuscator), but like, an entire cpu with the same architecture as your computer is just way cooler

grant.ed.

anyway it's just an instruction pass :p css computer will run it

whoa, it's like... assembly... but for the web... imagine if that was an actual thing that would be crazy

neat

Oh my god 😭

Truly unhinged code to read from memory I love it @function --readMem(--at <integer>) returns <integer> { result: if( style(--at:-1): var(--__1AX); style(--at:-2): var(--__1CX); style(--at:-3): var(--__1DX); style(--at:-4): var(--__1BX); style(--at:-5): var(--__1SP); style(--at:-6): var(--__1BP); style(--at:-7): var(--__1SI); style(--at:-8): var(--__1DI);

@function you should post the rests of it

@function Haha i opened the file in vim and i thought it was bugging out

That’s fucking awesome

you deserve this:

you WHAT

this is the most redstoner coded coding project of all time

jesus fucking christ

can it run Doom?

incredible

fuckin what

fascinated to learn this doesn't rely on JS to advance time, will have to stare at the code later

I know you're going to write a blog about this but can you name the most abused trick in this contraption?

the if() statement combined with a style query combined with collapsing calcs

Ok but does it play Doom.

this is awesome!

Neat! It makes me wonder is this a new attack vector? It’s kind of like unhinged WASM, but without the guardrails.

link to implement just `mov` for Turing completeness

You Gave me some Ideas!

do these actually work without js? they look very vibe coded

The pong game probably will never work real time. (due to the logic of the pong ball) but I can get the paddles to move. The emoji quest was based off an already existing JS reliant game ( that i tried to xfer to CSS sort of works but i'm still building.

Interesting approach though, I have made html/css template document type pages which are nice and clean for the UI. But turning them into full functional PWA is a new realm I am learning.

Getting some Cool Zine style pages for CSS ideas doing this. Avoiding the JS seems to give the LLM more CSS editing in it's replies (using deepseek browser client for this)

I am going to try to build a collection of html/css webzine pages with these themes

thats nice

Bro i swear to god

Thanks!

I can't decide whether we should give you a medal or put you in jail.

@dante_eats

Literally how

Can it run Doom?
