3 ms·
Is CSS Turing complete yet?
by miohtama 3y ago
Is CSS Turing complete yet?
- lyvxh 3y agoWell, if you consider the accompanying HTML as well as a user mindlessly clicking orange squares as part of the execution, then yes, it is: https://jsfiddle.net/Camilo/eQyBa/ https://jsfiddle.net/Camilo/eQyBa/
- tetha 3y agoI came across that as well, as well as these two interesting blog posts: https://accodeing.com/blog/2015/duty-calls-css3-is-not-proven-to-be-turing-complete https://accodeing.com/blog/2015/duty-calls-css3-is-not-prove... https://accodeing.com/blog/2015/css3-proven-to-be-turing-complete https://accodeing.com/blog/2015/css3-proven-to-be-turing-com... So yeah, it's most likely as powerful as our current computers.
- alwillis 3y agoYes, for a while now.
- OtherShrezzing 3y agoThere's already a bunch of ways to make "something close to Turing Complete CSS", but there's usually some caveat. This change, when applied with css transition to split commands, would allow you to create loops, and enable you to implement the commands MOV, JMP, INC, and DEC. It should be possible to compile an arbitrary C program with just those commands (some papers have shown just MOV will do). In the most inefficient scenario, you should be able to draw a series of AND/OR and NOT/NAND gates to a HTML document, and colour in different outputs based on their inputs. So CSS should be Turing Complete without caveats after this feature is introduced. I'm not sure what the output of such an application could be. I guess just the satisfaction of knowing that some computation is occurring, if that counts?
- miohtama 3y agoInteresting. CSS can generate content, so it can actually output text like any other console.
- deleted 3y ago[deleted]