ZYXDCBA
ZYXDCBA, a joke on the esolang being totally "backwards", is an esolang created by User:Yayimhere based on AQoP. It was originally thought up in an answer for an interview question on the esoteric.codes blog. It uses a mix of queues and stacks, stored within a larger queue/stack. In this document, for ease of use, the largest(or main) stack/queue will be called the stue. It has been semi developed a few times, but was only completed
Memory
As mentioned before, memory is stored in a "stue". The stue starts as a queue, so pushing and popping happen at opposite ends of the stue. the pushing end is always the one moved. The "top" is always considered the popping end(for obvious reasons). ZYXDCBA has a concept of N stue's in/out. In is easy to explain. If we take the stue as a list, then it would be n many indexes(making the main stue be 0 stue's in), with the appropriate indexes(depending on if its a stack or queue for each index). Out, is simply the "oppesite", going outwards instead of inwards. Note that these "stop" when needing to(so going out from the main stue, it just is still the main stue).
Commands
ZYXDCBA has 5 commands.
- +:
- Pushes an empty stack to the stue.
- -:
- Pushes an empty queue to the stue.
- .:
- Toggles the stue(so if its a stack it becomes a queue,a dot eh other way around)
- ::
- Copies the top of the stue, and pushes it one stue out.
- $x(P):
- Executes the subprogram
P, however it acts upon the stue that isxin.
- !:
- Pops an element off of the stue.
- \:
- Pops an element
xoff of the stue, executes the command after it, executes the code that pushesx(if it was its own program) using only$x(P), +, and -, and executes that command again.
ZYXDCBA programs loop indefinetily, or until the stue becomes empty. This is only checked when the end of the program string is reached, or when a pop command pops on an empty stue.
Examples
$1(+)