Hacker News new | ask | show | jobs
by VladRussian 5398 days ago
>It'll print the reverse of a string, but it will also print everything before it until it hits a null byte.

exactly! The brainfuck execution starts with the pointer at the first byte of zero-filled array:

http://www.muppetlabs.com/~breadbox/bf/

So the first ">" in my program moves the pointer to the next byte, and this skipped first byte would serve as a stopper when pointer moves back.

1 comments

Ah. I wasn't aware of that part of the spec. In that case, then, the code would work.

It's an interesting language, and one that I'm not convinced is so entirely without practical application as is commonly stated.