meowscript

The purrfect programming language.

MeowScript is a small scripting language where purrhaps means if, pawction means function, and every program announces itself with a meow. The interpreter is written in Rust and runs right here, in your browser.

Loading the playground…

Cat to human

Every keyword is a pun, and every pun means exactly one ordinary thing. This is the whole vocabulary.

CatHumanLooks like
scratchdeclare a variablescratch lives = 9;
amewchange itamew lives = lives - 1;
pawctionfunctionpawction greet(name) { meow("Hi", name); }
tailreturntail lives * 2;
purrhaps / meowtuallyif / elsepurrhaps hungry { meow("feed me") } meowtually { nap(10) }
furreverloop, with an optional conditionfurrever lives > 0 { amew lives = lives - 1; }
fur ~for eachfur toy ~ toys { meow(toy); }
hiss / continuebreak / continuepurrhaps tired { hiss; }
purrfect / clawfultrue / falsescratch asleep = purrfect;
mewnullscratch owner = mew;
furrealtypeoffurreal "whiskers" // "whiskers"
pawckageimportpawckage "nya:furrball";
'sproperty accesscat's name
~is in"Tom" ~ cats
whiskersa string"meow"
furrballan array["yarn", "box", "sunbeam"]

Put together, it reads like this:

pawckage "nya:furrball"; scratch cats = ["Tom", "Luna", "Salem"]; pawction introduce(cat) {    purrhaps cat == "Salem" {        tail cat + " (a witch's familiar)";    }    tail cat;} fur cat ~ cats {    meow("This is", introduce(cat));} meow("That's", length(cats), "cats, and", "Luna" ~ cats, "that Luna is one of them.");

Batteries, in a bag of nya

meow, purr, and length are always there. Everything else is a pawckage away.

Run it on your own machine

The command line build adds a REPL and file access. Prebuilt binaries for Windows, macOS, and Linux are on the download page, or build it with cargo:

cargo install --git https://github.com/AlenVelocity/MeowScript meowscript-cli

meowscript                 # the REPL
meowscript hello.meow      # run a file
meowscript packages        # what's in the nya: pawckages

The full language reference is in the docs.