CRuby = subset of Ruby + typed methods + compiler to C

The main difference is the typing of functions and their
arguments. The generated source is intended to be linked with the Boehm GC.
By default methods return values of the same type as the receiver, but this
behaviour can be overridden with the -> operator.

The current "implementation" is definitely only a toy, but those interested
in the consept are welcome to the sources. I am going to mull over this for
a while further and either dump the sources on my homepage and leave it at
that -- or register a Savannah project.

The next stage would be a proof-of-concept implementation that
automagically generates a ruby-api to the generated C-code.

Cheerio,

  -- Nikodemus

Example follows:

$ cat test.crb

def words -> String
  "Hello World"
end

MAIN {
  msg = words()
  puts( msg )
}

$ ./cruby test.crb
$ cat test.c

#define _GNU_SOURCE

#include "test.h"

String *
Kernel_words ()
{
  return "Hello World";
}

void
crb_main ()
{
  void * msg;
  msg = Kernel_words ();
  Kernel_puts (msg);
}

int
main ()
{
  crb_init ();
  crb_main ();
  return 0;
}