Leave all behind

From Esolanging
Jump to navigationJump to search

inspiration inspiration 2 inspiration 3 inspiration 4 inspiration 5 name source, not an inspiration

Leave all behind is an esolang invented by user:phira, inspired by (see above).

Program flow

The program works on a queue. ONLY ONE QUEUE. for both program and data. not even a register (thus "leave all behind"). every tick an instruction is popped, the counter PC advance by 1 (but the PC has no uses), and the instruction is run. when running a quoted form of a command, the unquoted form is pushed. running any other command discard itsself.

command meaning
[ quoted form of (
( pops commands until a # and push them in sequence
; quoted form of :
: pops commands until a # and push them in sequence, twice
' quoted form of "
" quote the following command and push it
] quoted form of )
) discard characters until #
, quoted form of `
` pops 2 commands, runs ( if equal, # otherwise
* quoted form of #
# technically a noop, but is a marker for (.
% quoted form of % (itself)
~ quoted form of @
@ halt
$ quoted form of > (optional)
> output (optional)
! quoted form of < (optional)
< input (optional)

examples

infinite loop

: ANY NOP CAN GO HERE :*#*

Truth machine

<(1<0@#*"#[(:<1:*#*"#'*]`

or with brackets balanced:

<(1<0@#*"#[(:<1:*#*"#)#'*])#`

or with brackets and quotes balanced:

<(1<0@#)[#*"#[(:<1:*#)]#*"#'*]`