Tuvars

From Esolang
Jump to navigation Jump to search
Tuvars
Designed by User:SpaceByte
Appeared in 2022
Computational class Turing Complete
Reference implementation [1](dead link)
File extension(s) .tux

Tuvars is an Esolang created on 7/12/22 (July 12th), by User:SpaceByte. The idea behind Tuvars is to be semi powerful, yet be limited by the only having two accessible variables. These two variables make things difficult, but still allow for operations, and interactions between both variables.

Language description

Tuvars is an interpreted esolang written in C#. It was semi inspired by 512, and has many commands, allowing for printing strings, and ASCII values, and even the number values of variables. Tuvars is readable and commands are done line by line, variables are addressed by a and b, being the only two variables, and you are unable to change their names. The names of variables a and b will be replaced by their values when used in an argument that a variable is acceptable, and that the argument is usually an integer or double. Tuvars rounds to the nearest integer when a variable is needed as an integer, but they are stored as doubles.

Commands

Command Description
print [Predefined string] Print a string set in code.
char [variable] Prints the ASCII character corresponding with the value of [variable]
number [variable] Print the value of [variable] to the console. Prints like an integer if it is a whole number.
read [variable] Sets the value of the variable with the name [variable] to the value of a read character.
linebreak Print a linebreak.
goto [line] Goto line of the number [line]
close Close the console window.
title [string] Set the console title to [string]
clear Clear the console window
if [variable] If the value of a variable is not 0, execute the next line, otherwise skip it
ifnot [variable] If the value of a variable is 0, execute the next line, otherwise skip it

All commands which first arguments are not any that a command holds, aren't checked or executed at all, and are fully comments.

Example

Get ASCII Values

Because input is recieved as the ASCII value of the inputted character, and you are also able to print the number value of variables, we can use this to get the ASCII value of whatever the user inputs. This program is bundled with the interpreter.

read a //Set a to ASCII value of input
clear //Clear the console
number a //Print a's value
linebreak // Print a linebreak
goto 1 //Restart

Interpreter

  • Common Lisp implementation of the Tuvars programming language.