esolang

Odasjoi

Six commands typed by smashing the keyboard, one accumulator, and a loop that forgets.

None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: 4

The idea

None1 made Odasjoi in 2023. Its name and all six of its commands come from smashing random keys. esolangs.org files it under unusable for programming.

The machine

One accumulator holds a signed integer of any size and starts at 0. Commands go one to a line, in any case.

CommandDoes
fowdifAdd 1
wekewwTake 1 away
woiejdRead a decimal number from a line of input
doqijePrint the accumulator in decimal
iwejdoHalt if the accumulator is 0
oweijwRun the commands after it forever

The Python interpreter in the specification runs a loop by calling itself on the rest of the program, with the accumulator as it was at oweijw. So every round starts from the same number. A loop that reads no input does the same in every round, so it halts in its first round or never.

Example

The first is the random number, chosen by four increments.
Expected: 0
Expected: 3 5

The first is the random number, chosen by four increments. The second is its truth machine. On 0 it halts at iwejdo; on 1 it prints 1 forever. The last reads numbers and prints them until it reads a 0.

Further

Also in Jokes

Write your own in Run Convert a program from Odasjoi

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run odasjoi -e 'woiejd
doqije
iwejdo
oweijw
doqije' --input '0'
shib manual odasjoi

Source

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

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

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