Because Brainfuck is so last year, right?
TrollScript is basically an esoteric dialect of Brainfuck. Why did I make it I hear you ask? Because I had some free time.
Interpreter is based on this gist I found hacked to run TrollScript instead.
Similar to another esoteric language cow
Just kidding, none needed!
Oops, it's a rubygem now.
gem install trollscript
It's so simple even a troll could do it: trollscript path/to/script.troll
As it's based on Brainfuck, it's fairly simple (lol?) to understand and use.
The eight operators from Brainfuck are simply replaced with TrollScript
trigraphs. Also TrollScript scripts can optionally begin with tro
and end
with ll.
.
>
isooo
- increment the data pointer (to point to the next cell to the right)<
isool
- decrement the data pointer (to point to the next cell to the left)+
isolo
- increment (increase by one) the byte at the data pointer-
isoll
- decrement (decrease by one) the byte at the data pointer.
isloo
- output a character, the ASCII value of which being the byte at the data pointer,
islol
- accept one byte of input, storing its value in the byte at the data pointer[
isllo
- if the byte at the data pointer is zero, then instead of moving the instruction pointer forward to the next command, jump it forward to the command after the matching]
command]
islll
- if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it back to the command after the matching[
command
Here's the most direct way to get your work merged into the project:
- Fork the project
- Clone down your fork
- Create a feature branch
- Hack away and add tests. Not necessarily in that order
- Make sure everything still passes by running tests
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up
- Send a pull request for your branch
Fuck that
Just send any pull requests willy-nilly!
Copyright 2013 Tom Bell see LICENSE.md