From Esolang
Jump to navigation Jump to search

PingPong is a 2D esoteric programming language similar to Befunge.

Flow control

PingPong manipulates the program flow control using a variety of operators which treat the IP as a ping-pong ball, which reflects off each flow control instruction at a 90-degree angle.

Flow control instructions include:

/ reflect left-up and right-down
\ reflect left-down and right-up
| reflect left-right, ignore up-down
_ reflect up-down, ignore left-right
# skip next instruction
= skip if top value on the stack is equal to zero
> skips if top value on the stack is greater than zero
< skips if top value on the stack is less than zero

Loops are written in a similar manner to Befunge - by creating literal 'loops' . This led to the eventual creation of Befreak, a reversible programming language that borrows this behavior.

PingPong has a varied set of instructions for performing arithmetic, stack manipulation, and a couple logical operations (AND and NOT). Additionally, PingPong is designed to support threading, function calls, and a set of API instructions for manipulating IO streams.


Pingpong uses several non-ascii characters, and has its own character code (0-255) that includes several PingPong-specific non-display characters.

Hello World

This is merely one method of implementing the common Hello World program in Pingpong.

1-dlroW$ olleH#/<\@

External resources