Solo
Three letters and one number. The only loop never ends.
A, 2018 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
A made Solo in 2018. A program has one accumulator and three letters. It can read a number, print it and loop, but the loop has no exit. Once l sees a number that is not 0 it repeats the next letter forever, so a program either ends before any loop runs or does not end at all. esolangs.org files it under unusable for programming.
The machine
| Letter | Does |
|---|---|
s | Scan a number into the accumulator, as C's scanf("%d") |
o | Print the accumulator and a line feed |
l | If the accumulator is not 0, repeat the next letter forever |
The accumulator starts at 0. Every other character is ignored. When s finds no number, the accumulator keeps its value.
Example
A one-time numeric cat.
A one-time numeric cat.
The truth machine. On 0 it prints 0 twice, once before the l and once after it, because the C interpreter on the specification does exactly that. On 1 the l repeats the last o and prints 1 forever.
Further
See also
Also in Jokes
Write your own in Run Convert a program from Solo
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: solo.
Command line
shib run solo -e 'so' --input '42'shib manual soloSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/solo.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org