https://github.com/namusyaka/reli
Generic interface for Esoteric Language Implementation which is written in Ruby.
https://github.com/namusyaka/reli
Last synced: about 1 month ago
JSON representation
Generic interface for Esoteric Language Implementation which is written in Ruby.
- Host: GitHub
- URL: https://github.com/namusyaka/reli
- Owner: namusyaka
- Created: 2013-10-03T08:45:30.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-15T23:33:06.000Z (over 11 years ago)
- Last Synced: 2025-03-25T12:41:18.930Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 147 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
README
# RELI (Ruby Esoteric Language Implementation)
[](https://travis-ci.org/namusyaka/reli)
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`
```ruby
require 'reli'brainfuck = RELI.new(type: :brainfuck)
source = "+++++++++[>++++++++<-]>.<++++[>+++++++<-]>+.+++++++..+++.<++++++++[>----------<-]>+.<+++++++[>++++++++<-]>-.<+++++[>+++++<-]>-.+++.------.--------.<++++++++[>--------<-]>---."
brainfuck.run(source) #=> Hello World!
```### only Brainf*ck
```ruby
require 'reli/brainfuck'brainfuck = RELI::Brainfuck.new
source = "+++++++++[>++++++++<-]>.<++++[>+++++++<-]>+.+++++++..+++.<++++++++[>----------<-]>+.<+++++++[>++++++++<-]>-.<+++++[>+++++<-]>-.+++.------.--------.<++++++++[>--------<-]>---."
brainfuck.run(source) #=> Hello World!
```### Braincrash
```ruby
require 'reli/braincrash'braincrash = RELI::Braincrash.new
source = ">>>>>>^<<[-]>[[<+>-]>]<<<<<<<<<<<<<"
braincrash.run(source) #=> Hello World!
```### Ook!
```ruby
require 'reli/ook'ook = RELI::Ook.new
source = < Hello World!
```### MONAmona
```ruby
require 'reli/monamona'mona = RELI::Monamona.new
source = "NNNNNNNNNNnMNNNNNNNMNNNNNNNNNNMNNNMNOOOOAaMNNoMNoNNNNNNNooNNNoMNNoOONNNNNNNNNNNNNNNoMoNNNoAAAAAAoAAAAAAAAoMNo"
mona.run(source) #=> Hello World!
```### Malbolge
```ruby
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+
```ruby
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