selfmodi

From Esolang
Jump to navigation Jump to search

selfmodi is a self-modifying esolang derived from brainfuck by user:tommyaweosme

commands

0 nop
1 increment next number
2 decrement next number
3 | (flip)
4 . (out)
5 , (inp)
6 [ (while0)
7 ] (while0)
8 > (next)
9 < (prev)
A-Z()
script definition end
a-z use script

script definition

A(34)
4a4aa

prints

01101

asciification

groups of 8 can be turned into ascii using 3333 (or four repeats of 24 or 12) right after the eighth bit has been printed

4244424444424424242424

prints

a

instead of

01100001

because we asciified it

lethrough

;

is the lethrough character. if current bit is 1, it lets commands after it until : be done, and gone through. otherwise, they get skipped.

order

0123456789abcdefghijklmnopqrstuvwxyz;:

this is for the increment and decrement commands (also it only uses letters that are defined)

truth machine (example)

54:[4];00