News for hackers. Stuff that matters.
Re:HTML + CSS3 is Turing complete by elitheeli on Tuesday March 08, 2011 @10:33AM (#2301201)
TeX is very Turing complete. As is Java sans semicolons, C macros, and many other things that probably shouldn't be. Right now, I'm trying to figure out what the minimum number of characters you need in Ruby is to make it Turing complete. I'm pretty sure that if you restrict yourself to under 12 characters, it's still possible.
Re:HTML + CSS3 is Turing complete by sgentle on Tuesday March 08, 2011 @11:35AM (#2301478)
As in the minimum character set? As of 1.9.2, you can do lambdas with a = ->(x){do stuff} and call them with a[3]. So I think you could probably translate to SKI calculus using only: (){}->[]

Since SKI gives you lambda calculus, and the lambda calculus is turing complete, you might win that way. :)

Re:HTML + CSS3 is Turing complete by Xk on Tuesday March 08, 2011 @10:52AM (#2301294)
C macros are not Turing complete, they're a pushdown automaton.

C++ templates are.

Check out this IOCCC entry which does simulate a Turing machine, but only by having another script repeatedly run it.

Edit: Yes, I meant to copy the link, see mchouza's comment for the link.

Re:HTML + CSS3 is Turing complete by mchouza on Tuesday March 08, 2011 @11:08AM (#2301358)
Link: http://www.ioccc.org/2001/ (herrmann1 files)
Re:HTML + CSS3 is Turing complete by elitheeli on Tuesday March 08, 2011 @11:15AM (#2301390)
Sorry, you're totally right. My bad.
Re:HTML + CSS3 is Turing complete by jerf on Tuesday March 08, 2011 @11:11AM (#2301370)
"eval", followed by whatever chars are required to get a string.

I think you mean "the minimum to get a Turing Machine", which is not the same. But I am being pedantic. Very, very pedantic. As befits the topic. :)

Re:HTML + CSS3 is Turing complete by elitheeli on Tuesday March 08, 2011 @11:18AM (#2301405)
But what's in that string? That still counts. What I should have done was put an additional restriction on what IO is available. Otherwise, something like "eval `cat f`" or something could be all powerful.

My first attempt shows Ruby simulating a cyclic tag system with only 15 unique characters including newlines and spaces: https://github.com/elitheeli/oddities/raw/master/only_a_few_...

EDIT: down to 14 characters.

Re:HTML + CSS3 is Turing complete by jerf on Tuesday March 08, 2011 @12:29PM (#2301736)
"But what's in that string? That still counts."

Sure, but it counts regardless of what you're talking about. We don't generally talk about charging data against the TM because they all need data of some sort to do anything interesting. "eval" still gets you there. (Pedantic.)

Re:HTML + CSS3 is Turing complete by elitheeli on Wednesday March 09, 2011 @11:58PM (#2308121)
I should have phrased as "what is the minimum number of characters that need to be seen by a Ruby parser in order to have something Turing equivalent to Ruby without a limited character set?"