The Cat Programming Language

Overview

Cat is a functional stack-based programming language inspired by the Joy programming language. The primary differences is that Cat provides a static type system with type inferencing (like ML or Haskell), and a term rewriting macro language extension language called MetaCat.

Cat is a high-level intermediate language translation that can also be used as a stand alone language for simple application development. In this way it occupies a similar niche to PostScript. Cat is also an appropriate language for teaching of basic programming concepts.

Cat News

For the latest Cat news please join the discussion group or check out Christopher Diggins's blog.

The current version of Cat is 1.0 beta 4.

DDJ Article Errata

For those who read the Doctor Dobbs article on Cat, please take note of the following recent langauge changes:

  • The language no longer supports the "(1, 2, 3)" notation for lists by default. Please use [1 2 3] list instead. or alternatively you can create your own definitions for (, ,, ) and () as:
      define ( { }
      define , { cons }
      define ) { cons }
      define () { nil }
    
  • The bin_rec definition shown in the article is no longer correct. The bin_rec is a primitive instruction in the main distribution and executes correctly. I will write a corrected version of the bin_rec from core primitives soon.
  • A correct and working version of "map_reduce" can be found in the distribution in the file "demo-examples.cat" in the most recent version.

Cat Implementations

The following are Cat implementations are currently under active development: Development on the following Cat implementations are in suspended animation, but may be revived at any time:

The primary implementation of Cat is the C# interpreter and MSIL compiler written by Christopher Diggins, that is compatible with Mono. A self-installing package of the C# of the interpreter can be downloaded through Google code hosting. Cat on Mono may not work with graphics enabled on all platforms. I have included build files (.bat) and an executable for non-graphics builds.

The source code to the C# intepreter can be either browsed online, or it can be downloaded anonymously using a subversion CVS client (I use Tortoise SVN): svn checkout http://cat-language.googlecode.com/svn/trunk/ cat-language

If you find any bugs in the interpreter, or desire any features please submit them using the issue reporting form.

Cat is completely open-source and the source code is dedicated to the public domain. This means all source files can be used or modified for any purpose, without restriction, obligation, or warrantee. If you are interested in consulting services related to Cat please contact the lead developer and designer Christopher Diggins.


copyright Christopher Diggins, 2007