Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Inline::Brainfuck

by moxliukas (Curate)
on Aug 29, 2002 at 22:46 UTC ( [id://193942]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Inline::Brainfuck
in thread Inline::Brainfck

Nested Brainf*ck loops can be used like this:

+++[>++++[>+++++<-]<-]>>++++++.++++.

Which in this case is only a fancy way of writting

++++++[>+++++++++++<-]>.++++.

Both of these should print "BF".

On a closer look at your code I think nested loops are indeed supported however I am having trouble with installing Filter::Simple so I cannot check.

Regarding comments and ` operator: to my understanding anything that is not a Brainf*ck operator (that is not in the []-+,.<> set) is automatically treated as a comment and is silently ignored (this lets you have Brainf*ck code span a couple lines rather than being on one long line). Of course the philosophy should say that Brainf*ck code should not be commented at all because if it was difficult to write it must be difficult to read ;)

Replies are listed 'Best First'.
Re: Re: Re: Re: Inline::Brainfuck
by jaldhar (Vicar) on Sep 02, 2002 at 04:20 UTC

    On a closer look at your code I think nested loops are indeed supported however I am having trouble with installing Filter::Simple so I cannot check.

    Oh sure, that kind of thing works. Somehow I thought you meant something more complicated.

    Regarding comments and ` operator: to my understanding anything that is not a Brainf*ck operator (that is not in the []-+,.<> set) is automatically treated as a comment and is silently ignored (this lets you have Brainf*ck code span a couple lines rather than being on one long line).

    That's true. What led me down this path was the difficulty of adding perl comments after I had commandeered the # character for my debug instruction. But now I see it is easy to work around so I'm not going to bother.

    --
    જલધર

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://193942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-16 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found