[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac OS X / Carbon



>>Interesting note: the Carbon analyzer was written entirely in MacPerl by
>>Matt Morse.
>
>Cool! However, from looking at the output, it appears that the analyzer does
>some Code Fragment Manager Magick that is not yet supported as a Perl module,
>so I suppose it's more like 95% MacPerl :-) (Maybe Matt is willing to
>comment?). 

I'm willing!  

Your estimate of 95% MacPerl is probably right.  I'm using MPW tools like dumpPEF to rummage around in the binary and extract data. (Actually, to avoid putting MPW's UI on screen, I'm using ToolServer to run the tools, some of which were customized by a programmer here at Apple.) The Analyzer script sends AppleEvents to ToolServer to have it run different tests on the binary and write the results to a file, which I process to extract the relevant data. Developers mail this file back to Apple where another script (Reporter) compares the raw data to the latest information we have in the Carbon API database. Reporter writes out an HTML document containing the results of the test.  

The process of running a lage executable through the Analyzer and Reporter and producing an HTML report (with functions categorized by support level and manager, appropriate documentation inserted for each manager and many functions, with some simple numerical analysis, and a pie chart) takes only a minute or so on a G3. This is really amazing considering:

1. Each of an app's hundreds of functions is looked up in a table (derived from the Carbon API database) of over 8000 functions to determine support level, extract appropriate documentation, etc.
2. Each instruction in the binary is examined for access to specific low memory addresses.
3. Each of the app's resources is checked for various things.
4. And I haven't spent much time seeing how I could optimize performance.

I've been getting a lot of congratulations on the app, which I want to share with this group. MacPerl is wonderful (and fast!), and the community of MacPerl users has been an incredible resource. I feel like I've been stitching together other people's fine efforts (Progress Bar, GD, Chart, Launch, RuntimeBuilder, and on and on) and getting all the credit!  I started using MacPerl only a few month's ago (having had previous experience with Perl under OpenStep), and have found the tools very productive.  As as I could break away from the lab at WWDC, I bought Vicki and Chris' book, so I could 
figure out how some of this stuff works!

Thanks everyone,
Matt






***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch