Polyglot::Brainfuck

A module that allows true inline use of Brainfuck code

Polyglot::Brainfuck

A basic module showing off how Brainfuck can be integrated into Raku.

Instead of using sub to declare a subroutine, use bf and you can code in BF!

BF subs do not accept signatures. They always have a single optional buf8 parameter.

BF subs always output a buf8;

    use Polyglot::Brainfuck;
    
    bf hi { 
        ++++++++[>++++[>++>+++>+++>+<<<<-]>
        +>+>->>+[<]<-]>>.>---.+++++++..+++.
        >>.<-.<.+++.------.--------.>>+.>++. 
    }
    
    say hi.decode; # Hello World!
    
    bf plus-two {
        ,++.
    }
    
    say plus-two(buf8.new: 40).head; # 42

Version History

  • v0.1 Initial release

Polyglot::Brainfuck v0.1

A module that allows true inline use of Brainfuck code

Authors

  • Matthew Stephen Stuckwisch

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Polyglot::Brainfuck
  • Polyglot::Brainfuck::Actions
  • Polyglot::Brainfuck::Grammar

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.