Pointstack

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Pointstack is an esoteric programming language created by User:catto.4 in 2024. It is similar to brainfuck, except that it uses a stack instead of a tape. Items on the stack can only contain numbers.

Commands

Symbol Explanation
! Pushes a 0 to the top of the stack.
^ Increments the top value on the stack.
_ Decrements the top value on the stack.
+ Adds the top two values on the stack and pushes the result.
- Subtracts the top two values on the stack and pushes the result.
* Multiplies the top two values on the stack and pushes the result.
/ Divides the top two values on the stack and pushes the result.
. Pops the top value on the stack and prints it.
, Takes one byte of input as an ASCII character and pushes it to the top of the stack.
: Duplicates the top value on the stack.
$ Swaps the top two values on the stack.
? Pops and discards the top value on the stack.
[ Marks the start of a loop.
] If the top value on the stack is a 0, continue. Otherwise, jump back to the matching [.
= If the top two values on the stack are equal, discard those values and push a 1. Else, push a 0.
~ If the top two values on the stack are not equal, discard those values and push a 1. Else, push a 0.
` If the top value on the stack is a 0, then skip the next command.
\ If the top value on the stack is a 1, then skip the next command.

Examples

Hello World

Outputs "Hello World".

!^^^^^^^^!^^^^^^^^^*.
!^^^^^^^^^^!^^^^^^^^^^*^.
!^^^^^^^^^!^^^^^^^^^^^^*:..
!^^^^^^^^^^^!^^^^^^^^^^*^.
!^^^^^^^^!^^^^*.
!^^^^^^^^!^^^^^^^^^^^*_.
!^^^^^^^^^^^!^^^^^^^^^^*^.
!^^^^^^^!^^^^^^^^^^^^^^^^*^^.
!^^^^^^^^^!^^^^^^^^^^^^*.
!^^^^^^^^^^!^^^^^^^^^^*.

Cat program

Takes one character and outputs it.

,.

Computational class

Pointstack's computational class is currently unknown.

Interpreter

There is currently no interpreter for Pointstack.