Slashdot Mirror


New Cocoa/Perl Bridge Released

bsartist writes "I've released the first version of a Cocoa/Perl bridge that I call CamelBones. It's alpha-quality but functional enough for the example application, a POD reader similar to MacPerl's Shuck, to be written entirely in Perl." There are other projects like this that have been started, though this is the first one I've seen (since the Rhapsody days, anyway) that has code available.

7 of 27 comments (clear)

  1. Excellent by medcalf · · Score: 3, Insightful

    I'm excited about this, and will certainly be watching it develop. There are times when embedding Perl into ObjC would be really helpful (for example, using Perl rather than TCL as an embedded tool language), and if this project works out, it will provide a very useful tool for the MacOS X developer community.

    -jeff

    --
    -- Two men say they're Jesus. One of them must be wrong. - Dire Straits
  2. Re:What about Perl development? by pudge · · Score: 3, Informative

    I would guess because most people don't care. I use BBEdit under Mac OS X to write Perl and am perfectly happy with it. I wouldn't ever use ProjectBuilder to do Perl projects ... unless they are tied to something like this, where you're doing Perl to tie into Cocoa. Maybe I am abnormal, though.

  3. Hell yeah! (and other bridges) by RevAaron · · Score: 3, Interesting

    This isn't the first XXXObjective-C bridge to come out for OS X. There's RubyCocoa, which works pretty well. Squeak has an (more generalized) Objective-C bridge. Lua has one. I believe the PyObjC bridge has released code as well, and works under OS X, although that project seems to be a lot more quiet than the others.

    Good to see this. I emailed the author about it coming out, and had a bad feeling it would never get released. (why? dunno, just a feeling) :)

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  4. Re:What about Perl development? by RevAaron · · Score: 4, Informative

    Why would you have to have Apple "let" you use PB to write perl? Have a look a CamelBridge, the very project that this post is about, look at the Doc section of the website. You can write the perl scripts in PB, even use IB to create the GUI. The ShuX POD browser is a native, double-clickable GUI app for OS X that's written in perl.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  5. OS X as a great scripting/RAD environment by RevAaron · · Score: 4, Informative

    One of the issues that hasn't really been solved on most platforms is the want to have a double-clickable app written in one of these high-level languages. In the case of RubyCocoa and CamelBridge, that problem is solved, thanks to OS X's awesome bundling system.

    Take ShuX, the POD viewer for OS X mentioned above, for example. It's written in perl, and aside the perl system that comes with OS X, all it requires is the CamelBridge.framework. When the user decompresses the ShuX tarball, they're presented with a .app- a double-clickable, first-class Mac OS X application. To the user, it appears native in every way. They could easily copy it to other drives and folders with no problems.

    They could stuff-it up and send it to a friend- and provided they that had the CamelBridge framework, the recipient could run the app with no fuss. No screwing around with extra dependencies, installing libs, making sure the .pl file is associated with the interpreter. If there are additional libraries that app requires, but aren't generally applicable, they can just be thrown in the Resources subfolder, along with the main.pl script. This isn't quite as big of a deal in perl, because of CPAN, but it could be a huge boon for those using other scripting languages.

    AFAIK, this problem hasn't been solved anywhere near this elegantly on other platforms. Keep the user experience very consistent and pleasing, but gives the developer all the option she wants! :)

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    1. Re:OS X as a great scripting/RAD environment by bsartist · · Score: 3, Insightful

      If there are additional libraries that app requires, but aren't generally applicable, they can just be thrown in the Resources subfolder, along with the main.pl script. This isn't quite as big of a deal in perl, because of CPAN,

      I was actually thinking that was a big deal, because of CPAN. For all but a few developer's machines, it's pretty safe to assume a bone-stock Perl configuration, with no CPAN modules installed. You can package CPAN modules with your app, so that the end user doesn't have to install them.

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
  6. Re:Unicode? by larkost · · Score: 3, Informative

    While I don't have much experience using Unicode, perl does support UTF-8 cueently. For more details 'man perlunicode'. The next major version of perl will be built on UTF-16. Everything will be built so that internal representations are in UTF-16 (or at least seem to be... for speed's sake).