<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>WizBlog</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/" />
    <link rel="self" type="application/atom+xml" href="http://www.bitwiz.org.uk/s/atom.xml" />
    <id>tag:www.bitwiz.org.uk,2009-01-26:/s//1</id>
    <updated>2010-06-30T09:15:40Z</updated>
    <subtitle>Forbidden Projects</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>

<entry>
    <title>iAudio X5 Tagging</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/06/iaudio-x5-tagging.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.77</id>

    <published>2010-06-30T08:17:42Z</published>
    <updated>2010-06-30T09:15:40Z</updated>

    <summary><![CDATA[The Cowon iAudio X5 is, in many ways, the ideal music player for the discerning geek.&nbsp; It's Linux friendly, behaving as a normal USB mass storage device requiring no special software nor drivers; it plays Ogg/Vorbis and FLAC files; it...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cowon" label="Cowon" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iaudio" label="iAudio" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ogg" label="Ogg" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tag" label="tag" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="vorbis" label="Vorbis" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="x5" label="X5" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="x5l" label="X5L" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[The <a href="http://www.cowonglobal.com/product_wide/product_X5_feature.php">Cowon iAudio X5</a> is, in many ways, the ideal music player for the discerning geek.&nbsp; It's Linux friendly, behaving as a normal USB mass storage device requiring no special software nor drivers; it plays Ogg/Vorbis and FLAC files; it has a line in connector; it has fantastic sound quality; it organises your files by folder, so you can have your files organised how you really want them.&nbsp; It also has a battery which lasts ages, particularly the X5L version.&nbsp; When my X5L was younger, a full charge would last for about two weeks of fairly constant use at work.&nbsp; Now it's several years old - I've actually forgotten how old exactly - and it still lasts for many days.<br /><br />It does, however, have a particular weirdness when handling Ogg/Vorbis files.&nbsp; Its tag parser is extremely basic, and apparently just skips one character (the equals sign) after finding the letters "ARTIST" in the tags.&nbsp; But most recent ripping software adds an extra field, called ARTISTSORT.&nbsp; The X5 often finds that instead of ARTIST, and thinks the name of the artist is something like "ORT=Haza, Ofra" instead of "Ofra Haza".<br /><br />So, I wrote a little script to remove the ARTISTSORT tags altogether.&nbsp; It's a cheap solution - it'd probably be better just to move that tag to the end (possibly the start, I didn't really test) of the tags field, but this field isn't used for sorting on the X5 anyway.<br /><br />Here's the script ("<code>ogg-retag</code>").&nbsp; It's really simple:<br /><br /><code>#!/bin/sh<br /><br />if [ -e ogg.tags ]; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "ogg.tags file exists.&nbsp; Please remove it first."<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit 1<br />fi<br /><br />for FILENAME in "$@"; do<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Processing "$FILENAME<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Dump tags to file, removing ARTISTSORT tag<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vorbiscomment -l "$FILENAME" | grep -v "ARTISTSORT=" \<br /></code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code><code>&gt; ogg.tags<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Write tags back<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vorbiscomment -w -c ogg.tags "$FILENAME"<br /><br />done<br /><br />rm -f ogg.tags<br /></code><br />To run, simply "cd" into the folder containing the problematic Ogg/Vorbis files, then run "ogg-retag *.ogg" or similar.<br />]]>
        
    </content>
</entry>

<entry>
    <title>Easier Partial &quot;DCommitting&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/05/partial-dcommitting.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.76</id>

    <published>2010-05-24T13:14:39Z</published>
    <updated>2010-05-30T10:42:08Z</updated>

    <summary><![CDATA[I've been making extensive use of Git-SVN recently, because I vastly prefer the user interface of Git to that of SVN, yet am collaborating on a project which uses SVN. &nbsp;My workflow consists of keeping a set of commits on...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="subversion" label="subversion" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[I've been making extensive use of Git-SVN recently, because I vastly prefer the user interface of Git to that of SVN, yet am collaborating on a project which uses SVN. &nbsp;My workflow consists of keeping a set of commits on top of the commits from SVN, which do things like add .gitignore files (hint: use git svn create-ignore to make these automatically), or contain code that I'm not ready to show other people just yet, or don't ever want to release.<div><br /></div><div>This isn't the most advanced use of git-svn possible, but it's quite neat, simple and difficult to make mistakes with. &nbsp;When I described the method on IRC to someone who was asking about exactly this situation, it sounded like my method was of interest. &nbsp;I promised to do a short write-up, and here it is.<br /><div><br /></div><div>My workflow consists of three simple(ish) aliases. &nbsp;The first one is the simplest, for updating to the latest SVN trunk:</div><div><br /></div><div>git stash &amp;&amp; git svn rebase &amp;&amp; git stash pop</div><div><br /></div><div>This just stashes any local changes to the working tree, then rebases the unpublished, "floating" commits on top of the latest commits from SVN.</div><div><br /></div><div>The second is used when I have one or more commits to add to the SVN repository. Having previously created a branch "for-commit" (it doesn't matter where it's based initially), I open "gitk" and make sure it's up to date. &nbsp;It probably looks something like this:</div><div><br /></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="before.png" src="http://www.bitwiz.org.uk/s/gsvn/before.png" width="490" height="311" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div><div>Then I invoke the second alias, which is:</div><div><br /></div><div>git stash &amp;&amp; git checkout for-commit &amp;&amp; git reset --hard remotes/git-svn</div><div><br /></div><div>This stashes local changes, checks out the "for-commit" branch and resets it to the most recent known head of the Subversion trunk. &nbsp;Then I refresh my gitk window, which then looks like this:</div><div><br /></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="during-1.png" src="http://www.bitwiz.org.uk/s/gsvn/during-1.png" width="490" height="311" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" />Nothing too exciting has happened, but we're now on the "for-commit" branch which points in a sensible place. &nbsp;I right-click* each commit that's to be committed to Subversion, and cherry-pick them onto the "for-commit" branch:</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="during-2.png" src="http://www.bitwiz.org.uk/s/gsvn/during-2.png" width="490" height="311" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">So, now the "for-commit" branch has diverged from "master" because the commits have been re-written by the cherry-pick operation. &nbsp;Now comes the clever(ish) part, which is the third alias:</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">git svn dcommit &amp;&amp; git checkout master &amp;&amp; git svn rebase &amp;&amp; git stash pop</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">This commits the contents of the for-commit branch to SVN, then switches back to master and rebases it on top of the latest SVN branch, which now includes the commits just added. &nbsp;Git-SVN is clever enough to realise that some of the commits, but not all, are now in SVN. &nbsp;Gitk looks like this after a final update:</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="after.png" src="http://www.bitwiz.org.uk/s/gsvn/after.png" width="490" height="311" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">There are a couple of "sidings" in the history. &nbsp;The lower of the two is the old location of the "floating" commits on master. &nbsp;The upper one is the previous location of the for-commit branch. &nbsp;You could tidy them up by restarting gitk, but I find they're useful for keeping track of what I did. &nbsp;If you look closely, you'll notice that someone else added a commit to the Subversion branch between the last time I updated and the final commit, and git-svn dealt with that too.</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">So there you go. &nbsp;Maybe that's useful to someone.</span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><br /></span></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;">* I don't actually "right-click", since I'm left-handed. &nbsp;I also use a trackball instead of a mouse. &nbsp;You should get one - they're awesome.</span></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Drilling for Oil</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/05/drilling-for-oil.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.75</id>

    <published>2010-05-22T12:08:19Z</published>
    <updated>2010-05-22T13:29:44Z</updated>

    <summary><![CDATA[I find it somehow disturbing that&nbsp;we are able to drill a hole&nbsp;into our planet and make it "bleed", and in such a way that it's so hard to do anything about it.In fact, come to think of it, the whole...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Everything Else" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="oil" label="oil" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[I find it somehow disturbing that&nbsp;<a href="http://www.bp.com/extendedsectiongenericarticle.do?categoryId=40&amp;contentId=7061813">we are able to drill a hole</a>&nbsp;into our planet and make it "bleed", and in such a way that it's so hard to do anything about it.<div><br /></div><div>In fact, come to think of it, the whole idea of drilling a hole that deep, under so much water, is pretty incredible. &nbsp;I've never really thought about it before.</div>]]>
        
    </content>
</entry>

<entry>
    <title>Expat Financial Scams</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/04/expat-financial-scams.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.74</id>

    <published>2010-04-04T19:32:01Z</published>
    <updated>2010-04-04T20:48:18Z</updated>

    <summary><![CDATA[A somewhat eye-opening experience last week.I had a phone call from a company offering "independent" financial advice regarding offshore savings and pensions - to "make the most" of my residence abroad. &nbsp;The company in question will not be mentioned on...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Everything Else" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="scam" label="scam" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[A somewhat eye-opening experience last week.<div><br /></div><div>I had a phone call from a company offering "independent" financial advice regarding offshore savings and pensions - to "make the most" of my residence abroad. &nbsp;The company in question will not be mentioned on here, but there is&nbsp;<a href="http://www.redtape.ru/forum/showthread.php?t=37205">plenty of information</a>&nbsp;about their&nbsp;<a href="http://www.cqdx.gov.cn/Faq/FinancialPlanning/200909/19460.html">dodgy business methods</a>&nbsp;and&nbsp;even&nbsp;<a href="http://realrussia.co.uk/forum/forums/thread-view.asp?tid=2980&amp;posts=17">their recruiting strategies</a>&nbsp;available on the web. &nbsp;To cut a long story short: &nbsp;&nbsp;It's nothing more than a&nbsp;scam: their representatives are usually not qualified financial advisors, but simply salespeople who will subject you to high-pressure sales tactics in the hope of getting their (huge, up-front) commission&nbsp;which is taken from your contributions, and can be as much as your whole first year's worth of payments.</div><div><br /></div><div><div>While the underlying products they may advertise may be basically sound, they tend to be very expensive and unsuitable for people in my kind of situation. The worst thing, however, is that they often use restrictive contract terms which lock you in to paying huge fees which negate any potential tax benefits.</div><div><br /></div><div>It seems like there's quite a lot of this kind of thing going around. &nbsp;Needless to say, I know where I'll tell any other financial "advisors" who call me to go...</div><div><br /></div><div>Most readers probably think they're far too clever to fall for such a thing, but I've now experienced first-hand how powerful the illusion is and how easy it can be to fall under the spell, and it's very scary. &nbsp;Beware.</div></div><div><br /></div><div><div>As ever, if something sounds too good to be true, it probably is..!</div></div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>OpenCL Calculation and Reduction</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/02/opencl-calculation-and-reduction.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.73</id>

    <published>2010-02-25T21:35:08Z</published>
    <updated>2010-02-25T22:13:25Z</updated>

    <summary><![CDATA[Otherwise known as "calculating a long list of numbers then adding them all up". &nbsp;For a GPGPU (OpenCL) simulation program at work, I needed to calculate around 160 numbers which would be averaged to produce one result for storage in...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Science" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="gpgpu" label="GPGPU" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gpu" label="GPU" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opencl" label="OpenCL" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[Otherwise known as "calculating a long list of numbers then adding them all up". &nbsp;For a GPGPU (OpenCL) simulation program at work, I needed to calculate around 160 numbers which would be averaged to produce one result for storage in a 1024x1024 element array. &nbsp;That's 160 numbers for each of 1024x1024 pixels, which would be a lot to store as an intermediate result for a later step of averaging on the GPU, or (heaven forbid) to be copied back to system memory.<div><br /></div><div>The magic word to search for in tackling this is <i>reduction, </i>and there's plenty of hardcore compsci knowledge about how to make it go as fast as possible in a parallel environment. &nbsp;But, basically the trick is to have 160x1024x1024 threads operate in groups of 160 (one group for each of the 1024x1024 overall elements). &nbsp;Threads cooperating like this can share memory, and each thread writes its individual value to an array in that local memory. &nbsp;Then, one of the 160 threads adds up all the values and does a single write of the final average value to the global array. &nbsp;For the kernel to test if it's running the "chosen thread" is as simple as something like this:</div><div><br /></div><div><code>if ( get_local_id(0) == 0 )</code></div><div><br /></div><div>The only bit of "funny business" is that each of the 160 threads has to have finished calculating before the results can be added. &nbsp;That's done with this statement, which&nbsp;guarantees that all previous local memory writes have completed for all threads:&nbsp;</div><div><br /></div><div><code>barrier(CLK_LOCAL_MEM_FENCE);</code></div><div><br />This is a really simple example: for one thread to do all of the averaging is a waste of resources when the reduction itself could be parallelised. &nbsp;In that case, one thread would (say) add up values 0-79 while another added up 80-159, then one of those threads would (after another barrier) add up the remaining two values. &nbsp;It's easy to see how it can be broken down more and more, and there are variations which make better use of the GPU resources, avoid memory conflicts, and so on.</div><div><br /></div><div>So, if you'd ever heard of the thread groups and local memory used in OpenCL (also CUDA) and wondered what they were good for, now you know..</div><div><br /></div><div>NVidia's&nbsp;<a href="http://www.nvidia.com/content/cudazone/download/OpenCL/NVIDIA_OpenCL_ProgrammingOverview.pdf">OpenCL Programming Guide</a>&nbsp;has a lot of discussion of this topic, and there's loads more to be found around the web.</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>OpenStreetMap&apos;s Role in Haiti</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/02/openstreetmaps-role-in-haiti.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.72</id>

    <published>2010-02-25T20:12:49Z</published>
    <updated>2010-02-25T20:25:20Z</updated>

    <summary><![CDATA[This&nbsp;is very cool. &nbsp;Volunteer contributors used satellite imagery, which was made available especially, to create detailed maps of Haiti which the aid workers used to help find their way....]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Everything Else" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="haiti" label="Haiti" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="openstreetmap" label="OpenStreetMap" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[<a href="http://news.bbc.co.uk/2/hi/uk_news/magazine/8517057.stm">This</a>&nbsp;is very cool. &nbsp;Volunteer contributors used satellite imagery, which was made available especially, to create detailed maps of Haiti which the aid workers used to help find their way.]]>
        
    </content>
</entry>

<entry>
    <title>The Mysterious Missing Milliamps</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/02/the-mysterious-missing-milliamps.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.71</id>

    <published>2010-02-10T19:28:06Z</published>
    <updated>2010-02-10T21:36:57Z</updated>

    <summary><![CDATA[My new A7+ Freerunner arrived a few days ago. &nbsp;Before long I'd flashed it with the latest version of SHR-testing, made sure stuff worked, and moved my main SIM over to it. &nbsp;Then I set about installing all the most...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Openmoko" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="microsd" label="MicroSD" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="openmoko" label="Openmoko" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="overheat" label="overheat" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><div>My new A7+ Freerunner arrived a few days ago. &nbsp;Before long I'd flashed it with the latest version of SHR-testing, made sure stuff worked, and moved my main SIM over to it. &nbsp;Then I set about installing all the most cutting-edge unstable userspace and 2.6.32 kernel stuff on the old A6 Freerunner ready to have some&nbsp;<a href="http://git.bitwiz.org.uk/?p=mesa.git;a=summary">fun</a>. &nbsp;But I quickly noticed that something wasn't right - it wouldn't charge properly. &nbsp;During my first Sunday hacking session, it didn't seem to be able to charge from a USB connection to my computer, and seemed to be getting quite warm to the touch as well.</div><div><br /></div><div>The current_now sysfs node indicated that the device was using many hundreds of milliamps more current than it should have been. &nbsp;So much, in fact, that the current provided to it over USB by my laptop wasn't enough to charge the battery - with barely enough power to keep the thing running the battery slowly discharged. &nbsp;With the higher current provided by the mains charger, the battery would charge, but more slowly that normal. &nbsp;But this only seemed to happen with the 2.6.32 kernel.</div><div><br /></div><div>Lots of discussion on IRC (mostly with&nbsp;<a href="http://wiki.openmoko.org/wiki/User:JOERG">DocScrutinizer</a>) followed, and it emerged that one possibility was a short circuit in the uSD card slot. &nbsp;Sure enough: &nbsp;I'd moved my uSD card from the A6 to the A7+ Freerunner (since the new one didn't come with a card), leaving the A6's SD slot empty. &nbsp;On my device, some of the pins protruded up, perhaps enough to short out against the metal SD slot lid:</div></span><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.bitwiz.org.uk/s/sdslot/p2100009%20%28Modified%29.jpg"><font class="Apple-style-span" color="#333333"><br /></font><img alt="p2100009 (Modified).jpg" src="http://www.bitwiz.org.uk/s/assets_c/2010/02/p2100009 (Modified)-thumb-400x285-10.jpg" width="400" height="285" class="mt-image-center" style="text-align: auto;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 20px; margin-left: auto; " /></a></span></div><div>I cut a roughly 1x1.5cm rectangular piece of plastic from the packaging of some small halogen bulbs I'd bought the previous day, and put it into the slot as a "dummy". &nbsp;Testing again: no current drain. &nbsp;Dummy removed, the drain came back, and so on. &nbsp;The Doc had hit the nail on the head - the culprit was found!</div><div><br /></div><div>But there was one more piece to the puzzle. &nbsp;Why didn't the drain seem to happen with the older 2.6.29 kernel? &nbsp;Turns out that a&nbsp;<a href="http://git.bitwiz.org.uk/?p=kernel.git;a=commitdiff;h=6299be6a85f3e115ccfbd5786ad8de3b0781cd3e">small detail</a>&nbsp;had been left out from the kernel during an earlier merge. &nbsp;Because of this, the Glamo SD engine's power supply was left on all the time, when normally it should get switched off when no SD card was present. &nbsp;The resulting waste of a small amount of power became a huge power drain when the short circuit was added. &nbsp;Hopefully the SD electronics aren't too fried..</div>]]>
        
    </content>
</entry>

<entry>
    <title>Gitolite</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/01/gitolite.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.70</id>

    <published>2010-01-26T23:13:18Z</published>
    <updated>2010-01-27T07:18:49Z</updated>

    <summary><![CDATA[I've just spent a few hours rearranging my&nbsp;Git repositories&nbsp;to use&nbsp;Gitolite, something I've been meaning to do for a long time. This gives me much better control over access permissions, potentially letting me give other people access to my repository without...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gitolite" label="gitolite" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[I've just spent a few hours rearranging my&nbsp;<a href="http://git.bitwiz.org.uk/">Git repositories</a>&nbsp;to use&nbsp;<a href="http://github.com/sitaramc/gitolite">Gitolite</a>, something I've been meaning to do for a long time. This gives me much better control over access permissions, potentially letting me give other people access to my repository without handing over shells and/or real user accounts.<div><br /></div><div>I've done some testing, but things might have broken. &nbsp;If they have, address your complaints to the usual address..</div>]]>
        
    </content>
</entry>

<entry>
    <title>New Toys</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/01/new-toys.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.69</id>

    <published>2010-01-25T18:18:06Z</published>
    <updated>2010-01-25T18:47:47Z</updated>

    <summary><![CDATA[So, I'm now the proud owner of a Lenovo Thinkpad T500 with WSXGA+ screen (1680x1050), 7200rpm HDD, Core 2 Duo, UK keyboard and 9-cell battery. Exactly to specification, and within budget :DI've also ordered myself a second Freerunner. &nbsp;This was...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Openmoko" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="freerunner" label="Freerunner" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="thinkpad" label="Thinkpad" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[So, I'm now the proud owner of a Lenovo Thinkpad T500 with WSXGA+ screen (1680x1050), 7200rpm HDD, Core 2 Duo, UK keyboard and 9-cell battery. Exactly to specification, and within budget :D<div><br /></div><div>I've also ordered myself a second Freerunner. &nbsp;This was a bit less of a budgeted expense, but I have no real shortage of money at the moment (thanks to not drinking regularly). &nbsp;I realised that the reason for my recent lack of productivity wasn't time as such, rather the faff involved with switching into a very unstable environment for development then having to go back to a usable setup at the end of a "session". &nbsp;Developing in "sessions" like this seems to be a nice way to avoid getting anything done at all - I had the same problem at the start of my DRM work when we changed to Linux 2.6.29 from 2.6.24. &nbsp;It's much better to be able to work in a semi-continuous stream as time allows.</div><div><br /></div><div>There's another reason for this purchase though. &nbsp;I'm affected strongly by the infamous Freerunner buzz problem in Germany, whereas I didn't notice it back in the UK. &nbsp;I was going to send my FR in to get both the buzz and #1024 (standby time) fixes done, but I've decided instead just to buy a new one with both fixes already. &nbsp;Then I'll use the new one day-to-day while my current one becomes a development platform, installed with all the latest and most unstable software I can find, so that I can stomp on the nastiest bugs with some degree of comfort.</div><div><br /></div><div>And there's one more new toy: &nbsp;A 32TB RAID6 array with 4 optical fibre channel connections for storing and analysing our data on at work. &nbsp;All my analyses just went from being I/O limited to being firmly CPU bound..</div>]]>
        
    </content>
</entry>

<entry>
    <title>Code Offsetting</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/01/code-offsetting.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.68</id>

    <published>2010-01-23T09:56:09Z</published>
    <updated>2010-01-23T10:15:10Z</updated>

    <summary><![CDATA[I just came across&nbsp;The Alliance for Code Excellence, where you can offset bad code you've written in the past with donations which support open-source projects which "decrease the propagation of bad code"....]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="badcode" label="bad code" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[<div>I just came across&nbsp;<a href="http://codeoffsets.com">The Alliance for Code Excellence</a>, where you can offset bad code you've written in the past with donations which support open-source projects which "decrease the propagation of bad code".</div>]]>
        
    </content>
</entry>

<entry>
    <title>New Year</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2010/01/new-year.html" />
    <id>tag:www.bitwiz.org.uk,2010:/s//1.66</id>

    <published>2010-01-08T21:05:16Z</published>
    <updated>2010-01-08T21:24:33Z</updated>

    <summary><![CDATA[2009 was an awful lot better than 2008 for me, for many reasons. &nbsp;2008 had a lot of negative things of various types, but I won't go into detail about those. 2009 began with my falling into what could possibly...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Everything Else" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Science" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[2009 was an awful lot better than 2008 for me, for many reasons. &nbsp;2008 had a lot of negative things of various types, but I won't go into detail about those. 2009 began with my falling into what could possibly be described as my dream job (particle accelerators <i>and</i> computers!), the completion of my PhD thesis and passing of the subsequent examination before being whisked off my feet by the beginning of an international adventure. &nbsp;I suspect the adventure will be ongoing for the rest of my life. &nbsp;When I moved out of my last long-term accommodation in Cambridge back in May, I knew that things would never be the same again.<br /><div><br /></div><div>I won't go into more detail than that, because&nbsp;his journal has become more about technical things and "productive" aspects of my life rather than personal wibbling. &nbsp;Along which lines, I hope to soon be able (/allowed) to post details of the exciting science I've been doing...</div>]]>
        
    </content>
</entry>

<entry>
    <title>New Laptop Time</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2009/12/new-laptop-time.html" />
    <id>tag:www.bitwiz.org.uk,2009:/s//1.65</id>

    <published>2009-12-22T22:53:29Z</published>
    <updated>2009-12-22T23:19:20Z</updated>

    <summary><![CDATA[{I am getting} {scary messages} in {curly brackets} in my laptop's {dmesg}.&nbsp; The universal warning signal for imminent hard drive death and data loss.&nbsp; I get dropouts of about 30 seconds at a time with no hard drive activity (before...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="laptop" label="laptop" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[{I am getting} {scary messages} in {curly brackets} in my laptop's {dmesg}.&nbsp; The universal warning signal for imminent hard drive death and data loss.&nbsp; I get dropouts of about 30 seconds at a time with no hard drive activity (before the kernel realises and reset the link), during which time the computer is mostly frozen (no HDD I/O possible), and this seems to be happening more and more often.&nbsp; In addition, the power connector is broken - the central pin in the laptop's connector snapped off.&nbsp; Since the pin stays fixed in the hole in the adaptor's plug, it still just about works if it's carefully pushed in and the cable wrapped round to put pressure in the right way.&nbsp; However, I don't know how long either of these will hold out.<br /><br />Of course I'm backed up to the hilt with distributed version control, so I'm not in immediate danger of losing anything particularly important.&nbsp; However, it's apparent that I'll need to buy a new laptop in the near future.&nbsp; At the moment I'm looking at a Lenovo Thinkpad T500 with WSXGA+ (1680x1050) screen and Radeon graphics, but does anyone have any other suggestions?&nbsp; My non-negotiable requirements are:<br /><br /><ul><li>Linux-friendly wifi and graphics.<br /></li><li>Dual core, or at least HT.&nbsp; This really does make a huge difference.<br /></li><li>Widescreen.&nbsp; 1680x1050 with a 15.4" screen gives a resolution I like.</li><li>UK keyboard layout (i.e. UK market, ideally with delivery to Germany possible).</li><li>DVD drive.<br /></li></ul>Ideally it would also have:<br /><br /><ul><li>Decent battery life, or the possibility to buy spare or larger batteries during the next few years once the original one becomes a plastic box of jelly.</li><li>VGA output.</li><li>Fast-ish hard drive (7200rpm or higher.&nbsp; I'm not sure how much of a difference this makes, but I do a lot of compiling and so on.&nbsp; No need to go overboard with solid-state disks for hundreds of extra pounds.<br /></li></ul>I'm not too bothered about:<br /><br /><ul><li>Bluetooth (I don't use it at the moment).</li><li>Huge hard drive - I get on fine with only about 80Gb at the moment.</li></ul>Any suggestions on a comment or email to this address..<br />]]>
        
    </content>
</entry>

<entry>
    <title>Trip to Stanford</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2009/12/trip-to-stanford.html" />
    <id>tag:www.bitwiz.org.uk,2009:/s//1.64</id>

    <published>2009-12-20T11:11:21Z</published>
    <updated>2009-12-20T11:43:28Z</updated>

    <summary><![CDATA[On Friday I got back to Hamburg from San Francisco, where I'd been taking part in experiments at the Stanford Linear Accelerator Cente.&nbsp; We used the LCLS to zap various kinds of object and measure the resulting signals.&nbsp; Without going...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Science" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="lcls" label="LCLS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="particleaccelerator" label="particle accelerator" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="quark" label="quark" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sanfrancisco" label="San Francisco" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="slac" label="SLAC" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="xray" label="X-ray" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[On Friday I got back to Hamburg from San Francisco, where I'd been taking part in experiments at the <a href="http://www.slac.stanford.edu/">Stanford Linear Accelerator Cente</a>.&nbsp; We used the <a href="http://lcls.slac.stanford.edu/">LCLS</a> to zap various kinds of object and measure the resulting signals.&nbsp; Without going into too many gory details, I'm happy to be able to say that the experiment was a great success and we got several terabytes of useful data, which we'll be analysing for many months to come.<br /><br />I hardly had any time to escape the campus or to explore, but I did manage to find some sites of geeky interest.&nbsp; Here's a photo of the research stations at the end of the two mile long linear accelerator, which is hidden by the trees at the back of the picture.&nbsp; The large concrete building on the right is End Station A, where the first experimental evidence for the existence of quarks was recorded around 1966.&nbsp; Their experiment was like a much larger version of Rutherford's scattering experiment with alpha particles and gold foil.&nbsp; Today, End Station A contains test experiments to prepare for the International Linear Collider.&nbsp; I wasn't able to go inside - it's probably possible, subject to the particle accelerator's beam being directed elsewhere and talking to the right people, but there wasn't time and I wasn't keen to push the limits of my security pass (I also couldn't find the door..).<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.bitwiz.org.uk/s/assets_c/2009/12/pc170019-7.html" onclick="window.open('http://www.bitwiz.org.uk/s/assets_c/2009/12/pc170019-7.html','popup','width=1600,height=1208,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.bitwiz.org.uk/s/assets_c/2009/12/pc170019-thumb-320x241-7.jpg" alt="pc170019.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="241" width="320" /></a></span>The similar concrete monstrosity on the left is End Station B, which probably contains similarly cool things (remember what I wrote about concrete?).&nbsp; The long building which comes out between and runs off the picture to the left is the LCLS beam transport hall.&nbsp; Standing where I took this picture, below me and to the left would be the undulator hall, which contains magnets which cause the electron beam to emit X-ray pulses of unimaginable brightness and brevity.&nbsp; The tunnel emerges on the other side of the hill I'm standing on, where the electrons and X-rays move into the building where we worked.&nbsp; The electron beam is dumped (basically by directing it into the ground) and the X-rays make their way into our experiment.<br />]]>
        
    </content>
</entry>

<entry>
    <title>Comments Enabled</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2009/11/comments-enabled.html" />
    <id>tag:www.bitwiz.org.uk,2009:/s//1.63</id>

    <published>2009-11-20T21:51:29Z</published>
    <updated>2009-11-20T21:53:01Z</updated>

    <summary><![CDATA[Due to popular demand, I've enabled comments and trackbacks here.&nbsp; Please don't all spam me at once... :)...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Everything Else" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="comments" label="comments" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="trackbacks" label="trackbacks" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[Due to popular demand, I've enabled comments and trackbacks here.&nbsp; Please don't all spam me at once... :)<br /><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Internal Memory Bottlenecks and Their Removal</title>
    <link rel="alternate" type="text/html" href="http://www.bitwiz.org.uk/s/2009/11/internal-memory-bottlenecks-and-their-removal.html" />
    <id>tag:www.bitwiz.org.uk,2009:/s//1.62</id>

    <published>2009-11-15T16:53:12Z</published>
    <updated>2009-11-15T16:59:23Z</updated>

    <summary><![CDATA[While debugging something different late last night, I noticed some flags in one of Glamo's registers which looked interesting: FIFO settings for the LCD engine.&nbsp; This reminded me of an observation by Lars a few weeks ago that the LCD...]]></summary>
    <author>
        <name>Tom</name>
        
    </author>
    
        <category term="Computer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Openmoko" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="glamo" label="Glamo" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.bitwiz.org.uk/s/">
        <![CDATA[While debugging something different late last night, I noticed some flags in one of Glamo's registers which looked interesting: FIFO settings for the LCD engine.&nbsp; This reminded me of an observation by Lars a few weeks ago that the LCD engine seems to conflict with Glamo's 2D engine on memory accesses, leading to slower performance of accelerated 2D operations when the screen is switched on.&nbsp; So I turned the FIFO up to "8 stages" (from 1) to see what happened.&nbsp; The result was much faster 2D operations - literally twice the speed!<br /><br />At "8 stages", the price of this was that the display became jittery and unstable.&nbsp; However, the same speed improvement is seen at the "4 stages" setting. I've also seen some occasional artifacts with this setting, so I'm using 2 stages at the moment, where the speed is still right up there.&nbsp; I'll be testing some more and seeing if things can be tuned even more.<br /><br />Because we don't make the maximum use possible of the 2D engine, this doesn't immediately translate into a huge increase in the UI speed.&nbsp; But the differences are very obvious with x11perf and some of my test programs. The program I showed in the screenshot recently jumped from 45-48fps right up to 95-98fps!<br />]]>
        
    </content>
</entry>

</feed>
