InterWOEven

From Esolang
Jump to navigation Jump to search

InterWOEven is an esoteric programming language designed to have a really unique execution style and really difficult to use. Programs in InterWOEven are, as the name suggests, just woven parentheses and brackets.

Syntax

The program is converted to a graph. Matching parentheses/brackets correspond to a node and how these matchings wove dicates what type of connections (if there are any) exist between these nodes.

In this example: '{(})' the two nodes partially contains each other. Meanwhile in this example: '({})', one node fully contains the other.

Each nodes holds a value, initialized to 1. Much like Brainfuck, InterWOEven interacts with a tape. Depending on the value of the first node, the one corresponding to the first open parenthesis/bracket and its partner, an instruction is executed:

Value Effect
14 Increment
31 Decrement
43 Move tape pointer to the left
47 Move tape pointer to the right
53 Input
56 Output
61 Set the value of first node to the value of the current cell
62 Halt

After an instruction is executed, the node values are updated with this update rule: v <- (v + F)^P mod 101.

F is the sum of the values of the fully contained nodes.

P is the sum of the values of the partially contained nodes.

Interpreter

An implementation can be found here