Progress with AROS Ruby port
At the start of this year I revisited the Ruby port for AROS. It has been around a year since I did the original port and started on Zuby which was a binding to the MUI/Zune GUI library. However, I gave the project a rest so that I could have a rethink on how to develop this. The decision was how MUI-like should the Ruby API be? What is the right level of abstraction for a Ruby programmer?
I had a couple of ideas for also supporting other Ruby GUI bindings like GTK and TK for compatibility with existing libraries. Then the idea struck me – why not keep the Zuby binding as an abstract binding layer to MUI and then have the Ruby client API be polymorphic, for example to look like GTK or TK. The advantage here is that we don’t end up with ‘yet another API’ and the programmer can just us the API that they are used to.
So far I have made quite a bit of progress with the abstract Zuby layer and have primarily focussed on the GTK2 concrete API. A handy side effect of this is that I can support Glade/GTKBuilder after writing a small XML parser. Not all widgets are supported, but things like layout, buttons, text boxes, lists and menus work. I have not had time to do much more since the last holiday and I am not going to be able to work on this for another couple of months, however, here is a screenshot of what I have working so far which is a simple GUI created in Glade/GTKBuilder and the loaded into AROSRuby: