Waïdyoudoudat

From Esolang
Jump to navigation Jump to search

waïdyoudoudat (pronounced "Why'd you do that?") is a Esoteric Programming Language created by User:Legeriergeek in 2026. It's a Uyjhmn n inspired programming language made to be as verbose as possible. It's original interpreter is coded in Python.

Syntax

In waïdyoudoudat, there are quirks rules such as:

  • Each line of code HAS to be followed by a blank line.
  • You can have only 2048 variables, and their name is a number between 0 and 2048
  • You can access variable by typing `VAR!N` where `N` is the variable's number
  • To get user input only while creating a variable, use the keyword `ASKFORUSERINPUT`
  • You have to put a colon after the name of each command
  • In logic and repeating code blocks, the argument n°4 is the length of the block, not including the end statement (see below)
  • To end a logic or repeating code block, you have to insert END OF [NAME OF THE BLOCK]

Commands

Command What it does
CREATE VARIABLE TYPE INT: [VARIABLE NUMBER] [VARIABLE VALUE] Creates a variable of type int. There is no other type of variable than int.
INSERT TO CONSOLE: [Numeric Value/Variable] Inserts numbers only into the console
INCREASE VARIABLE: [Variable Number] Increases a variable by 1
DECREASE VARIABLE: [Variable Number] Decreases a variable by 1
REPEAT UNTIL: [Numeric Value/Variable] [Logic Operator] [Numeric Value/Variable] [Block Length] Repeat what's in the block until the condition is true.
EXECUTE CODE IF TRUE: [Numeric Value/Variable] [Logic Operator] [Numeric Value/Variable] [Block Length] Execute what's in the block if the condition is true.
REPEAT WHILE: [Numeric Value/Variable] [Logic Operator] [Numeric Value/Variable] [Block Length] Execute what's in the block while the condition is true.
INSERT TO CONSOLE AS ASCII: [Each letter in ASCII separated by a space] Prints the message you input as text.
EXIT THE PROGRAM: Exits the program.
COMM: [Your comment] Used to put a comment in your code.

Logic Operators

Name What it is
EQUALS Check if left argument equals right argument
NEQUALS Check if left argument does not equal the right argument
SUPERIOR Check if left argument is superior to the right argument
INFERIOR Check if left argument is inferior to the right argument
SUPEQ Check if left argument is superior or equal to the right argument
INFEQ Check if left argument is inferior or equal to the right argument

Examples

Hello World

Here's how you print `Hello, World!` in waïdyoudoudat:

INSERT TO CONSOLE AS ASCII: 72 101 108 108 111 44 32 87 111 114 108 100 33

EXIT THE PROGRAM:

Truth Machine

Here's how you can implement a Truth Machine in waïdyoudoudat:

CREATE VARIABLE TYPE INT: 1 ASKFORUSERINPUT

EXECUTE CODE IF TRUE: VAR!1 EQUALS 0 2

INSERT TO CONSOLE: 0

EXIT THE PROGRAM:

END OF EXECUTE CODE IF TRUE:

REPEAT WHILE: 1 EQUALS 1 1

INSERT TO CONSOLE: 1

END OF REPEAT WHILE:

Prime Numbers

Here's an example on how to calculate prime numbers until a certain amount:

CREATE VARIABLE TYPE INT: 0 ASKFORUSERINPUT

CREATE VARIABLE TYPE INT: 1 2

REPEAT WHILE: VAR!1 INFEQ VAR!0 21

CREATE VARIABLE TYPE INT: 3 1

CREATE VARIABLE TYPE INT: 2 2

REPEAT WHILE: VAR!2 INFERIOR VAR!1 13

CREATE VARIABLE TYPE INT: 4 VAR!1

REPEAT WHILE: VAR!4 SUPEQ VAR!2 5

CREATE VARIABLE TYPE INT: 5 0

REPEAT WHILE: VAR!5 INFERIOR VAR!2 2

DECREASE VARIABLE: VAR!4

INCREASE VARIABLE: VAR!5

END OF REPEAT WHILE:

END OF REPEAT WHILE:

EXECUTE CODE IF TRUE: VAR!4 EQUALS 0 2

CREATE VARIABLE TYPE INT: 3 0

CREATE VARIABLE TYPE INT: 2 VAR!1

END OF EXECUTE CODE IF TRUE:

INCREASE VARIABLE: VAR!2

END OF REPEAT WHILE:

EXECUTE CODE IF TRUE: VAR!3 EQUALS 1 1

INSERT TO CONSOLE: VAR!1

END OF EXECUTE CODE IF TRUE:

INCREASE VARIABLE: VAR!1

END OF REPEAT WHILE:

EXIT THE PROGRAM:

Computational Class

This language is Turing Complete as it can implement a 2 counter Minsky machine:

CREATE VARIABLE TYPE INT: 0 ASKFORUSERINPUT

CREATE VARIABLE TYPE INT: 1 0

REPEAT WHILE: VAR!0 SUPERIOR 0 2

DECREASE VARIABLE: VAR!0

INCREASE VARIABLE: VAR!1

END OF REPEAT WHILE:

INSERT TO CONSOLE: VAR!1

EXIT THE PROGRAM:

Interpreter

You can find my implementation of waïdyoudoudat here: https://github.com/legeriergeek/wa-dyoudoudat

Inspiration

This esolang has been greatly inspired by Uyjhmn n from the user User:Truttle1