4 ms·
Idle question, is CSS/HTML turing complete? If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.
by aaroninsf 6y ago
Idle question,
is CSS/HTML turing complete?
If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.
- Wowfunhappy 6y agoIt’s not.
- pacificmint 6y agoMy understanding is that: Neither CSS nor HTML is turing complete. The combination of CSS and HTML together is not quite turing complete either. The combination of CSS and HTML plus an external source that repeated clicks the mouse is turing complete. I could be remembering this wrong, however.
- James0x57 6y agoI would say no because the core boolean mechanic that allows CSS-Sweeper to exist cannot be inverted directly (NOT, !). In order to invert anything here, you have to start with an inverted copy of every bit and do the opposite calculation at every &, |, etc to always have a "NOT" var to reference. Like a shadowy, anti-vein, copy of the main logic. There are several edge cases where a sort of simile of NOT is possible though. You can branch from truthy/falsey into falsy/truthy numbers. And if is something is falsey you can "else" into another action. Just can't "else" from a truthy state without the ...anti-vein... always being present.
- bawolff 6y agoIt is (and has been since the css 2.0 era) if you include user clicking mouse. There is a famous demo of rule110 in css at http://eli.fox-epste.in/rule110-full.html http://eli.fox-epste.in/rule110-full.html
- potiuper 6y agoMouse is not necessary using CSS 3 (animations); Minesweeper[1] is enough to show Turing completeness. [1] http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf
- James0x57 6y agoedit: ^ previously said "with css variables to hold state" or something similar (or my wires got crossed and I saw that somewhere else) CSS variables can't be set by animations yet without JS's CSS Houdini giving them a type - a CSS @ property is in the works to do it without JS though!