Trigational Pseudoomninumitype

From Esolang
Jump to navigation Jump to search

Trigational Pseudoomninumitype /traɪ.geɪ.ʃə.nl̩ suː.do.ɔm.niː.njuːm.ɪ.taɪp/ is an esoteric programming language created by User:CreeperBomb. A more accurate and understandable name might be "Limited Continuous Three-gates", as the program has three logic gates extended to all reals in [0,2). However, the actual name also (technically) describes this, makes User:CreeperBomb sound extremely jejune1 (and perhaps even elephant!), and can be used to strike terror into the hearts of innocent readers. There is no valid acronym or abbreviation, meaning the full name must be used when mentioning it. Make sure to not make a tyop!

Trigational Pseudoomninumitype is believed to be Turing-complete.

Gates

As stated, there are three gates that can be used: N, +, and &.

  1. N (read as "not" /nɒt/) takes one input and outputs 1 minus the input.
  2. + (read as "xor" /ksor/) takes two inputs and outputs their sum.
  3. & (read as "and" /ænd/) takes two inputs and outputs their product.

The mod(2) of these are then taken to preserve the [0,2) property.

Node definitions & basics

When writing a node definition in Trigational Pseudoomninumitype, there are 3-4 parts:

  1. The node name saying what gets set, and is at the beginning
  2. The operation (N, +, or &)
  3. The first input
  4. A comma & the second input (if the operation is not N)

Inputs are names of nodes. In every step of the program, the node will get the value determined by this. All nodes start with a value of 0, and undefined nodes will always be 0, with the exception of fractions. Any node of the form a÷b, where a and b are integers and 0≤a÷b<2 starts with a value of a÷b instead of 0. Node can't have "N", "&", "+", ",", or a newline in their name. Otherwise, whitespace and capitalisation is ignored.

Special nodes

There are three special nodes used for I/O: "input", "output", & "output confirm". "Input" is equal to user input. "Output" stores the contents of any output. "Output confirm" will output the value of "output" when it changes from [0,1) to [1,2) in a step (after "output" has updated its value).

Visual representation

Trigational Pseudoomninumitype, in addition to its textual/basic descriptions of programs, also has a visual form, from which the term "node" comes from. In it, nodes are drawn as circles with labels and directed connections based on their operation, inputs, and nodes it outputs to. The gate is written as a single letter in the center of the circle - "N" for "N", "+" for "+", "&" for "&", "I" for "input", "O" for "output", "C" for "output confirm", and "a/b" for "a÷b". The inputs/outputs are drawn as directed arrows coming from the input node to the output node.

Examples

Truth machine:

Output & Input, Input
Clock N Clock
Can Ouput & Clock, Input
Output Confirm N Can Output

Or of nodes "A" and "B" into "E":

C + A, B
D & A, B
E + C, D