Meow (None1)
Meant as a normal language, it grew esoteric on the way. The comments say meow.
None1, 2022 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
None1 started Meow on 31 October 2022 and worked on it for 7 months. The specification says the aim was a normal language, an assembly with variables, functions and loops, and that it became more and more esoteric. The machine has no addresses at all. Memory is a map from names to long doubles, beside a call stack and a queue for passing arguments.
Read the story
There are no real loops either. do reads the lines up to the next while and turns them into a function that runs them, then the test, then calls itself inside the test's block. Each turn of the loop is one call deeper.
The machine
| Command | Does |
|---|---|
add sub mul div mod a b var | Put a op b into var |
read var readc var scanc var | Read a number or a character |
out val outc val | Print a number or a character |
prtstr text | Print the rest of the line |
equal big small a b ... end | Run the lines up to end if a = b, a > b or a < b |
do ... while test | Run the lines, then again while the test holds |
func name ... endf | Define a function; run name calls it |
addarg poparg addret popret | Pass arguments and a return value |
meow text | A comment |
exit | Stop |
This implementation follows the C++ interpreter in the specification, quirks and all. Inside a false block it still counts big and small but not equal, so an end meant for a nested equal closes the outer block early. A blank line runs the last command again. The standard libraries are separate files and are not included.
Example
The truth machine prints its input once.
The truth machine prints its input once. On 1 the test holds, the loop's function calls itself, and it prints 1 forever.
A function takes its argument from the queue and leaves its result in the return value.
The interpreter reads its file with getline and parses each line with sscanf. After a final line break getline gives one more empty line, sscanf finds no word in it and leaves the last command word in place, and the command runs again. So the Hello World, saved with a line break at the end, prints twice.
Further
See also
Also in Turing tarpits
Write your own in Run Convert a program from Meow (None1)
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: meow-none1.
Command line
shib run meow-none1 -e 'prtstr Hello, World!'shib manual meow-none1Source
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/meow-none1.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org