AEWNN
One counter that only counts up to 52, and a letter for each of its values.
ResU, 2021 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
ResU made AEWNN in 2021. The name is short for An esolang with no name. It has one number, the VariableWithNoName, which + raises by 1 and which can never pass 52. Its own table turns that number into a letter, with 1 to 26 for A to Z and 27 to 52 for a to z. A program counts up to a letter, stores it in a letter variable and prints the variable.
Read the story
There is no input and no test. Every loop runs a number of times written in the program, so every program stops.
The machine
| Command | Does |
|---|---|
+ | Add 1 to the counter; past 52 the run stops with Value too big. |
c cb | Store the counter's letter in a, or in the variable named after it |
p pb | Print the letter in a, or in the variable named after it |
r2 | Set the counter to 0 |
rb | Set the counter to the number of the letter in b |
| space | Print a space |
[n ... ] | Run the body n times |
The letter variables are a, b, d to o, q and s to z. The letters c, p and r are commands, so they cannot name a variable. That is why cpa stores in a and then prints a.
Example
The first loop counts to 4, prints D and sets the counter back to 0, three times.
The first loop counts to 4, prints D and sets the counter back to 0, three times. The second never resets, so it walks through all 52 letters.
The Hello World. Its letters all come from the first half of the table, so it shouts.
A small letter needs 26 more. The i of Hi is 35.
Patterns it teaches
- Encoding tricks: a private table from numbers to letters.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from AEWNN
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: aewnn.
Command line
shib run aewnn -e '[52+cp]'shib manual aewnnSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/aewnn.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org