A Ruby gem for interpreting esoteric programming languages. Full doc on rubydoc.
Supported at the moment: Smallfuck, Boolfuck, Paintfuck, Brainfuck, Ook! (with method to feet the memory pointer with bananas)
This gem is inspired by this Kata Series on Codewars that ignited my passion for esolangs. Special thanks to the author donaldsebleung.
Codesnippets for tests and examples are copies or variations from Esolangs wiki or Wikipedia
This is an ongoing fun and educational project, and the author assumes no liability for the accuracy and completeness of the implementations.
To use the esolang gem, you can install it via:
gem install esolangrequire 'esolang'
using Esolang::Refinements
code = ";;;+;+;;+;+;
+;+;+;+;;+;;+;
;;+;;+;+;;+;
;;+;;+;+;;+;
+;;;;+;+;;+;
;;+;;+;+;+;;
;;;;;+;+;;
+;;;+;+;;;+;
+;;;;+;+;;+;
;+;+;;+;;;+;
;;+;;+;+;;+;
;;+;+;;+;;+;
+;+;;;;+;+;;
;+;+;+;"
puts code.boolfuckThis gem adds string refinements. You can use the boolfuck method directly on a string:
require 'esolang'
using Esolang::Refinements
code.boolfuck('user_input')Alternatively, you can use the Esolang module:
require 'esolang'
Esolang.boolfuck(code, input)