<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>insomnia bytes &#187; development</title>
	<atom:link href="http://bytes.inso.cc/wp/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://bytes.inso.cc/wp</link>
	<description>Imagination is a nightbird's dream</description>
	<lastBuildDate>Sat, 07 Nov 2009 17:13:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>dot-emacs: smarter indentation with tabs and spaces</title>
		<link>http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indentation-with-tabs-and-spaces/</link>
		<comments>http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indentation-with-tabs-and-spaces/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 10:50:07 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[elisp]]></category>
		<category><![CDATA[indentation]]></category>

		<guid isPermaLink="false">http://bytes.inso.cc/wp/?p=836</guid>
		<description><![CDATA[In XMMS2, the coding guidelines require you to use a mix of tabs and spaces to indent code: tabs indent blocks, while spaces are used to align multi-line statements. It&#8217;s all very natural really:

[tab][tab][tab]foo_function (arg1,
[tab][tab][tab]              arg2,
[tab][tab][tab]       [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://xmms2.sf.net/">XMMS2</a>, the <a href="http://wiki.xmms2.xmms.se/wiki/XMMS2_Coding_Style#Indentation">coding guidelines</a> require you to use a mix of tabs and spaces to indent code: <em>tabs</em> indent blocks, while <em>spaces</em> are used to align multi-line statements. It&#8217;s all very natural really:</p>
<p><code>
<pre>[tab][tab][tab]foo_function (arg1,
[tab][tab][tab]              arg2,
[tab][tab][tab]              arg3)</pre>
<p></code></p>
<p>Unfortunately, if you use the default C indentation mode in emacs, what you get (when breaking like with <kbd>C-j</kbd> or RET TAB) is the following:</p>
<p><code>
<pre>[tab][tab][tab]foo_function (arg1,
[tab][tab][tab][tab][tab]    arg2,
[tab][tab][tab][tab][tab]    arg3)</pre>
<p></code></p>
<p>So you mean to tweak the code yourself to fix the tabs. Tedious, annoying. We know better!</p>
<p>I wrote a hook to fix this. The idea is to fix tabs when we&#8217;re in an argument list context. It can probably be further improved (please send patches!), but it&#8217;s quite useful already.</p>
<p>Just add the following to your .emacs file.</p>
<p>[code lang="lisp"]<br />
(defun xmms2-c-mode ()<br />
  "C mode with adjusted defaults for use with the xmms2."<br />
  (interactive)<br />
  (c-mode)<br />
  (c-set-style "K&#038;R")<br />
  (setq tab-width 4)<br />
  (setq indent-tabs-mode t)<br />
  (setq c-basic-offset 4)</p>
<p>  ; Align closing paren with opening paren<br />
  (c-set-offset 'arglist-close 'c-lineup-arglist-intro-after-paren)</p>
<p>  (add-hook 'c-special-indent-hook 'smart-tab-indent-hook))</p>
<p>(defun get-nonempty-context ()<br />
  (let ((curr-context (car (c-guess-basic-syntax))))<br />
    (if (or (eq (car curr-context) 'arglist-intro)<br />
            (eq (car curr-context) 'arglist-cont)<br />
            (eq (car curr-context) 'arglist-cont-nonempty)<br />
            (eq (car curr-context) 'arglist-close))<br />
        curr-context<br />
      nil)))</p>
<p>(defun smart-tab-indent-hook ()<br />
  "Fixes indentation to pad with spaces in arglists."<br />
  (let ((nonempty-ctx (get-nonempty-context)))<br />
    (if nonempty-ctx<br />
        (let ((tabbed-columns (+ (point-at-bol)<br />
                                 (/ (c-langelem-col nonempty-ctx t)<br />
                                    tab-width)))<br />
              (orig-column (current-column)))<br />
          (tabify (point-at-bol) tabbed-columns)<br />
          (untabify tabbed-columns (point-at-eol))<br />
          ; editing tabs screws the pointer position<br />
          (move-to-column orig-column)))))<br />
[/code]</p>
<p>Note: don&#8217;t forget the <code>c-set-offset</code> bit, else it won&#8217;t work properly for the last argument before the closing parenthesis. And avoid using <code>c-indent-new-comment-line</code> to break lines, it can fail with this hook; use <code>c-context-line-break</code> instead, it&#8217;s smarter anyway!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2009/01/07/dot-emacs-smarter-indentation-with-tabs-and-spaces/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git Tips #1: Get there now</title>
		<link>http://bytes.inso.cc/wp/2008/12/04/git-tips-1-get-there-now/</link>
		<comments>http://bytes.inso.cc/wp/2008/12/04/git-tips-1-get-there-now/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 16:45:25 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://bytes.inso.cc/wp/?p=801</guid>
		<description><![CDATA[Sometimes you&#8217;ve played around in the history of a branch, edited some stuff in older commits, perhaps reordered them. You&#8217;ve reset&#8217;d back a few commits, and now you want to get to the final state you were at initially (or whatever state you want to get to).
Say you&#8217;ve kept a branch called &#8216;the-end-state&#8216; with the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you&#8217;ve played around in the history of a branch, edited some stuff in older commits, perhaps reordered them. You&#8217;ve reset&#8217;d back a few commits, and now you want to get to the final state you were at initially (or whatever state you want to get to).</p>
<p>Say you&#8217;ve kept a branch called &#8216;<code>the-end-state</code>&#8216; with the working end state you wanted to get back to before you started messing around with the history. You don&#8217;t want to <code>merge</code> (merging two alternative histories of the same development wouldn&#8217;t make any sense), you don&#8217;t want to <code>rebase</code> (it&#8217;s about building a new history, not forwarding it on top of the old one). You just want a new commit to bring you to &#8216;<code>the-end-state</code>&#8216;.</p>
<p>And you want to <strong>get there <em>now</em></strong>!</p>
<p>The intuitive way to do this is the following:</p>
<p><code class="snippet commands">$ git diff ..the-end-state &gt; finish.patch<br />
$ patch -p1 &lt; finish.patch<br />
$ git commit -a -s</code></p>
<p>But why three steps when you can do with just two, using <code>git read-tree</code> to import the tree from <code>the-end-state</code> branch into your index (<code>-m</code> to check for unmerged entries) and populate your work tree (<code>-u</code>):</p>
<p><code class="snippet commands">$ git read-tree -m -u the-end-state<br />
$ git commit -a -s</code></p>
<p>Thanks Junio for the <a href="http://article.gmane.org/gmane.comp.version-control.git/102315">tip on gitml</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2008/12/04/git-tips-1-get-there-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMMS2 GSoC 2008 wrap-up</title>
		<link>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/</link>
		<comments>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 13:37:55 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[genipc]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[nycli]]></category>
		<category><![CDATA[s4]]></category>
		<category><![CDATA[service.clients]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/?p=587</guid>
		<description><![CDATA[I&#8217;m still waiting for nesciens&#8217; conclusion notes about his very successful project, Collections 2.0, but he&#8217;s been busy with his starting university so it will take a few more days.
In the meantime, I wanted to write a wrap-up post about this year&#8217;s mildly successful Google Summer of Code with XMMS2.  Out of 6 projects, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still waiting for nesciens&#8217; conclusion notes about his very successful project, Collections 2.0, but he&#8217;s been busy with his starting university so it will take a few more days.</p>
<p>In the meantime, I wanted to write a wrap-up post about this year&#8217;s mildly successful <a href="http://code.google.com/soc/">Google Summer of Code</a> with <a href="http://xmms2.sf.net/">XMMS2</a>.  Out of 6 projects, we&#8217;ve had 3 successful projects and 3 failed ones.  That&#8217;s a pretty high and disappointing failure rate to be honest.  You always have to be prepared to face unplanned obstacles, but it got a bit out of hand this time.</p>
<p>It is especially frustrating as the projects were all pretty sexy or important, or both.</p>
<p>The long-awaited <strong>Generic IPC</strong> project seems to be one of those cursed projects that nobody manages to get done.  We ran that project last year but it was not finished in time, so Leonid Evdokimov (darkk) took over this year, but he wasn&#8217;t able to complete it either.</p>
<p>We had been lucky to get an extra slot to run the <a href="http://wiki.xmms2.xmms.se/wiki/New_medialib_backend"><strong>S4</strong></a> project, an experimental new backend for the medialib optimized (in structure, space and performance) for the specific semantics of our data (basically, short property strings attached to objects). Unfortunately, Tobias Bengtsson (ydo) got more busy than expected with his master thesis and a major hardware failure put an end to his hopes of completing S4.</p>
<p>The last failing project was probably the most original/experimental: <strong>cloudstream</strong>, or a smart blend of xmms2 local music playing and <a href="http://www.last.fm/">last.fm</a>&#8217;s social &amp; semantic information, allowing to play &#8220;local radios&#8221; of your tracks using a sexy graphical cloud interface.  We were especially excited as it had come as a spontaneous suggestion by the student, Arpith Siromoney.  Sadly, only <a href="http://git.xmms.se/?p=cloudstream.git;a=tree">little code</a> was produced; we hope that the idea will live on and end up being implemented in one way or the other!</p>
<p>On the brighter side of things, the three other projects were a great success and we hope to include them in the -devel tree and the main release ASAP.</p>
<p>Daniel Chokola (puzzles) worked on getting Ning Shi (zeegeek)&#8217;s <strong>Service clients</strong> (which I mentored for GSoC &#8216;07) ready for merge.  He reworked the concept a bit (operations involved, atomicity of registration, etc), gave the API a refresh and rebased the tree onto the latest -devel releases.  From early on, it had also become clear that it would all be nicer with the <a href="http://bugs.xmms2.xmms.se/view.php?id=1835">result/value-split</a> refactoring that had been discussed for some time.  Nobody had time to hack it up so I did, and I worked closely with puzzles to update service clients to use the new code and giving him a hand cleaning up the server-side and IPC layer.  It&#8217;s now a good showcase of the cool new <code>xmmsv_t</code> API!</p>
<p>The first project I mentored was <a href="http://wiki.xmms2.xmms.se/wiki/New_korving_CLI"><strong>nycli</strong></a>, also referred to as &#8220;the new korving CLI&#8221;, a new CLI client for XMMS2 in C that I had started to take over from my previous C++ client, <a href="http://nyello.inso.cc/">nyello</a>.  I had run out of time to work on nycli but Igor Ribeiro de Assis (greafine) did a great job taking over the code, improving it and completing all the missing features and adding some of his own: commands to interact with the playlist, collections and server actions, support for subcommands, file path globbing, interactive status command, and the super cool <em>aliases</em>!</p>
<p>The second student I mentored, Erik Massop (nesciens), hacked heaps of new features into <a href="http://wiki.xmms2.xmms.se/wiki/Collections_Concept">Collections</a> (my GSoC &#8216;06 project): <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0/Operator_list">new operators</a> (incl. Order, Limit, generic comparison, Token, etc.), server-side source preferences, support for medialists (ordered collections), new query mechanisms allowing aggregates, functions on values and more complex results, conversion of all values to strings, optimized prefix matching, etc.  Here come <a href="http://wiki.xmms2.xmms.se/wiki/Summer_of_Code_2008/Collections_2.0"><strong>Collections 2.0</strong></a>!</p>
<p>As an organization, we acknowledge our failure at choosing students able to complete their projects in full and in time.  We had a much better success ratio in the previous editions, so I guess this year is a combination of bad luck and small defects on the part of mentors and students.</p>
<p>Next year, I&#8217;d like us to improve communication between mentor and student, and also between the GSoC participants and the XMMS2 community.  Status updates on the planet, clearer project descriptions, better linking throughout the wiki, etc.  I&#8217;d also like to focus on working on a stricter list of objectives, roadmap and deadlines with the student, to help us keep track of progress more formally.  I think we already had a pretty good selection process, but that might be improved too.</p>
<p>Nevertheless, I&#8217;m very happy with the students I mentored (nesciens, greafine, and puzzles unofficially): they all showed dedication and genuine interest in their projects, they were very open to criticism but also ready to provide arguments and new ideas to make solutions more elegant.</p>
<p>I look forward to seeing the GSoC code merged in official releases; it has sometimes taken longer than we would have liked in the past, but nycli and service clients should make it to your Git tree in the near future.  Collections 2.0 still need review and tests, but the possibilities are already quite exciting!</p>
<p>Congratulations to all the successful students, thanks to Google for sponsoring this program, and let&#8217;s make it even more successful next year!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2008/09/19/xmms2-gsoc-2008-wrap-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get the Git slides</title>
		<link>http://bytes.inso.cc/wp/2008/04/10/get-the-git-slides/</link>
		<comments>http://bytes.inso.cc/wp/2008/04/10/get-the-git-slides/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 18:07:51 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[barcamp]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gull]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/?p=496</guid>
		<description><![CDATA[Git is the coolest content versioning system since the birth of bits, and I gave two talks/courses recently: the first at the BarCamp in Lausanne (edition 2), and the second for the local LUG, AKA the GULL.
I&#8217;ve uploaded the PDF of the slides in English and in French, and in case anyone is interested in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://git.or.cz/">Git</a> is the coolest content versioning system since the birth of bits, and I gave two talks/courses recently: the first at the <a href="http://barcamp.ch/BarCampLausanne2">BarCamp in Lausanne (edition 2)</a>, and the second for the local <acronym title="Linux User Group">LUG</acronym>, AKA the <a href="http://www.linux-gull.ch/">GULL</a>.</p>
<p>I&#8217;ve uploaded the PDF of the slides <a href="http://inso.cc/wp/wp-content/uploads/2008/04/git-presentation-barcamp.pdf">in English</a> and <a href="http://inso.cc/wp/wp-content/uploads/2008/04/git-presentation-gull-fr.pdf">in French</a>, and in case anyone is interested in reusing them, the sources are available (warning: evil Keynote format; I was in a rush, won&#8217;t happen again) under the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-Share Alike 2.5 License</a>: sources <a href="http://inso.cc/wp/wp-content/uploads/2008/04/git-presentation-barcamp.zip">in English</a>, and <a href="http://inso.cc/wp/wp-content/uploads/2008/04/git-presentation-gull-fr.zip">in French</a>.</p>
<p><img class="illu2 wp-image-502" title="Git logo" src="http://inso.cc/wp/wp-content/uploads/2008/04/git-logo.png" alt="Git logo" />And to follow up to the topic of Git, go and read <a href="http://tomayko.com/writings/the-thing-about-git">this interesting article about using the Index to do partial commits</a> and <a href="http://blog.madism.org/index.php/2007/09/09/138-git-awsome-ness-git-rebase-interactive">this short note about using git-rebase &#8211;interactive to rewrite history</a> (not History, yet).</p>
<p>PS: I&#8217;m quite sure I&#8217;m scaring the shit out of my non-tech geek readers, sorry. Stay around though, I will try to split this blog in two (life stuff, bytes stuff) in the future, and I have a few entries about Japan cooking up&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2008/04/10/get-the-git-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regarding those slow XMMS2 queries&#8230;</title>
		<link>http://bytes.inso.cc/wp/2008/04/06/regarding-those-slow-xmms2-queries/</link>
		<comments>http://bytes.inso.cc/wp/2008/04/06/regarding-those-slow-xmms2-queries/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 14:34:25 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/2008/04/06/regarding-those-slow-xmms2-queries/</guid>
		<description><![CDATA[The screaming groupies disturb my concentration, so I will reluctantly take a few minutes to silence the general hysteria. The secret is no more: we have über-optimized queries in XMMS2!
All thanks go to nesciens, who dived in the optimization documentation of SQLite to fix some stupid bottlenecks of my query generator.  The two most [...]]]></description>
			<content:encoded><![CDATA[<p>The screaming groupies disturb my concentration, so I will reluctantly take a few minutes to silence the general hysteria. The secret is no more: we have über-optimized queries in XMMS2!</p>
<p>All thanks go to nesciens, who dived in the optimization documentation of SQLite to fix some stupid bottlenecks of my query generator.  The two most important elements are the use of <code>COLLATION NOCASE</code> for case-insensitive comparison (instead of using <code>LOWER(value)</code>, which disabled indexing), and the creation of better indices on the Media table (including collated indices).</p>
<p>Let&#8217;s get some numbers out!</p>
<p>Quick note: in addition to a pair of [key, value] indices (one with BINARY collation and one with NOCASE), he added a pair of [id, key, value] indices. I couldn&#8217;t highlight any effect on performance of the latter two, but I left them in for those tests. (Hint: more tests and insight are welcome!)</p>
<p>I ran a series of benchmarks with different search patterns.  The execution time has been averaged over 100 executions ran with the command <code>time for i in $(seq 100); do $CMD &gt; /dev/null; done</code>. I compared the performance of execution in two versions of XMMS2:</p>
<ul>
<li><strong>default</strong> DrKosmos (git hash: f171d33ca13e1715d3b167e8fa958a724eb032ce)</li>
<li><strong>optimized</strong> DrKosmos (git hash: 94661d22a7437b48c9cb5d4b1cd6483350d0a9a4, nesciens-sqloptims in my tree)</li>
</ul>
<p>The queries used were the following (all matched songs):<br />
<code><br />
Q1) artist:Air album:"Moon Safari"<br />
Q2) artist:AIR<br />
Q3) artist:Air album:"Moon*"<br />
Q4) artist~Air<br />
</code><br />
In the first set of tests, I used xmms2 as a black-box and ran queries from the CLI.  The <em>real</em> execution time was extracted.  The data is presented in the following table and graph.</p>
<table border="0">
<thead>
<tr>
<td>Query</td>
<td>Standard</td>
<td>Optimized</td>
</tr>
</thead>
<tbody>
<tr>
<td>Q1</td>
<td>368.25</td>
<td>68.46</td>
</tr>
<tr>
<td>Q2</td>
<td>396.11</td>
<td>158.97</td>
</tr>
<tr>
<td>Q3</td>
<td>331.23</td>
<td>77.23</td>
</tr>
<tr>
<td>Q4</td>
<td>961.69</td>
<td>869.53</td>
</tr>
</tbody>
</table>
<p><img src="http://inso.cc/wp/wp-content/uploads/2008/04/cli_search_execution_time.png" alt="CLI search execution time" /><br />
The <em>optimized</em> version is clearly faster than the <em>default</em> version, except for the partial matching query (Q4) which is expensive in both cases.</p>
<p>In the second set of tests, I ran the same queries directly in the SQLite database to measure the pure query time.  The <em>user</em> execution time was extracted in that case. Here comes the data in a table and graph.</p>
<table border="0">
<thead>
<tr>
<td>Query</td>
<td>Standard</td>
<td>Optimized</td>
</tr>
</thead>
<tbody>
<tr>
<td>Q1</td>
<td>168.89</td>
<td>8.52</td>
</tr>
<tr>
<td>Q2</td>
<td>168.02</td>
<td>7.16</td>
</tr>
<tr>
<td>Q3</td>
<td>164.53</td>
<td>7.43</td>
</tr>
<tr>
<td>Q4</td>
<td>203.00</td>
<td>140.97</td>
</tr>
</tbody>
</table>
<p><img src="http://inso.cc/wp/wp-content/uploads/2008/04/sqlite_query_execution_time.png" alt="SQLite queries execution time" /><br />
The difference is even more visible here, although I cannot explain why. The benefit of using indices (in Q1-Q3) is unquestionable.</p>
<p>I also benchmarked the performance of running <code>xmms2 info 1</code> (read all properties from the DB) with both versions, and the execution time was similar.</p>
<p>In short, these performance improvements should make it possible to activate find-as-you-type in clients, or at least very responsive searches.</p>
<p>Another optimization I would like to implement is searching for a given value in multiple properties (e.g. &#8220;artist:Air OR title:Air&#8221;). Currently, this is done with expensive JOINs, but it doesn&#8217;t have to.  I just have to decide in which abstraction layer to improve search in multiple fields (query generator, collections API, etc).</p>
<p>It looks like <a href="http://wiki.xmms2.xmms.se/index.php/New_medialib_backend">S4</a> is not as desperately needed as we first though, although it might still make a very interesting <a href="http://wiki.xmms2.xmms.se/index.php/Summer_of_Code_2008/Proposed_projects">GSoC 2008 project</a> (did you apply yet?)!</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2008/04/06/regarding-those-slow-xmms2-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MP3Tunes contest: XMMS2 support?</title>
		<link>http://bytes.inso.cc/wp/2007/09/21/mp3tunes-contest-xmms2-support/</link>
		<comments>http://bytes.inso.cc/wp/2007/09/21/mp3tunes-contest-xmms2-support/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 05:27:58 +0000</pubDate>
		<dc:creator>theefer</dc:creator>
				<category><![CDATA[xmms2]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mp3tunes]]></category>
		<category><![CDATA[music.player]]></category>

		<guid isPermaLink="false">http://inso.cc/wp/2007/09/21/mp3tunes-contest-xmms2-support/</guid>
		<description><![CDATA[MP3Tunes may or may not be an Evil (as in Axis of ~) service, but it just announced a developer contest to encourage people to implement its API and create new interfaces (on the desktop, mobile phone, TV, toilet seat, whatever).
The contest page on the official website isn&#8217;t quite as verbose as one would have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mp3tunes.com/">MP3Tunes</a> may or may not be an Evil (as in <em>Axis of ~</em>) service, but it just announced a developer contest to encourage people to implement its API and create new interfaces (on the desktop, mobile phone, TV, toilet seat, whatever).</p>
<p>The <a href="http://www.mp3tunes.com/cb/contest">contest page on the official website</a> isn&#8217;t quite as verbose as one would have hoped, though, and the link to the rules points to a missing webpage. Some more intel is however available in a <a href="http://www.michaelrobertson.com/archive.php?minute_id=244">blog post on Michael Robertson&#8217;s blog</a>. Yes, Michael MP3.Com/Linspire Robertson, who is also Michael MP3Tunes Robertson, obviously.</p>
<p>The deal: you have until November 5th, 2007, to submit an interface to MP3Tunes in one of the ten predefined categories (Desktop Player, Game Console, WebUI, PDA, etc). The winner in each category will receive a cosy $1000. I haven&#8217;t determined whether it&#8217;s a public vote, a closed jury, or some other semi-random algorithm involving <a href="http://www.neilgaiman.com/journal/uploaded_images/IMG_0434-747430.JPG">car-driving girafes</a>.</p>
<p>I haven&#8217;t yet checked what the <a href="http://www.mp3tunes.com/api/">API</a> offers, either, but I sure wonder whether we could hack something together with <a href="http://xmms2.sf.net/">XMMS2</a>. If it could be hooked into the daemon, and apart from the obvious ever satisfying benefit of being neat and fun, it might allow using any of our interfaces (AKA <a href="http://wiki.xmms2.xmms.se/index.php/XMMS2_Clients">clients</a>) to play music from MP3Tunes.</p>
<p>From what I see, MP3Tunes isn&#8217;t much more than an online storage for music files, that you either upload or retrieve from wherever on the web. (Let&#8217;s leave the obvious legal issues to Michael&#8217;s lawyers, shall we?) This means that you have a whole medialib on their server, apparently indexed and searchable and, naturally, playable. If I&#8217;m not mistaken, the &#8220;streaming&#8221; seems to be nothing more than retrieving the music file (original or transcoded to mp3) over HTTP, which XMMS2 already supports.</p>
<p>In the current scheme, our medialib assumes to contain all the media and their metadata, so unless this is extended to support distributed media libraries (hello, Summer of Code 2008?), it means we would have to sync the remote MP3Tunes medialib to the local XMMS2 medialib. Sounds a bit tedious and expensive and ugly, so suggestions are welcome with better solutions!</p>
<p>These are the few implementation considerations I can think of off the top of my head, but overall it doesn&#8217;t sound so complicated, unless we want the support to be very smart (async, allow upload/download media, etc).</p>
<p>Of course, the whole contest looks like a call for devs to code cool interfaces to a money-making online service (mostly) for free, more than anything else, but let&#8217;s just consider the idea for a minute and whether it could justify spending some energy on writing one or several polished clients (which I think most of us agree we need).</p>
<p>And transparently sharing music through a (currently) free, password protected, remote service can&#8217;t be such a useless idea, can it?</p>
]]></content:encoded>
			<wfw:commentRss>http://bytes.inso.cc/wp/2007/09/21/mp3tunes-contest-xmms2-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
