Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Inline::Brainfuck

by moxliukas (Curate)
on Aug 29, 2002 at 22:46 UTC ( #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 ;)


Comment on Re: Re: Re: Inline::Brainfuck
Select or Download Code
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
Node Status?
node history
Node Type: note [id://193942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2014-08-28 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls