4 ms·
I'd found this before posting: http://stackoverflow.com/questions/2497146/is-css-turing-complete http://stackoverflow.com/questions/2497146/is-css-turing-com..
by throwaway1980 13y ago
I'd found this before posting:
http://stackoverflow.com/questions/2497146/is-css-turing-complete http://stackoverflow.com/questions/2497146/is-css-turing-com...
where the top answer gives a Rule 110 solution, but I was satisfied with this comment:
"BRILLIANT!. However, I don't think this qualifies as turing complete. CSS is only able to calculate 1 iteration of the state-machine. Your example relies on the human repeatedly clicking all the orange boxes in order to feed the "output" (pixels) back into the input (page state) and "pump" the state machine. Because there is no programmatic way to use the output of CSS as input, it can't be used to calculate any multi-step loops, the hallmark of turing-complete languages."
- jeffasinger 13y agoThat makes sense. Browser implementors would definitely balk at anything that they couldn't guarantee would stop in a reasonable amount of time.
- throwaway1980 13y agoWhat about JS?
- jeffasinger 13y agoJS is trivially Turing complete (given infinite RAM) See this: http://www.turing.org.uk/turing/scrapbook/tmjava.html http://www.turing.org.uk/turing/scrapbook/tmjava.html
- throwaway1980 13y agoWhat I meant was, why don't browser implementors balk at it?
- jeffasinger 13y agoI think the thing is, that JS can be executed separately from the layout engine, but CSS can't, however, I'm definitely not an expert in the matter.
- gcr 13y agoBrowser vendors control the javascript VM. Though we can't solve the halting problem, we can just throttle or unplug the JS interpreter if it causes usability problems. But CSS is required for the site to look right There's no way to turn it off without messing with the site's layout.