x86 CPU made in CSS (No Javascript). You can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS
17 Comments
Comments from other communities
@yogthos@lemmy.ml @programming@lemmy.ml
The x86css didn't work because CSS @function rules aren't yet implemented on Firefox (by extension, Waterfox). I'm not gonna spin up the Chromium.
Then I tried other projects from this lyra.horse website, I tried the CSS clicker (a clicker game which uses no JS, just CSS and HTML). It's very interesting. There are a few glitches (e.g. the "Name your website:" should behave like input[type='text'] but actually behaves like textarea, thus allowing newlines where the semantic (a title) expects none; IIRC, there are CSS properties allowing a [contenteditable] element to restrict the input to an one-line text) but interesting nonetheless.
The only problem, besides the limited support for certain state-of-the-art features across browser engines, is the fact that this "CSS-oriented functional programming" ends up requiring more processing power than JS does, because JS has optimizations that CSS often lack.
Don't get me wrong: it's really interesting, and I'm quite fond of unorthodox approaches to programming. I myself once used nodemon (a live-reloading CLI tool intended for Node.js but also usable for other programming languages) to compile and run an Assembly (GNU Assembly) Linux program as the code was being edited, and I also used the same Assembly tool-chain to code a "program" whose compilation result wasn't an actual runnable program, but a whole, valid BMP (Bitmap) image structure, full with a linear gradient, I achieved this by using compiler macros. This is how much I'm fond of unorthodox programming, so I'm far from being against CSS programming, much to the contrary: it's awesome!...
... but this whole approach, using CSS as a whole functional programming language, unfortunately ends up heating my old poor I5-7200U laptop...
CSS has been considered turing complete for a long time.
So this isn’t a shocking revelation, but it is cool.
Chrome and JavaScript required.
Chromium yes, but JS?
x86CSS is a working CSS-only x86 CPU/emulator/computer. Yes, the Cascading Style Sheets CSS. No JavaScript required.
They used the JS to provide a stable clock that speeds up the processing, but they also implemented it in CSS only as a fallback, if you haven’t enabled scripts
ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86
RetroFed
Settoletto 🍤
Share on Mastodon
☆ Yσɠƚԋσʂ ☆
Dæmon S.
einkorn
spartanatreyu
This is terrible I love it
Doesn’t seem to work on Android firefox
Ye. The cybergods will quantum donedid the author for sure: blesseings because wtf genius, cursings because “pwEAsE in$tALl cHroWmiUm”