Talk:Emoticon

From Esolang

Jump to: navigation, search

[edit] Turing-completeness

I found a way to translate brainfuck programs to Emoticon, you just have to initialize the memory with

10 8-O 0 :-O 8=\ :-( :-E L-O 0 :-O 1 :-{ 8=\ :-)

10 being how many cells to initialize.

[	8=\ :-( :-E
]	8=\ :-)
+	1 :+{
-	1 :-{
>	R-< L-O :-< :-O
<	L-< R-O :-< :-O
.	:-P S:-P

Note: There's no input, and . prints a number followed by a space instead of an ascii character.

Is this enough proof that Emoticon is turing complete or does the initializing part ruin it?

Hello World! translated: [1] Outputs 72 101 108 108 111 32 87 111 114 108 100 33.

--BodyTag 13:06, 20 Oct 2005 (GMT)

To show Turing-completeness there would need to be a way to initialise an unbounded number of memory cells. One way of doing this (in general - I don't know if it would work for Emoticon as I'm not familiar with the language) is to keep a record of the highest initialised address, and every time the pointer moves beyond this initialise a few more cells (this is how my Javascript Sansism interpreter works, for example). --Safalra 13:45, 20 Oct 2005 (GMT)
A slight modification to the table over that would make sure you always have enough cells: R-< L-O 0 :-< :-O for >. Every time you use > it would do as usual then add a new cell to the far right. Sure you will probably end up with more cells than you need, but it was easy to rewrite and I'm lazy. Is that sufficient to show turing-completeness? Even more notes: It's using bignum cells (or whatever they're called), and they can be negative. Be sure to put spaces between the translated emoticons. Thanks to the new > command you can initialize the progam with 8-O 0 :-O 0 --BodyTag 10:11, 21 Oct 2005 (GMT)
If the cells are unlimited in what values they can store, then as few as two cells may prove Turing-completeness; see Minsky machine. --Graue 13:43, 21 Oct 2005 (GMT)
The spec does not mention any limit on how big a number can be. --BodyTag 16:05, 21 Oct 2005 (GMT)
Personal tools