MacPerl at the O'Reilly Open Source Convention

By: Vicki Brown

1999 does not mark the first year that MacPerl has been present at the O'Reilly Perl Conference [1] (enlarged and enhanced this year as the Open Source Convention). We've held informal BOF (Birds of a Feather) sessions at the previous two conferences. (Our first BOF was so informal it was held outdoors, next to the swimming pool on the roof of the conference hotel. We were also on the San Jose airport flight path and had to suspend conversation whenever a plane flew by!)

This year, however, marks an important event for MacPerl. At The Perl Conference 3.0, MacPerl was the subject of a formal, scheduled presentation! (We were originally scheduled for a presentation at the 1998 conference, but it was canceled... :-(

Not only did we have a presentation, it was videotaped (wheee!) as well as audio-taped. If you couldn't make it to the conference, or somehow missed the talk [2], you can still order a tape [3] of the presentation.

The Conference

As nearly everyone who uses Perl must be aware, O'Reilly & Associates is the publisher of Programming Perl, fondly nicknamed, "The Camel Book", as well as a host of other books on Perl (and other things :-). Since 1997, O'Reilly has also produced the annual Perl Conference. Now in its third year, the conference was expanded to become part of an Open Source Convention, also featuring Apache, Linux, Python, Sendmail, Tcl/Tk, and an Open Source business track. Some 1600 attendees registered for this year's convention, held August 21-24 in Monterey, CA.

The BOF

MacPerl activities started with our BOF on Sunday night. BOF sessions provide an opportunity for like-minded conference attendees to "flock together" and talk about shared interests, in this case, MacPerl.

Although our talk began at 7pm (overlapping the last half hour of the Party with the Perl Mongers [4] we had a reasonable turnout. More people drifted in as the PM party ended; by the end we had roughly 3 dozen MacPerl users present.

We had no formal agenda, so we took questions and general discussion from the floor. Most of the folks present use MacPerl to create and test their scripts, but deploy the code on Unix / Linux (although we did have at least one attendee who runs his all of his code on his Macintosh!). We talked about database access (use DBD::proxy and DBI::ProxyServer [5]), touched briefly on Mac OS X and Mac OS X Server [6], and generally flocked ("networked").

The Talk: MacPerl: Now and Tomorrow

Several of the questions raised in the BOF were deferred until Monday afternoon's formal presentation. The talk [2] was given by Matthias Neeracher (porter of Perl to the Macintosh and author of the MacPerl toolbox extensions) and Chris Nandor (mailing list poster, module writer, and co-author of MacPerl: Power and Ease).

The presentation began with Matthias' strategy for MacPerl in two succinct bullet points:

Future development will progress in the direction of supporting these two goals.

Matthias went on to explain why there has been no development activity on MacPerl in the past year (a PhD thesis, a wedding, a new job, and a 6000-mile relocation resulted in a severe reduction in time alloted for MacPerl development!). There has, however, been development in and for MacPerl. MacPerl users have been creating interesting and innovative applications, making use of AppleEvents, sound and graphics [7].

Chris Nandor's Mac::Glue module [8] is easily one of the larger and very useful contributions to MacPerl in the past year. Mac::Glue provides support for Macintosh Inter-application Communication which is performed by AppleEvents (AE). For most Mac users, AppleEvents are frequently sent using AppleScript, a language created by Apple specifically to allow ordinary users to "script" applications. Unfortunately, AppleScript syntax is, shall we say, different...

  tell application "FileMaker Pro"
    set mycells to get the second cell ¬
      of (the records whose eighth cell contains "bill") ¬
      of database "Check Tracker"
  end tell
Apple events are actually sent as binary data, but they have text representations as well. The previous AppleScript builds an event that looks like this:
  core/getd:‘----’:obj {
    form:indx, want:type(ccel), seld:long(2), from:obj {
      form:test, want:type(crow), from:obj {
        form:name, want:type(cDB ),
        seld:“Check Tracker”, from:‘null’()
      },
      seld:cmpd{
        relo:cont,
        ‘obj1’:obj {
          form:indx, want:type(ccel),
          seld:long(8), from:‘exmn’()
        },
        ‘obj2’:“bill”
      }
    }
  }
Most any Mac language can create and send this event, including Perl. Unfortunately, the syntax gets worse before it gets better. That is, it gets worse unless you use Mac::Glue:
  use Mac::Glue ':glue';
  my $fmp = new Mac::Glue 'FileMaker Pro';
  my @cells = $fmp->get(
    $fmp->obj(
      cell => 2,
      records => whose(cell => 8 => contains => 'bill'),
      database => 'Check Tracker'
    )
  );
  die $^E if $^E;
Not too bad...

Mac::Glue transparently provides much of the support you need to send AppleEvents.

Getting started is even easier - just drop an application on the "gluemac" droplet included in the Mac::Glue distribution to create glue (and documentation!) for that application.

A full discussion of Mac::Glue would be the subject of a complete article (which we hope to convince Chris to write :-). If you're interested in using Mac::Glue, download the current Beta from Chris' web page [8] and start playing.

Sightings

Macs and MacPerl were not limited to the BOF or the talk by any means. Randal Schwartz was frequently seen using his Powerbook G3 (he was one of the few presenters using Mac OS instead of Linux).

The Perl Mongers seem to have adopted the Powerbook as their "platform of choice". Although many of them admit to running Linux, I'd personally rather see them dual-boot with Mac OS!.

Damian Conway, author of the newly-published soon-to-be bestseller, Object Oriented Perl [9], as well as numerous modules, tutorials, and papers, is a MacPerl user. Damian used his Mac (and MacPerl for the examples) when presenting his Sunday tutorial, Practical Parsing with Parse::RecDescent, as well as three papers presented on Monday and Tuesday. (Damian's award winning paper, Coy -- Like Carp, only Prettier, singlehandedly increases the body of Computer-related haiku by several orders of magnitude!)

MacPerl users were in the exhibit hall too. If you have $1400 to spare (plus an additional $475 for the conference fee), consider Perl Whirl 2000, a techie cruise to Alaska's "Inside Passage". Neil Bauman, President of Geek Cruises [10], is a MacPerl user and member of the macperl mailing list.

Other MacPerl list members were visible (if not obviousl y using MacPerl). Ron Kimball took part in the first Perl Bowl and the 2nd annual Perl quiz show... for taking part in either, he deserves a round of appluase. Chris Nandor was one of the commentators for the Perl Bowl... if he ever needs a new career, he'll know where to look.

Summary

MacPerl may not be quite a first-class citizen at the Perl Conference... yet. But we've come in from the back porch (or the roof :-). Next year, we hope to have our BOF listed in the printed schedule. We're also hoping O'Reilly will be interested in another talk.

That's where you come in. Are you doing interesting work with MacPerl? Consider submitting a user paper or a proposal for an invited talk to be presented at next year's Perl Conference 4.0 (July 15-18, 2000, in Monterey, CA). It's only a year away! We hope to see you there.

References

1. O'Reilly and Associates is, among other things, a respected publisher of books on Open Source Software. O'Reilly also produces the annual Perl conference, hosts www.perl.com, and supports Open Source in many ways.

2. The slides from the 1999 Perl Conference 3.0 presentation, MacPerl: Now and Tomorrow can be found at www.pudge.net/macperl/tpc/1999/macperl, along with other talks that Chris has given.

3. VWtapes provides conference and seminar recording. See their home page for more information. Or jump directly to their catalog for tapes from Perl Conference 3.0.

4. The Perl Mongers supports Perl Users and Perl User groups in many ways.

5. For more information on DBI / DBD Proxies, see Chris Nandor's tutorial, on the subject.

6. Mac OS X Server is Apple's server operating system that "combines the strength of Unix with the simplicity of Macintosh".

7. Many contributed MacPerl examples have been posted on the The MacPerl Pages in our Code Contributions department. Additional contributions are solicited.

8. Information about the Mac::Glue modules and other modules can be found on Chris Nandor's web pages at http://pudge.net/macperl/.

9. Object Oriented Perl is published by Manning Publications. The book is available directly from the publisher, as well as from fine virtual and physical bookstores near you.

10. Sun, Sea, Code... Geek Cruises sponsors Perl Whirl 2000 as well as other "High-Tech Cruises for Geeks and Other Computer Professionals".


MacPerl, currently version 5.2.0r4, is available from the CPAN in the ports directory .

MacPerl: Power and Ease (Vicki Brown and Chris Nandor, 1998, ISBN 1-881957-32-2) is published by Prime Time Freeware. MacPerl: Power and Ease is the only book to specifically cover MacPerl.

The MacPerl Pages http://www.macperl.com sponsored by Prime Time Freeware, bring you pointers to MacPerl, the mailing lists, support, tutorials, and more.