esolang

USERA

Four commands, each built from the letter a. It can print, add and subtract.

OsmineYT, 2019 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: Hello, World!

The idea

OsmineYT made USERA, also written User:A, in 2019 and dedicated it to the esolangs.org user A. Every command is made of the letter a. a prints the characters whose codes follow it, a+a and a-a add or subtract two numbers, and aa clears the screen. There are no loops, no input and no conditions, so a program prints the same text every time.

The machine

CommandDoes
a codesPrint the character of each code
aaClear the screen
a+a x yGive x plus y
a-a x yGive x minus y

Commands and numbers are separated by spaces. A code is a number, which may have a sign, or an a+a or a-a, so the arithmetic works inside a print. A byte stream has no screen to clear, so aa throws away all output so far.

Example

The second program is the Hello World through arithmetic.
Expected: Hello, World!
Expected: OK

The second program is the Hello World through arithmetic. 70 plus 2 is 72 for H, minus 100 plus 144 is 44 for the comma, and 150 minus 50 is 100 for d. In the third, aa wipes the Hi before OK is printed.

Further

Also in Jokes

Write your own in Run Convert a program from USERA

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: usera.

Command line

shib run usera -e 'a 72 101 108 108 111 44 32 87 111 114 108 100 33'
shib manual usera

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/usera.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org