<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Blog of Anders Rune Jensen &#187; Uncategorized</title>
	<atom:link href="http://people.iola.dk/arj/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://people.iola.dk/arj</link>
	<description>metalinguistic musings and other related ramblings</description>
	<lastBuildDate>Sun, 13 Jun 2010 18:00:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/dk/</creativeCommons:license>		<item>
		<title>Concurrency the other way around</title>
		<link>http://people.iola.dk/arj/2010/06/13/concurrency-the-other-way-around/</link>
		<comments>http://people.iola.dk/arj/2010/06/13/concurrency-the-other-way-around/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 18:00:06 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=457</guid>
		<description><![CDATA[<p>Clojure is built around concurrency and it clearly shows in the abstractions the language makes available. I would say that concurrency is pervasive in the language. The good thing about that it that it&#8217;s a bit harder to shoot yourself in the foot when doing programming with multiple threads. But the bad side is that it adds quite a bit of mental overhead in situations where concurrency is undesirable.</p>
<p>As an example in <a href="http://code.google.com/p/mucomp/">mucomp</a>, there is a certain part of the code that deals with the audio player. This is inherently a resource that should only be handled by one thread at a time. Clojure comes with a very good abstraction for exactly this problem, <a href="http://clojure.org/agents">agents</a>. An agent is simply some state, that is manipulated by only thread. Using an agent is done by through sending a function to the agent that will take the old state and return a new state. So with that one gets everything that is needed to write an audio player: serialized access and safely mutable state.</p>
<p>The only bad thing about agents is that if one forgets to return something from a function that run on the agent, then the new state of the agent will be nil. After being bit by this two times I decided that enough was enough. One of the very nice things about languages in the lisp family, is that one can mold your own abstractions to make code better (easier to read and with less bugs in this case).</p>
<p>The following macro creates a new way to define functions. Functions defined in this way will check for nil on return, and return the old state instead. The only change that is needed in code is to use defa instead of defn <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><script src="http://gist.github.com/436844.js?file=gistfile1.clj"></script></p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/06/13/concurrency-the-other-way-around/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Do we really need record labels?</title>
		<link>http://people.iola.dk/arj/2010/06/08/do-we-really-need-record-labels/</link>
		<comments>http://people.iola.dk/arj/2010/06/08/do-we-really-need-record-labels/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 20:00:12 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=453</guid>
		<description><![CDATA[<p>I was very sad to hear that one of the better bands in metal, <a href="http://www.theprojecthate.net/">The Project Hate MCMXCIX</a>, <a href="http://www.theprojecthate.net/news/parting-ways-with-vic-records">parted way</a> with their record label, Vic Records, after only one record because they didn&#8217;t have the money to record their latest album. I guess it&#8217;s not easy to have a band on your roster who doesn&#8217;t tour.</p>
<p>The new album is written and just needs the funding to get recording. One great thing about Lord K, the main man behind the band, is that he cares a lot about the sound quality.  The music sounds so much better in flac than in mp3 and proper speakers / headphones of course helps a lot <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  *hint* Slayer and Metallica.</p>
<p>The band has been searching for a new record label, but has decided to try a <a href="http://www.globaldomination.se/forums/viewtopic.php?t=8275">donation experiment</a> to see if they can get the money needed to do the recording through generous metal heads instead of a record label. I suggested that he tried <a href="http://www.kickstarter.com/">kickstarter</a>, but I guess he just wanted a low-tech email solution.</p>
<p>It is going to be extremely exciting how this works out. The internet and p2p networks has to a large degree in the mainstream media been associated with destroying the music industry. This is our chance to show that it can also be used to create music.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/06/08/do-we-really-need-record-labels/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microfunding</title>
		<link>http://people.iola.dk/arj/2010/05/26/microfunding/</link>
		<comments>http://people.iola.dk/arj/2010/05/26/microfunding/#comments</comments>
		<pubDate>Wed, 26 May 2010 21:04:55 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[funding]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[micropayment]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=449</guid>
		<description><![CDATA[<p>I&#8217;ve recently joined <a href="http://www.flattr.com">flattr</a> (that&#8217;s the icon on the right you can see <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ), and just last week I read about some students from NYU who got almost 200.000$ in funding through <a href="http://www.kickstarter.com/">kickstarter</a> to write an open source facebook clone. Something is definitely buzzing in the micropayment world.</p>
<p>When you look at kickstarter and flattr, they are attacking the same problem, funding, at different angles. Kickstarter tries to get all the funding up front, while flattr is more of a tip jar model for something already produced. So in a way, they are complementary. I would argue that they both work best if the content is placed into the public <a href="http://creativecommons.org">one way</a> or <a href="http://www.opensource.org">another</a>. And that is where I think there is a huge potential.</p>
<p>Something like flattr creates an alternative to paywalls and an alternative to ads. And that is something I would very much like to see.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/05/26/microfunding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google search is not a programmers best friend</title>
		<link>http://people.iola.dk/arj/2010/05/23/google-search-is-not-a-programmers-best-friend/</link>
		<comments>http://people.iola.dk/arj/2010/05/23/google-search-is-not-a-programmers-best-friend/#comments</comments>
		<pubDate>Sun, 23 May 2010 15:49:27 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=445</guid>
		<description><![CDATA[<p>I was playing around with google this weekend. The original problem I wanted to solve was that last.fm returns strange strange release dates for albums, so I was writing a small script that would extract the correct release date from various sources. I was aiming at www.metal-archives.com and wikipedia. Both of these sites have different search pages, and in general I&#8217;ve come to rely more on google&#8217;s site:xxx functionaly, than on individual pages own search engines. So I thought, why not just use google programmatically to search the sites. Seems easy enough.</p>
<p><strong>Failure 1 (I&#8217;m feeling lucky):</strong></p>
<p>Google has a very nice feature called &#8220;I&#8217;m feeling lucky&#8221; that will direct you to the first result. If I could specify my queries good enough, I could rely on that, and not have to parse google to get the url. It&#8217;s very simple, you just add &amp;btnI at the end of your query and google will redirect. Sadly it works fine most of the time, but sometimes it just fails to redirect you. I couldn&#8217;t find any patterns to this randomness and a &#8220;works sometimes solution&#8221; is not a good one <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
<p><strong>Failure 2 (google ajax):</strong></p>
<p>I then found out that google has a seemingly very nice api that lets you do queries and get JSON back. JSON is easy to work with and it also allows one to go through several results, in case google doesn&#8217;t return the right one as the first result. After a bit poking around I found out that google ajax randomly returns different results from the normal google. It&#8217;s like using Yahoo instead of google. A bit of poking around returns the <a href="http://code.google.com/p/google-ajax-apis/issues/detail?id=43">following</a> 2 year old bug report. Furthermore the TOS directly forbids using the API for this kind of activity. Oh well, it didn&#8217;t work anyway.</p>
<p><strong>Failure 3 (parsing google results directly):</strong></p>
<p>After two bitter defeats I thought screw it, I&#8217;ll just parse the damn google result pages, how hard can it be? At least I know that it gives me the right results. So I did that, coded everything up and checked that things was working. Then let it loose on my collection (2&#215;275 requests) and around the middle it stopped working. I poked a bit around, and found out that google has identified my program as a bad boy and decided to spank it by returning a &#8220;Please identify yourself as a human&#8221; page back instead of the normal google result page.</p>
<p>As a side note, after 3 bitter defeats I was ready to jump ship and try bing or Yahoo. That was a quick detour though, as none of them where up for the challenge of returning good results.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/05/23/google-search-is-not-a-programmers-best-friend/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Channel downmixing in MPlayer</title>
		<link>http://people.iola.dk/arj/2010/02/27/channel-downmixing-in-mplayer/</link>
		<comments>http://people.iola.dk/arj/2010/02/27/channel-downmixing-in-mplayer/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 21:49:58 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[downmixing]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[stereo]]></category>
		<category><![CDATA[surround]]></category>
		<category><![CDATA[vlc]]></category>
		<category><![CDATA[volume]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=439</guid>
		<description><![CDATA[<p><img class="alignright" style="border: 10px solid black;" title="Speakers" src="http://farm1.static.flickr.com/174/390135126_02a2567eb2.jpg" alt="" width="300" height="201" />Recently I have been playing with downmixing in MPlayer.  When I bought new speakers, I decided to go with stereo instead of surround since I mostly listen to music. As anyone using mplayer or any &#8220;derived&#8221; players such as vlc have discovered, there is a incredible annoying problem that the voices of the actors are very low, actually in general the sound is very low. It appears that when mixing to two speakers, the center channels is put very low in the mix. The same could be said about the subwoofer although it&#8217;s naturally not as easily recognized.</p>
<p>A quick google revealed that MPlayer has several tricks (audio filters) that might potentially work: volume, volnorm, pan, hrtf. I quickly discarded volume and volnorm since I don&#8217;t want to just boost the sound, I want it to distribute the channels properly. hrtf seemed like a good simple choice, since pan looked very complex. Sadly in the middle of Harry Potter I had to turn it off because it was making lots of clipping of the sound. So I was left with pan. It took a while to get a good default, but a bit of googling around revealed one with a decent default. I first just tried turning sub + center up to one but in one or the other movie introduced the dreaded clipping. So I had to keep it down a bit while still retaining decent boost of center and sub. After an afternoon of testing I came to the following &#8220;magic&#8221; formula:</p>
<p>-af pan=2:0.5:0:0:0.5:0.33:0:0:0.33:0.5:0.5:0.5:0.5</p>
<p>Please do note that one needs to add a -channels 6 in order for mplayer to decode all 6 channels so that it can mix it down to two. One can read more about the pan filter <a href="http://www.mplayerhq.hu/DOCS/HTML/en/advaudio-channels.html">here</a>.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/02/27/channel-downmixing-in-mplayer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How far have we come?</title>
		<link>http://people.iola.dk/arj/2010/02/04/how-far-have-we-come/</link>
		<comments>http://people.iola.dk/arj/2010/02/04/how-far-have-we-come/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 09:47:32 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=434</guid>
		<description><![CDATA[<p>Things like <a href="http://groups.google.com/group/clojure/browse_thread/thread/ab8b86bbda9b9296?hl=en">these</a> makes me wonder, with all the <em>advances</em> in computer science how far have we really come?</p>
<ul>
<li>40 years after the invention of relational databases we are still manually defining indexes</li>
<li>40 years after the invention of Unix, the scheduler in Android (= Linux) still does a terrible job at <em>scheduling</em> the tasks that really depend on it (games and audio)</li>
</ul>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2010/02/04/how-far-have-we-come/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobilt bredbånd med Telmore</title>
		<link>http://people.iola.dk/arj/2009/09/22/mobilt-bredband-med-telmore/</link>
		<comments>http://people.iola.dk/arj/2009/09/22/mobilt-bredband-med-telmore/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 20:50:19 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abonnement]]></category>
		<category><![CDATA[bredbånd]]></category>
		<category><![CDATA[modem]]></category>
		<category><![CDATA[telmore]]></category>
		<category><![CDATA[tethering]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=368</guid>
		<description><![CDATA[<p><span style="background-color: #ffffff;">Jeg har i sidste uge købt en HTC Hero gennem Telmore, og udmærket tilfreds med telefonen. Jeg fandt dog en besynderlig situationen mht. mobilt bredbånd ved Telmore. Der er 2 muligheder man kan bestille tjenesten på. Enten til sin telefon, eller som et modem. Hvis man bestiller det til sin telefon, bliver det låst til det nummer man har. Og hvis man bestiller et modem får man et nyt sim kort + nummer hvor det mobile bredbånd er låst til! Jeg blev lettere forvirret og dette, og spurgte derfor deres support. Det skal lige siges at dette ikke var ret godt dokumenteret på deres side. Det er derfor ikke muligt at både få bredbånd på ens eksisterende nummer og samtidig få et modem. Det er nu heller ikke det store problem når man kan køre internet henover telefonen. Dog stadig noget besynderligt synes jeg. Deres løsning var selvfølgelig i bedste sælger stil at man købt to abonnementer <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2009/09/22/mobilt-bredband-med-telmore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>+1 Ubuntu</title>
		<link>http://people.iola.dk/arj/2009/08/11/1-ubuntu/</link>
		<comments>http://people.iola.dk/arj/2009/08/11/1-ubuntu/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:10:59 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=358</guid>
		<description><![CDATA[<p>I was flaming Ubuntu in an <a href="http://people.iola.dk/arj/2009/07/18/the-openbsd-releases-process/">earlier post</a> for their lack of quality in their releases, so I thought it would be fair to give them credit when it is due. They have a project called <a href="https://edge.launchpad.net/hundredpapercuts">One Hundred Paper Cuts</a> where they try to fix low hanging fruit, easy bugs but annoying bugs. Bugs that when stacked together really can make you go from loving a piece of software to hating it. When I look through the <a href="http://davidsiegel.org/100papercuts-round6/">blog post</a> for their round 6, I really like what they are fixing.</p>
<p>We need more of this in software. It&#8217;s so easy, and has become so accepted, to ship a half-baked product and just slap a beta sign on it nowadays. Release early, release often is great, but there is also a time for making fixing all the small annoying bugs. If they plan on fixing this <a href="https://bugs.launchpad.net/ubuntu/+bug/1">bug</a>, then this is a step in the right direction.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2009/08/11/1-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Chrome in Ubuntu</title>
		<link>http://people.iola.dk/arj/2009/07/17/running-chrome-in-ubuntu/</link>
		<comments>http://people.iola.dk/arj/2009/07/17/running-chrome-in-ubuntu/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 16:07:54 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=335</guid>
		<description><![CDATA[<p>Getting Chrome running in Ubuntu is now pretty easy, simple add the following line to /etc/apt/sources.list:</p>
<blockquote><p>deb http://dl.google.com/linux/deb/ stable main</p></blockquote>
<p>Then you can install Chrome using the package manager and it will keep itself updated. Sadly the browser is quite alpha (no flash, random errors, <span style="text-decoration: line-through;">no tabs saving on exit</span>) but they update it every week and it runs insanely fast compared to firefox.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2009/07/17/running-chrome-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making hibernate work after harddrive upgrade</title>
		<link>http://people.iola.dk/arj/2009/07/17/making-hibernate-work-after-harddrive-upgrade/</link>
		<comments>http://people.iola.dk/arj/2009/07/17/making-hibernate-work-after-harddrive-upgrade/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 15:30:03 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=332</guid>
		<description><![CDATA[<p>I recently upgraded the harddrive in my trusty old IBM T60. I mirrored the hd using a little dd magic and everything worked fine, including the IBM rescue partition. The only thing that wasn&#8217;t working anymore was hibernation in Ubuntu. This was because it relied on wierd UUIDs instead of actual device names. Fixing it was pretty easy, once you know what the problem is. First step is to fix up /etc/fstab so that the swap partition has the right UUID. You can get the UUID of a device using something like:</p>
<blockquote><p>sudo vol_id -u /dev/sda4</p></blockquote>
<p>Next step is to fix up the location of the resume partition. Open /etc/initramfs-tools/conf.d/resume and change the UUID to the same as you just put into fstab. Then run:</p>
<blockquote><p>sudo update-initramfs -u</p></blockquote>
<p>And you should be running again <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2009/07/17/making-hibernate-work-after-harddrive-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
