Experimental Ruby interpreter for the Chitter catlang
Find a file
2026-07-19 02:18:06 -07:00
examples so triangular ... 2026-07-19 01:46:47 -07:00
src duplicate arrays at boundaries 2026-07-19 02:18:06 -07:00
Gemfile initial commit, finished lexer 2026-07-05 17:20:54 -07:00
Gemfile.lock initial commit, finished lexer 2026-07-05 17:20:54 -07:00
LICENSE tested and fixed it, NOW it works 2026-07-19 01:09:56 -07:00
README.md duplicate arrays at boundaries 2026-07-19 02:18:06 -07:00

foxchitter

This my experimental Chitter interpreter written in Ruby.

Chitter is a programming language, specifically a "catlang" (batlang), designed and developed by my girlfriend Iris. You'll find it to be a cute little stack-based scripting language with a small set of dynamic types. Here's a tiny example program that I quite like:

99 { DUP OUT " bottles of beer on the wall" PRINT DEC }> 99 FOR
"no more bottles of beer on the wall" PRINT

As for this interpreter, I chose Ruby because I wanted to learn it, and I chose Chitter because I really like it, and I also like my girlfriend, obviously.

I've gone to some effort to keep the code organized, obvious, and well-documented. Ideally, it should be readable/understandable for various other users.

Usage is pretty straightforward: $ ruby src/chitter.rb <files...>
There is also a REPL available if you don't pass any files.

TODO:

  1. make arrays copy themselves eg. for reopening or a[ 1 2 3 ]> (test to make sure this actually works)
  2. finish implementing the various built-in functions
  3. make the repl nicer and add a CLI with flags
  4. debugger would be nice
  5. a test suite to verify the behaviour, especially against the reference interpreter