Hacker News new | ask | show | jobs
by throwaway1980 4783 days ago
I'd found this before posting:

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."

1 comments

That makes sense. Browser implementors would definitely balk at anything that they couldn't guarantee would stop in a reasonable amount of time.
What about JS?
JS is trivially Turing complete (given infinite RAM)

See this: http://www.turing.org.uk/turing/scrapbook/tmjava.html

What I meant was, why don't browser implementors balk at it?
I 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.
Browser 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.