esolang

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

Expected: Hello, World!

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

CommandDoes
add sub mul div mod a b varPut a op b into var
read var readc var scanc varRead a number or a character
out val outc valPrint a number or a character
prtstr textPrint the rest of the line
equal big small a b ... endRun the lines up to end if a = b, a > b or a < b
do ... while testRun the lines, then again while the test holds
func name ... endfDefine a function; run name calls it
addarg poparg addret popretPass arguments and a return value
meow textA comment
exitStop

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.
Expected: 0

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.

Expected: 49

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.

Expected: Hello, World!Hello, World!

Further

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-none1

Source

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