PTotE
The Periodic Table of the Elements as a character set. Every element symbol prints one letter.
None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
None1 noticed that there are 118 elements, and 118 plus 10 is 128. So the elements can cover every printable ASCII character from the line feed (10) up to 127. An element prints the character whose code is its atomic number plus 9. A program is a list of symbols, and there is nothing else; no input, no memory and no loops.
The machine
| Symbol | Atomic number | Prints |
|---|---|---|
H | 1 | a line feed |
V | 23 | a space |
Eu | 63 | H |
Au | 79 | X |
Og | 118 | code 127 |
Symbols are separated by spaces and are case sensitive. The Python interpreter skips any word that is not a symbol and reads only the first line.
Example
Europium is 63, uranium 92 and einsteinium 99, which spell H, e and l.
Europium is 63, uranium 92 and einsteinium 99, which spell H, e and l.
The last one is the answer to the XKCD random number, technetium, 43.
Further
Ideas it shows
See also
Also in Jokes
Write your own in Run Convert a program from PTotE
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: ptote.
Command line
shib run ptote -e 'Tc'shib manual ptoteSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/ptote.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org