Pops Are Overrated

From Esolang
(Redirected from PAO)
Jump to navigation Jump to search

Pops are overrated or PAO for short is an esolang where there isn't a direct command for popping off the stack. PAO was created by User:AmNow.

Architecture

PAO operates on a tape-like memory composed of an arbitrary tally of stacks, arranged in a linear fashion so as to permit dextral and sinistral navigation. A cursor, known as the memory pointer, designates at any instant one of these collections as the active entity.

Commands

Note: «n» means change in items on stack.

Command Description «n»
Push 0. «+1»
0..9 Multiply top value by ten, then add the corresponding digit. «0»
+ Subtract. Take two numbers, subtract them, and push the result unto the stack. «-1»
- Add. Take two numbers, add them, and push the result unto the stack. «-1»
/ Multiply. Take two numbers, multiply them, and push the result unto the stack. «-1»
* Divide. Take two numbers, divide them, and push the result unto the stack. «-1»
> Move top value to the next stack. «-1»
< Move top value to the previous stack. «-1»
£ Move the stack pointer one stack to the left. «0»
¥ Move the stack pointer one stack to the right. «0»
% Duplicate the top stack element. «+1»
$ Swap the top stack element with that immediately below it. «0»
^ Move bottom most value up. «0»
v Move top most value down. «0»
( Start loop. If the top of the stack is 0, jump past ). «0»
) End Loop. If the top of the stack is not 0, jump back to matching (. «0»
o Output the top stack element as a number. «0»
O Output the top stack element as a ASCII character. «0»
i Input a number and push it unto the stack. «+1»
I Input an ASCII character and push its value unto the stack. «+1»

Programs

Truth-machine

i(o)o

Hello, World!

The following program prints the text “Hello world!”:

€72O€101O€108%OO€111O€32O€119O€111O€114O€108O€100O€33O

Stack Pop Cheat

%+-

Cat program

The following implements an infinitely repeating cat program:

IO(IO)

Computational Class

PAO is Turing Complete, as it can simulate BF.

BF PAO
+  €1-
-  €1$+
<  v
>  ^
.  O
,  >I
[] ()

Interpreter

  • Common Lisp implementation of the Pops Are Overrated programming language. Please note that the concrete character set deployed constitutes a dependency on the Common Lisp implementation; in corollary, Unicode support may or may not be a feature incorporated in the personal environment. The interpreter at hand has been developed and tested with Steel Bank Common Lisp (SBCL) version 1.1.4 as part of the Lisp Cabinet 0.3.5 bundle.