a virtual-tape based esoteric 'programming language', in hex base.
for best experience, run this interpreter directly in cmd, with a monospace font as default.
I am depracating this project temporarily in order to port it to another language, and build a better interpreter. Don't worry, the base interpreter will still be python, it just will have a GUI wrapper, which will probably be written in VB.
- fix the nesting bug
- multiline support
- better commands, possibly word-commands'
- live tape view + output view
- GUI IDE
> move pointer right. will add a cell with value '0x0' if at end.
< move pointer left
- subtracts 1 from current cell (if current cell is 0, + makes current cell f)
r print raw bits
!_[_]_ if not condition (!0x0[>$0x0$=]>0x$1$= is equivalent to 'if current cell is not 0x0 then >$0x0$= else >$0x1$=)
?_[_]_ if condition (?0x0[>$0x0$=]>$0x1$= is equivalent to 'if current cell is 0x0 then >$0x0$= else >$0x1$=)
# randomly assign a value to this cell
(x) goto cell at location x (starts from 0, (not in hex!) if '-' in front of x, then go back x positions. if '+' in front of x, go forward x positions. wraps around if reaches end or start.)
(~) goto last cell
{.} goto beginning *of code*
{~} goto end of code (basically break)
{n} goto position n in code (n is not a hex number!)
* reverse all cells behind pointer (including current cell)
@ try to print output as string
i print output as integer
; reset
= prints output in the [_.,.,.,._] format
=
example 1 - conditions
#?0x0[>$0x1$=]?0x1[>$0x0$=]$0x0$= if # gets value 1, will print ['0x1','0x0'] else if # gets value 0x0, will print 01 ['0x0','0x1'] else prints 0
example 2 - value assignment
$0xabc$ or $abc$ will assign 0xabc to current cell $0xf0$>$0x0$ will assign 0xf0 to current cell, move ahead one cell and assign 0x0 to that cell $a||0xc||0xff$ does the same thing as $0xa$>$0xc$>$0xff$
note that to actually view the assigned changes, an '=' is required. in case you forgot to put it, and pressed enter, no worries. the bits are retained forever unless reset by ';'
example 3 - strings
while
$68||65||6c||6c||6f||20||77||6f||72||6c||64||21$i prints 32309054545037006034346730529
example 4 - looping !0xf[+r{.}] will print digits 1-f sequentially while
!0x5[+>-<={.}] will have a much more exotic output
- dont count them there are lots- 'where' *might* not work due to a recent code port
- since recently looping is not working properly - fixed the buggy tag nesting. now ? and ! constructs should nest just fine.
- fixed bug in variable assignment where multi digit hex were not assigned at all.
- fixed big in looping and code + tape navigation
- fixed a downright terrible bug which caused any '=' to result in an infinite loop! - fixed indentation errors