<?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>Ronald! &#187; Computing</title>
	<atom:link href="http://www.rchu.nl/cat/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rchu.nl</link>
	<description>My own little corner of the world wide web</description>
	<lastBuildDate>Mon, 06 Feb 2012 20:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Inconsistent gestures in OSX Lion</title>
		<link>http://www.rchu.nl/2011/11/inconsistent-gestures-in-osx-lion/</link>
		<comments>http://www.rchu.nl/2011/11/inconsistent-gestures-in-osx-lion/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 11:44:17 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[Lion]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=949</guid>
		<description><![CDATA[As everyone it took me some time, though not more than a day or two, to get used to natural scrolling in OS X Lion, but now I really like it. If feels natural because it feels like you put your fingers on the page and pull it upwards to scroll down, and vice versa. <a href='http://www.rchu.nl/2011/11/inconsistent-gestures-in-osx-lion/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-Shot-2011-11-01-at-12.18.17-150x150.png" alt="OS X Swipe gesture" title="OS X Swipe gesture" width="150" height="150" class="alignright size-thumbnail wp-image-950" />As everyone it took me some time, though not more than a day or two, to get used to <em>natural scrolling</em> in OS X Lion, but now I really like it. If feels natural because it feels like you put your fingers on the page and pull it upwards to scroll down, and vice versa. The same thing goes for the four finger swipe to switch between spaces and full screen applications. Hold the current space, and pull it to the left to reveal the space or application on the right.</p>
<p>It does not, however, work that way with the three finger gesture to go to the next or previous page, which also works as the back/next button in my browser. Visualizing the pages of a document or in your browser history as numbered pages going from left to right seems the most natural (if you read from left to right as I do). But swiping to the left brings you to the previous page, not the next. I ask you to go into mission control. Do a four-finger swipe to the left, and then a three finger swipe to the left and see what happens (you will go to the next space, and then go back to the previous space). Same direction, different result.</p>
<p>The trackpad gestures take little time to get used to, the direction doesn&#8217;t really matter that much because  you get used to it. But because these swipe gestures are inconsistent they still causes me to make the wrong gesture. I hope those human-interface geniuses at Apple will realize this too and, most importantly, fix it.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2011/11/inconsistent-gestures-in-osx-lion/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2011/11/inconsistent-gestures-in-osx-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Waveform image with PHP</title>
		<link>http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/</link>
		<comments>http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 08:00:36 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=909</guid>
		<description><![CDATA[For my new website I have been working on for a while I want to generate an image of the waveform of all audio files uploaded on the server. A trip down google avenue quickly led me to this post on andrewfreiday.com. He describes his search for the very same and comes up with a <a href='http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rchu.nl/wordpress/wp-content/uploads/wave.png" alt="" title="wave" width="150" height="150" class="alignright size-full wp-image-910" />For my new website I have been working on for a while I want to generate an image of the waveform of all audio files uploaded on the server. A trip down google avenue quickly led me to <a href="http://andrewfreiday.com/2010/04/29/generating-mp3-waveforms-with-php/">this post on andrewfreiday.com</a>. He describes his search for the very same and comes up with a solution using lame to convert the mp3 file to a wave file and a php script to generate the image. I&#8217;m going to use his approach and couldn&#8217;t resist rewriting the script.</p>
</p>
<p>You can download <a href="http://rchu.nl/files/waveform.phps">my script for generating a waveform</a>. It is licensed under the Apache License v2.0 because the original script was (I usually don&#8217;t bother with a license).</p>
<p><span id="more-909"></span></p>
<p>Too fully get what I&#8217;m talking about you should really first read the <a href="http://andrewfreiday.com/2010/04/29/generating-mp3-waveforms-with-php/">post on andrewfreiday.com</a> and look at the source code of both his and my script.</p>
<p>The original script gets the input via a POST request and uses <code>eval()</code> to call lame for the conversion. Since I do not want to use <code>eval()</code> my script should be used a a command-line tool and I&#8217;ll probably watch a directory or use the cron daemon to call a shell script which will call lame and my PHP script. It takes two parameters: the wave and png file (eg. <code>php waveform.php file.wav file.phg</code>). Same difference, and if you want the original approach it shouldn&#8217;t be hard to change it back. The actual waveform generating part consists of two parts: reading the wave file and drawing the image.</p>
<p>Reading the wave file is bases <a href="http://forums.devshed.com/php-development-5/reading-16-bit-wav-file-318740.html">a post by &#8220;zvoneM&#8221; on DevShed</a>. I&#8217;ve looked closely at the wave file specifications and the code that reads the header of the file but changed little. There are some checks on the format of the file, that&#8217;s all. I did completely rewrite how the actual is read.</p>
<p>The original code reads one value and then skips a bunch. This approach is not flexible enough and takes more time on large files. Since I am going to post two-hour DJ sets this needed to change. How much values need to be read depends on the width of the image generated. The image is also drawn within the same loop as opposed to looping over an array after reading the file.</p>
<p>The drawing part is mainly the original code, but to improve the quality of the image it is generated and then resized resulting in a more accurate and nicely antialiased image. Multiple values are read for one line to reduce the chance that the one value read is not the most representable for the block of audio it represents. This results in a more full image because less (or no) peaks are missing or to short. The image at the top of this post is generated with a zoom level of 10 and 100 values per line.<br />
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Watching several files for changes</title>
		<link>http://www.rchu.nl/2011/08/watching-several-files-for-changes/</link>
		<comments>http://www.rchu.nl/2011/08/watching-several-files-for-changes/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 13:00:53 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=895</guid>
		<description><![CDATA[This little bash script will watch several files for changes and serves as the basis for more complicated scripts that actually do something when a change is detected. It&#8217;s simply a matter of comparing the output of stat every 5 seconds #!/bin/bash count=0 for var in &#34;$@&#34;; do count=$(($count + 1)); files[$count]=$var; stats[$count]=`stat -r &#34;$var&#34;`; <a href='http://www.rchu.nl/2011/08/watching-several-files-for-changes/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This little bash script will watch several files for changes and serves as the basis for more complicated scripts that actually do something when a change is detected. It&#8217;s simply a matter of comparing the output of stat every 5 seconds</p>
<pre class="brush: bash;">
#!/bin/bash

count=0
for var in &quot;$@&quot;; do
    count=$(($count + 1));
    files[$count]=$var;
    stats[$count]=`stat -r &quot;$var&quot;`;
done

while [ true ]; do
    i=1
    while [ $i -le $count ]; do
        newstat=`stat -r &quot;${files[i]}&quot;`
        if [ &quot;$newstat&quot; != &quot;${stats[i]}&quot; ]; then
            echo \&quot;${files[i]}\&quot;
            stats[$i]=$newstat
        fi
        i=$(($i+1))
    done

    sleep 5
done
</pre>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2011/08/watching-several-files-for-changes/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2011/08/watching-several-files-for-changes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add a reply-to header with Procmail</title>
		<link>http://www.rchu.nl/2011/06/add-a-reply-to-header-with-procmail/</link>
		<comments>http://www.rchu.nl/2011/06/add-a-reply-to-header-with-procmail/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 12:07:09 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=849</guid>
		<description><![CDATA[After discovering I didn&#8217;t backup everything on my server before the hard disk was replaced I realized how much I love  procmail, especially the rule that adds a reply-to header to several mailing lists. Technically they aren&#8217;t mailinglists but just lists, thanks to Google Apps used by my student association. Fortunately I bragged about it <a href='http://www.rchu.nl/2011/06/add-a-reply-to-header-with-procmail/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>After discovering I didn&#8217;t backup everything on my server before the hard disk was replaced I realized how much I love  <a href="http://www.procmail.org/">procmail</a>, especially the rule that adds a reply-to header to several mailing lists. Technically they aren&#8217;t mailinglists but just lists, thanks to <a href="http://www.google.com/apps/intl/en/group/index.html">Google Apps</a> used by my <a href="http://www.biton.nl/">student association</a>. Fortunately I bragged about it on <a href="http://www.facebook.com/rchu.nl">Facebook</a> several months ago so after checking my old wall posts (not a pleasant job because it was months and months of posts) I found it.</p>
<p>I did fix my backup scripts but just to be sure, and maybe to make someone else happy I&#8217;m posting it here:</p>
<pre class="brush: bash;">
# Add reply-to to those pesky example.com mailinglists.
:0 fhw
* ^List-Id:\/.*\.example\.com
|formail -I &quot;Reply-To: `echo $MATCH | \
sed -e 's/^.*\&gt;\(.*\)\.example\.com.*$/\1@example.com/'`&quot;

# Other ppl without cool procmail rules press reply-all
# so delete all to &lt;lists&gt;@example.com msgs cc'd to me
:0
* ^TO_(list_name|another_list|yet_another_list)@example.com
* !^List-Id:\/.*\.example\.com
/dev/null
</pre>
<p><strong>Update:</strong> I&#8217;ve added a second rule to delete all mail that is addressed to the mailing list (using *@example.com won&#8217;t work because there are also non-list adresses at that domain) but has no list-id and therefor must be a cc to me, not the list, because few people have these cool filters and most just press reply-all to make sure it is at least delivered to the list. Sigh. I&#8217;m still monitoring this rule in case of errors but it seems to work fine. You can replace /dev/null with your trash folder if you want to be less rigorous.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2011/06/add-a-reply-to-header-with-procmail/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2011/06/add-a-reply-to-header-with-procmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disk usage notification</title>
		<link>http://www.rchu.nl/2011/02/disk-usage-notification/</link>
		<comments>http://www.rchu.nl/2011/02/disk-usage-notification/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 11:50:59 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=714</guid>
		<description><![CDATA[I don&#8217;t pay much attention to my hard disk usage nor do I remember to periodically empty the trash. In fact, I don&#8217;t want to empty the trash as long as the disk space is available because you never know when to need to restore a trashed file. To keep track of my disk usage <a href='http://www.rchu.nl/2011/02/disk-usage-notification/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2011-02-16-at-12.48.21.png"><img class="alignright size-thumbnail wp-image-719" title="Disk usage growl notification" src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2011-02-16-at-12.48.21-150x150.png" alt="" width="150" height="150" /></a>I don&#8217;t pay much attention to my hard disk usage nor do I remember to periodically empty the trash. In fact, I don&#8217;t want to empty the trash as long as the disk space is available because you never know when to need to restore a trashed file.</p>
<p>To keep track of my disk usage I made a simple bash script that determines the free space and size of the trash and sends a Growl notification if the disk space is running low or the trash is to big (absolute or proportional to the free space available) and set my crontab to run it every 15 minutes. <span id="more-714"></span></p>
<pre class="brush: bash;">
#!/bin/sh

trash=`du -d 0 -k /Users/ronald/.Trash/ | awk '{print &quot;scale=0; &quot;$1&quot;*1024/1000000000&quot;}' | bc`
freespace=`df / | tail -n 1 | awk '{print &quot;scale=0; &quot;$4&quot;*512/1000000000&quot;}' | bc`
trashperc=`echo &quot;scale=0; 100*$trash/$freespace&quot;|bc`

if   [ $freespace -lt 20  ]; then message=&quot;Free disk space is running low&quot;
elif [ $trashperc -gt 100 ]; then message=&quot;Trash is more than half of the free disk space&quot;
elif [ $trash     -gt 20  ]; then message=&quot;Trash is getting big&quot;
else exit
fi

echo &quot;$message

$freespace GB free
$trash GB in trash ($trashperc%)&quot; |  /usr/local/bin/growlnotify -a /Applications/Utilities/Disk\ Utility.app -t Smith
</pre>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2011/02/disk-usage-notification/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2011/02/disk-usage-notification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating WordPress with Facebook</title>
		<link>http://www.rchu.nl/2010/11/integrating-wordpress-with-facebook/</link>
		<comments>http://www.rchu.nl/2010/11/integrating-wordpress-with-facebook/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 12:34:31 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=653</guid>
		<description><![CDATA[Update: I now use a different plugin because I want people to be able to write something on their wall when liking a post. I just installed a plugin that adds open graph data and a like box to each page on this site. I like to have it configured this way; specifying meta data <a href='http://www.rchu.nl/2010/11/integrating-wordpress-with-facebook/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Update: I now use a different plugin because I want people to be able to write something on their wall when liking a post.</p>
<p>I just installed a <a href="http://wordpress.org/extend/plugins/facebook-open-graph-widget/other_notes/">plugin</a> that adds <a href="http://developers.facebook.com/docs/opengraph">open graph</a> data and a like box to each page on this site. I like to have it configured this way; specifying meta data in the header my pages, it all feels semantic web-ish.</p>
<p>Of course I needed to make some changes in the code to make it all work.<br />
<span id="more-653"></span></p>
<p>First of all the layout elements in the sidebar weren&#8217;t present in the HTML and after a quick inspection of the plugin source code I found that it simply was trying to read that information from a undefined variable <em>$args</em>. Google quickly led me to the <a href="http://codex.wordpress.org/Widgets_API#Display_Sidebar_on_Theme">widgets API page</a> where I found out it is simply the first parameter passed to that method:</p>
<p>
<pre class="brush: php; first-line: 210; gutter: true; highlight: [212]; light: false;">&lt;br /&gt;
}&lt;br /&gt;
// widget control functions&lt;br /&gt;
function kpg_fb_like_data_widget($args) {&lt;br /&gt;
 // show the widget&lt;br /&gt;
 // need to just put the iframe here&lt;br /&gt;
</pre>
</p>
<p>Next up was the description of the page. Because I want all posts to be seperate entities (as opposed to the entire site as one entity) I do not want the description of the page to be the description of the blog. I added a line setting the description simply to the stripped content of the post:</p>
<p>
<pre class="brush: php; first-line: 24; gutter: true; highlight: [27]; light: false;">&lt;br /&gt;
        global $post;&lt;br /&gt;
        if (!empty($post)) {&lt;br /&gt;
                $fbtitle=$post-&gt;post_title;&lt;br /&gt;
                $fbdesc=htmlspecialchars(strip_tags($post-&gt;post_content));&lt;br /&gt;
        }&lt;br /&gt;
</pre></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2010/11/integrating-wordpress-with-facebook/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/11/integrating-wordpress-with-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First Steam experience</title>
		<link>http://www.rchu.nl/2010/05/my-first-steam-experience/</link>
		<comments>http://www.rchu.nl/2010/05/my-first-steam-experience/#comments</comments>
		<pubDate>Fri, 14 May 2010 11:09:43 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=555</guid>
		<description><![CDATA[As a Mac user Steam used to be something from another planet, until recently. I am happy Steam comes to the Mac, bringing lots of great games for me to play. The news that Portal is free (for a limited time) was the trigger for me to actually get started with Steam. And my joy <a href='http://www.rchu.nl/2010/05/my-first-steam-experience/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-05-14-at-12.53.27.png"><img class="alignright size-medium wp-image-556" title="Steam (Mac Screen shot) " src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-05-14-at-12.53.27-300x201.png" alt="Steam (Mac Screen shot) " width="300" height="201" /></a>As a Mac user <a href="http://en.wikipedia.org/wiki/Steam_%28content_delivery%29">Steam</a> used to be something from <a href="http://www.microsoft.com/windows/">another planet</a>, until recently. I am happy Steam comes to the Mac, bringing lots of great games for me to play. The news that <a href="http://store.steampowered.com/freeportal">Portal is free</a> (for a limited time) was the trigger for me to actually get started with Steam. And my joy went away fast.</p>
<p><span id="more-555"></span>First of all, I don&#8217;t like the fact that if I actually want to play Portal I have to:</p>
<ol>
<li>Download Steam (a few Mb).</li>
<li>Download the actual Steam files within Steam.</li>
<li>Download several Steam updates.</li>
<li>Download Portal.</li>
<li>Ignore a warning about the minimum system specifications and my windows video driver having an unknown version. Now that says something about the native OS X version they build…</li>
<li>Wait, because even tough the download isn&#8217;t complete and won&#8217;t resume there is a &#8220;play&#8221; button which cannot start the game because their servers are too busy.</li>
<li>Whatever the future may bring…</li>
</ol>
<p>Second, I have less trust in a native application that doesn&#8217;t feel native (misaligned button labels; buttons, and worse, hyperlinks with no feedback weather I clicked them; custom colors, themes and icons; windows sometimes not showing up after switching applications; a crash when I press <code>Command+Q</code>), especially when it doesn&#8217;t work smoothly the first time I use it. Little inconsistencies like one window telling me it went wrong and the other it went fine does not help in gaining my trust either.</p>
<p>But, since I know I like Portal and because I&#8217;d like to be able to play more games on my Mac I&#8217;m just going to keep on trying. It is a good move to make an extremely popular game free to boost the number of Mac Steam users, because it makes users like me accept the rough patches and keep on trying.</p>
<p><strong><em>Update:</em></strong><em> After deleting all local files and downloading Portal again everything went fine, except that the warning about minimum system requirements turned out to be meaningful: Portal does not work on my MacBook (2.16 GHz</em> <em>Core 2 Duo).</em></p>
<p><em> </em></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2010/05/my-first-steam-experience/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/05/my-first-steam-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Human vs Machine clustering in Music collections</title>
		<link>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/</link>
		<comments>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 12:50:47 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[study]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=537</guid>
		<description><![CDATA[For the semantic web course in my master program I&#8217;ve spend the last few weeks working on an exploratory project with two colleagues. The goal we&#8217;ve set for ourselves is to research if it is at all possible to cluster music based on automatically extracted musical features and compare those clusterings to clusterings based on <a href='http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>For the semantic web course in my master program I&#8217;ve spend the last few weeks working on an exploratory project with two colleagues. The goal we&#8217;ve set for ourselves is to research if it is at all possible to cluster music based on automatically extracted <a href="http://en.wikipedia.org/wiki/Music_information_retrieval">musical features </a>and compare those clusterings to clusterings based on the tags users annotated the songs with on <a href="http://www.last.fm/">Last.fm</a>.</p>
<p><span id="more-537"></span>Even though time was very limited and many improvements can be made in almost every step the results we obtained are encouraging. The clustering based on the musical features did make (some) sense and the differences between human categorisation and feature based clustering are interesting to say the least. The most striking example to me is that there always was a cluster with (almost) all classical music and <a href="http://www.last.fm/music/Nirvana/_/Something+in+the+Way">a song by Nirvana</a>, which users put in the grunge genre.</p>
<p>It was fun to work on, and I hope there are possibilities to continue this project with more time to make more proper assessments. And as a personal bonus I finally got around to exploring the beautiful programming language Python. Of course I&#8217;ve only scratched the surface, but it was enough to make my programmers heart beat a bit faster.</p>
<p><em>You can read t<a href="http://www.rchu.nl/files/HumanVsMachineClusteringMusic.pdf">he full paper </a>and if you want, for some reason, get <a href="http://www.rchu.nl/files/HumanVsMachineClusteringMusic.tar.bz2">the raw results and source code</a>.</em></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some nice layout changes</title>
		<link>http://www.rchu.nl/2010/04/some-nice-layout-changes/</link>
		<comments>http://www.rchu.nl/2010/04/some-nice-layout-changes/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 18:27:36 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=444</guid>
		<description><![CDATA[My WordPress powered website has been running for quite some time now, and today I finally replaced the default theme with something I like better,  Suffusion, and customized it to my needs. I had installed some syntax highlighting plugins before but disabled them because I couldn&#8217;t get it to work properly. Now with the pretty <a href='http://www.rchu.nl/2010/04/some-nice-layout-changes/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-449" title="Source code" src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-04-05-at-19.33.47.png" alt="Source code" width="287" height="225" />My WordPress powered website has been running for quite some time now, and today I finally replaced the default theme with something I like better,  <a href="http://wordpress.org/extend/themes/suffusion">Suffusion,</a> and customized it to my needs.</p>
<p>I had installed some syntax highlighting plugins before but disabled them because I couldn&#8217;t get it to work properly. Now with the pretty new layout all posts with snippets of unhighlighted source code were a real eye-sore, so that needed to be fixed as wel.</p>
<p><span id="more-444"></span>For some unknown reason the <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/">SyntaxHighlighter Evolved</a> plugin that I couldn&#8217;t get to do as I wanted before now works like a charm. The only difficult part was to get me some <a href="http://developer.apple.com/AppleScript/">AppleScript </a>highlighting. <a href="http://davidchambersdesign.com/applescript-syntax-highlighting/">David Chambers</a> has written a brush, so I only had to install that brush the <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/adding-a-new-brush-language/">proper way</a>. Creating the plugin was easy:</p>
<pre class="brush: php;">
&lt;?php
/*
Plugin Name: SyntaxHighlighter Evolved: AppleScript Brush
Description: Adds support for the Applescript language to the SyntaxHighlighter Evolved plugin.
Author: Ronald Chu
Version: 1.0.0
Author URI: http://www.rchu.nl/
*/

// SyntaxHighlighter Evolved doesn't do anything until early in the &quot;init&quot; hook, so best to wait until after that
add_action( 'init', 'syntaxhighlighter_applescript_regscript' );

// Tell SyntaxHighlighter Evolved about this new language/brush
add_filter( 'syntaxhighlighter_brushes', 'syntaxhighlighter_applescript_addlang' );

// Register the brush file with WordPress
function syntaxhighlighter_applescript_regscript() {
 wp_register_script( 'syntaxhighlighter-brush-applescript', plugins_url( 'shBrushAppleScript.js', __FILE__ ), array('syntaxhighlighter-core'), '1.2.3' );
}

// Filter SyntaxHighlighter Evolved's language array
function syntaxhighlighter_applescript_addlang( $brushes ) {
 $brushes['applescript'] = 'applescript';
 $brushes['osascript'] = 'applescript';

 return $brushes;
}
?&gt;
</pre>
<p>But at first the highlighting did not work on AppleScript snippets, and it took me quite some time to find out that I shouldn&#8217;t have copy-pasted the javascriptcode into <a href="http://www.vim.org/about.php">Vim</a> on my ssh shell. Some of the special characters in line 37 were transformed into in a question mark which broke the regular expression.</p>
<p>Now, as far as I know, only one thing is wrong; when I refresh quickly in Chrome (5.0.342.7 beta, OS X 10.6.2) some of the keywords do not light up. I do not know if it is a bug in Chome, SyntaxHighighter or the AppleScript brush, but it is something I can live with for now.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2010/04/some-nice-layout-changes/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/04/some-nice-layout-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the language of a DIR-615</title>
		<link>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/</link>
		<comments>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 08:48:26 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=426</guid>
		<description><![CDATA[Update: As Kirto007 points out in the comments this also works for the DIR-100, so if you have another product from the DIR series this post might be useful. After my D-Link dir-615 broke down and I still had waranty I received a brand new one. Which is great, except for the fact that the <a href='http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> As Kirto007 points out in the comments this also works for the DIR-100, so if you have another product from the DIR series this post might be useful.</em></p>
<p>After my D-Link dir-615 <a href="http://www.rchu.nl/2010/02/the-mystery-of-the-blue-light/">broke down</a> and I still had waranty I received a brand new one. Which is great, except for the fact that the web-interface was in German. Fortunately I do speak a little german and all the technical terms were the same as in english, but it was still anoying.</p>
<p><span id="more-426"></span><a title="D-Link dir-615 web interface" href="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-03-29-at-10.34.46.png"><img class="alignright size-medium wp-image-427" title="D-Link dir-615 web interface" src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-03-29-at-10.34.46-300x162.png" alt="D-Link dir-615 web interface" width="300" height="162" /></a>In (the german version of) the <em>Maintenance » Firmware update</em> menu there is an option to upload a language pack. Hurrah, but those packs are nowhere to be found, not even after searching the web for several hours. So I decided to call customer services since they were so helpfull last time. They pointed to the <em>Maintenance » Save and restore</em> page where there exists an <em>Clear Language Pack</em> option. I hadn&#8217;t found that one yet, probably because of my poor german language skills.</p>
<p>I was kinda hoping to get the location(s) of all available language packs, so I could post them here and help all language-change-craving people across the world. Unfortunately customer services also did not know where to find these. But they must exist, since the german language pack was already installed on my device (and is now lost forever, I cannot change the language back to german). Why would D-Link choose not to share them with the world?</p>
<p>So, if you ever get a dir-615 in some unreadable language just go to the third menu, second submenu and click the bottom button.</p>
<p>Also, why do I get the belgium customer services when I dial the dutch phone number? The option of getting support in french is useless for most dutch people, and it was kinda hard to understand everything the guy at the other end said, because of the noisy connection and the <a href="http://en.wikipedia.org/wiki/Flemish">flemish</a> accent.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

