Talk:Nandarin

From Esolang
Jump to navigation Jump to search

Looks good to me. Two questions:

  • Are we considering input at all? Or is Nandarin meant to be output-only?
  • Is it really a good idea to have printing text be the simplest instruction? I'm sure it'll be used a lot less than NAND. The sample 5-bit incrementer on the FerNANDo page has 26 NAND instructions and only one output, for example.

I love the idea that you can change what an instruction does by changing the value of the variables that make it up. You can even change how long an instruction is in this way, with all sorts of fun consequences. Very clever. Very esoteric. Snowyowl (talk) 13:30, 29 April 2013 (BST)

You are more than right about print and nand have to be reversed. I don't know about input for now. Thnx for your comment :) Whtspc (talk) 14:09, 29 April 2013 (BST)

I don't think the golfed example works right for 1. The loop loops back to the character after the b, if I understand the spec correctly. The first time around, the b was part of the print instruction, but the next time it is not and the instructions line up differently giving a couple of NAND assignments, then they print the 0 and hit the end of the program. --Superdave (talk) 03:29, 2 May 2013 (BST)

This one works for me and is shorter:

t i f f ta f t 1 f f t ta 1 f t 0

If that agrees with your understanding of the language, I have an interpreter that seems to work. --Superdave (talk) 03:55, 2 May 2013 (BST)

Aargh! My mistake! You are right! Thought I had a shortcut but didn't check it. Allthough your example isn't right either:

t i f f

nands two falses and puts it into the i (effectively storing value true in i)

ta f t 1

stores t NAND 1 in f , and that's not what you expected it to do.

Interested in what you come up with though! Whtspc (talk) 12:37, 2 May 2013 (BST)

Superdave's code looks fine to me. t i f f sets 0 to TRUE if i is replaced with 0, and 1 to TRUE if i is replaced with 1.
ta f t 1 does nothing, again by design. It doesn't change anything or break anything. But! If i is 1, the program is eventually supposed to jump back to the previous ta, which causes it to execute f t 1, which prints 1. Did you just see an instruction that does nothing and forget to check that it wasn't used somewhere else? Snowyowl (talk) 13:52, 2 May 2013 (BST)
yeah right again, I definitely need to start thinking brighter.Whtspc (talk) 18:34, 2 May 2013 (BST)