Building with Rake (Jim Weirich)
My talk on Rake was the first talk Sunday morning. I was a bit disappointed
that Matz wasn’t there, he and some other attendees attended an early
morning church service (can’t complain about that!) and were not back
yet. Overall, I feel the talk went well and I got positive feedback from
it. If I were to revise it for the future I would try to include more demos
and a bit less talking. As it was, the Sunday morning presenters were a bit
time compressed, but I was able to get the end of the talk and handle some
questions. I didn’t get into any of the extra information I included
in the appendicies (which is OK, they were only there if I ran out of
time).
I did manage to squeeze in a single slide showing the creating of a GEM
file from a GemSpec. This was a teaser from the RubyGem folk that Rich
elaborated on later in his talk.
Toward a Refactoring Framework for FreeRide (Hal Fulton)
Hal shared some of his ideas for a Refactoring framework for FreeRide. He
has been experimenting with the Scientilla editor widget and has some
(very) rudimentary refactoring and code assists running. Truthfully, Hal
was limited by the lack of a good Ruby-based parser for Ruby. Without that,
a full featured rectoring browser will have to wait.
The discussion that followed Hal’s talk centered on the need for a
good Ruby parser. There was some talk about Ripper, which is a
port of the original parse.y file from the Ruby source base, but replaces
explicit parse actions with a callback/event based mechanism to allow
something other than the Ruby interpreter to use it. FreeRide is using this
parser and there is some hope that it will be integrated back into the Ruby
source tree so there will be only one parser. I can think of serveral
projects that would benefit from this.
Ruby and the Java Debug Wire Protocol (Rich Kilmer)
I don’t think Rich could decide what topic he wanted to present at
the conference this year. The main thrust of his presentation was about
using Ruby to control Java VM via the Java Debug Wire Protocol. Rich uses a
ruby based monitoring script to control the execution of over 100 (large)
JVMs.
One thing that I found particularly interesting was how Rich generated the
code for the low level debug packets. The JDWP is a binary protocol, with
around 70 different packet types. There is an HTML writeup from SUM
detailing all these different packet types. Rich transformed (by hand) the
descriptions of the packets in HTML to more or less isomorphic Ruby code.
In other words, He described the packets using Ruby instead of HTML. He
then wrote a generated that loaded the Ruby descriptions of the packets and
generated code to parse, send and receive the packets. The Ruby description
and generator were several hundred lines of code, but the final generated
code base was well over 1500 lines. Not a bad trade-off.
I’ve been thinking about Ruby as a declarative language for a bit.
See onestepback.org/articles/buildingwithrake/appa.html
for some of my thoughts in the area.
When Rich got to the demo portion of his talk, he pulled up a terminal
window and tried to run his program which immediately failed because one of
the Ruby JDWP libraries were not installed. "Oh look" says Rich
in a mock serious voice, "I’ve got a GEM for that library
here." Rich runs the GEM which installs the library. He then tries the
demo again, but it fails because it is requiring the wrong version of the
library. Rich fixes the version problem and the demo runs without a hitch.
What you missed if you blinked was that Rich inserted a mini-demo of the
RubyGems project into the middle of his Ruby-JDWP demo. Although sneaky,
the next part of the demo should he had even more tricks up his sleeve.
The demo consited of a JVM running some Java-2D demos and a GUI listing the
JVM threads and command buttons to start and stop individual threads or the
entire JVM. The GUI was implemented by Ruby code, and although I
couldn’t place the toolkit used to generate it, I didn’t really
think too much about it.
After the demo, Rich revealed that the GUI was done using the Alph project
(Rich had been dropping hints about Alph all weekend long). The GUI was
drawn in a Flash component and communicated with a controlling Ruby script
that specified the components and buttons to appear on the page and then
handled the callbacks when those buttons were clicked. The Flash portion of
the GUI is a single file that implements all the components, but lets the
Ruby script completely control it. You need the proprietary MacroMedia
development kit to create that Flash file, but once created it can be used
by any Ruby script. In other words, you can develope your GUI completely in
Flash without using the proprietary Flash development kit. Cool!
Why is it named Alph? It comes from the poem:
In Xanadu, did Kubla Khan
A stately pleasure dome decree
Where Alph the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
Rich was thinking of a GUI Utopia, and Alph the river runs right through
that utopia. One of my favorite quotes from Rich during the talk:
-
- "This is pretty much the fun thing you do in Open Source, is think
of names." — Rich Kilmer
Post Conference Activities
The presentation portion of the conference ended around 11:30. Lunch was to
be served at noon, so I hustled up to my room to check out of the hotel.
After lunch, several of us decided to head to the airport to take advantage
of the WIFI network, even though our flights were not scheduled for several
hours.
At the airport, Chad and Rich put some final touches on the RubyGems code
and checked it into RubyForge CVS tree. I did some cleanup on Rake and as
soon as they check RubyGems in, I updated the copy on my laptop and
generated a GEM for Rake 0.2.9. I then uploaded the GEM to the file area of
RubyForge allowing me to claim the first GEM enabled application on
RubyForge (we are ignoring for the moment that I forgot to use a
"require_gem" in the source, so the fact that the Rake GEM
won’t work out of the box is a small blight on that claim).
Rich and Chad’s flight was about a half an hour before mine, so after
they left I hung around the ruby-lang IRC channel and answered some
questions on RubyGems. I even started the gem_server on my laptop and
allowed a couple people to download the Rake GEM directly through the
gem_server before I to pack up to make a plane. What a great way to cap off
the whole weekend.
Late Update: Presentation Source
Ryan Davis is hosting all the 2003 RubyConf presentations. You can find
them at www.zenspider.com/Languages/Ruby/RubyConf2003.html
|