Skip to main content

An esolang where every keyword is based on cats and kittens

Project description

What is this?

This is an esoteric programming language ( esolang ) called KitCoda.

It is centered around cats, because I love them, and every command is something a cat could do.

It is like python, except it's tiny ( 600 lines!! ) and only has a few, essential commands.

However, you can do lots of things in KitCoda! For example, you can approximate sin(x), with just its four basic math functions!

Why did I make this?

I made this to satisfy something for me and others: the need for a cute programming language.

How did I make this?

I wrote this line by line, day by day, over the course of a month.

I started by creating simple commands, like meow ( the print command ) and bap ( an if statement )

Over time, though, I added more and more commands, until I felt this was a complete esolang.

What did I learn? What did I struggle with?

I struggled with many bugs and errors, code not working, and with many other problems throughout this wonderful process.

However, I feel that I have learned a few things from it:

  • How to make an esolang,
  • Why these exist,
  • How to implement a variety of commands
  • Parsing
  • And finally, how to get through the struggles of coding!

This is also my first published, completed project.

How to use KitCoda:

There are two modes to use KitCoda: REPL ( one line at a time ), or file ( write a file, give it to the parser )

In KitCoda, you start every line of code with a command. There are 15 main commands ( commands you can start a line with ), with 2 subcommands ( commands in a seperate statement ), which we'll talk about individually later.

For now, you can know them as meow, sit, bap, purr, pounce, spin, add, subtract, multiply, divide, eat, sip, and nap.

Now, let's get into commands!

meow

Function: logs something to the command line.

Syntax:

sit var is "!"
meow "hello world"  
meow var
meow "hello world" var

Output:

hello world
!
hello world !

Don't worry, you'll learn sit in just a moment!

sit

Function: sets a variable.

Syntax:

sit var is "meow"
sit purr is "hi"
sit hello is var

meow var purr hello

Output:

meow hi meow

bap

Function: tests if something is true. does something if it is. optionally: does something else if it isnt.

Syntax:

sit var1 is "hello"
sit var2 is "hi"
sit var3 is "hello"

bap var1 is like var2 {
  meow var1
} bop {
  meow var2
}

Output:

hi

purr & pounce

Function: purr defines a function. these can take arguments! pounce runs a function and optionally passes arguments to it.

Syntax:

sit meow is "hello world"
purr func var {
  meow var
}
pounce func meow

Output:

hello world

spin

Function: loops! does something over and over.

Syntax:

sit var is 0
spin while bap var isnt like 3 {
  meow "hello world"
  sit var is add var with 1
}
spin 2 times {
  meow hi
}

Output:

hello world
hello world
hello world
hi
hi

math commands

Function: add, subtract, multiply, or divide things. you can do lots with these!

Syntax:

sit x is 5
sit y is 10
sit z is add x with y
meow z
sit z is subtract y with x
meow z
sit z is multiply x with y
meow z
sit z is divide y with x
meow z

Output:

15
5
50
2.0

eat

Function: takes user input.

Syntax:

sit name is eat "What is your name? "
sit age is eat "How old are you? "
meow "You are" name "and you are" age "years old"

Output:

What's your name? skai
How old are you? 14
You are skai and you are 14 years old

sip

Function: take functions from another file. thievery!

Syntax:

in one file (hello.kit):

    purr hello {
      meow "hello"
    }
    purr world {
      meow "world"
    }

in another file:

    sip hello.kit
    pounce hello
    pounce world

Output:

hello
world

nap

Function: goes to sleep! exits the program.

Syntax:

meow "hello"
nap
meow "world"

Output:

hello

Athena Award Badge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kitcoda-1.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kitcoda-1.0.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file kitcoda-1.0.1.tar.gz.

File metadata

  • Download URL: kitcoda-1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kitcoda-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9008e7b05554e9718bcf86d7e9b13c5518bf6e224f5c486573f15914cfd7029d
MD5 aaf95bb43fd6939e8059a19dd2063214
BLAKE2b-256 06597e866fb2b7165ed9eda383983e0ac9d87f62759f96211c79c9f2ba4d87cd

See more details on using hashes here.

File details

Details for the file kitcoda-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: kitcoda-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kitcoda-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1db609402caa83f914e94ec3242dde04aeff2339dc42351deb5b1b24bcfd404
MD5 610ced7e081c3cfd7516618439545444
BLAKE2b-256 eaa90c4dd17ff6c119720fdc2b3ee6b79f6c3f291d9c5826c9f66081572fc722

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page