Cinnabar released

The academic year is officially over.
This means I can share a project I’ve been working on for the Programming Languages and Paradigms course.
It’s an original programming language and its interpreter, written in Haskell.

The name Cinnabar references a toxic, but also beautiful mineral.
The language draws inspiration from JavaScript and Python.

Notable features include:

  • All variables are references
  • Dynamic typing with built-in types: char, bool, int, object, list, dictionary, function
  • Char, bool, int and list values are immutable
  • Tuple unpacking
  • List and dictionary literals, list comprehension
  • Runtime assertions
  • String literals (implemented as character lists)
  • Built-in str function - converts values to string representation
  • Writing to stdout and reading from stdio
  • Anonymous functions with arguments passed by reference
  • Objects with instance fields and methods.
  • Classless prototype inheritance

A simple Hello World program:

print "Hello World!\n";

You can get the interpreter, documentation and sample programs here.