librelist archives

« back to archive

What I'm up to right now

What I'm up to right now

From:
MenTaLguY
Date:
2009-12-04 @ 15:05
I've been largely distracted with other projects lately, but basically
where I am at the moment with Shoes is that I'm pushing the pure-Ruby
shoes angle a little harder. _why made the decision up front to write a
lot of Shoes in C, and I think maybe in the era of Ruby 1.9 and JRuby
this might have turned out to be a premature optimization.

In any case, the current situation where we have such a thick and
platform-specific C layer is turning out to be untenable -- implementing
keyup/keydown was sort of a trial balloon for that, and it's becoming
pretty obvious that there's no way we're going to be able to keep the
various platforms in sync in C with our current resources.

My thinking is that anything we could do in C we could also do in Ruby
using FFI from the Ruby side (although, with JRuby even FFI shouldn't
really be necessary, except maybe for joystick/gamepad support). It may
be that it's too slow in cases, and maybe then we have to move some
things back into C. But that will be after measuring and optimizing
things on the Ruby side first. I think I can live with that.

My first cut of this is with JRuby/Swing, but I'm going to try to
strictly limit the amount of platform-specific code, so it shouldn't be
*too* hard to port to other Rubies/GUIs. (Among other things, becase of
the whole standalone .exe packaging thing I'm not ready to abandon 1.9
yet.)

I'll post more when I have some more interesting code to show. I'm sort
of trying to attack this in layers, starting with the basic Shoes scene
graph, then layout, then event handling, then the Shoes API proper.

-mental