GithubHelp home page GithubHelp logo

isabella232 / reli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixie-grasper/reli

0.0 0.0 0.0 169 KB

Generic interface for Esoteric Language Implementation which is written in Ruby.

Ruby 99.03% Perl 0.97%

reli's Introduction

RELI (Ruby Esoteric Language Implementation)

Build Status

Generic interface for Esoteric Language Implementations which is written in Ruby.

Installation

Add this line to your Gemfile.

gem 'reli'

Then execute.

$ bundle

Or execute this.

$ gem install reli

Usage

Basic

type: support :brainfuck, :braincrash, :ook, :monamona, and :malbolge, :hq9plus

require 'reli'

brainfuck = RELI.new(type: :brainfuck)
source    = "+++++++++[>++++++++<-]>.<++++[>+++++++<-]>+.+++++++..+++.<++++++++[>----------<-]>+.<+++++++[>++++++++<-]>-.<+++++[>+++++<-]>-.+++.------.--------.<++++++++[>--------<-]>---."
brainfuck.run(source) #=> Hello World!

only Brainf*ck

require 'reli/brainfuck'

brainfuck = RELI::Brainfuck.new
source    = "+++++++++[>++++++++<-]>.<++++[>+++++++<-]>+.+++++++..+++.<++++++++[>----------<-]>+.<+++++++[>++++++++<-]>-.<+++++[>+++++<-]>-.+++.------.--------.<++++++++[>--------<-]>---."
brainfuck.run(source) #=> Hello World!

Braincrash

require 'reli/braincrash'

braincrash = RELI::Braincrash.new
source     = ">>>>>>^<<[-]>[[<+>-]>]<<<<<<<<<<<<<"
braincrash.run(source) #=> Hello World!

Ook!

require 'reli/ook'

ook    = RELI::Ook.new
source = <<OOK
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook. Ook?
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook.
Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook! Ook? Ook!
Ook. Ook? Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook.
Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook! Ook.
Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook.
Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.
Ook. Ook? Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook.
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook!
Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook.
Ook! Ook. Ook. Ook? Ook! Ook.
OOK
ook.run(source) #=> Hello World!

MONAmona

require 'reli/monamona'

mona   = RELI::Monamona.new
source = "NNNNNNNNNNnMNNNNNNNMNNNNNNNNNNMNNNMNOOOOAaMNNoMNoNNNNNNNooNNNoMNNoOONNNNNNNNNNNNNNNoMoNNNoAAAAAAoAAAAAAAAoMNo"
mona.run(source) #=> Hello World!

Malbolge

require 'reli/malbolge'

malbolge = RELI::Malbolge.new
source   = "(=<`#9]~6ZY32V6/S3,Pq)M'&Jk#Gh~De{z@>`v*;yKw%ut4Uqp0/ml>jibgIedFFaZB^{@[ZfXWV98Mqpo31kj.DCgT"
malbolge.run(source) #=> Hello World!

HQ9+

require 'reli/hq9plus'

hq9plus = RELI::Hq9plus.new
source  = "H"
hq9plus.run(source) #=> Hello, world!

TODO

  • support other esoteric languages
  • RSpec test is insufficient.

Contributing

  1. fork the project.
  2. create your feature branch. (git checkout -b my-feature)
  3. commit your changes. (git commit -am 'commit message')
  4. push to the branch. (git push origin my-feature
  5. send pull request.

Authors

  • namusyaka
  • pixie-grasper

License

the MIT License

reli's People

Contributors

namusyaka avatar pixie-grasper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.