PAPEL

From Esolang
Jump to navigation Jump to search

PAPEL (Particle Automata Programming Ephemeral Language) is a stack-based esoteric programming language created by User: LolloDev5123 intended to be stored on paper using hole punches of different shapes.

Instructions

Instruction Hole-punch Symbol
Do nothing ⛆⛆⛆
Do nothing πŸž†
Set top stack value to 0 🞊
Swap top and second stack value 🞲
Rotate top 3 stack values clock-wise β—”
Rotate top 3 stack values counter-clock-wise β—•
Push NumArg to Stack β–Ά
Push random number (from min in stack to max in stack) to stack 🟊
Increment top stack value β–²
Decrement top stack value β–Ό
Push sum of first and second stack value (pop first 2 & push sum) 🞧
Push difference of first from second stack value (pop first 2 & push difference) ⚊
Push product of first and second stack value (pop first 2 & push product) 🞬
Push quotient of first from second stack value (pop first 2 & push quotient) β—’
Square top stack value β—Ό
Repeats all functions after itself, until a 🞚 is reached πŸž›
Repetition halt 🞚
Mod-3 top stack value ⛬
Breakpoint β—»
Square root top stack value βš‘
Push input from user (ascii value/integer) to top of the stack ☷
Output top of the stack (as ASCII Char) ☰
Output & pop from top of the stack ☲

NumArgs

For instructions that require arguments (β–Ά), in the right section of the paper, there is a space intended for 8-bit binary numbers. (β—‹/●)

File/Instruction Set Format

The format starts with the "ΒΆ Program Name" and then separates into 2 columns, the left column is padded by 2 spaces and holds the operator or instruction while the right column holds the number argument, which is expressed as an 8-bit binary integer by default "β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹". The right column is only evaluated or used when the instruction requires a value neither from output nor from the stack (β–Ά). It can also be used to mark the line number whenever it isn't needed for the "β–Ά" instruction. Anything written outside the "Paper" or ASCII Box is considered a comment:

╔═════════════════╗
β•‘ ΒΆ Program Name  β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•‘  πŸž†  β•‘ β—‹β—‹β—‹β—‹β—‹β—‹β—‹β—‹ β•‘
β•šβ•β•β•β•β•β•β•©β•β•β•β•β•β•β•β•β•β•β•
(  Op  ) ( NumArg )