Portable Brainfuck interpreter

Discussion in 'General Off-Topic Chat' started by chuckstudios, Aug 7, 2008.

Aug 7, 2008
  1. chuckstudios
    OP

    Member chuckstudios Putting the pro in procrastination

    Joined:
    Jul 19, 2006
    Messages:
    896
    Location:
    North Carolina, USA
    Country:
    United States
    http://www.mediafire.com/download.php?hc5z9gtm6lw

    God, I've been bored lately. This can execute any standards-compliant Brainfuck program on any platform with a C compiler or PHP installation.

    To show you how tedious Brainfuck code is:
    CODE++++++++++[>+++++++>++++++++++>+++>+.
    Prints "Hello World!" to the screen.

    The C version has a precompiled executable included (brainfuck.exe, 4KB) which you can start from the command line (it takes one argument, the name of a Brainfuck file) or drop a Brainfuck file onto. The PHP version doesn't have any method of getting input or loading files, so you just need to change the argument to parseBrainfuck() to the code. A few sample programs are included in the "sample" directory.
     
  2. lagman

    Former Staff lagman I wish I was green.

    Joined:
    Nov 5, 2003
    Messages:
    4,071
    Location:
    Me, To You
    Country:
    Mexico
    This is what you wanted to get into college for?!

    j/k [​IMG]
     
  3. xalphax

    Member xalphax Internet killed the Ponystar.

    Joined:
    Nov 18, 2006
    Messages:
    1,266
    Location:
    here'n'there
    Country:
    Croatia
    i prefer Whitespace over brainfuck ^^

    esoteric programming languages for the win.
     
  4. CockroachMan

    Member CockroachMan Scribbling around GBATemp's kitchen.

    Joined:
    Jan 14, 2006
    Messages:
    3,889
    Location:
    Brazil
    Country:
    Brazil
    Chuck Norris made a N64 DS emulator and a Smash Bros DS homebrew using Brainfuck..
     
  5. Sephi

    Member Sephi fool

    Joined:
    Jan 21, 2008
    Messages:
    1,850
    Location:
    Rhode Island
    Country:
    United States
    LOLCODE is so much better.

    Code:
    HAI
    CAN HAS STDIO?
    VISIBLE "HAI WURLD"
    KTHXBYE
     
  6. SonicFan49

    Newcomer SonicFan49 Member

    Joined:
    Jul 8, 2008
    Messages:
    26
    Location:
    Detroit, Michigan
    Country:
    United States
    Meh. Brainfuck FTW.
     
  7. Hyperlisk_

    Member Hyperlisk_ GBAtemp Regular

    Joined:
    Jan 30, 2008
    Messages:
    187
    Country:
    United States

Share This Page