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 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). y is a placeholder for 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 without question
|n goto line n
{b.} set counter b to user input
{b,} print counter b as a ascii char

tips

  • running the function t on counter b, and then running I twice, that becomes minus 1!
  • similarly, running i three times, and then t once, becomes PLUS 1!

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
℘x <-> |x
℘ <-> :

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
℘x <-> |x+2
℘ <-> :