Tick

From Esolang
Jump to: navigation, search

Description

Tick is a esolang created in 2017. It has only 4 commands and an infinite memory tape. It is made to also ignore non-command characters. It is an incomplete TrivialBrainfuckSubstitution.

Commands

>: Move selector to the next cell
<: Move selector to the previous cell
+: Increment memory cell. Truncate overflow: 255+1=0
*: Add ascii value of memory cell to output stream

Hello world!

The following is a hello world program in Tick

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*+++++++++++++++++++++++++++++*+++++++**+++*>+++++++++++++++++++++++++++
+++++*<++++++++*>+++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++*+++*>++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*>++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++*>+++++++++++++++++++++++++++++++++*

Interpreter

As it is a Trivial Brainfuck Substitution the interpreter is equally trivial.

#!/usr/bin/ruby
eval 'm=Hash.new(p=0);'+ARGF.read.gsub(
        /./,
        '>' => 'p+=1;',
        '<' => 'p-=1;',
        '+' => 'm[p]+=1;',
        '*' => 'putc m[p];')