3 ms·
I assume this is not more powerful computationally than existing selectors, right? What exactly keeps CSS+HTML from being Turing-complete?
by jordanscales 1y ago
I assume this is not more powerful computationally than existing selectors, right? What exactly keeps CSS+HTML from being Turing-complete?
- shakna 1y agoIf you include the user clicking, then it already is. [0] [0] https://github.com/brandondong/css-turing-machine https://github.com/brandondong/css-turing-machine
- cluckindan 1y agoNothing. Given infinite memory, a NAND gate is Turing complete by itself and trivial to construct based on the OP examples.
- csmantle 1y agoUnfortunately the examples provided by OP only contain combinational circuits, which by def. have no memory.
- cluckindan 1y agoWell, there are half and full adders, maybe a flip-flop would be feasible?
- csmantle 1y agoIf we can introduce delay in the circuit it would be trivial to build FFs from Boolean-complete gate sets, thus sequential elements with memory. But AFAIK CSS if() can't introduce delays.
- cluckindan 1y agoKeyframe animation?
- amelius 1y agoOk, so NoScript should also block (parts of) CSS now, and not just JavaScript?
- cdaringe 1y agoI’m going to assume this is a joke. However, if it’s not a joke, no. We as a community have gone to great lengths to use responsive design over the past few years. There are still styling cases for complex elements that can’t be implemented without JavaScript. This is just an additional step of the journey to allow intermediate styling for complex cases. If anything, it should enable (minor) expansion of noscript!
- cdaringe 1y agoId actually like to redact that prior message and think further, here. We already have information egress thru URIs, with some amount of “protection” via CSP. But I didn’t think of other types of attack vectors at length. Someone above remarked that this is just a general form of conditional, which perhaps unlocks new vectors. Im always surprised by CSS so i should slow down and keep an open mind :)
- zamadatix 1y agoIt lacks a usable form of pure-CSS recursion (which was intentionally excluded in this implementation) but that's not as big a problem as one would expect for a lot of practical things.
- Dylan16807 1y agoBasic arithmetic plus iteration is Turing complete. CSS has basic arithmetic but not iteration. Some people have already claimed it's Turing complete by making the user hit tab and space to copy data between iterations, but I wouldn't listen to them. That copying role is simple but it's not negligible.