We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Pilas

From Esolang
Jump to navigation Jump to search

Pilas is an esolang by User:ChuckEsoteric08 with two stacks.

Description

All programs have two lines and based on which line command appears it will refers to that stack. It also has two instruction pointers for each of them. First command at first instruction pointer is exexuted followed by one at second instruction pointer. Stack has unbounded integers but whether signed or unsigned depends on implementation

Command list
Command Description
integers 0-9 push that integer onto the stack
+ Pop two values, a and b and push their sum
- Pop two values, a and, b, and push b-a
: Duplicate top of the stack
~ Pop value and push it to another stack
{...} While loop, at each iteration pops a value from top of the stack and if it is nonzero loop ends. Loop dosen't apply to the other line
, Push next byte of input to the stack
. Pop value and output it as an ASCII character
Everything else Does nothing but is important enough to be counted as another instruction

Program halts when either of instruction pointers goes past end of a program.

Computational class

Brainfuck with while zero loops and with finite (initially empty) but extendable tape could be translated into it:

Create a new zero cell to the right of current one and move pointer to it:

0
 

Increment current cell:

1+
  

Decrement current cell:

1-
  

Move pointer right:

~
 

Move pointer left:


~

While zero loop:

:~:{ ... :~:}
   { ...    }