Continuations, additional stability, and clean ups

Some recent commits to rubinius have yield some great results:

  • Continuations: They’re under fire right now in the ruby community as to whether they’re a feature that implementations need to support. Rather than wait for the dust to clear, I went through the motions of implementing them in rubinius. It was amazingly simple actually. It required some debugging to get it correct, but all in all there wasn’t actually all that much code, just a primitive VM method to manually activate a method context (aka a stack frame). Having method context’s be first class objects is what made it easy, and it’s again validated my decision to make everything possible first class.
  • additional stability: more work to stabilize the core has yield some new error conditions that get nicely translated into exceptions being thrown, the primary one being when the stack is blown (all used up) a StackExploded exception is thrown and can be handled (carefully)
  • clean up: I’ve gone through the whole process front a fresh checkout and fixed up the order of things that were missed when I was constantly using a copy that had some cached object files.

You should be able to build and test shotgun now pretty easily, doing as follows:

$ rake shotgun
$ rake test_shotgun

It will go through building shotgun and running the current set of core tests against it.

If you encounter errors, please email me with them, and attach a patch if you want!

Soon I’ll be release some code with rubinius that will let people automatically report errors, I’ll post once it’s up and running.

4 thoughts on “Continuations, additional stability, and clean ups

  1. That’s great news on the continuations front. I suspected that of the three non-RubyC versions of Ruby (Rubinius, JRuby and Ruby.NET ) that it would be easiest to implement continuations in Rubinius. Keep up the good work!

  2. I did an svn co and then tried to build shotgun as shown above and I get the following error:
    cpu_primitives.c:26: error: field ‘tz’ has incomplete type

  3. trunk from 5 minutes ago. with default tiger installation of ruby (1.8.2)

    Loaded suite test/tc_all
    cpu_instructions.c:124: failed assertion `0′
    Ecpu_instructions.c:124: failed assertion `0′

    ad infinitum

    that was after doing:
    class Rubinius::Logger

  4. […] “Rubinius is a project to watch“, so says Charles Nutter in his post Rite, Rubinius, and Everything — I think he’s right. Evan is hard at work making things work better in rubinius. He’s now got continuations working (I think this makes him the first alternative implementation of Ruby to do so), and says he should have serializable continuations soon (see his post on it here). W00t! […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s