Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An implementation of Brainfuck on the Rubinius VM.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gemtest
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Rakefile
Octocat-spinner-32 Readme.md
Octocat-spinner-32 brainfuck.gemspec
Readme.md

brainfuck

An implementation of Brainfuck on the Rubinius VM.

(If you don't know what Brainfuck is, you definitely should).

Obviously... needs Rubinius!

Installation and usage

You just gem install brainfuck (or gem 'brainfuck' in your Gemfile)!

And then:

$ brainfuck my_file.bf

Or if you just want to generate the compiled bytecode in my_file.bfc:

$ brainfuck -C my_file.bf

You can also require the gem and use inline brainfuck in your ruby scripts like this:

require 'brainfuck'

# Brainfuck needs an object binding to do its stuff.
bnd = Object.new
def bnd.get; binding; end
bnd = bnd.get

Brainfuck::CodeLoader.execute_code "+++>+++<---", bnd, nil
# => [0, 3]

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add specs for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. If you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull.
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2011 Josep M. Bach. See LICENSE for details.

Something went wrong with that request. Please try again.