Talk:ROTfuck

From Esolang
Jump to navigation Jump to search

This is really cool. I never imagined programs would be that easy to golf in. A 2 character cat? I think you should compress it from octal to ASCII for ultimate golfing. -User:Apollyon094

Hey, I tried implementing this but I think I misunderstood the rotation part of it. If you want you could help clarify by looking at it here. If not I understand, I put all the nonCommented characters in an array and then shifted the index of the array one to the right every rotation pretty much. thanks -User:Nmcassa

There are a few problems with this interpreter:
  • [ jumps to the next ], whereas it should jump to the matching ]. Similarly, ] jumps to the previous [ while it should jump to the matching [.
  • . should output the Unicode character whose codepoint is the value of the cell, and the statement printing instruPointer should probably be removed, or its execution made optional through use of a debug flag or similar.
  • As far as I can tell, your rotation logic is correct, although [ and ] currently have the characters of their matching brackets hardcoded, whereas they should take rotation into account.
Other than that, it looks fine. —User:PythonshellDebugwindow (talk) ~~~~ 18:06, 6 August 2022 (UTC)
Thanks! I tried some stuff and ended up getting the one character cat working but the hello world won't run for me. --(this comment by Nmcassa at 20:35, August 7, 2022‎ UTC; please sign your comments with ~~~~)
I don't think that the Hello World program should actually work — its first command invokes undefined behaviour by using a negative cell address. I think that Apollyon094 likely misunderstood the language, and probably misread the exact semantics of rotation: the program seems to assume that + directly follows < in rotation and that commands should be rotated before being executed, both of which are incorrect, although to be fair the table listed the commands in a different order than the rotation order and the section about rotation was unclear. —User:PythonshellDebugwindow (talk) ~~~~ 21:04, 7 August 2022 (UTC)
I've been staring at my code for two nights now don't know what's wrong. The new hello world should work. I'm getting false positives for recognizing []'s when moving backwards from a ]. I think I'm braindead. I won't look at this for a while. Nmcassa (talk) 18:12, 8 August 2022 (UTC)
It's something with the rotation when moving backwards from the ]. I'm not smart enough for this one. Nmcassa (talk) 19:01, 8 August 2022 (UTC)