esolang

Meow (Martsadas)

Eight words and two registers. Put a number in a, then Meow it.

Martsadas · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, World

The idea

Martsadas made Meow as a joke language with two registers, a and b, that hold integers. Three of its eight words come from a cat. Meow prints a character, Purr prints a whole string and Cat makes a label.

Read the story

There is one test. Go jumps to a label when an expression is negative, so Go -1 name always jumps and Go -a loop loops while a is above 0. Move swaps the two registers, which is how a program keeps a second number while the first is busy.

The machine

WordDoes
MeowPrint a as a character
Put eSet a to the expression e
GetRead one byte into a, or -1 at the end of the input
Purr "text"Print the text, which may span lines
Go e nameJump to the label if e is negative
Cat nameMake a label
MoveSwap a and b
ExitHalt

An expression has no spaces. It holds whole numbers, a, b, + - * / %, unary minus and parentheses. Labels are known before the run starts, so a Go may jump ahead.

Example

The truth machine.

The truth machine. Get reads the digit, Put b-48 turns it into 0 or 1, and Move brings the digit back for each Meow.

Expected: 0

The factorial keeps the product in b and prints it digit by digit, six digits with leading zeros.

Expected: 5! = 000120

The FizzBuzz and 99 bottles of beer programs print numbers the same way, so they come out as 001, 002, Fizz and as 09 bottles of beer.

The cat meows each byte before it tests for the end. At the end it meows the -1 that Get gives. The specification does not say what that prints. In this implementation it prints nothing.

Expected: purr

Further

Pseudonatural

Write your own in Run Convert a program from Meow (Martsadas)

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: meow-martsadas.

Command line

shib run meow-martsadas -e 'Purr "Hello, World" Exit'
shib manual meow-martsadas

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/meow-martsadas.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org