Right

From Esolang
Jump to navigation Jump to search

Right is a fungeoid created by User:D in 2023. The IP cannot do much in the codespace, except for (as the name suggests) some very basic operations.

Storage

Right uses a queue for storage. Initially, there are 2 1 bits in the queue, known as the 'markers'. These markers cannot be pushed into the queue, nor can they be popped from the queue. (e.g. When the * command is called when the head of the queue is the marker, it's simply popped and pushed back again.)

The queue only allows 0 bits to be pushed into and out of the queue.

Execution

The codespace is a rectangular grid of characters.

Initially, the IP starts at 0:0, facing the right. The following commands are recognized:

Command Description
+ Turn IP right (see below)
. Enqueue a 0 bit into the queue.
* Dequeue & Skip (see below)
  No-op.

The IP may wrap around if it goes around the edge of the codespace.

Turn right

It works like a regular fungeoid. E.g. If IP's facing right before hitting +, then it's now facing downwards:

-->+
   |
   v

Dequeue & Skip

It does the following:

  • Dequeue a bit from the queue.
  • If it's the marker bit:
  • Enqueue the marker bit back to the queue.
  • Continue execution.
  • Otherwise:
  • Skip the next character in front of the IP.