Skip to content

kbmackenzie/mewlix

Repository files navigation

Mewlix logo

Mewlix is a cat-themed esoteric programming language that compiles to vanilla JavaScript. It's designed for making little HTML5 games!

Mewlix's compiler is written in pure Haskell, and is a self-contained binary executable. It can build projects, run them in a simple HTTP server, and package the build output neatly into a .zip file for upload in websites like itch.io.

As is tradition for all languages, here's a simple 'hello world' program in Mewlix:

meow "Hello world!"

And here's how to draw a sprite to the canvas in graphic mode:

from std.graphic takes load, draw, init

🐱 draw_cat()
  do draw <- "cat", 0, 0
~meow

do load <- "cat", "path/to/cat.png"
do init <- draw_cat

It has...

  • Cat-themed syntax!
  • A stack-like, LIFO persistent data structure—affectionately nicknamed a 'shelf'.
  • String interpolation—:3"like [this]!"—affectionately nicknamed 'yarn strings'.
  • Lambda functions, defined like this: 🐈 (a, b) -> a + b
  • Classes, affectionately nicknamed 'clowders'.
  • A function composition operator (:>) and a function application operator (|>)!
  • nand and nor operators, for picky boolean expressions.
  • Feline-oriented programming capabilities.

Documentation

All of the documentation for Mewlix can be found in the wiki.

If you have any questions, be sure to read the FAQ!

Looping animation of a cartoon cat resting on a shelf.

Examples

An assortment of little example projects written in Mewlix can be found here.

Snake game example. Animation + UI example. Animation example. Button example.

Installation

Mewlix's compiler is a self-contained binary executable.

The installation guide can be found here.

A guide on how to build Mewlix from source can be found here.

Tools

Vim

A plugin that provides syntax highlighting for .mews files can be found here!

Special Thanks

A big special thanks to my friend Jade for helping me stay sane through this project and for letting me talk endlessly about it these past few months. I wouldn't have been able to finish it without you, thank you! ♡

About

🐱 A cat-themed programming language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages