Are you referring to the short list at the top of the README on GitHub? That list does not provide "syntax definitions". That's just a quick introduction about what is about to come.
The command "F" does not draw a pixel and move forward. Instead "F" moves forward first and then draws a cell.
> [ ... ] (loop): anything inside this is executed twice
The control flow command "[" can be written without a corresponding "]". For example "[", "[F", "[[F", etc. are valid CFR[] inputs. Again, the section of the README I have linked to above defines what "[" and what "]" are.
Barely anyone is going to go to the github, especially outside of HN, and only some of those people are going to read past the first image, so it's important that you get the most important information out there immediately. I glanced at the extended explanation and decided it would be faster to figure it out by putting stuff in the website. The instant visual feedback means you don't need to tell users every nuance of every command, but you do need to pick the specific details that users can use to learn everything else.
I have updated the implementation to incorporate your feedback as much as possible while maintaining accuracy in the command descriptions. Now there is also a new help screen which can be invoked by typing '?'.
I am hoping the information in the new help screen will make the commands easier to understand. However, if you or anyone has better ideas about describing the commands, please feel free to send pull requests.
Thank you for playing with this tool and for offering your feedback! It has been very helpful in refining the command descriptions.
> For example "[", "[F", "[[F", etc. are valid CFR[] inputs.
Are those different from just "F"?
If not, even if those are technically valid syntax, op's explanation seems clearer. I was confused by the README definition too and came to op's conclusion after experimenting for a while.
If they are not equivalent to just "F" I still don't get the distinction so the README definition is not very good considering it confused at least both op and me.
(This is meant as constructive criticism, I'm having a lot of fun playing with this.)
Thanks for the feedback. The code examples "[F" and "[[F" both paint one cell but the code "[" produces no visual change, so in that sense there is a difference between them.
Between "[F" and "[[F", there is no visual difference. The command "[" is a control flow command that does not alter the state of the canvas or the invisible turtle. Instead it merely marks the current position in the code as the beginning of a block. The execution continues normally after "[" regardless of whether there is a corresponding closing "]" or not. However, if a corresponding "]" is found, then the execution jumps back to the corresponding "[" and executes the enclosed block once more. This produces the effect of a loop that executes twice. For most drawing purposes the code bounded by "[" and "]" indeed behaves like a loop that executes twice.
I have updated the README to make this clearer. However, I am open to improving the README further if there are better suggestions. Pull requests are welcome too.
F (fill/forward): draw a pixel and move forward
C (color): change the color
R (rotate): rotate the direction of F by 45 degrees
[ ... ] (loop): anything inside this is executed twice