This post originated from an RSS feed registered with Ruby Buzz
by Eric Stewart.
Original Post: Ruby Sightings: amaroK
Feed Title: Ponderings On Ruby
Feed URL: http://blog.eric-stewart.com/category/programming-ruby.rss
Feed Description: This is the Ruby related section of Eric Stewart's weblog. These entries will be the commentary of a long time Java/C++ programmer that started exploring Ruby in 2003.
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?