BUT

From Esolang
Jump to navigation Jump to search

BUT is a esolang created by User:Yayimhere with 2 unbounded decimal counters(u and r. also if decremented to negative will be set to 0) and 4 functions(i, t ,f and k) and these functions can be changed. it was inspired by Emmental and then most of ais523's works

commands

heres the functions(when i reference y i mean counter y and the same with u):







syntax
command description
p/b apply function p to counter b
[p;q] redefine function p to the BUT code q(recursive functions are not allowed) where when y is used is the register the function is used on
(q;b) loop code q(only checking at the brackets) until counter b is 0
: halt
# escape loop
|n goto line n
{b.} set counter b to user input
{b,} print counter b as a ascii char

when a function p is redefined the original function is p0 and the redefined one is p(and such it is for every redefinition. so for the nth redefinition the function from before the redefinition must now be referenced as pn-1) and must be referenced

examples

Cat:

{r.}({r,}{r.};r)

translation to Minsky machine

notes:

this is the translation:

xy <-> t/y i/y i/y(|x#;)
℘y <-> i/y i/y i/y t/y
℘ <-> :

this proves that BUT is Turing-complete. the functions can be redefined:

[t;t/y i/y i/y]
[i;i/y i/y i/y t/y]

and now the translation becomes:

xy <-> t/y(|x+2#;)
℘y <-> i/y
℘ <-> :