Skip to content

joeygibson/brainfuckyou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brainfuckyou

This is a variant of Brainfuck, suggested by my friend, Wesley Hartford, that adds more fuckery to the langauge, by requiring a semicolon after every instruction.

For example, "Hello World!" looks like this

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

and a simple program to add two numbers would look like this:

[;
    This program adds two numbers,; 2,; and 5,; and prints the result
    followed by a newline.
;];

+;+;
>; +;+;+;+;+;
[;
    <; +;
    >; -;
];

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

>;
+;+;+;+;+;+;+;+;+;+;  // newline
.;

This is a fork of my rust-brainfuck compiler, which is a simple Brainfuck compiler in Rust, ported from Go from an article by Thorsten Ball in this blog post.

Building

Just run cargo build and you will get a brainfuckyou executable. If you want any kind of performance from it, run cargo build --release to get an optimized build.

Running

Pass in the name of the file you want to execute