esolang

A Ruby gem for interpreting esoteric programming languages.

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.

Installation

To use the esolang gem, you can install it via:

gem install esolang

Example Usage

require 'esolang'
using Esolang::Refinements

code = ";;;+;+;;+;+;
    +;+;+;+;;+;;+;
    ;;+;;+;+;;+;
    ;;+;;+;+;;+;
    +;;;;+;+;;+;
    ;;+;;+;+;+;;
    ;;;;;+;+;;
    +;;;+;+;;;+;
    +;;;;+;+;;+;
    ;+;+;;+;;;+;
    ;;+;;+;+;;+;
    ;;+;+;;+;;+;
    +;+;;;;+;+;;
    ;+;+;+;

puts code.boolfuck

This 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)