META
There is no print command. You print by writing over a line of your own program.
Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 2024 · Turing complete: unknown · ●●○ moderate · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
META is a joke stack language from 2024. Every command is a whole line, and the lines are memes, emoji, a Russian phrase, a Chinese sentence and words in mathematical letters. A line marked with console.log(); becomes an output line. When a later command writes a value onto that line, the new contents are printed.
Read the story
The specification gives the language as a table and as a short Python compiler, and the two differ in places. This implementation follows the compiler. 𐞣 pushes Hello, World! with a comma, beer builds the song but never prints it, and ;()ϱol.ɘloƨnoɔ always fails.
The machine
Lines are numbered from 0. After each line the counter moves on by the speed, which starts at 1.
| Line | Does |
|---|---|
𐞣 | Push Hello, World! |
✨✨✨ | Push the number of characters on the line, here 3 |
﷽ | Push the current line number |
𝙽𝙾𝙱𝙾𝙳𝚈 𝙰𝚂𝙺𝙴𝙳 𝚈𝙾𝚄 | Push a line of input |
л | Push the whole program |
console.log(); | Make this line an output line |
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ | Pop a line number and a value, and write the value on that line |
rͬeͤaͣdͩ | Pop a line number and push what that line holds |
aͣdͩdͩ ᴫ | Add or multiply the top two |
Squirtle ⅟ t | Square root, reciprocal, add 1 |
I'M ON A PLANET 2763 LIGHTYEARS AWAY👍 | Pop a line number and go there |
?50deLeap | Pop a value; if it equals 5, pop a line number and go there, else drop one more |
ᵦₑ₄ᵤₙⱼₑ | Pop the speed |
ᴪ ᴘᴏᴡᴇʀ ᴏᴜᴛʟᴇᴛ ᴪ | Stop |
Values are Python's ints, floats and strings, so ᴫ repeats a string and aͣdͩdͩ joins two. The ? line reads its number one character short, so ?5deLeap compares with 0. A jump lands one line after its target, because the counter still moves on.
Example
Line 0 pushes the text, line 1 becomes an output line, line 2 pushes 1, and line 3 writes the text onto…
Line 0 pushes the text, line 1 becomes an output line, line 2 pushes 1, and line 3 writes the text onto line 1.
The cat and the quine are the same program with another first line. The quine pushes its own code and prints its four lines.
Numbers print as Python prints them. Two sparkles push 2, and its square root goes onto line 2.
Patterns it teaches
- Self-modifying code: output is a side effect of rewriting the program.
- Stack machines: one stack, and line numbers as addresses.
- Quine: a command that pushes the whole program.
Further
See also
CJK
Stack-based
Write your own in Run Convert a program from META
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: meta.
Command line
shib run meta -e 'л
console.log();
✨
ⱼBⱼEⱼFⱼUⱼNⱼGⱼEⱼ'shib manual metaSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/meta.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org