How to learn this language
Three letters. o says the next character, i takes a word, q starts again.
Turing complete: no · ●○○ easy · esolangs.org
Tested with 4 known programs · Test method
Run it
The idea
The joke is in the name. Its full name never ends, because "this language" can always be replaced by the name itself, giving How to learn "How to learn this language" and so on. The longest example prints that name in capitals, over and over, forever.
The machine
| Code | Does |
|---|---|
o + character | Print that character, unless it is i, o or q |
oi | Read a word and print it with a newline |
i | Read a word and forget it |
q | Start the program over |
Everything else does nothing. Only the first line is code, as in the C++ interpreter. Words are read as C++ reads them, up to the next space or newline. The printed character is still run afterwards, so ooH prints H and oq prints nothing and then loops.
Example
The second program is the specification's interpreter for the language 6.
The second program is the specification's interpreter for the language 6. It reads a program and ignores it, then prints 6.
Ideas it shows
See also
Also in Jokes
Write your own in Run Convert a program from How to learn this language
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: how-to-learn-this-language.
Command line
shib run how-to-learn-this-language -e 'oi' --input 'meow'shib manual how-to-learn-this-languageSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/how-to-learn-this-language.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org