Live data from Hacker News

HTML + CSS3 is Turing complete

github.com

1–10 of 89 posts

Re: HTML + CSS3 is Turing complete

#4
I'd like a more complete description of this.

My first thought is "no it's not", because you are encoding a fixed-sized grid in the HTML, which is then the total extent of the program. While no real machine has an "infinite tape", I think requiring the tape be embedded in the program itself is strengthing things a little far.

Re: HTML + CSS3 is Turing complete

#6
Way to steal my karma.... :)

As the original author of this, I was going to put it into a much more presentable state before showing it off here.

For those confused, here's a proper explanation. No real-world thing can actually be Turing complete (able to express basically any computation that we might want to perform of any size). That's because there are finitely many atoms in the universe, so we can only construct machines of finite size.

It's well known that Rule 110 (Google it) is Turing Compete.

What I've done is made an implementation of Rule 110 in HTML and CSS. Since CSS can't actually really manipulate state, some user interaction is required to "drive" it. In the one that bgruber linked to, it's clicking.

Here's a bigger version that doesn't require the user to know where to put his mouse. The tab-space combo is just as legitimate as requiring that you plug a computer into a wall to power it in order to run a Java program. http://elilies.com/rule110-full.html

Also, I haven't tested it on anything besides the latest Chrome on Mac.

Re: HTML + CSS3 is Turing complete

#7
As far as I remember is LaTeX (or TeX itself) touring complete, too. In the end, if you can simulate a turing machine (or another "equivalent" calculating "device") the language is itself turing complete. While not being a html/css wizard, by the amount of complex examples i saw you could do with only HTML/CSS3, I am not surprised that you can write a cellular automaton in it.

edit: typo (personal hangup with touring/turing)

Re: HTML + CSS3 is Turing complete

#8

I'd like a more complete description of this. My first thought is "no it's not", because you are encoding a fixed-sized grid in the HTML, which is then the total extent of the program. While no real machine has an "infinite tape", I think requiring the tape be embedded in the program itself is strengthing things a little far.

Is my MacBook Pro any more Turing complete? All of the memory came with it. There's no way to expand the memory as it's running.

Re: HTML + CSS3 is Turing complete

#9
post #2

I don't understand .. explain? EDIT: part of not understanding is I ran it in firefox 3.5 -- not good. works better in chrome.

I tried to do a little bit better of a job explaining it above. I was caught off guard... I intended to post this in a few days with a proper explanation.

Re: HTML + CSS3 is Turing complete

#10

I'd like a more complete description of this. My first thought is "no it's not", because you are encoding a fixed-sized grid in the HTML, which is then the total extent of the program. While no real machine has an "infinite tape", I think requiring the tape be embedded in the program itself is strengthing things a little far.

But the HTML is not the program; it's the machine that runs the program. In that view, the tape being finite is just like the tape (RAM, disk, mercury delay lines) of a physical machine being finite.
Post reply on HN