Code Monkey home page Code Monkey logo

flufflepuff's Introduction

BrainPuff

BrainPuff is a programming language based on Brainfuck and the speech of everypony's favorite fluffy pony, Fluffle Puff.

Conversion table

BF  Fluffle Puff
+   pf
-   bl
>   b
<   t
.   !
,   ?
[   *gasp*
]   *pomf*

Examples

Sample hello world in Brainfuck:

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

Sample hello world translated in BrainPuff:

pfpfpfpfpfpfpfpfpfpf*gasp*bpfpfpfpfpfpfpfbpfpfpfpfpfpfpfpfpfpfbpfpfpfbpfttttbl*pomf*bpfpf!bpf!pfpfpfpfpfpfpf!!pfpfpf!bpfpf!ttpfpfpfpfpfpfpfpfpfpfpfpfpfpfpf!b!pfpfpf!blblblblblbl!blblblblblblblbl!bpf!b!

Output:

Hello World!

Compile and Run

This project comes with a reference implementation written in C++.

Just install flex, then type make in a Linux, Mac OS X or Windows (with Cygwin) command prompt. Then you can run it like this:

% cat hello.fp | ./flufflepuff
% ./flufflepuff < hello.fp
% ./flufflepuff hello.fp

That's really simple. For now.

Implementations

This is the reference implementation released under GPL, so feel free to make your own implementation in other languages. You'll want to link back to the original project's page on your project page and tell me about it so I can link you here, it will be greatly appreciated.

Links

Fluffle Puff

flufflepuff's People

Contributors

juju2143 avatar topaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flufflepuff's Issues

Reference implementation fails "Hello World!"

This translation from BF should print "Hello World!"

pf*gasp*b*gasp*tbl*gasp**pomf*bpf*gasp*bpfpfpfb*gasp*pfpfpfpfpfpfpfpfpfpfpfb*pomf**gasp*b*pomf*bl*gasp*t*pomf*bbl*pomf**pomf*pfpfpfpfpfpfpfpfpfpft*pomf*bbbbbbblblblbl!ttpfpfpf!tbl!!pfpfpf!tbl!bbb!tt!pfpfpf!blblblblblbl!bbl!ttpf!t!

This implmentation does print "Hello World!" as does Lunar Fire

#!/usr/bin/ruby

h = {
    'b' => 'p+=1;',
    't' => 'p-=1;',
    'pf' => 'm[p]+=1;',
    'bl' => 'm[p]-=1;',
    '!' => 'putc m[p];',
    '?' => 'm[p]=STDIN.getbyte if !STDIN.eof;',
    '*gasp*' => '(',
    '*pomf*' => ')while((m[p]&=255)!=0);'
}

r = Regexp.union(Regexp.union(h.keys.sort{|a,b|b.length<=>a.length}),/./);
eval 'm=Hash.new(p=0);'+ARGF.read.gsub(/[\n\t ]+/," ").gsub(r,h);

A BF/FP converter

Hello there! ๐Ÿ˜ƒ I wrote a program that converts BF to FP, and FP to BF. I call it "Project Chrysalis", and it is a bit buggy, so beware if you try to use it.

Anyways, you can find it here.

Broken link to LunarFire's implementation

The link to my javascript implementation of the language is no longer working. I don't own the domain anymore and I don't seem to have the original code either ;(

If I ever find it again I will give it to you but for now you better remove the link.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.