Friday, June 30. 2006How wastefulI’m sure you’ve all heard it before - Creative is the iPod killer. Opera is the Firefox killer. Here’s a new one: the k3b killer. Seriously, who cares. Why are people so determined to kill wonderful products? They should spend more effort making crap products better (and I’m not talking about imitations), not playing down the already stunning ones. Friday, June 30. 2006
Some Sort of Rule: last.fm. Firefox ... Posted by Ian Monroe
in eean at
05:44
Comments (2) Trackbacks (0) Some Sort of Rule: last.fm. Firefox unintegration.As Seb points out, it is necessary to point out how awesome native last.fm support is. It is. One (as-yet unintegrated feature, it will probably be put in shortly after the string freeze ends) great feature of Last.fm is the custom radio station. Just enter some of your favorite artists and it puts together a stream of those artists and their related artists. Feel free to try a couple of mine, though of course its better if you pick your own artists. Leo Franchi added a .protocol file to be installed with Amarok to support the lastfm:// protocol for Konqueror, like the links in the previous paragraph. Though Makefile.am isn't ever fun, it was a straightforward task: an app installing support for new protocols is obviously an issue that KDE decided to provide a solution for. I immediately got to thinking it would be cool to add such protocol support to Firefox as well. In Windows a registry edit is all that is required. After some help from irc.mozilla.org and Google, it appears to be completely impossible for a application to install a protocol into vanilla Linux Firefox. The user has to go in and add an entry to about:config manually. One suggestion I got was to write an extension, I asked if an extension could be installed from outside Firefox - no. Obviously not useful (though perhaps something last.fm should look into). If you have a Firefox built with Gnome support (eg, not a Firefox binary downloaded from mozilla.org), you can use gconftool-2 to add the necessary settings. Gconftool-2 is hardly ideal for what should probably be an install-time operation, it doesn't appear to do settings for all users (though I could be wrong). Thursday, June 29. 2006last.fmThis is my obligatory blog saying that native last.fm support in Amarok is bloody awesome. Wednesday, June 28. 2006
Hooray, last.fm stream support in ... Posted by Mark Kretschmann
in markey at
14:08
Comments (28) Trackbacks (0) Hooray, last.fm stream support in Amarok!
I'm very happy to break this news to you, as I think it's an incredibly cool feature: Amarok now has full support for last.fm streams. This includes advanced features known from the last.fm player, like skip/love/ban, cover images and metadata. Have a look:
![]() In true Amarok fashion, we have developed this feature with intense teamwork. The planning and first code was started at our K3M multimedia meeting. Seb Ruiz did the initial port of Muesli's original last.fm player code (Qt4) to Amarok. Then Ian Monroe improved the framework and added a proxy server, which was needed to make our engines understand the lastfm:// protocol. Soon we realized that an in-process server would not work; here my previous experience with server programming and Ruby kicked in: I ported the proxy to a tiny external Ruby script, with very low overhead. Now we were able to listen to a last.fm stream with Amarok for the first time, which rocked. Soon we noticed that the server script was bit too simplistic; it would not work with the Helix engine. To the rescue came our Helix expert Paul Cifarelli, who had never before programmed in Ruby. In a matter of hours he managed to improve the script, so that it now works with all engines. Then we added support for cover images from last.fm - they are shown automatically for each track the stream is playing. And our graphics artist Vadim Petrunin made some funky icons for the skip/love/ban buttons. Sounds complicated? It was Have fun Tuesday, June 27. 2006
Defeating Wordpress Trackback Spam Posted by Max Howell
in mxcl at
16:31
Comments (0) Trackbacks (0) Defeating Wordpress Trackback SpamUntil yesterday I was getting 200 trackback spams a day. Firstly I installed Trackback Validator, which works a treat at preventing trackback spam from going directly to your blog comments listing. But you still get an email about the trackback, even though it is already classified as spam. So I was looking through my referral logs and I noticed that I get a lot of visitors searching with the suspicious string “l3av3 a r3ply pr0udly p0w3r3d by w0rdpr3ss”. I used leet-speak so that google doesn’t flag up this site anew! So I edited the wordpress code to change that string. You can find it in footer.php, and this is editable in the theme editor in wordpress admin. Hope this helps some people out there! (But not too many as then the spammers will catch on…) I still wanted to attribute the blog to Wordpress, as it’s awesome, so the string now reads:
Update [30-Jun-2006]Actually, it turns out the www-redirect plugin I coincidentally activated on the same day as the above hack, had a bug that made it impossible to submit trackbacks and comments to this blog.. Although I still expect my measures to have some affect, I doubt it’ll be that much. Too good to be true eh? Update [25-Jul-2006]I changed the address for the site from http://methylblue.com/blog/ to http://www.methylblue.com/blog/, because I use the www-redirect plugin for Wordpress attacks by trackback spammers to the old address fail, as the POST is lost. Very little new trackback spam comes my way now and I’m hoping this is because I changed the string above. Tuesday, June 27. 2006
Defeating Wordpress Trackback Spam Posted by Max Howell
in mxcl at
12:31
Comments (0) Trackbacks (0) Defeating Wordpress Trackback SpamUntil yesterday I was getting 200 trackback spams a day. Firstly I installed Trackback Validator, which works a treat at preventing trackback spam from going directly to your blog comments listing. But you still get an email about the trackback, even though it is already classified as spam. So I was looking through my referral logs and I noticed that I get a lot of visitors searching with the suspicious string “l3av3 a r3ply pr0udly p0w3r3d by w0rdpr3ss”. I used leet-speak so that google doesn’t flag up this site anew! So I edited the wordpress code to change that string. You can find it in footer.php, and this is editable in the theme editor in wordpress admin. Hope this helps some people out there! (But not too many as then the spammers will catch on…) I still wanted to attribute the blog to Wordpress, as it’s awesome, so the string now reads:
Update [30-Jun-2006]Actually, it turns out the www-redirect plugin I coincidentally activated on the same day as the above hack, had a bug that made it impossible to submit trackbacks and comments to this blog.. Although I still expect my measures to have some affect, I doubt it’ll be that much. Too good to be true eh? Update [25-Jul-2006]I changed the address for the site from http://methylblue.com/blog/ to http://www.methylblue.com/blog/, because I use the www-redirect plugin for Wordpress attacks by trackback spammers to the old address fail, as the POST is lost. Very little new trackback spam comes my way now and I’m hoping this is because I changed the string above. Monday, June 26. 2006Max'd OutOur part-time Codeine hacker part-time radio personality Max Howell has a new name for his show: "Max'd Out". The website even has a new look. Be sure to ask him about it. Sunday, June 25. 2006My Xbox 360 is alive, somehow.Did I mention, my Xbox 360 has become alive. Somewhat at least. It blogs every now and then and tells you what I did to it (him / her?!)... So in case you want to know how my gamerscore developed over the time, check out my Xbox 360's own blog. cheers, muesli Saturday, June 24. 2006SVKTo do a simple SVK commit of just a couple files changed (and not merge everything, as SVK seems designed to do) I have to run the following command: svk merge --change 5324 //amarok/ian //amarok/trunk Which of course assumes that the files you want to commit only changed in one or sequential commits. I kind of feel like SVK is two steps forward (a local revision system), two steps backward (a real pain to actually commit anything remotely). I really want a revision control system for developing the DAAP library and media device plugin, so I'll probably just deal with it. If all else, I can always just copy the files into a normal SVN checkout and commit there. Thursday, June 22. 2006the next stepI've taken something of a break from DAAP work, though not really. For the past couple of days I've been working on finishing the last.fm support that Seb started, which was mostly a backport of Qt4 code from Muesli's official Last.fm Player. With a few fixes of the existing code, I was able to get it to login and retrieve the URL of the stream. It was in-fact almost in beta1, until Mark noted that I had used a synchronous get function introduced in KDE 3.4. I really needed a synchronous function since without refactoring a lot of code it was necessary to turn the "fake" lastfm:// URLs into the real http:// MP3 stream URL within the EngineController::load function. KDE 3.3 lacks a synchronous function that doesn't put up a bunch of annoying popups. The solution was to create a proxy server: this way the proxy server URL could be returned immediately. And a proxy server would have to be created anyways since the Last.FM stream includes "SYNC" commands that let the client know to fetch new metadata. This is actually why I was working on Last.FM support: thanks to Apple's quasi-DRM, DAAP requires special headers be sent with the HTTP requests so I knew I would eventually have to create a proxy server anyways. So I created a really basic proxy server using QSocket and QServerSocket. It worked with the Helix Engine, but with the Xine Engine it would just hang all of Amarok (Alexandre looked at the Xine code, it actually has an infinite loop in it). So Mark made the server threaded. He says that this still did not work, which doesn't make sense to me (he never committed this code). Currently Mark is working making the proxy server be a separate process, as just a ruby script (less overhead then starting a QApplication). And oh yea... go Japan! On that note, this morning I was turned into a USA fan into a Ghanaian fan. sigh It would've been fun to see the USA get into the quarter finals again, but we just didn't play that well this year. So too bad USA, hooray Ghana! Wednesday, June 21. 2006The other wayMy PC has lots of problems, but I’m the kind of person that can’t be bothered to find out what or where the problem lies, simply because hardware is too difficult to dig through. I’m quite convinced that the problem is the memory, because whenever I do big compile jobs I end up with these crazy stories:
Don’t be fooled it happens regularly, so I’ve come up with a fail proof method of compiling a big application:
I’m quite proud of it. Yeah, I also can’t be bothered to run memcheck because it infuriates me that I have no idea how long there is left of the test. Thursday, June 15. 2006SimpleDaapClient finished
SimpleDaapClient is a Ruby script that connects to a non-Apple DAAP server (though old iTunes probably works), gets a listing and produces an XSPF playlist of the hosts entire database. The XSPF file contains much of the metadata so that Amarok can display it all. It turned out that Amarok didn't support XSPF files that specified their location. The alternative - to look up the song based on album and artist - was the only thing supported. So I had some fun debugging both the Ruby script that made the XSPF file and the decoder in Amarok at the same time.
I just put what I think are probably the finishing touches to SimpleDaapClient. Yesterday, Mark pointed out that if the recursive solution was too big for the stack, why not just make the stack bigger. Which I did, so I haven't made an iterative solution like I said I would last time. It is just a prototype after all. Though... I probably should find an iterative solution for Amarok itself. There's something satisfying about writing a Ruby script that uses 3x the memory of kdevelop. To use SimpleDaapClient.rb, first download it, make it executable, and find & replace "localhost" with the DAAP server of your choice. Then bump your stack size and run: ian@wasabi ~/soc/DAAP/trunk $ su wasabi trunk # ulimit -s 65536 wasabi trunk # su ian ian@wasabi ~/soc/DAAP/trunk $ ./SimpleDaapClient.rb This will create a /tmp/daap.xspf. So, just do something like `amarok /tmp/daap.xspf`. You need Amarok from revision 551863 (the newest at the time of this blog). And now... back to coding in C++ full time probably. I'll miss you Ruby! Thursday, June 15. 2006HypocritesJust started to read an article about the annoyances of websites over at some crappy news site. I’ve taken a second to apply their rules to their own website.
A classic example of “do as I say, not as I do”… Wednesday, June 14. 2006DAAP with LISPy Ruby Code; Interproject Mingling
Now that I'm settled back in beautiful Kirksville, I've started working full steam on my Google Summer of Code project, which is to add iTunes music sharing to Amarok (also known as "DAAP support"). Currently the only maintained DAAP library is part of the Banshee project, so its in C#. Libopendaap and kio_daap (which has a fork/branch of libopendaap) hasn't been touched in a year and doesn't work for me, I think due to 64-bit issues (which I tried to diagnose, but it was entirely mysterious to me). Rhythmbox has its own implementation of DAAP, written as a SOC project last year and uses glib, so it quickly scared me a way.
So at the risk of being accused of "not written here", I've decided to write my own DAAP implementation, at least for the client-side (I'm still holding out hope for mt-daapd integration). I could make it a separate library for use by other KDE applications (Juk?); I will at least not couple it with Amarok to leave that option open (though I might go ahead and use metabundle...). To become familiar with the protocol, I've written a Ruby script (it doesn't do anything yet, but its on SVN). I think it will be possible to actually turn it into an Amarok script to provide bare-bones basic DAAP client support - basically the user would type in the IP address and all the tracks would be loaded into the playlist. Currently it gets a 'stack level too deep' error when trying to get a database listing, which I blame on learning LISP last semester. It uses the same sort of recursive algorithm we used in class all the time. It shouldn't be too difficult to rewrite it iteratively. One "interesting" feature of the iTunes implementation of DAAP is that it requires an almost DRM-like messed up MD5 hash, meant to reduce interoperability of iTunes with others. Luckily David Hammerton of libopendaap has already figured it out. If you have a spare minute you might check out that code, its pretty hilarious. I've never liked Apple, now I have a reason not to. (This means my Ruby prototype won't ever work with iTunes). A thanks also goes to James Willcox (snorp) of the Banshee project for pointing this out and providing other useful pointers. I consider Banshee to be Amarok's most significant competitor in the open source world, but I think we all recognize that our real competition isn't open source. On a similar note, I contacted Cole, a fellow SOCer who is implementing DAAP for XMMS2. He also determined that none of the current DAAP implementations are satisfactory and is implementing his own library as well. Though our conflicting library requirements mean we can't directly colloborate, I think we will be comparing notes as the summer continues. Wednesday, June 14. 2006Blogging with flockI’ve just downloaded flock and am trying to blog from within it. I’ll start with the good parts. Flock advertises itself as the social web browser, a concept which I really like. I have (seemingly) successfully setup my wordpress blog for use with integrated blogging. Just to test, it also works with my Flickr account, but I don’t use it. It doesn’t support photo uploads to my personal gallery just yet, which I would have really liked. Soon enough hopefully. This is actually the second time that I am writing this post because flock seemingly mangled the contents. Take 2! One feature which I really like is the snippets functionality, which lets you drag arbitrary content onto a toolbar for later use, such as blogging, uploading or just remembering. I really like the concept of the browser, but I haven’t used it for much more than 5 minutes, and would like to play around before deciding whether to keep it or not. |
Amarok LinksCalendarQuicksearchCategoriesSyndicate This BlogBlog Administration |

