ForkStack

From Esolang
Jump to navigation Jump to search

ForkStack is a two-dimensional esoteric programming language based on stack.

Grammar

ForkStack starts from left-top facing right. When it goes to infinity far, it halts.

  • F Create a subprocess that turn right. After the subprocess halt, go on current process. All processes share same stack.
  • T Turn. Pop from stack. Turn left if it's a 0, right if it's a 1, or straight if it's empty.
  • 0 Push 0 into stack.
  • 1 Push 1 into stack.

Some useful blocks

Join up and down to right

v
0
T >
1
^

Push 0 to bottom of stack

>      F >
 T T   1
   T1T0T
   1
 1 F TF 0
      1
 T110 T
     0

Try it online!

Turing Complete

Ability to push 0 to bottom of stack means that you can simulate a queue, providing enough resource for Turing Complete