Interview to Gtk2-Perl maintainer (muppet)
gtk2-perl is the collective name for a set of perl bindings for Gtk+ 2.x and various related libraries. These modules make it easy to write Gtk and Gnome applications using a natural, perlish, object-oriented syntax.
Please muppet, introduce yourself to the CaFe.pm group
I'm a 30-year-old musician and programmer living in Lexington, Kentucky, USA with my wife and twin girls. I have a Bachelor's degree in Electrical Engineering, but have done pretty much only software since about six months after graduation. I write and perform eclectic rock music (http://seasonone.org/) whenever i'm not chasing toddlers, hacking on software, or engaging in geeky conversation with my techie spouse.
It may help to know that the nickname muppet comes from my days in the dormitories at the University of Kentucky, where i was known for my long, flyaway blond hair and penchant for vaudevillian humor.
N . del E.: he's the one at http://seasonone.org/sights/2005-06-25/scotta2.jpg
Which one was your motivation to build Gtk2-Perl ??
Short version: I needed it, and it wasn't there.
Long version:
I did a lot of text data processing at my job and perl was the right tool for that work. I was already an avid Linux and Gnome user, and when i needed to put a gui to some of the tools, i chose Gtk-Perl. I was also working on a C library to do image analysis, and bound that to perl with XS, so i could use DBI to push the analysis results directly into an SQL database. The combination of C for low-level bit-banging and Perl for application logic was a real winner.
After a couple of years of using Gtk-Perl in isolation, i wondered where the support for gtk+ 2.x was, and joined the gtk-perl-list at gnome.org. As it turned out, the original maintainers had silently abandoned the project, and some of the list members were discussing starting a new project.
Several months passed, while my in-house software grew up around GObject and gtk+ 2.0. When the time came to make my stuff work with perl, i found that the Inline-based Gtk2-Perl (then version 0.12) was not extensible enough to allow me to bind my own GObject-based library to perl in an interoperable way. In April of 2003, i hacked up a prototype of a new architecture for the bindings, and presented this to Göran and Guillaume on the mailing list (http://mail.gnome.org/archives/gtk-perl-list/2003-April/msg00015.html). To my surprise, they responded by handing me the project maintainership.
In truth, however, i didn't build Gtk2-Perl by myself. There was plenty of prior art; i borrowed heavily from the original Gtk-Perl, the Inline-based Gtk2-Perl, and pygtk. Ross McFarland did a lot of the gruntwork to flesh out the original prototype into something useful, and Torsten Schönfeld set us straight on the TreeView bindings and created most of our massive test suite.
It's not clear to me what GObjects are
gtk+ is an object-based widget system; GObject is the abstract base class of the object hierarchy and also the library which exports this object; all of Gnome is based on it (http://developer.gnome.org/doc/API/2.0/gobject/index.html) They are reference-counted C objects which support typed properties and notifications. Perl doesn't have a base object, so there's not really an analog.
And how did you feel when Göran and Guillaume gave you the role of maintainer ?? Did you accept immediately ?? Did you feel comfortable with that ?? What caveats did you had ??
I was surprised, to be honest. I wasn't expecting it, it wasn't anything formal; I already had commit permission, and GC just gave me maintainer permissions one day and said, here you go. (sourceforge has a specific maintainer role)
Did you get some help from other Open Source projects ?? (code, advice, manpower, etc.)
Yes. Marc Lehmann helped perfect the glue between the C GObject and perl references. The gtk+ developers have always been helpful in determining whether bugs lie in the bindings or gtk+ itself. I've often looked to the code of the old Gtk-Perl and pygtk for guidance.
What skills (Perl related or not) did you gain while you build Gtk2-Perl ??
I learned quite a lot about project management, how much work actually goes into making software stable, and what makes a good API, not to mention the ins and outs of the GObject type system.
What advice will you give to the wanna be designers and hobbists facing a new project ?
Don't underestimate the value of your user community.
In which parts of the code you will advice to the novice Perl coder to look at, in order to have a very pleasant learning experience ?
I presume a novice would want to know how to *use* Gtk2-Perl. The best place to start would be the examples and demos that ship with the source code of the Gtk2 module, and the various tutorials and documentation linked from http://gtk2-perl.sourceforge.net/ .
For someone wanting to create or maintain language bindings, that's a different matter. The bindings are nearly all XS, Perl's eXternal Subroutine extension language. (This is a dialect of C and preprocessor directives.) The heavy lifting happens in the Glib module. All of the other extensions are just boilerplate, using utilities provided by Glib.
How can anyone colaborate with Gtk2-Perl ?
The mailing list, gtk-perl-list@gnome.org, is the best place to start. We take patches and general discussion there. We also hang out in #gtk-perl on irc.gnome.org.
We have a small core of developers for the base modules. Ross McFarland and I did most of the work through the summer of '03. In late summer '03, we started getting a lot of very good patches from a German physics student named Torsten Schönfeld; in fact, so many patches, and of such high quality, that we gave him commit permissions and started asking for his opinions in on our changes. Last year, when work started to get in the way of effective maintainership for both Ross and me, we handed most of the responsibility to Torsten, who has done a great job.
Some of the modules in the collection are still in need of maintainers, and we're always on the lookout for volunteers.
What features you think are missed, and which ones will you add soon ?
No matter how complete we think the bindings are, somebody always manages to report that some obscure API they need is missing.
We are reviewing API for the bridge between Ross's Cairo bindings and Gtk2.
The gtk+ team is working on adding full API introspection to the platform, and we are preparing our own support for it. This will, we hope, lead to almost fully automatic bindings, fewer version-related problems for users, and less work for us as maintainers.
What kind of introspection are they doing and how it would impact in Gtk2-Perl ??
Right now, GObject lets you ask each object what properties do you support? what are their types? and what signals do you support? what are their signatures?, but that's it. All of the other functions must be explicitly bound with some XS goo and that's true for all of the language bindings, not just Gtk2-Perl.
The introspection proposal is to add the ability to ask the library for information about every function and datatype it exports. That way, language bindings don't have to have quite so much hand maintained stuff. We're planning to support that with AUTOLOAD and libffi... (http://sourceware.org/libffi/) If your script asks for a function that doesn't exist, AUTOLOAD looks to see if the library exports it; if so, it looks to see how to call it; then creates and caches a stub to call it next time. If it works, it will be very cool, because when a new version of gtk+ comes out, the version of Gtk2 you already had will magically support those new functions. (Currently, we have to add support for new functions as they are added to gtk+.)
And you wouldn't have to be an XS wizard to create perl wrappers for your favorite GObject-based library !!!
Any favorite CPAN module ?
That would have to be Acme::Scurvy::Whoreson::BilgeRat. :-)
http://search.cpan.org/dist/Acme-Scurvy-Whoreson-BilgeRat/lib/Acme/Scurvy/Whoreson/BilgeRat.pm
Do you have a Perl Group in your location ?? Do you participate in it ??
The local group, Lexington.pm is rather, ahem, low-traffic. http://lexington.pm.org/
It seems most of the people who would participate there are involved with the Lexington Professional Linux Users Group: http://lplug.org/
Instead, i've been subscribed to London.pm for quite some time, despite being several thousand miles away and never having visited. There's a lot of overlap between london.pm and (void), so i don't feel quite so out of place. At least, they haven't kicked me off yet. =)
Do you have any experience (funny or not so) that you had while making Gtk2-Perl and that want to share with us ?
The main reason i was able to spend several months' worth of evenings and weekends on Gtk2-Perl was that my wife was pregnant and didn't feel like getting out of the house.
Except for Ross, I have never met any Gtk2-Perl users in real life.
Anything else that you want to tell us and we haven't asked you ?
I've used perl to do a lot of things, but i have *not* used perl for web development.
What did you use Perl for ??
A little bit of everything...
for a long time, it was mostly rearranging numbers in text data files, then crunching
numbers and putting them into an SQL database.
Now I have tools to scan log files and send me email on interesting events,
something to scan code for FIXME comments every night,
another tool that generates stubs for a C project...
A little bit of everything. :-)




