By now we’ve seen plenty of toy demos of the various scripting language bridges to Cocoa. The word is out that scripting languages can be used to build significant applications, but the gap between demonstration and reality still seems wide. Also, it’s not easy to compare and qualify bridges. Microbenchmarks miss the point; as a developer, I want to know “can this bridge go all the way with me?” And, “if I get stuck, then what?”
Like many Cocoa newbies, I’m a big fan of Aaron Hillegass’ work to teach and document Cocoa. He has one of the most knowledgeable public voices on Cocoa, and as an independent, he’s much more free to speak his own mind (and have one). That makes Aaron the perfect expert to help test and debug Nu, my new language for Cocoa application development—if I could only afford to pay him!
So last month when Aaron released the source code to his popular PagePacker program, I thought, “What a perfect opportunity! Here’s a full-featured Cocoa application written by an expert. Let’s see how PagePacker would look in Nu!” Then I immediately jumped into a project to convert PagePacker to Nu.
Now, several upgrades and Nu releases later, I’m ready to share the result. NuPagePacker is a Nu version of PagePacker that, as far as I can tell, is completely equivalent to Aaron’s original. All but three methods of the original sources are now written in Nu, and besides being able to snoop inside the app for the Nu source, you can download it from my git repository at code.neontology.com.
Like Aaron’s original source code, I’m releasing this under the BSD license. It requires Nu-0.2.4 or later (see my downloads page at programming.nu), and once you’ve installed Nu and cloned my git repository, you can build a shippable disk image by simply typing “nuke dmg”. This will compile and configure a NuPagePacker.app that includes Nu as a private framework; that means that you can share this app with people who haven’t yet installed Nu (a population that will soon drop faster than polar ice sheets).
Also, if you’re a Cocoa developer (or want to be), be sure to read the source code and compare it to Aaron’s original Objective-C sources. And if you’re a developer or user of some other scripting bridge (I hear there’s even one for PHP), feel free to do this conversion for your own bridge and post the results for comparison.
NuPagePacker is a universal binary. I’ve tested it on OS 10.5 (Intel) and 10.4.11 (Intel). If you find bugs, they’re probably my fault, and I’ll jump right in to fix them. Just leave a comment here or post a message to our mailing list at the Programming Nu Google Group.