aboba

From Esolang
Jump to navigation Jump to search

An esolang created in 1 day.

Inspired by Brainfuck, but very different from it.

Should be turing complete.


Extensions: .b.

Instructions

Command Action
+N Increment open variable by N
-N Decrement open variable by N
%N Open N variable
" any text 1-line comment (aboba ignores all not listed here characters, but you still better make comments like this)
?> or ?< If open variable is 0, loop back or forward in code until wall (sorry, cannot put that character here) met.
in or ic Input (N)umber or (C)harater (as ASCII code) in open variable.
{ and } Brainfuck-like loop: enters if not zero, exits if zero
[N C] Execute (C)ommands only if open variable == N
( and ) Outputs from open variable as character (from ASCII code) if (, or outputs as number if ).
~ Ends program.
sC Does stack operation. C may be this:

p - pushes open variable

g - pops open variable

d - duplicates top value

w - swaps top 2 values

+, -, * or / - perform math operations (top value OPERATION other value)

All other chars are ignored completely.

Examples

"Hello World!"

%1 +72 ( +29 ( +7 ( ( +3 ( -79 ( +55 ( +24 ( +3 ( -6 ( -8 ( -67 (


Calculator (1 and 2 is numbers, 3 is operator)

%1 in sp %2 in sp sw %3 ic
[43 s+ sg ) ~]
[45 s- sg ) ~]
[42 s* sg ) ~]
[47 s/ sg ) ~]
%0 +73 ( +37 ( +8 ( -21 ( +11 ( -3 ( -5 ( -67 (
~


Fibonacci sequence (up to 17711)

%1 )
%4 +10 (
%2 +1 ) 
%4 (
{
	%1 sp 
	%2 sp
	s+ %3 sg )
	%4 (
	%2 sp
	%1 sg
	%3 sp
	%2 sg
	[17711 ~]
}


Interpreter

Currently only Python interpreter available for my language.

To use it, do:

$ python3 aboba.py <filename>

External links