Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The Fancy Programming Language - Fancy is a dynamic, object-oriented programming language heavily inspired by Smalltalk, Ruby and Erlang.
Fancy Ruby JavaScript Other
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The Fancy Programming Language
(C) 2010 Christopher Bertels <>


Fancy is a dynamic, object-oriented programming language heavily
inspired by Smalltalk, Ruby and Erlang. It will support dynamic code
evaluation (as in Ruby & Smalltalk), concurrency via the actor-model
and many more features yet to be implemented.


It’s still in development, the implementation consisting of an
interpreter written in C++.

For some example code (that can be successfully executed), have a look
at the examples/ directory.

There's also lots of test coverage code. Have a look at the tests/
directory for these. The tests are written in FancySpec, a simple
testing library (somewhat similar to Ruby's RSpec). FancySpec's
implementation can be viewed in lib/fancy_spec.fnc.


Compiling / Installing from source:

Fancy is currently built using flex & bison for parsing and uses the
BoehmGC for garbage collection. You'll need the following
libraries/programms in order to build the sources:
  - GNU Make
  - Bison ( version 2.4 and higher )
  - Flex
  - libgc ( BoehmGC - It's included in the vendor/ directory
            but you can also get it here:

For example, to build on Ubuntu Linux, run:
  $ cd <fancy_source_path>
  $ sudo apt-get install g++ make bison flex
  $ make && make test

I've successfully built Fancy on Debian & Ubuntu, OpenSuSE and Mac OS
X 10.5. Given the tools & libraries mentioned above, it _should_ build
on most Unix compatible platforms. If you find a system it doesn't
compile on, let me know.

Some technical information:

What's already working?

  - Class definitions
    (including nested classes that work like modules / namespaces)
  - Instance & class method definitions
  - String, Integer, Float, Array, Hash (HashMap) & Block literals
  - Method & Operator calls
  - Instance & class variable access
  - Dynamic getter and setter method definitions (similar to Ruby's attr_acessor)
  - Loops
  - Support for closures (it works but there's definately room for
    performance improvements)
  - File reading and writing
  - Class-Mixins (including methods of one class into another)
  - Exception handling

What's still missing?

  - Pattern matching
  - Concurrency stuff (Actor-model based concurrency features as in
  - Some more advanced stuff, e.g. runtime inspection of method calls
    via MethodContext etc. (advanced stuff - saved for later)
  - Rubinius VM bytecode compiler

How is it implemented?

  - Currently, theres a quite simple interpreter written in
    non-idiomatic C++.
    Sorry, I'm not a big C++ programmer. It should be fairly easy to
    read though.

  - It uses the BoehmGC for garbage collection.

  - Currently the lexer & parser are built with flex & bison.

  - I'm planning to add a bytecode compiler soon, written in the
    language itself. I'm planning on bootstrapping and targeting the
    language for the Rubinius VM.



vendor/gc: GC Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
           For more information see the vendor/gc directory.

Fancy is licensed under the terms of the GNU LGPL v3. For more
information on licensing issues have a look at the LICENSE file.
Something went wrong with that request. Please try again.