<?xml version="1.0" encoding="UTF-8"?>
<feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en"
   >
  <title type="text">All Unkept</title>
  <subtitle type="text"></subtitle>

  <updated>2013-05-24T11:16:23Z</updated>
  <generator uri="http://blogofile.com/">Blogofile</generator>

  <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog" />
  <id>http://lukeplant.me.uk/blog/feed/atom/</id>
  <link rel="self" type="application/atom+xml" href="http://lukeplant.me.uk/blog/feed/atom/" />
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Family Fortunes]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/family-fortunes/" />
    <id>http://lukeplant.me.uk/blog/posts/family-fortunes/</id>
    <updated>2011-05-13T13:57:27Z</updated>
    <published>2011-05-13T13:57:27Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Web development" />
    <category scheme="http://lukeplant.me.uk/blog" term="Software projects" />
    <summary type="html"><![CDATA[Family Fortunes]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/family-fortunes/"><![CDATA[<div class="document">
<p>Yesterday I needed to play Family Fortunes (a.k.a. Family Feud) at our church youth group. Our church doesn't have internet connection, so I needed something that would work offline.</p>
<p>There were quite a few versions you could download — for a fee. But as well as the price, getting the computer to do it all is often not so much fun as something with humans more in control, and you're limited to what the computer can do — not easy to fix when you type something in wrong.</p>
<p>So in the end, with a couple of hours to go before the club started, I reckoned I could code up a simple implementation of the score board in a web browser. I scraped some questions from <a class="reference external" href="http://www.pub-quiz.net/Family-Fortunes-quiz.htm">here</a>, used a bit of Python to parse and convert to JSON, then used jQuery and HTML5 audio to get <a class="reference external" href="http://lukeplant.me.uk/familyfortunes/">something that works pretty well</a> for our purposes and doesn't need an internet connection.</p>
<p>Usage and source code on <a class="reference external" href="https://bitbucket.org/spookylukey/familyfortunes/overview">bitbucket</a>. In brief:</p>
<ul class="simple">
<li>n - next question</li>
<li>p - previous</li>
<li>1-5 - correct answer</li>
<li>x - wrong answer</li>
</ul>
<p>We set up my laptop as the screen, with some speakers for increased volume, and one of the other leaders used a USB keyboard to control it and decide on correct answers, while I was the game show host. It ended up being pretty fun, and I can imagine re-using on a church holiday etc, with a projector perhaps.</p>
<p>I was also impressed by just how much you can do in a browser these days, with so little time and effort. Recently the brilliant <a class="reference external" href="http://code.google.com/p/flot/">flot</a> library made me realise the same thing — more and more, web development is beating desktop development in terms of APIs, speed of development, ease of development, and even the performance of the result. I very quickly produced a great set of graphs gathering some stats on a website&nbsp;— both attractive and interactive — and realised that even with many of the easiest charting solutions for the desktop, I would not have been able to produce anything like the results.</p>
</div>
]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Emacs and personal trac wiki]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/emacs-and-personal-trac-wiki/" />
    <id>http://lukeplant.me.uk/blog/posts/emacs-and-personal-trac-wiki/</id>
    <updated>2009-03-18T02:01:12Z</updated>
    <published>2009-03-18T02:01:12Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Python" />
    <category scheme="http://lukeplant.me.uk/blog" term="Blogging and bloggers" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <summary type="html"><![CDATA[Emacs and personal trac wiki]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/emacs-and-personal-trac-wiki/"><![CDATA[
<p>
I've blogged before about
<a class="ext-link" href="http://lukeplant.me.uk/blog/posts/personal-wiki-and-desktop-integration/"><span class="icon">using trac as a personal wiki</span></a>,
and that has been working very well for me.
</p><p>
But of course the day would was bound to come when using the text box
in a web browser was just too painful.  I want to use emacs to edit
the text, and do so painlessly.
</p><p>
Of course, I should have realised before that someone else would have
already done the hard work:
</p><p>
<a class="ext-link" href="http://trac-hacks.org/wiki/EmacsWikiEditScript"><span class="icon">http://trac-hacks.org/wiki/EmacsWikiEditScript</span></a>
</p><p>
It has a few dependencies, as you might expect, and I also had to
<a class="ext-link" href="http://savannah.nongnu.org/bugs/?25314"><span class="icon">patch xml-rpc.el</span></a> because I'm
using Emacs 23 (the author of trac-wiki.el, Shun-ichi GOTO, helpfully
pointed me in the right direction), but it's now working beautifully.
</p><p>
It allows you edit wiki pages directly in Emacs, and much more: it's
got syntax highlighting, completion of page names, history and diff
modes etc., with key bindings and integration for everything you might
want.
</p><p>
A few little Python XML-RPC scripts later, and I can convert this post
(written in my wiki, using Emacs, of course) into HTML ready for
posting on my blog).
</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[MOC and last.fm]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/moc-and-last-fm/" />
    <id>http://lukeplant.me.uk/blog/posts/moc-and-last-fm/</id>
    <updated>2008-06-26T22:26:11Z</updated>
    <published>2008-06-26T22:26:11Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Music" />
    <category scheme="http://lukeplant.me.uk/blog" term="Linux" />
    <summary type="html"><![CDATA[MOC and last.fm]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/moc-and-last-fm/"><![CDATA[<div class="document">
<p>Update: people are having trouble with this now, I am unable to debug what is wrong, it seems like a problem with mocp.</p>
<hr class="docutils" />
<p>When not using Amarok (e.g. if I'm low on memory due to using VMs
or something), <a class="reference external" href="http://moc.daper.net/">moc</a> is very nice music
player (Debian/Ubuntu package 'moc', but command 'mocp'). Here is
how to get it to submit tracks to <a class="reference external" href="http://www.last.fm/">last.fm</a>
in a well behaved manner (that doesn't submit tracks if you are
just skipping through a playlist):</p>
<ul class="simple">
<li>Install lastfmsubmitd: <tt class="docutils literal">sudo aptitude install lastfmsubmitd</tt></li>
<li>Add yourself to lastfm group:
<tt class="docutils literal">sudo adduser [yourusername] lastfm</tt></li>
<li>Download and save my
<a class="reference external" href="http://files.lukeplant.fastmail.fm/public/moc_submit_lastfm">MOC - last.fm script</a>,
and make it executable.</li>
<li>Alter your ~/.moc/config to set OnSongChange as per the
instructions at the top of the script.</li>
<li>Completely quit moc and restart it.</li>
</ul>
<p>The advantage of the script I wrote over just using OnSongChange is
that my script will wait for half the length of the song before
submitting to last.fm. Every 5 seconds it will check you are still
listening to that song, and if not, it will quit. This way it will
behave much more like Amarok and other well behaved last.fm
clients.</p>
</div>
]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Jordan - Wadi Rum]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/jordan-wadi-rum/" />
    <id>http://lukeplant.me.uk/blog/posts/jordan-wadi-rum/</id>
    <updated>2007-09-14T11:51:05Z</updated>
    <published>2007-09-14T11:51:05Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Facebook posts" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <summary type="html"><![CDATA[Jordan - Wadi Rum]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/jordan-wadi-rum/"><![CDATA[
<p>So, I'm back in Amman, time for some updates on what I've been doing this week.  There's loads I could tell, so I'll try to limit myself...</p>

<p>On Monday we set off to the south of Jordan, and stopped on the way down at <a href="http://en.wikipedia.org/wiki/Kerak">Karak Castle</a>.  That deserves a blog post of its own, but I'm going to quickly rush on to <a href="http://en.wikipedia.org/wiki/Wadi_Rum">Wadi Rum</a> — a desert area of Jordan.  We were outside of the main tourist season, and on arrival we were met by a Bedouin man who arranged to put us up with his family that night and organised camel rides and a jeep ride the next day (all for a price, of course, but the hospitality is a really attractive part of the culture here).</p>

<p>This is the tent we slept in:</p>

<p><a href="/blogmedia/wadi_rum_1.jpeg"><img src="/blogmedia/wadi_rum_1_th.jpeg" alt="Bedouin tent"></a>
</p>

<p>They have been made like this for thousands of years (minus the corrugated iron, of course), and the lifestyle of these Bedouins, on the edge of the desert, has likewise remained very constant over this time (again, minus the addition of pickup trucks which have partly replaced camels in the past fifty years).</p>

<p>After a traditional evening meal, and Arabic tea (which is sweet and very refreshing), we slept basically under the stars.  It was a fantastic night for star gazing — as clear as I've ever experienced, no moon, and far from any light pollution from inhabited areas.  I couldn't actually sleep much, but it didn't bother me, as the night sky was just glorious.  I saw dozens of shooting stars, and I'm pretty sure I saw I could see a cloudy structure that seemed to be galaxy — normally only the very centre is bright enough to be seen.  I've tried to memorise the positions of the surrounding constellations, so I'll look it up on <a href="http://www.stellarium.org/">Stellarium</a> as soon as I get the chance.</p>

<p>In the morning, having been awake since half 3, I got up early and climbed this hill before breakfast, which was a lot of fun:</p>

<p><a href="/blogmedia/wadi_rum_2.jpeg"><img src="/blogmedia/wadi_rum_2_th.jpeg" alt="Hill behind Bedouin tent"></a>
</p>


<p>Finding my way down again was even more fun!  After breakfast with the Bedouin family, our camels arrived.  I was not prepared for just how uncomfortable the ride would be — after a while I became convinced that the saddle was on backwards, and turning round (which was easy enough to do without dismounting) did in fact make it ten times more comfortable, if slightly less conventional.  Sitting sideways was probably the best, and almost any position was better than the most obvious one. Still, it was a fun experience.  Up close, camels do look like quite alien creatures — their strange, two-toed feet and curious gait make them seem like genetically engineered alien products.  We stopped at the foot of a mountain to explore a cleft — or 'siq' as I believe it is called:</p>

<p><a href="/blogmedia/wadi_rum_cleft1.jpeg"><img src="/blogmedia/wadi_rum_cleft1_th.jpeg" alt="Cleft in mountain"></a>
</p>


<p>and also enjoyed a stop for tea with another hospitable local Bedouin. Shortly after, for more rapid progress and exploration, we continued by jeep:</p>

<p><a href="/blogmedia/wadi_rum_jeep.jpeg"><img src="/blogmedia/wadi_rum_jeep_th.jpeg" alt="Jeep and driver"></a>
</p>

<p>We were taken round various interesting parts, including various natural rock bridges like this one:</p>

<p><a href="/blogmedia/wadi_rum_bridge1.jpeg"><img src="/blogmedia/wadi_rum_bridge1_th.jpeg" alt="Natural rock bridge"></a>
&nbsp;<a href="/blogmedia/wadi_rum_bridge2.jpeg"><img src="/blogmedia/wadi_rum_bridge2_th.jpeg" alt="Peter under the bridge"></a>
</p>


<p>(Peter and myself were both on top of this one shortly afterwards, but you never have the camera in the right place at the right time).  Of course, we had to try a bit of sand dune leaping too:</p>

<p><a href="/blogmedia/wadi_rum_dune1.jpeg"><img src="/blogmedia/wadi_rum_dune1_th.jpeg" alt="Sand dune leaping 1"></a>
&nbsp;<a href="/blogmedia/wadi_rum_dune2.jpeg"><img src="/blogmedia/wadi_rum_dune2_th.jpeg" alt="Sand dune leaping 2"></a>
</p>


<p>The sand is mainly a pink-orange here, but it does in fact vary quite a lot in colour.  And the desert just goes on ...</p>

<p><a href="/blogmedia/wadi_rum_4.jpeg"><img src="/blogmedia/wadi_rum_4_th.jpeg" alt=""></a>
&nbsp;<a href="/blogmedia/wadi_rum_5.jpeg"><img src="/blogmedia/wadi_rum_5_th.jpeg" alt=""></a>
</p>

<p>and on and on...</p>


<p><a href="/blogmedia/wadi_rum_7.jpeg"><img src="/blogmedia/wadi_rum_7_th.jpeg" alt=""></a>
&nbsp;<a href="/blogmedia/wadi_rum_6.jpeg"><img src="/blogmedia/wadi_rum_6_th.jpeg" alt=""></a>
</p>


<p>...a bit like this blog post, but that's all for now.</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Jordan - part 1]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/jordan-part-1/" />
    <id>http://lukeplant.me.uk/blog/posts/jordan-part-1/</id>
    <updated>2007-09-08T17:49:49Z</updated>
    <published>2007-09-08T17:49:49Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Facebook posts" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <summary type="html"><![CDATA[Jordan - part 1]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/jordan-part-1/"><![CDATA[
<p>I don't normally do really personal blog posts, but thought I'd make an exception to update family and so on about what I've been doing.</p>


<p>Until now we've mainly been lazying around being entertained by the very hospitable Jordanian folk, but today I did more sightseeing.  You can follow my route using this <a href="http://maps.google.co.uk/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=101263706111064127946.000439a1fea57c8421dca&amp;ll=31.690782,35.661621&spn=1.063337,1.867676&amp;t=h&amp;z=9&amp;om=1">Google MyMap</a>, or click the links below. We started off fairly early this morning from where we are staying in <a href="http://maps.google.co.uk/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=101263706111064127946.000439a1fea57c8421dca&amp;ll=31.972297,35.956943&amp;spn=0.008282,0.014591&amp;t=h&amp;z=16&amp;om=1">Hashemi</a>, <a href="http://en.wikipedia.org/wiki/Amman">Amman</a>.</p>

<p>For those who are interested, this is a <a href="http://en.wikipedia.org/wiki/Image:Amman3.jpg">representative photo of Amman</a>, which is a large city of about 3 million inhabitants.</p>

<p>We then traveled an hour south to the <a href="http://en.wikipedia.org/wiki/Dead_Sea">Dead Sea</a> (<a href="http://maps.google.co.uk/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=101263706111064127946.000439a1fea57c8421dca&amp;ll=31.492963,35.570447&amp;spn=0.008325,0.014591&amp;t=h&amp;z=16&amp;om=1">map</a>), which was great. Trying to swim in it is actually rather difficult -- you have to keep your head out of the amazingly saline water, but the buoyancy forces your legs to the surface as soon as they deviate at all from vertically down!  We then washed off in a waterfall fed from a naturally hot spring -- and I mean <strong>hot</strong>.  I couldn't keep my feet in it for more than a few minutes at a time.  With the added pressure and volume that a waterfall provides, it was the best hot shower I've ever had.</p>

<p>After that, we went to <a href="http://en.wikipedia.org/wiki/Mount_Nebo_%28Jordan%29">Mount Nebo</a> (<a href="http://maps.google.co.uk/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=101263706111064127946.000439a1fea57c8421dca&amp;ll=31.768493,35.727024&amp;spn=0.008301,0.014591&amp;t=h&amp;z=16&amp;om=1">map</a>), stopping at a nicely -- and necessarily -- air conditioned restaurant for a good lunch.  The views from Mount Nebo were impressive, but it would have been much better if had been less hazy (and if I'd had some sunglasses! it was rather bright).</p>

<p>That's all for now, though there is lots more I could say.  Hopefully next week I'll visit <a href="http://en.wikipedia.org/wiki/Petra">Petra</a>, among other places.</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Beryl usefulness]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/beryl-usefulness/" />
    <id>http://lukeplant.me.uk/blog/posts/beryl-usefulness/</id>
    <updated>2007-06-11T21:43:25Z</updated>
    <published>2007-06-11T21:43:25Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="KDE" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Linux" />
    <summary type="html"><![CDATA[Beryl usefulness]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/beryl-usefulness/"><![CDATA[
<p>I thought I'd do a quick analysis of <a href="http://www.beryl-project.org/">Beryl</a> from a 'usefulness' point, rather than the <a href="http://youtube.com/watch?v=QOWeeVvhiAw">pure</a> <a href="http://youtube.com/watch?v=ZD7QraljRfM">eyecandy</a> <a href="http://youtube.com/watch?v=bYsxaMyFV2Y">you see</a> <a href="http://youtube.com/watch?v=YKEcz_OTTBk">everywhere</a>.  For the record, my machine is a few years old, an AMD Athlon 1800, with 512 Mb RAM, and I've got an NVidia GeForce 5200 FX -- an pretty old model of graphics card these days, but you can still buy them new, and it works well enough for my needs (although some of the effects are noticeably sluggish</p>

<h3>Configuration</h3>
<p>First, a hint to people using KDE - <tt>export KDEWM=beryl</tt> is the way to go -- just put that line in your ~/.bash_profile.  This way, beryl starts first of all, rather than first loading KWin.  This speeds things up, but also avoids some bugs I found if KWin loads first.</p>

<p>It took me a while to configure everything, and l usually change in my case, as I tend to use the 'Windows' key for all window manager and global shortcuts).  I've now got pretty much ideal settings, but it would take a long time for a novice to get things into the setup I would demonstrate to them (but then again, I'm pretty fussy about this kind of thing -- most people would just use a mouse)</p>

<p>Setting up windows to appear on certain cube faces is too hard -- it needs to be integrated into the context menu for the window, like it is in KWin.</p>

<p>Lots of things can only be discovered by the inquisitive i.e. pretty much all the shortcuts require going through dialogs in beryl-settings to find (and then usually change in my case, as I tend to use the 'Windows' key for all window manager and global shortcuts).  I've now got pretty much ideal settings, but it would take a long time for a novice to get things into the setup I would demonstrate to them (but then again, I'm pretty fussy about this kind of thing -- most people would just use a mouse).</p>



<h3>Useful things</h3>
<p>Having got everything configured as I like it, I've got a list of things I consider genuine advantages:</p>

<ul>
<li><b>Switching between windows/desktops</b> is <b>snappier</b> because windows are not having to be redrawn (at least it seems that way) due to an offscreen buffer.  Moving of windows is also much nicer -- the windows underneath are not redrawn.</li>

<li><b>Edge flipping</b> is much better with a cube.  Because it takes time to do the rotation (not much once it gets going), you have opportunity to back out, and it's not a case of magically appearing on another desktop -- it's very obvious what's happened.</li>

<li>The <b>uninitiated</b> can see how useful it will be much more easily.  To explain to someone how multiple viewports/desktops work used to take a long time and they probably still wouldn't believe you.  Using a manual cube rotation, you can show it to them in 2 seconds (I did it today, with a real 'wow' response).</li>

<li><b>Edge snapping</b> is nicer in some ways with wobbly windows -- the windows don't jump about, instead they stretch and squash, and it feels much more 'physical', and obvious what is happening. (Edge snapping itself actually works slightly better in KWin -- it snaps <i>before</i> you get there, whereas in Beryl it sticks <i>after</i> you've got there).  In general wobbly windows are not as useless as they seem -- they make windows much more tangible.</li>

<li><b>'Scale'</b> (like Compose on Macs) works great, and it works in combination with multiple desktops very well -- you can access the window you want very quickly, and yet you still have multiple workspaces</li>

<li>Windows <b>fading/zooming in and out</b> when they appear is somehow much nicer on the eyes.   The visual clues that something has appeared/disappeared are nice.</li>
<li>Window <b>transparency</b> is useful once you realise that there are shortcuts for changing the transparency of an individual window (Alt + mousewheel by default).  This allows you to put something in the background (e.g. a browser window that you are waiting to load) and quickly change the transparency of the window that is in front slightly so that you can see when it has loaded.  </li>
<li><b>Zooming</b> - you can zoom in on the whole desktop very easily (Win + mousewheel for me), which is nice for looking at the detail of a photo and things like that.</li>
<li><b>'Beep'</b> - Beryl can reinterpret the 'beeps' that many applications make in response to invalid input and turn them into a visual clue -- the whole window quickly expands and contracts like someone stamped on it.  It's a very nice effect, and much nicer than hearing a beep.  It doesn't work with all applications -- I still haven't succeeded get konsole/yakuake to do it, though xterm does (I've tried every combination of settings for interpreting the 'system beep' in konsole).</li>

</ul>

<p>In general, the 'windows-as-pieces-of-paper-on-a-desktop' metaphor starts to come into its own when you can have multiple desktops, when you can shrink all the pieces of paper and put them side by side at a keystroke, when you can magnify your entire desktop in a fraction of a second, when you can 'touch' pieces of 'paper' and change their opacity at will, and so on.  It has taken us this long for this metaphor to actually be much better than the physical thing it is copying.</p>


<h3>Sucky things</h3>
<p>Crashes:</p>

<ul><li>I've been afflicted by X crashing randomly -- it's a <a href="https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/71913">known bug</a>.  It happens about once every 10 hours with me, usually when there is some intense disk activity.  Quite annoying, but hasn't lost me much time yet.</li>

<li>About once every 5-10 times I log in, X freezes very shortly after logging in.  Quite annoying.  I have to do a hard reset.</li>
</ul>

<p>Other bugs:</p>

<ul>
<li>An Nvidia bug means that once you open too many windows, you start get black windows appearing (for me, this condition isn't too hard to trigger). You can fix it by changing the 'Rendering Platform' to 'Force AIGLX' and the 'Rendering path' to 'Texture from Pixmap'.  However, performance is then much worse - CPU maxes out when doing things like rotating the cube or things involving a large amount of transparency.  This means that things like live preview of videos becomes very jerky or stops altogether, and music will pause if you spend more than about a couple of seconds rotating the cube or dragging windows around.</li>

<li>Some normal apps have worse performance.  Notably for me, this includes scrolling down by using arrow keys in the editor in Eric (a Python IDE)</li>

</ul>

<p>The combined effect of these bugs has been annoying enough to make me go back to using KWin -- in fact the last one in the list was the biggest.  On a more powerful machine, I'm guessing some of these things wouldn't actually be a problem. Things I'm missing the most are the nice 'feel' of everything (things fading in and out, windows being more tangible) and the 'Scale' feature.  Previews of <a href="http://dot.kde.org/1180541665/">KWin for KDE4</a> look very nice, getting the most useful of the desktop effects with the stability of KWin, and I'm looking forward to that.  I'm hoping the NVidia bugs will be fixed by then too :-)</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[What's so bad about the Nazis anyway?]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/what-s-so-bad-about-the-nazis-anyway/" />
    <id>http://lukeplant.me.uk/blog/posts/what-s-so-bad-about-the-nazis-anyway/</id>
    <updated>2007-05-02T22:13:40Z</updated>
    <published>2007-05-02T22:13:40Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Christianity" />
    <summary type="html"><![CDATA[What's so bad about the Nazis anyway?]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/what-s-so-bad-about-the-nazis-anyway/"><![CDATA[
<div class="document" id="what-s-so-bad-about-the-nazis-anyway">
<p><i>The following article is intended to be thought-provoking satire. I was forced to put this disclaimer at the top, because I discovered, unfortunately too late, that it is almost impossible to parody a lot of what goes on and is believed in today's society.</i></p>

<p>A popular, though inaccurate, interpretation of <a class="reference" href="http://en.wikipedia.org/wiki/Godwin's_Law">Godwin's law</a> is that one should
refrain from comparing your opponent to Nazis, because this action is
so insulting that meaningful debate will be killed off.  I want to ask
whether this is really true, and whether the Nazis were really as bad
as they are portrayed in our media.</p>
<p>One famous Nazi policy was to kill physically handicapped people.
Before we react against this, we must remember that the killing of
handicapped people can hardly be called barbaric if the <a class="reference" href="http://www.independent.co.uk/life-style/health-and-families/health-news/allow-active-euthanasia-for-disabled-babies-doctors-urge-423059.html">Royal Society
of Gynaecology (UK) is suggesting that we be allowed do the same
thing</a>
if they are newly born children. Their arguments for this are pretty
sound -- in the words of John Harris, a member of the government's
Human Genetics Commission and professor of bioethics at Manchester
University: &quot;We can terminate for serious foetal abnormality up to
term but cannot kill a newborn. What do people think has happened in
the passage down the birth canal to make it okay to kill the foetus at
one end of the birth canal but not at the other?&quot;.  It makes sense in
other ways too — for cases where it is easier to detect the condition
after birth, it is safer for both the mother and child if the
procedure is done after birth, and it's less wasteful as it avoids
misdiagnoses.</p>
<p>Actually, the Nazis were more consistent and logical than we are. Our
aim, quite rightly, is to eliminate suffering, so we compassionately
end the lives of people who are either going to suffer a lot, or cause
lots of suffering in other people's lives.  We should not be
half-hearted about this effort, but follow the noble lead set by the
Nazis.</p>
<p>Then there is the issue of how the Nazis segregated the Jews from the
rest of society.  Racial separation is well known in many parts of the
world, and in many cases is not seen to be harmful or undesirable —
see the attitude of many of these people regarding their <a class="reference" href="http://www.cnn.com/2007/US/04/23/turner.prom/index.html">traditional
segregated high school proms</a> for
example. It is quite natural for people to prefer society that they
are comfortable with.  In the case of Nazi Germany, the majority of
that society did not feel comfortable around Jews, and one can safely
imagine that the Jews of this period were not that fond of the
Germans.  So no-one would have objected to this segregation, which
actually promoted a peaceful society by keeping the warring factions
at a safe distance from each other.</p>
<p>Some people may still object that when it came to the Final Solution,
the Nazis went too far.  However, the people of Germany were
exercising their democratic rights — Hitler was, after all,
democratically elected.  Since morality is defined by consensus, it is
outrageous for us to condemn this nation for its actions.  Also, we
should remember that their action in removing Jews from their society
once and for all is really just a logical parallel to removing other
undesirables such as handicapped people.  While we obviously neither
share nor applaud these anti-Semitic views (because we have found
that, far from being a social pestilence, Jewish people can in fact
make a very valuable contribution to society), we must respect the
right of a democratic nation to come to its own conclusions about
ethics — who are we to enforce our own scruples on others?</p>
<p>In the past, we have suffered a great deal from people imposing their
moral opinions on other people, and thankfully many nations are now
outlawing this kind of behaviour.  For instance, Britain has recently
passed a bill making it <a class="reference" href="http://news.bbc.co.uk/1/hi/uk_politics/6473831.stm">illegal to refuse services on the basis of
sexual orientation</a>.  One
ramification of this, that certain Christian groups are complaining
about, is that private individuals who let out rooms in their houses
for Bed and Breakfast (a common practice in the UK) will no longer be
able to refuse a double room to a homosexual couple.  Similarly,
religious adoption agencies will no longer be allowed to refuse their
services or discriminate against homosexual couples.  In both cases
this is, of course, a great step forward in the right direction — we
ought to be very intolerant of these groups who would seek to force
their moral views on other people, even if until very recently their
views have been considered the norm or even enshrined in law.  In the
same way, we need to learn to refrain from passing judgement and
condemning peoples of the past, such as the Nazis, who didn't happen
to have identical ethics to our changing standards.</p>
<p>Finally, I want to say something about debates that invoke Nazis not
as direct insults, but in 'slippery slope' arguments that take the
form &quot;if we do this now, very soon we will be doing X, just like the
Nazis (or other bad people)&quot;.  While these may seem either very
powerful or insulting, history has shown that such arguments are
actually empty.  For example, when abortion law was changed in the UK
in the 1960's, I have no doubt that one of the arguments against
abortion was that it would lead to selectively terminating people with
severe handicaps or disabilities, or even to the killing of infants
after birth — certainly I have heard both such arguments within my
<em>own</em> lifetime, and the idea that anyone would approve of post-natal
terminations sounded ridiculous at the time.  But today, we know that
it is perfectly reasonable to cull foetuses for these reasons,
including post-natal infants, according to the sensible arguments of
the Royal Society mentioned above.</p>
<p>Again, when genetic screening for cystic fibrosis and other diseases
was introduced, some people complained that this might lead to
screening against the mere possibility of a disease. In this <a class="reference" href="http://www.woodrow.org/teachers/bi/1992/gen_screen1.html">article
from 1992 about screening and ethics</a>, it states
that the guidelines from 1970's handled the ethical problems by
stating that &quot;screening was appropriate if the genetic disorder was
serious, the test was accurate, and a therapy or intervention was
available&quot;.  The article lists some of the ethically dubious
possibilities envisioned, such as: &quot;Women carrying foetuses with
genetic abnormalities may be encouraged to abort&quot;.</p>
<p>In Britain, aborting because of genetic abnormalities such as cystic
fibrosis is old news. Last week, <a class="reference" href="http://news.bbc.co.uk/1/hi/health/6594725.stm">plans for screening against a gene
that gives a high risk of breast cancer were announced</a>, which is clearly
quite a different matter.  The screening is done not against the
mother eggs, against the foetuses, and not for the purpose of therapy,
but early abortion (i.e. in the context of IVF, as I understand it).
Clearly, all but the most heartless of people have applauded this
humane step. The very fact that these 'slippery slope' arguments were
used in the first place, and the way that people responded to them at
the time, shows us that these arguments were thought to be powerful,
and the possibilities they threatened were thought to be genuine
evils. But in both cases, and surely many others, we now know better.
For this reason, we are right to ignore <em>all</em> slippery slope
arguments. Eventually, time and the progress of ethics will show that
the original moral objections were misguided.</p>
<p>So, to conclude, I am actually in favour of the principle that we
shouldn't use the example of Nazis when debating ethics and so, but
for different reasons than those commonly cited.  The first reason is
that when we use the Nazis in this way, we are perpetuating a slur on
the reputation of the Nazis that they simply do not deserve — they
were a compassionate people, and even if there are some areas where we
think they did not act very wisely, or where we would have acted very
differently, we are stepping way out of line if we condemn them for
their different ethical standards.  A second reason stems from the
first — it can hardly be either an insult or an argument to make
comparisons to such a people, and so the Nazis are somewhat irrelevant
to our ethical debates.  We should find some other <em>genuinely</em> evil
group of people as a reference point, and then pronounce a ban on
making comparisons to <em>them</em> instead.  And thirdly, all slippery slope
arguments can be seen, ultimately, to be vacuous, as society will
adjust its understanding of morality and we will come to realise that
what we had been afraid of isn't so bad after all.</p>
<p>I already know what the reaction to this essay will be. Half the
readers, the Christian fundamentalists, will rant on about this being
an example of the disastrous effect of moral relativism, and that in
fact Western society is already a long way down the slope to becoming
one of the most horrific societies this world has ever known, and
the only reason I don't realise it is because I am so desensitised.
They will go on to threaten the judgement of God (or George Bush) and
other silly things. The other half, the more reasonable half, will
complain that this is old news.</p>
</div>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Working with email offline]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/working-with-email-offline/" />
    <id>http://lukeplant.me.uk/blog/posts/working-with-email-offline/</id>
    <updated>2006-10-10T21:29:59Z</updated>
    <published>2006-10-10T21:29:59Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Internet" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Linux" />
    <summary type="html"><![CDATA[Working with email offline]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/working-with-email-offline/"><![CDATA[
<p>I'm currently without internet connection to my own computer, and I've
been working out ways to make send and receiving e-mail as seamless as
possible.  I thought I'd document my procedure, with scripts, for
those who find themselves in the same predicament.</p>
<p>Thankfully, although the machines I'm using to connect to the net are
Windows machines, I do have access to a Linux box that is connected to
the net with an ssh account I can log in to.  Here is my setup for
e-mail:</p>
<div class="section">
<h2><a id="sending" name="sending">Sending</a></h2>
<p>I'm still using KMail for composing and sending e-mail.  I've set up a
'sendmail' item for sending, but pointed it at my own python script,
which, instead of attempting to send the e-mail, saves it as a file on
a folder in my MP3 player (or complains if I've forgotten to plug it
in).  Here is the script:</p>
<!--  -->
<pre class="python literal-block">
#!/usr/bin/python

# Dump stdin in a file with unique name

from datetime import datetime
import operator
import sys
import os
import random
from copy import deepcopy
import itertools

DUMPDIR = '/media/sda1/mail/outgoing'

def mk_filename():
    "Creates a unique filename"
    return (reduce(operator.add,
                  [chr(random.randint(ord('A'), ord('Z'))) for i in xrange(0,10)]) \
                  + '.' + datetime.isoformat(datetime.now())).replace(':','_')

def dump_file(recips):
    if len(recips) == 0:
        print "No recipients found."
        sys.exit(1)

    fname = mk_filename()
    fn = os.path.join(DUMPDIR, fname + ".msg")
    fp = open(fn, 'w')
    for line in sys.stdin:
        fp.write(line)
    fp.close()

    fn2 = os.path.join(DUMPDIR, fname + ".recips")
    fp2 = open(fn2, 'w')
    fp2.write(' '.join(recips))
    fp2.close()

def prompt_for_continue():
    prompt = "Cannot find directory %s for saving mail.  " \
             "Create directory or mount device and press 'Continue', " \
             "or cancel."  % (DUMPDIR,)
    exit_status = os.system('kdialog --warningcontinuecancel "%s"' % prompt)
    return exit_status == 0

def check_dir_and_dump(recips):
    if not os.path.isdir(DUMPDIR):
        if prompt_for_continue():
            check_dir_and_dump()
        else:
            sys.stderr.write("Cancelled.")
            sys.exit(1)
    else:
        dump_file(recips)

# For BCC, have to read recipients from command line,
# and then for simplicity create separate files for each, with a
# 'To' header added

def get_recipients():

    recipients = deepcopy(sys.argv)
    recipients = recipients[1:] # name of this shell script

    cont = True
    i = 0
    while (cont):
        if i >= len(recipients):
            cont = False
        else:
            if recipients[i] == '-i':
                recipients.pop(i)
            else:
                if recipients[i] == '-f':
                    recipients.pop(i)
                    recipients.pop(i)
                else:
                    i += 1
    return recipients

check_dir_and_dump(get_recipients())
os.system('sync')
</pre>
<p>Then, on the machine that is connected it to the internet, which I'll
use perhaps once a day, I transfer the files from my MP3 player to my
Linux box on the net via ftp.  I also log in via ssh, using PuTTy, and
run a script with sends all the emails in the 'outgoing' folder,
deleting them if successful.  To send these e-mails, I use 'msmtp',
which can easily be downloaded, compiled and installed locally:</p>
<blockquote>
./configure --prefix=~/local &amp;&amp; make &amp;&amp; make install</blockquote>
<p>(Needs ~/local to exist, probably, and needs ~/local/bin on your path to
use the installed binary.)</p>
<p>Then, the script to send all the e-mails is just something like:</p>
<!--  -->
<pre class="shell literal-block">
#!/bin/bash
cd $HOME
for TMP in ~/lp/mail/outgoing/*.msg; 
do 
  echo $TMP
  RECIPFILE=${TMP%%.msg}.recips
  RECIPS=$(cat $RECIPFILE);
  msmtp $RECIPS &lt; $TMP || exit 1;
  rm $TMP $RECIPFILE
done
</pre>
<p>(once you've created a config file for msmtp).</p>
</div>
<div class="section">
<h2><a id="receiving" name="receiving">Receiving</a></h2>
<p>Currently, I check my e-mail using Fastmail's web interface, and at
that point deal with all the spam, and delete other e-mail that there
is no point transfering, and answer some e-mails.  What needs to be
transfered goes into my 'received' folder, and you can then use
Fastmail's 'Archive' feature to take all the e-mails in a folder and
download them as a zip file.  This zip file is saved back onto my MP3
player in a specific folder, and taken back to my computer.</p>
<p>Once on my computer, I have another script which imports all the
e-mail in that folder into KMail, removing them from the MP3 player.</p>
<!--  -->
<pre class="shell literal-block">
#!/bin/bash

# Attempt to import all files on removable device into KMail

INCOMING_DIR=/media/sda1/mail/incoming
EXTRACT_DIR=/home/luke/download/mail

die_loudly() {
    # kdialog --error &quot;$1&quot;
    echo &quot;$1&quot;
    echo
    exit 1
}

ps ax | egrep 'kontact|kmail' &gt; /dev/null || { die_loudly &quot;KMail isn't running, can't import messages&quot; ; }

if [ \! -d &quot;$INCOMING_DIR&quot; ]
then
    die_loudly &quot;$INCOMING_DIR cannot be found&quot;
fi

if [ \! -d &quot;$EXTRACT_DIR&quot; ]
then
    die_loudly &quot;$EXTRACT_DIR cannot be found&quot;
fi

mv $INCOMING_DIR/*.zip $EXTRACT_DIR || die_loudly &quot;Can't move files from device&quot;
cd $EXTRACT_DIR
unzip -o *.zip
for FILE in *.eml
do
  echo dcop kmail KMailIface dcopAddMessage &quot;inbox&quot; \&quot;file://$PWD/$FILE\&quot; &quot;&quot;
  retval=`dcop kmail KMailIface dcopAddMessage &quot;inbox&quot; &quot;file://$PWD/$FILE&quot; &quot;&quot;`
  if [ $? -ne 0 ]
  then
      die_loudly &quot;Failed to import $FILE&quot;
  fi
  if [ $retval -ne 1 ]
  then
      die_loudly &quot;Failed to import $FILE&quot;
  fi
  rm &quot;$FILE&quot;
done

rm $EXTRACT_DIR/*.zip
</pre>
<p>I normally run this from a console (Yakuake, to be precise, which is
only ever 'F12' away), so I can see any error messages.  Otherwise I'd
change the 'die_loudly' function to use kdialog.</p>
<p>This is of course quite a bit of a faff, but it's doable.  The methods
and scripts are robust against forgetting to do it some days.  If I
wasn't using Windows boxes for connecting to the net, or if it was
always the same box and I was allowed to install any software on,
things would be better.  As it is, 'PuTTy', which is a single, small
executable, is the only thing I have to carry around with me.  Also,
if for whatever reason I'm reduced to only the web interface of
Fastmail, I'm OK -- the Linux box isn't periodically retrieving my
mails by POP or anything like that, and I only need it for sending
e-mails I've prepared on my own machine.</p>
</div>

<p>UPDATED: Fixed scripts to handle BCC and other recipients that are passed only on the sendmail commandline.</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Truth In Science website launched]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/truth-in-science-website-launched/" />
    <id>http://lukeplant.me.uk/blog/posts/truth-in-science-website-launched/</id>
    <updated>2006-09-20T21:15:30Z</updated>
    <published>2006-09-20T21:15:30Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Internet" />
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Web development" />
    <category scheme="http://lukeplant.me.uk/blog" term="Christianity" />
    <summary type="html"><![CDATA[Truth In Science website launched]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/truth-in-science-website-launched/"><![CDATA[
<p>The website for <a href="http://www.truthinscience.org.uk">Truth In Science</a> has just launched 5 minutes ago (I know because I pressed the switch to make it go public, having helped out a bit with building the website).</p>

<p>Truth In Science is a UK organisation seeking to improve science education in the UK, especially in the area of theories of origins.  It is hoping to promote teaching of alternatives to evolution, especially Intelligent Design,  and encourage critical examination of evolutionary theories.  I'm proud to have helped out as I've been able.</p>

]]></content>
  </entry>
  <entry>
    <author>
      <name></name>
      <uri>http://lukeplant.me.uk/blog</uri>
    </author>
    <title type="html"><![CDATA[Replacement dos box for Windows - emacs shell mode]]></title>
    <link rel="alternate" type="text/html" href="http://lukeplant.me.uk/blog/posts/replacement-dos-box-for-windows-emacs-shell-mode/" />
    <id>http://lukeplant.me.uk/blog/posts/replacement-dos-box-for-windows-emacs-shell-mode/</id>
    <updated>2006-09-01T09:18:06Z</updated>
    <published>2006-09-01T09:18:06Z</published>
    <category scheme="http://lukeplant.me.uk/blog" term="Personal and misc" />
    <category scheme="http://lukeplant.me.uk/blog" term="Microsoft" />
    <category scheme="http://lukeplant.me.uk/blog" term="Linux" />
    <summary type="html"><![CDATA[Replacement dos box for Windows - emacs shell mode]]></summary>
    <content type="html" xml:base="http://lukeplant.me.uk/blog/posts/replacement-dos-box-for-windows-emacs-shell-mode/"><![CDATA[
<p>The Windows dos box (command prompt) sucks in many ways in comparison to an xterm (and I'm not even including 'command' vs 'bash' here).  But if you have emacs you can make it suck a little bit less.  "M-x shell" gets you shell mode, and you can select text etc, and use emacs keybindings for editing your commands etc.</p>

]]></content>
  </entry>
</feed>
