News for hackers. Stuff that matters.
Re:Nintendo NES console in CSS by throwaway1980 on Thursday May 16, 2013 @01:58PM (#5719969)
"Full CSS Nintendo NES" is a bit of a linkbait title. However, it's still kind of amazing, because despite knowing that CSS is not Turing complete, I still clicked on it hoping for an emulation. Which effectively means that I identified it as bait and then chose to eat it anyway.

Other than that it's a neat demo.

Re:Nintendo NES console in CSS by jeffasinger on Thursday May 16, 2013 @02:54PM (#5720380)
I remember seeing an encoding of Rule 110 in CSS + HTML a while back. Is CSS actually not Turing complete?
Re:Nintendo NES console in CSS by throwaway1980 on Thursday May 16, 2013 @03:00PM (#5720415)
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."

Re:Nintendo NES console in CSS by jeffasinger on Thursday May 16, 2013 @03:23PM (#5720567)
That makes sense. Browser implementors would definitely balk at anything that they couldn't guarantee would stop in a reasonable amount of time.
Re:Nintendo NES console in CSS by throwaway1980 on Thursday May 16, 2013 @03:44PM (#5720684)
What about JS?
Re:Nintendo NES console in CSS by jeffasinger on Thursday May 16, 2013 @04:08PM (#5720844)
JS is trivially Turing complete (given infinite RAM)

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

Re:Nintendo NES console in CSS by throwaway1980 on Thursday May 16, 2013 @04:52PM (#5721061)
What I meant was, why don't browser implementors balk at it?
Re:Nintendo NES console in CSS by jeffasinger on Thursday May 16, 2013 @09:50PM (#5722301)
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.
Re:Nintendo NES console in CSS by gcr on Friday May 17, 2013 @01:22PM (#5725592)
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.

Re:Nintendo NES console in CSS by orangethirty on Thursday May 16, 2013 @02:41PM (#5720295)
Did you seriously expect a NES emulator written in CSS? Color me surprised.
Re:Nintendo NES console in CSS by madsravn on Thursday May 16, 2013 @02:44PM (#5720325)
But ... OP promised.
Re:Nintendo NES console in CSS by Zimahl on Thursday May 16, 2013 @04:01PM (#5720807)
.orangethirty { background-color: #ff0000; font-weight: bold; }
Re:Nintendo NES console in CSS by orangethirty on Thursday May 16, 2013 @05:17PM (#5721202)
Shouldn't it be:

    #orangethirty {background: #000;}
    #orangethirty .surprised {
        background: #fa0000; 
        font-weight: 700;
    }
(: