Skip to content

JaytirthJOSHI/Meow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MeowLang ๐Ÿฑ

A feline-friendly esoteric programming language where every command sounds like a cat! Perfect for learning programming concepts in a fun, approachable way.

Features

  • ๐Ÿฑ Cat-themed commands: Every instruction sounds like a cat sound or behavior
  • ๐Ÿ“š Educational: Great for learning programming concepts like loops, memory management, and algorithms
  • ๐ŸŽฎ Interactive: Try it online in the web playground
  • ๐Ÿ”ง Easy to install: Simple pip installation
  • ๐Ÿ“– Well documented: Comprehensive documentation and examples

Quick Start

Installation

pip install meowlang

Command Line Usage

# Run a .meow file
meow hello.meow

# Execute code directly
meow -c "meow meow meow purr"

Python API

from meowlang import MeowInterpreter

interpreter = MeowInterpreter()
result = interpreter.run('meow meow meow purr')
print(result)  # Output: 3

Core Commands

Command Description Brainfuck Equivalent
meow Increment current cell +
hiss Decrement current cell -
purr Output current cell .
mew Input to current cell ,
left Move pointer left <
right Move pointer right >
yowl Start loop [
paw End loop ]
nap No operation N/A
๐Ÿพ Comment N/A

Advanced Commands

Command Description
scratch Set current cell to 0
lick Multiply current cell by 2
stretch Set current cell to absolute value
zoomies Square the current cell
groom Sort memory array
sleep Sleep for memory value milliseconds
chase Generate random number (0-9)
chase <min> <max> Generate random number in range
pounce <line> Jump to line number
knead Add current and next cell
scratchout Subtract next from current cell
pounceon Multiply current and next cell
hairball Integer divide current by next cell
pawprint Modulo current by next cell
catnip Power: current to the power of next
hissfit Negate current cell
puffup Increment next cell
shrinktail Decrement next cell
scaredycat Set next cell to 0

Examples

Hello World (Output "Hello")

๐Ÿพ Hello World in MeowLang
meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Set cell 0 to 10
yowl ๐Ÿพ Start loop
    meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Add 10 to cell 0
    right ๐Ÿพ Move to cell 1
    meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Set cell 1 to 10
    left ๐Ÿพ Back to cell 0
    hiss ๐Ÿพ Decrement cell 0
paw ๐Ÿพ End loop
right ๐Ÿพ Move to cell 1
purr ๐Ÿพ Output cell 1 (should be 10)

Simple Calculator

๐Ÿพ Add two numbers
mew ๐Ÿพ Get first number
right ๐Ÿพ Move to next cell
mew ๐Ÿพ Get second number
left ๐Ÿพ Back to first cell
knead ๐Ÿพ Add cells together
left ๐Ÿพ Move to result cell
purr ๐Ÿพ Output result

Fibonacci Sequence

๐Ÿพ Generate Fibonacci numbers
meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Set counter to 10
yowl ๐Ÿพ Start loop
    right ๐Ÿพ Move to next cell
    meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Set to 10
    right ๐Ÿพ Move to next cell
    meow meow meow meow meow meow meow meow meow meow ๐Ÿพ Set to 10
    left left ๐Ÿพ Back to counter
    hiss ๐Ÿพ Decrement counter
paw ๐Ÿพ End loop
right ๐Ÿพ Move to first number
purr ๐Ÿพ Output first number
right ๐Ÿพ Move to second number
purr ๐Ÿพ Output second number

Web Demo

Try MeowLang online at the web playground!

Development

Installation for Development

git clone https://github.com/jaytirthjoshi/meow.git
cd meow
pip install -e .
pip install -e ".[dev,web]"

Running Tests

pytest

Running the Web Demo

cd demo
python app.py

Then visit http://localhost:5000

Project Structure

meow/
โ”œโ”€โ”€ meowlang/           # Main package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ interpreter.py  # Core interpreter
โ”œโ”€โ”€ demo/               # Web demo
โ”‚   โ”œโ”€โ”€ app.py         # Flask server
โ”‚   โ”œโ”€โ”€ templates/     # HTML templates
โ”‚   โ””โ”€โ”€ static/        # CSS/JS assets
โ”œโ”€โ”€ examples/          # Example programs
โ”œโ”€โ”€ tests/            # Test files
โ””โ”€โ”€ setup.py          # Package configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by Brainfuck and other esoteric programming languages
  • Built with โค๏ธ and lots of cat puns
  • Special thanks to all the cats who provided inspiration

๐Ÿฑ MeowLang - Where programming meets purrfection! ๐Ÿฑ