Ruby Sightings: amaroK

Posted by Eric Stewart Sun, 12 Mar 2006 08:03:00 GMT

I never realized the amaroK developers had any affinity toward Ruby.

As a part time user of Linux, usually Kubuntu these days, I occasionally use amaroK for playing music to work by. As Linux music player + library applications go, it’s one of the nicest you can find with some features that you don’t find in many other players.

amaroK, like an increasing amount of modern software, supports scripting to allow users to extend the software’s capabilities. They do this by taking advantage of amaroK’s DCOP interface.

This makes it possible to write scripts in almost any programming language, like Ruby, Python or bash scripting. The recommended programming language is Ruby, which is easy to learn and very well suited for amaroK scripting. The amaroK team will be happy to assist you if you have questions regarding Ruby programming.

Not surprisingly, they even recommend Ruby as a nice way to script the application, though they support other languages.

As development goes on, in fact, they are converting compiled portions of code to scripts that can be customized or replaced. This solution came to light after requests by users to support additional sources of song lyrics and deal with the brittle way they interfaced with such sites.

Sooooo, what to do? Scripts to the rescue! What I did is, ripped the hardcoded Lyrc code out. Ported the C++ code to Ruby. Then added a couple of DCOP calls and script notifications for the communication Script <—> amaroK. Added a slice of XML, and you get your spicy new Scriptable Lyrics Feature, mmh.

There was a bit of reaction in the post referenced above to the dependency on Ruby for the newly converted portion of default functionality. If KDE had a default scripting language (similar to the OS X/Applescript relationship) I’d understand those complaints a little more. But then again, OS X installs Python and Ruby by default along with Applescript and nobody really complains.

Is a dependency on a language runtime very different from a dependency on a given library?

Update: As Cornelius Schumacher points out, other KDE projects beginning to do similar things.

<!- technorati tags start ->

Technorati Tags: , , ,

<!- technorati tags end ->

Comments

  1. Efrén said 2 days later:

    We noticed your blog is focused in Ruby On Rails and that is why we would like to invite you to register yourself and your blog at RubyCorner, a directory of Ruby related blogs:

    http://www.rubycorner.com/

    We like to think about RubyCorner as a “meeting place” for the community, also as a “focal point” where the people new to this technology can quickly tune into the pulse of the community. Registering your blog will help build a valuable resource for this growing community.

    Thanks.

  2. Eric Stewart said 16 days later:

    Done!!!!

(leave url/email »)

   Comment Markup Help Preview comment