StackBBQ2

From Esolang
Jump to navigation Jump to search

StackBBQ2 is an esolang created by islptng.

It has a stack that holds bits, a queue Q that holds bits, and a stack P that holds queues.

Instructions

1 push True to stack.
0 pops a, pops b, and pops c if !(a&&b), pops d if !(a||b),
then does the special commands:

abcd
11   invert top bit of stack
101  pop two values, OR them, and push result.
100  duplicate the top stack bit
011  pop a bit, push it to Q
010  push Q to P and clear Q
0011 pop a bit, if true, append top of P to the program
0010 pop from P and discard it
0001 conditional I/O
0000 reverse the stack

Implementation

Try it online!