Wierd is a graphical, stack-based esoteric programming language. Programs are defined as a pattern of symbols resembling wires (the name is a pun on "weird" and "wired"). A pointer moves along the wires, and interprets the angle of any bend in its path as an instruction. 45 degrees P1: Push a data value of 1 onto the stack. 90 degrees IF: Pop the stack. If the value is zero, continue executing as normal. If the value is nonzero, however, reverse direction. 135 degrees GP: Pop the stack. If the value is zero, pops the next two items from the stack, retrieves (gets) the value stored at the coordinates specified by these values (x, then y), and push it onto the stack. If the first value was nonzero, however, takes the value stored below the coordinates on the stack, and stores (puts) it at the coordinates. 180 degrees QU: Jump the gap, if possible. Otherwise, terminate. 225 degrees IO: Pop the stack. If the value is zero, read a character from input, pushing it onto the stack. If the value was nonzero, pop the stack, and print the value to output as a character. 270 degrees IF: See 90 degrees. Included for flexibility. 315 degrees SB: Subtract the top of the stack from the value beneath it, popping both values, and pushing the result. (from the Wierd spec). According to John Colagioia, it was not supposed to be legal to cross wires, but several Wierd programs are in circulation that rely on this. Many other programs circle the globe today. Wierd was inspired by Brainfuck and Befunge. External resources * Wierd project site * Wierd files
|