Hi, love the turing machine simulator! It was a bit unclear tho as to how the bracket pairing works, with regards to nested brackets. I was under the understanding that the brackets would pair with whatever other bracket came before or after, not that they were paired together from the start. I also struggled with whether a single opening bracket could have multiple closing brackets for the same reason.
I think the problem description should list that each opening bracket will have EXACTLY ONE closing bracket. That would make it more clear and easier to understand.
Note: The [ and ] commands always come in pairs, and in case of nested [] the first [ always correspond to the last ].
Does that more or less carry the meaning of what youâve suggested to add? I mean if they come in pairs, each opening bracket will most certainly have exactly one closing bracket, right?
I suggest you consolidate the instructions into one line of valid characters instead of jumping between line to line.
Itâll eliminate bugs that you donât really see in an obvious way that you do see if you make everything one dimensional.
I feel compelled to leave some feedback to this puzzle:
Loved it!
I have long been curious about the brainfuck language and thus was really happy with this opportunity to learn about it. I was expecting it to be much more complicated. And when I still had an error in the code and had to analyse the command string and finally realized that the brackets are used to construct loops ⌠loved it!
When you say only one character you confirm the â.â for print is excluded?
If my understanding is right the error âINCORRECT VALUEâ can be prompt only if a print is required by one â.â in the code. So testing with the dot (as it is the only code based on your indication, it is printing ? as 0 is âNULâ in ASCII table. trying to change the min value to eclude the 32 first values, it doesnât suppress the validator fail.
Could you confirm my understanding ?
To my understanding, the ASCII code of range occurs only proceeding to its call.
So the value of the cell shall be checked to be lower than 256 at the moment of its affectation / incrementation ?
An array of S one byte cells initialized to 0, and indexed from 0.
âINCORRECT VALUEâ if after an operation the value of a cell becomes negative or higher than 255.
So, all cell values are correct at the beginning, and only after an operation the cell values should be checked to see whether any becomes âincorrectâ.
There seems to be a lack of a test case for a possible SYNTAX ERROR, some solutions simply tally the square brackets and see if there is a matching number, however this does not guarantee that the brackets are valid, case and point: ][, though for an actual test case it should obviously be a bit more elaborate.
Hello, where can I see the best solutions of this yearâs iteration of the challenge? I was interested in seeing what the best ones were from this week but it seems the three best solutions are from 2 or 4 years ago.