<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom">

	<title>Planet Belfast Linux</title>
	<link rel="self" href="http://planet.belfastlinux.org/atom.xml"/>
	<link href="http://planet.belfastlinux.org/"/>
	<id>http://planet.belfastlinux.org/atom.xml</id>
	<updated>2010-03-11T15:00:08+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<entry>
		<title type="html">Fizz buzz</title>
		<link href="http://www.earth.li/~noodles/blog/2010/03/fizz-buzz.html"/>
		<id>tag:www.earth.li,2010:/~noodles/blog//1.234</id>
		<updated>2010-03-08T22:32:37+00:00</updated>
		<content type="html" xml:lang="en">&lt;p&gt;
Inspired by a conversation about interview coding tasks from a list I'm on, I present the following - I considered it too long to email there. It took me longer than I expected to write; my x86 assembly is quite rusty. I'm not claiming it's pretty, but it fits in a single sector and most of the overhead is actually ELF structures.
&lt;/p&gt;
 &lt;pre&gt;
; nasm -f elf fizzbuzz.asm
; ld -melf_i386 -s -o fizzbuzz fizzbuzz.o
; ./fizzbuzz

section .data

fizz	db	&quot; fizz&quot;
fizzlen	equ	$ - fizz
buzz	db	&quot; buzz&quot;
buzzlen	equ	$ - buzz
num	db	&quot;   &quot;
numend	equ	$ - 1
numlen	equ	$ - num
nl	db	0xa
nllen	equ	$ - nl

curnum	db 1

section .text

	global _start

_start:
	mov ax, [curnum]
	call printnum

	mov ax, [curnum]
	mov cx, 3
	xor dx, dx
	div cx
	cmp dx, 0
	jnz notfizz

	mov edx, fizzlen
	mov ecx, fizz
	call printstr

notfizz:
	mov ax, [curnum]
	mov cx, 5
	xor dx, dx
	div cx
	cmp dx, 0
	jnz notbuzz

	mov edx, buzzlen
	mov ecx, buzz
	call printstr

notbuzz:
	mov edx, nllen
	mov ecx, nl
	call printstr

	inc BYTE [curnum]
	cmp BYTE [curnum], 100
	jle _start

	xor ebx, ebx
	mov eax, 1
	int 0x80

printnum:
	mov edi, numend
	mov cx, 10
p1:
	xor edx, edx
	div cx
	add dx, '0'
	mov [edi], dl
	dec edi
	cmp ax, 0
	jne p1

	mov ecx, num
	mov edx, numlen
printstr:
	mov ebx, 1
	mov eax, 4
	int 0x80
	ret
&lt;/pre&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Meta: Rant about rants about PGP keysigning problems</title>
		<link href="http://www.earth.li/~noodles/blog/2010/03/meta-rant-about-rants-about-pg.html"/>
		<id>tag:www.earth.li,2010:/~noodles/blog//1.233</id>
		<updated>2010-03-03T22:15:23+00:00</updated>
		<content type="html" xml:lang="en">(This has ended up longer than I intended, largely because I felt I should then get into why. I'm aware I haven't got into all the nuances, so I hope readers familiar with the area will appreciate this is the compact version.)&lt;br /&gt;&lt;br /&gt;Thorsten had a &lt;a href=&quot;https://www.mirbsd.org/permalinks/wlog-10_e20100223-tg.htm&quot;&gt;rant&lt;/a&gt; last week about PGP keysigning problems. He apologises for his tone, but that's not the issue I take with his rant.&lt;br /&gt;&lt;br /&gt;It starts &quot;Keysigning is useless&quot;. And yet his complaints seem to be:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dealing with the private half of your GPG key securely involves some faff (in this case booting with a live CD and having to set things up ready to keysign).&lt;/li&gt;&lt;li&gt;He doesn't get on with caff.&lt;/li&gt;&lt;li&gt;People reject email from machines with invalid HELOs and perform other anti spam measures on ISP access ranges (I'm not clear if it's just greylisting or outright rejects as that's not made clear).&lt;/li&gt;&lt;li&gt;PGP/MIME is a protocol violation (yes, but it's much better than inline OpenPGP. Unless you have to deal with RT, which mangles it. *sigh*)&lt;/li&gt;&lt;/ul&gt;None of these seem to actually be about keysigning being useless. The process of doing it, maybe, though he misses the main valid rant about this I'd have, which is that most mass keysignings don't actually allow you to accurately verify the identity of other participants unless you already know them reasonably well. (The LCA2010 keysigning and DebConf5 in Helsinki spring to mind as 2 good examples of bad keysignings I've attended, but speaking to others suggests it's far from an isolated thing.)&lt;br /&gt;&lt;br /&gt;Torsten does say that he'll continue to do keysigning on a per-person basis, so it doesn't sound like he's completely given up. I'm posting this largely so other Debian related people don't get the idea that it's not important to think about keysigning.&lt;br /&gt;&lt;br /&gt;Why should we care?&lt;br /&gt;&lt;br /&gt;Firstly, let's clarify what I mean when I sign someone else's key. If I sign your key then I think that I believe you hold the private part of a key that has your name and an email address I believe I can use to contact you on it. It means I have seen government issued ID that matches that name. It also means that I have interacted with you (and watched others interact with you) under that persona. In short I am happy that the key is a reasonable digital representation of your identity - something signed by it either comes from you or has involved the key being compromised or you coerced&amp;nbsp; into using it against your will.&lt;br /&gt;&lt;br /&gt;Why is this useful?&lt;br /&gt;&lt;br /&gt;It gets useful thanks to the web of trust; ie the idea that there are a bunch of people I trust partially to sign other keys, and if enough of them have signed a key then I can have a reasonable expectation that the key belongs to the person I want to talk to. Which means I might be prepared to send private data to them. Or Debian might be prepared to accept an upload from them. Which, when you're dealing with a community that spans the planet and where most of the contributors haven't met each other, is pretty freakin' useful - I, as part of Debian's keyring team, don't need to personally be able to identify every Debian developer. All I need to do is be able to trust other DDs to be able to do so. (Though maybe I'm missing out on something here - perhaps Debian should be paying for Gunnar and me to travel the world verifying fingerprints. \o/)&lt;br /&gt;&lt;br /&gt;(I still do mass keysignings btw. I'm picky about which keys I actually sign - this is in no way intended as a slight against those I don't, but a mass keysigning at least lets me know that the people involved are happy to exchange fingerprints. Though, FWIW, I normally have ID on me and frequently have fingerprint slips, so if you know me and want me to sign your key/want to sign mine then by all means ask me when you see me!)&lt;br /&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Valentine's CISS</title>
		<link href="http://pgregg.com/blog/2009/02/valentines-ciss.html"/>
		<id>tag:pgregg.com,2009:/blog//2.326</id>
		<updated>2010-02-25T12:28:49+00:00</updated>
		<content type="html" xml:lang="en">Printers. Love them or hate them, you still have to feed them Ink (or Toner) cartridges. &amp;nbsp; &lt;br /&gt;These are expensive little beasts to keep running - it has been commented that printer ink is expensive, and to give to an idea just how expensive it is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Printer Ink is 7 times more expensive than Dom Perignon.&lt;/li&gt;&lt;li&gt;Printer Ink is more expensive than the most expensive perfumes.&lt;/li&gt;&lt;li&gt;Printer Ink is more expensive than human blood.&lt;/li&gt;&lt;/ul&gt;Or if you want to see the scale, here is an often posted image (attribution unknown):&amp;nbsp; Update, found the original source at &lt;a href=&quot;http://gizmodo.com/212444/hp-ink-costs-more-than-human-blood-booze&quot;&gt;Gizmodo&lt;/a&gt; from Nov 2006.&lt;br /&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;compare.jpg&quot; src=&quot;http://pgregg.com/blog/images/compare.jpg&quot; class=&quot;mt-image-center&quot; height=&quot;402&quot; width=&quot;500&quot; /&gt;&lt;/span&gt;&lt;br /&gt; &lt;div&gt;&lt;br /&gt;Like many people I had found the relative comfort of 3rd-party or remanufactured Ink cartriges which brink the cost per cart down from around £3 (instead of £9) for my particular model.&lt;br /&gt;&lt;br /&gt;However, as I was installing the last of my replacement carts, before having to order more, imagine my horror when the magenta cart simply failed to work.&amp;nbsp;&amp;nbsp; Nothing - printer refused to accept it, thankfully my old cart had a dribble of ink left and was able to convince the printer to keep going while I got my order in for more.&lt;br /&gt;&lt;br /&gt;Next step, the online store where I order my carts, &lt;a href=&quot;http://www.svp.co.uk/&quot;&gt;SVP,&lt;/a&gt; typed in my printer model in the search box as they recommend and the first hit wasn't my usual multipack of 3rd party R265 carts - no, it was a CISS (Continuous Ink Supply System).&amp;nbsp;&amp;nbsp; Interesting.&lt;br /&gt;&lt;br /&gt;Here is the page: &lt;a href=&quot;http://svp.co.uk/product/ciss_for_epson_r265_r360_rx560_printers_mte058&quot;&gt;http://svp.co.uk/product/ciss_for_epson_r265_r360_rx560_printers_mte058&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Intrigued, I read the install manual they have on the page and thought it looked easy enough to try. And so I bought one - couldn't hurt - it cost the same as a complete set of carts and would last 10 times longer on the first fill.&lt;br /&gt;&lt;br /&gt;The device arrived a few days later, I sat on it a few days more, then got stuck in.&amp;nbsp; I took some photos of the completed install and I have to say I am &lt;b&gt;very&lt;/b&gt; impressed with it.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;IMG_7042_500w.jpg&quot; src=&quot;http://pgregg.com/blog/images/IMG_7042_500w.jpg&quot; class=&quot;mt-image-center&quot; height=&quot;333&quot; width=&quot;500&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;IMG_7046_500w.jpg&quot; src=&quot;http://pgregg.com/blog/images/IMG_7046_500w.jpg&quot; class=&quot;mt-image-center&quot; height=&quot;333&quot; width=&quot;500&quot; /&gt;&lt;br /&gt;&lt;/span&gt;I originally had the Inkwells on top of the printer, but I found it was putting out way too much ink - blobs of the stuff - and I figured gravity was playing a part.&amp;nbsp; Placing it down beside the printer saw the ink flow backwards, so I taped a few empty DVD cases together to get the right approximate height beside the printer and placed it there.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;Ink_Well_500w.jpg&quot; src=&quot;http://pgregg.com/blog/images/Ink_Well_500w.jpg&quot; class=&quot;mt-image-center&quot; height=&quot;398&quot; width=&quot;500&quot; /&gt;&lt;/span&gt;I have printed the equivalent of 20 full A4 colour pages at photo quality - quality is excellent and although the computer thinks the carts are now half full (or half empty), the evidence above shows just how much money I am going to save even in the short term.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;ink_levels.jpg&quot; src=&quot;http://pgregg.com/blog/images/ink_levels.jpg&quot; class=&quot;mt-image-center&quot; height=&quot;123&quot; width=&quot;500&quot; /&gt;&lt;/span&gt;If you are feeling the cost of Ink is too high (who doesn't?) and if you can find a well reviewed CISS system for your printer, I would encourage you to give it a go.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content>
		<author>
			<name>Paul Gregg</name>
			<uri>http://pgregg.com/blog/</uri>
		</author>
		<source>
			<title type="html">Plop in the Ocean</title>
			<link rel="self" href="http://pgregg.com/blog/atom.xml"/>
			<id>tag:pgregg.com,2009-02-01:/blog//2</id>
			<updated>2010-02-25T13:00:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">What&amp;#8217;s changed?</title>
		<link href="http://www.mccartney.ie/wordpress/2010/02/22/whats-changed/"/>
		<id>http://www.mccartney.ie/wordpress/?p=205</id>
		<updated>2010-02-22T11:48:09+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://cimota.com/blog/me/&quot;&gt;Matt Johnston&lt;/a&gt; &lt;a href=&quot;http://twitter.com/cimota/statuses/9468361994&quot;&gt;commented&lt;/a&gt; recently that the recent surge in activity in the community side of the local tech &amp;amp; business scene could be &amp;#8220;the &amp;#8216;real&amp;#8217; end of the &amp;#8216;Troubles&amp;#8217;?&amp;#8221;.  It&amp;#8217;s definitely a positive thing, I&amp;#8217;m delighted the next generation of technologists in Northern Ireland has a growing &amp;amp; diverse community around them.  Something that was sorely lacking in my formative years, where it seemed that the only exposure to technology was from inside the technology firm you worked in.  [and I'm a committed technologist, not a 9-5 salary man].  So what&amp;#8217;s changed?&lt;/p&gt;
&lt;p&gt;Many of us are of a similar age, all in full-time IT roles from the mid-90&amp;#8217;s onwards, some for much longer.  Is it the relatively recent additions that have invigorated us? People like the hyper-active &lt;a href=&quot;http://twitter.com/goodonpaper&quot;&gt;Andy McMillen&lt;/a&gt;, or what&amp;#8217;s caused &amp;#8220;the old guard&amp;#8221; like Matt to push on with xcake &amp;amp; &lt;a href=&quot;http://twitter.com/startvi&quot;&gt;startvi&lt;/a&gt;, or Colm &amp;amp; Norbert to persevere with &lt;a href=&quot;http://mobilemondaybelfast.org/&quot;&gt;MobileMondayBelfast&lt;/a&gt;, or &lt;a href=&quot;http://twitter.com/darrylxxx&quot;&gt;Darryl&lt;/a&gt; &amp;amp; the first &lt;a href=&quot;http://opencoffee.ning.com/forum/topics/609012:Topic:1156?commentId=609012:Comment:16926&quot;&gt;Open Coffee Belfast&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Surely none of us would admit to letting Northern Ireland&amp;#8217;s previous problems get in the way of the way we lead our lives?&lt;/p&gt;
&lt;p&gt;So what changed?  How do we make sure we don&amp;#8217;t loose momentum?&lt;/p&gt;
&lt;p&gt;How much would your life changed if you had the community &amp;amp; adventure surrounding you 10-15 years ago when you first discovered your passion for technology could pay the bills?  Would you have endured the 10 years in big, faceless corporations? [how did we get brain washed into thinking that the best IT career involved one of 3 or 4 companies in NI?]&lt;/p&gt;
&lt;p&gt;Would I still be doing what I&amp;#8217;m doing now? Probably, but probably not for who I&amp;#8217;m doing it for.  And I hope I would have had a much interesting &amp;amp; independent path here.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</content>
		<author>
			<name>simonm</name>
			<uri>http://www.mccartney.ie/wordpress</uri>
		</author>
		<source>
			<title type="html">ze blog of simon</title>
			<subtitle type="html">too boring to have a real blog</subtitle>
			<link rel="self" href="http://www.mccartney.ie/wordpress/feed/atom/"/>
			<id>http://www.mccartney.ie/wordpress/feed/atom/</id>
			<updated>2010-02-22T12:00:12+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Sinful admission</title>
		<link href="http://www.earth.li/~noodles/blog/2010/01/sinful-admission.html"/>
		<id>tag:www.earth.li,2010:/~noodles/blog//1.232</id>
		<updated>2010-01-27T09:43:55+00:00</updated>
		<content type="html" xml:lang="en">Knowing full well that it will cause many of my readers to tut and roll their eyes at me I derive slight pleasure from confessing that I have now eaten at McDonalds on 6 continents. To make it worse I only did so in Asia and Australia so I could say I had.&lt;br /&gt;&lt;br /&gt;It does lead me into a slightly more valid ramble. I'm not particularly bothered about eating on my own. I like food (even if I'm picky about what I like), but I prefer it with company. This means I'm not particularly great about being organised to cook complicated things when I'm on my own; largely the whole thing just turns into dealing with hunger. It also mean I'm bad at finding nice places to eat out while travelling. Which, when you're travelling for a month to some interesting places, is a bit of a bugger. I've got a bit better at actually going to nice places, and trying not to bolt my food into me so I can get out ASAP but instead enjoy it. A book helps. Also places that aren't quite as busy (which if you have no agenda is nicely achieved by letting your body clock desync from the world around you). Unfortunately I didn't really do so until after Hong Kong. Guess I'll just have to go back at some point...&lt;br /&gt;&lt;br /&gt;(More on my travels at some point, maybe. I've started the tortuous journey home now.)&lt;br /&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Boot time sound problems with QuickCam Pro 9000 webcam</title>
		<link href="http://www.piglets.org/serendipity/archives/110-Boot-time-sound-problems-with-QuickCam-Pro-9000-webcam.html"/>
		<id>http://www.piglets.org/serendipity/archives/110-guid.html</id>
		<updated>2010-01-17T22:21:30+00:00</updated>
		<content type="html">I've had a Logitech QuickCam Pro 9000 for some time now, and it works well, but I did have one bizarre problem with it when I used it with my main desktop machine (running &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; (Sid)). Namely, that if I had the camera plugged in (usb) at boot time the sound on the computer did not work, if you plugged it in after boot, everything was fine.&lt;br /&gt;&lt;br /&gt;

This was pretty irritating because if I forgot I would often have dozens of windows open and ready for work before I realised.&lt;br /&gt;&lt;br /&gt;

Normally this happens because the cards are loaded in the wrong sequence by udev. But, if you listed the sound cards with
&lt;div class=&quot;bash geshi&quot;&gt;&lt;br /&gt;&lt;span&gt;cat&lt;/span&gt; &lt;span&gt;/&lt;/span&gt;proc&lt;span&gt;/&lt;/span&gt;asound&lt;span&gt;/&lt;/span&gt;cards&lt;br /&gt;&amp;#160;&lt;/div&gt;
the main card wasn't just in the wrong order, it simply wasn't there. I tried comparing modules loaded with and without the camera (at boot) and manually loading the differences, but this did not help. I tried forcing the index to be zero on the correct card, but this also did not help.&lt;br /&gt;&lt;br /&gt;

In the end, I made the following edit to &lt;em&gt;/etc/modprobe.d/alsa-base.conf&lt;/em&gt;

&lt;div class=&quot;bash geshi&quot;&gt;&lt;br /&gt;&lt;span&gt;# Keep USB (webcam from being loaded as first card)&lt;/span&gt;&lt;br /&gt;options snd_usb_audio &lt;span&gt;index&lt;/span&gt;=-&lt;span&gt;2&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;

and this did the trick. So if like me you were searching for the answer to this, I hope it helps.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Prettifying Debian boot output</title>
		<link href="http://www.earth.li/~noodles/blog/2010/01/prettifying-debian-boot-output.html"/>
		<id>tag:www.earth.li,2010:/~noodles/blog//1.231</id>
		<updated>2010-01-07T04:40:21+00:00</updated>
		<content type="html" xml:lang="en">Being a bit of a freak I actually tend to read my boot output. Well, when I'm not using that time to go grab a cup of coffee first thing on a Monday morning. However I don't always find &lt;a href=&quot;http://www.uk.debian.org/&quot;&gt;Debian&lt;/a&gt;'s default output as clear as I'd like (especially when I haven't had that coffee yet, or when I'm half watching a remote machine boot over its serial console). ISTR that &lt;a href=&quot;http://www.redhat.com/&quot;&gt;RedHat&lt;/a&gt; had much nicer boot output (I'm talking about text based here, not the fancy &lt;a href=&quot;http://cgit.freedesktop.org/plymouth/&quot;&gt;Plymouth&lt;/a&gt; stuff) with a row of OK/FAILED etc down the right hand side that made it nice and obvious what was happening. Of course we can do that with Debian, at least for packages that use the &lt;tt&gt;lsb-base&lt;/tt&gt; logging functions. Drop the following into &lt;tt&gt;/etc/lsb-base-logging.sh&lt;/tt&gt; and enjoy a slightly prettier boot. I'm slowly filing wishlist bugs with patches for those bits and pieces I use that don't use &lt;tt&gt;lsb-base&lt;/tt&gt; for their init script logging.
&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;
# Colour our init scripts output

# int log_end_message (int exitstatus)
log_end_msg () {
    # If no arguments were passed, return
    if [ -z &quot;${1:-}&quot; ]; then
        return 1
    fi

    retval=$1

    log_end_msg_pre &quot;$@&quot;

    # Only do the fancy stuff if we have an appropriate terminal
    # and if /usr is already mounted
    if log_use_fancy_output; then
        RED=`$TPUT setaf 1`
        GREEN=`$TPUT setaf 2`
        YELLOW=`$TPUT setaf 3`
        NORMAL=`$TPUT sgr0`
        $TPUT hpa $((`$TPUT cols` - 12))
    else
        RED=''
        GREEN=''
        YELLOW=''
        NORMAL=''
    fi

    if [ $1 -eq 0 ]; then
        /bin/echo -e &quot; [   ${GREEN}OK${NORMAL}   ]&quot;
    elif [ $1 -eq 255 ]; then
        /bin/echo -e &quot; [${YELLOW}WARNING!${NORMAL}]&quot;
    else
        /bin/echo -e &quot; [ ${RED}FAILED${NORMAL} ]&quot;
    fi
    log_end_msg_post &quot;$@&quot;
    return $retval
}

log_action_end_msg () {
    log_action_end_msg_pre &quot;$@&quot;
    if [ -z &quot;${2:-}&quot; ]; then
        end=&quot;&quot;
    else
        end=&quot; ($2)&quot;
    fi

    /bin/echo -n &quot;${end}&quot;

    # Only do the fancy stuff if we have an appropriate terminal
    # and if /usr is already mounted
    if log_use_fancy_output; then
        RED=`$TPUT setaf 1`
        BLUE=`$TPUT setaf 4`
        NORMAL=`$TPUT sgr0`
        $TPUT hpa $((`$TPUT cols` - 12))
    else
        RED=''
        BLUE=''
        NORMAL=''
    fi


    if [ $1 -eq 0 ]; then
        /bin/echo -e &quot; [  ${BLUE}DONE${NORMAL}  ]&quot;
    else
        /bin/echo -e &quot; [ ${RED}FAILED${NORMAL} ]&quot;
    fi
    log_action_end_msg_post &quot;$@&quot;
}
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
(This is mostly for my own future reference, because I keep trying to search for details on it and not finding exactly what I want. I forget where I even found the basis for this, though there are lots of similar snippets out there. I've not tried it with a concurrency based boot so it may well look horrible under that.)</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Parsing the Doom Wad File</title>
		<link href="http://redbrain.co.uk/?p=528"/>
		<id>http://redbrain.co.uk/?p=528</id>
		<updated>2010-01-07T01:12:31+00:00</updated>
		<content type="html">&lt;p&gt;So it was a fine Christmas, I was at home with family armed only with 2 seasons of xFiles and my laptop added to the factI didn&amp;#8217;t upload my ssh key to my laptop so hacking on Crules was out the window. So it got me thinking on the main goals for my Crules Scripting Language, one of which ( the main one ) is that it should be embeddable into existing C/C++ applications like Lua or Python or even C# (mono) if your using its recently added reflection api!&lt;/p&gt;
&lt;p&gt;So why not make a game engine using my language with crules as a scripting language so I can see what the API _SHOULD_ look like for the client. So i choose doom since i am terrible with graphics, i can use the doom.wad and concentrate on programming; So in the past i have written two separate 2D game engines one was a Java 2D &lt;a href=&quot;http://en.wikipedia.org/wiki/Monkey_Island_%28series%29&quot;&gt;Monkey Island&lt;/a&gt; clone i done for university and it was terrible since Java is a terrible platform in my opinion, then my 2nd was a port  of it over to &lt;a href=&quot;http://www.libsdl.org/&quot;&gt;C++/SDL&lt;/a&gt; and the code was terrible &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;wp-smiley&quot; /&gt;  so don&amp;#8217;t bother asking me about it.&lt;/p&gt;
&lt;p&gt;Anyway&amp;#8217;s so the long and short i am writing doom engine from scratch, my original idea was to work with an existing game engine like &lt;a href=&quot;http://www.crystalspace3d.org/main/Main_Page&quot;&gt;Crystal Space&lt;/a&gt; or &lt;a href=&quot;http://dengine.net/&quot;&gt;Doomsday Engine&lt;/a&gt; though, Crystal Space i was put off since it already uses Python and i don&amp;#8217;t really feel like trawling though lots of code and forking it essentially would be really more work than its worth. Doomsday Engine is the cream of the crop of Doom Ports at the moment, all others are practically the same in essence using the same ancient code and hacks from throughout the 90&amp;#8217;s. And really the technology has changed somewhat since then. Though Doomsday Engine is pretty amazing and works well, it seems to need a massive cleanup and i don&amp;#8217;t mean to be nasty on the developers or anything they have done a fantastic job!  And they have really made the code much cleaner than any other port about! Plus the lead developer has been really nice to me &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;wp-smiley&quot; /&gt; . Anyway&amp;#8217;s Games have always been a great passion to me and really doom can&amp;#8217;t be that hard to re-implement from scratch and really it isn&amp;#8217;t i already have a basic game engine working using OpenGL and &lt;a href=&quot;http://www.libsdl.org/&quot;&gt;SDL{ _ttf, _mixer }&lt;/a&gt;. With audio, and fps counter and input bla bla. But i am just concentrating on differentiating the wad sprite formats etc while revising for exams and working on crules and many other bits and pieces. So in the end  i&amp;#8217;ll just stick in an extract of the log of my game engine when it starts parsing the doom.wad and explain a little on how to parse the wad!&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;debug: main.c:28 -&amp;gt; Trying to start crldoom wad: data/doom.wad!&lt;br /&gt;
debug: doom.c:147 -&amp;gt; parsing wad file &amp;lt;data/doom.wad&amp;gt;!&lt;br /&gt;
debug: doom.c:80 -&amp;gt; is a wad file :: &amp;lt;IWAD&amp;gt;!&lt;br /&gt;
log: doom.c:155 -&amp;gt; wad file data/doom.wad has length 12408292!&lt;br /&gt;
debug: doom.c:27 -&amp;gt; debug seeking&amp;#8230;&lt;br /&gt;
debug: doom.c:30 -&amp;gt; reading&amp;#8230;.&lt;br /&gt;
debug: doom.c:34 -&amp;gt; parsing&amp;#8230;&lt;br /&gt;
log: doom.c:49 -&amp;gt; header:: ident -&amp;gt; 1145132873, n_lumps -&amp;gt; 2306, infotableofs -&amp;gt; 12371396!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 12, size -&amp;gt; 10752, name -&amp;gt; 1497451600, ident -&amp;gt; PLAYPAL!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 10764, size -&amp;gt; 8704, name -&amp;gt; 1330401091, ident -&amp;gt; COLORMAP!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 19468, size -&amp;gt; 4000, name -&amp;gt; 1329876549, ident -&amp;gt; ENDOOM!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 23468, size -&amp;gt; 6854, name -&amp;gt; 1330464068, ident -&amp;gt; DEMO1!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 30324, size -&amp;gt; 9402, name -&amp;gt; 1330464068, ident -&amp;gt; DEMO2!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 39728, size -&amp;gt; 15466, name -&amp;gt; 1330464068, ident -&amp;gt; DEMO3!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 55196, size -&amp;gt; 3286, name -&amp;gt; 1330464068, ident -&amp;gt; DEMO4!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 58484, size -&amp;gt; 0, name -&amp;gt; 827142469, ident -&amp;gt; E1M1!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 58484, size -&amp;gt; 1430, name -&amp;gt; 1313425492, ident -&amp;gt; THINGS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 59916, size -&amp;gt; 6804, name -&amp;gt; 1162758476, ident -&amp;gt; LINEDEFS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 66720, size -&amp;gt; 19980, name -&amp;gt; 1162103123, ident -&amp;gt; SIDEDEFS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 86700, size -&amp;gt; 1880, name -&amp;gt; 1414677846, ident -&amp;gt; VERTEXES!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 88580, size -&amp;gt; 8964, name -&amp;gt; 1397179731, ident -&amp;gt; SEGS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 97544, size -&amp;gt; 956, name -&amp;gt; 1128616787, ident -&amp;gt; SSECTORS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 98500, size -&amp;gt; 6664, name -&amp;gt; 1162104654, ident -&amp;gt; NODES!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 105164, size -&amp;gt; 2288, name -&amp;gt; 1413694803, ident -&amp;gt; SECTORS!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 107452, size -&amp;gt; 968, name -&amp;gt; 1162495314, ident -&amp;gt; REJECT!&lt;br /&gt;
log: doom.c:62 -&amp;gt; directory:: filepos -&amp;gt; 108420, size -&amp;gt; 6948, name -&amp;gt; 1129270338, ident -&amp;gt; BLOCKMAP!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So this is just some of the output of the code i had written it parses out whats called the &amp;#8216;directories&amp;#8217; in the file and then i also have functions to parse out whats called the &amp;#8216;lumps&amp;#8217; from these directories the lumps are the actual data. I&amp;#8217;ll explain more detail when i talk about how to parse this. And how to convert the music lumps to proper midi so you can play it in SDL_mixer or even in Totem if in in gnome.&lt;/p&gt;
&lt;p&gt;So what do we need, if you have yourself a Doom.wad file lying about i am sure if you go through your old boxes you&amp;#8217;ll find yourself a copy of doom, or if you cant find it you can find it on torrent sites but you didn&amp;#8217;t read that here &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;wp-smiley&quot; /&gt; . Thing is I have bought the game like 3/4 times I am sure hehe. Lets get started.&lt;/p&gt;
&lt;p&gt;In the Doom wad there is whats called the &amp;#8216;HEADER&amp;#8217; which is of length 12 bytes which contains 3 * 4-byte integers which contain the data we care about, so lets do that lets make some code (i just wrote this code in like 10 min to illustrate the idea its ok does the job!):&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#include &amp;lt;string.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#define WAD_HEADER_LENGTH &amp;nbsp; &amp;nbsp; 12&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co2&quot;&gt;#define WAD_DIRECTORY_LENGTH &amp;nbsp;16&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *p &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &amp;nbsp; p&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; p&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;nu0&quot;&gt;8&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; p&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;nu0&quot;&gt;16&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; p&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; main&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; argc, &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *argv&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;* wad_file= &lt;span class=&quot;st0&quot;&gt;&amp;quot;/home/redbrain/workspace/doom-dev/crldoom/data/doom.wad&amp;quot;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; FILE* wad_fd;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; !&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wad_fd= fopen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;wad_file, &lt;span class=&quot;st0&quot;&gt;&amp;quot;rb&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fprintf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;stderr, &lt;span class=&quot;st0&quot;&gt;&amp;quot;error opening &amp;lt;%s&amp;gt;!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;, wad_file&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; EXIT_FAILURE;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; header_buffer&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; WAD_HEADER_LENGTH &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; fread&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; header_buffer, WAD_HEADER_LENGTH, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, wad_fd &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;* wad_ident= &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; header_buffer;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; wad_ident&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;#8216;&lt;span class=&quot;es0&quot;&gt;\0&lt;/span&gt;&amp;#8216;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; strncmp&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_ident, &lt;span class=&quot;st0&quot;&gt;&amp;quot;IWAD&amp;quot;&lt;/span&gt;, &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fprintf&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;stderr, &lt;span class=&quot;st0&quot;&gt;&amp;quot;invalid wad header type &amp;lt;%s&amp;gt;!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;, wad_ident &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; EXIT_FAILURE;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/printf.html&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;doom wad is a &amp;lt;%s&amp;gt;!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;, wad_ident &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; wad_length= &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; fseek&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_fd, &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;, SEEK_END &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; wad_length= ftell&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_fd &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; directory_offset= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; header_buffer&lt;span class=&quot;nu0&quot;&gt;+8&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; number_lumps= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; header_buffer&lt;span class=&quot;nu0&quot;&gt;+4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/printf.html&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;wad directory offset &amp;lt;%lu&amp;gt; with &amp;lt;%lu&amp;gt; lumps!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp;directory_offset, number_lumps &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; t_ofs= directory_offset; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; lump_count= &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; t_ofs &amp;lt;= &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_length -- WAD_DIRECTORY_LENGTH &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fseek&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_fd, t_ofs, SEEK_SET &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *directory_buffer= &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; malloc&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;sizeof&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; * WAD_DIRECTORY_LENGTH &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fread&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer, WAD_DIRECTORY_LENGTH, &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, wad_fd &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; filepos= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; size= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer&lt;span class=&quot;nu0&quot;&gt;+4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *directory_ident= strdup&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; directory_buffer&lt;span class=&quot;nu0&quot;&gt;+8&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; directory_ident&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; strlen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;directory_ident&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;#8216;&lt;span class=&quot;es0&quot;&gt;\0&lt;/span&gt;&amp;#8216;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/printf.html&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;directory name &amp;lt;%s&amp;gt; at offset &amp;lt;%lu&amp;gt; with size &amp;lt;%lu&amp;gt;!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;directory_ident, filepos, size &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; free&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_ident &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;; free&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; t_ofs += WAD_DIRECTORY_LENGTH; lump_count++;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;a href=&quot;http://www.opengroup.org/onlinepubs/009695399/functions/printf.html&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;printf&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;directorys parsed &amp;lt;%lu&amp;gt; total lumps &amp;lt;%lu&amp;gt;!&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt;,&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp;lump_count, number_lumps &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; fclose&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_fd &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;So lets compile and test this code &amp;lt;remember to change the path to your doom wad&amp;gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;gcc doom_wad_test.c&lt;/p&gt;
&lt;p&gt;./a.out&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So right what does any of this code mean i just chucked it up there, i wrote it up very quickly from scratch. So as i stated earlier there is a wad header which is a 12 bytes in length which i refer to as &amp;#8216;WAD_HEADER_LENGTH&amp;#8217; which contains 3 * 4-byte integers. So from the code we have fopen&amp;#8217;d the wad_file and i use fread to read in the 12 bytes in a 12 byte &amp;#8216;unsigned char[]&amp;#8216; buffer. So to read out the integers in a neutral endian way i found a nice parse_int function in some of the wad documentation i found and in old doom source code which was GPL so it was like&amp;#8230;. yoink&amp;#8230; but its pretty easy to understand if you know your representations well enough but i wont go into detail.&lt;/p&gt;
&lt;p&gt;The first integer is the IWAD or PWAD string, IWAD is what you will find mostly its the deployment version of the wad, the PWAD is a patch wad and very few of them are still around and i think it has similar structure. Anyways, you parse out the first integer like this&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;* wad_ident= &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; header_buffer;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;wad_ident&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;#8216;&lt;span class=&quot;es0&quot;&gt;\0&lt;/span&gt;&amp;#8216;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Remember to add null string &amp;#8216;\0&amp;#8242;, so we don&amp;#8217;t get buffer overflow! This string is always a length of 4 so no need to mess about! And then the next integer is the number of lumps in the wad the lumps are the actual binary data like music and graphics. Third int is the &amp;#8216;directory offset&amp;#8217; which contains pointers to where the lumps are their idents and the size of the lumps which have lengths of 16 &amp;#8216;WAD_DIRECTORY_LENGTH&amp;#8217; until the end of the wad file! so note i find the length of the file and do:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; t_ofs &amp;lt;= &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; wad_length -- WAD_DIRECTORY_LENGTH &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;#8230;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;So how do we parse out these directories?  We move to the directory offset and then read the 16 bytes into a buffer, which is 4 integers this time. But still contains only 3 things means the ident strings can be longer or can be with some padding between each directory lump.&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; filepos= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;long&lt;/span&gt; size= parse_int&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; directory_buffer&lt;span class=&quot;nu0&quot;&gt;+4&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *directory_ident= strdup&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt;*&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; directory_buffer&lt;span class=&quot;nu0&quot;&gt;+8&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;directory_ident&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; strlen&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;directory_ident&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;= &lt;span class=&quot;st0&quot;&gt;&amp;#8216;&lt;span class=&quot;es0&quot;&gt;\0&lt;/span&gt;&amp;#8216;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Now we know the file offset of the lump the size of the lump and the ident of the lump and we make sure to add the null terminator again to avoid buffer overflow. And then we can parse out the lumps simply just fseek and fread &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  Done its so simple and seems like there would be more to it, yet when you think of it is very much common sense there really isn&amp;#8217;t that many ways to pack data into a file like this! If your interested i&amp;#8217;ll be talking about it soon&amp;#8230; on how to convert the D_E1M* lumps which are music lumps to compatible midi tracks. And finally on how &lt;a href=&quot;http://en.wikipedia.org/wiki/Binary_space_partitioning&quot;&gt;BSP&lt;/a&gt; works for the levels and maybe how to draw them in C/SDL/OpenGL&amp;#8230; if you ask i prefer C over C++, yeah when it comes to building this game engine there have been times i though woo having an object would be really nice here but then i realise well no because that&amp;#8217;s what the scripting engine is going to do&amp;#8230; &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  Mainly due to the fact i dont like C++ syntax it feels messy to me and C is just nice and simple &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Finally I just want to wrap up with saying &lt;a href=&quot;http://en.wikipedia.org/wiki/John_D._Carmack&quot;&gt;John Carmack&lt;/a&gt; has to be one of my biggest Hero&amp;#8217;s in Computer Science along with &lt;a href=&quot;http://tirania.org/blog/&quot;&gt;Migel De Icaza&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Linus_Torvalds&quot;&gt;Linus Torvalds&lt;/a&gt;, Various GCC hackers&amp;#8230; like Ian Lance Taylor But John Carmack in particular since he made Doom! But also he attended the &lt;a title=&quot;University of Missouri–Kansas City&quot; href=&quot;http://en.wikipedia.org/wiki/University_of_Missouri%E2%80%93Kansas_City&quot;&gt;University of Missouri–Kansas City&lt;/a&gt; for two semesters before withdrawing to work as a freelance programmer. Which i think that is brilliant! Since University does not teach students to be serious programmers or technology well very few do anyway and i think its great he had the balls to do that and so did Migel De Icaza and they have both done some of the most amazing things in computer science!&lt;/p&gt;
&lt;p&gt;Anyways if your interested in Crules or CrlDoom see: &lt;a href=&quot;http://crules.org&quot;&gt;http://crules.org&lt;/a&gt; code for crldoom is over @ &lt;a href=&quot;http://code.redbrain.co.uk/cgit.cgi/crldoom&quot;&gt;http://code.redbrain.co.uk/cgit.cgi/crldoom&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a project i love &lt;a href=&quot;http://www.moddb.com/mods/classic-doom-3&quot;&gt;Classic Doom 3&lt;/a&gt; it was Doom re-implemented ontop of the Doom3 Engine what more do you want!!!&lt;/p&gt;
&lt;p&gt;&lt;!-- Smart Youtube --&gt;&lt;span class=&quot;youtube&quot;&gt;&lt;/span&gt;&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Michael</title>
		<link href="http://www.piglets.org/serendipity/archives/109-Michael.html"/>
		<id>http://www.piglets.org/serendipity/archives/109-guid.html</id>
		<updated>2010-01-01T01:12:36+00:00</updated>
		<content type="html">&lt;blockquote&gt;
Michael stands in the rain, as drops fall from his brow to the ground,&lt;br /&gt;
He waits patiently, his steel grey eyes surveying his battlefield,&lt;br /&gt;
It is a strange one, strewn with grass and flowers and many a mound,&lt;br /&gt;
And rank and file of stones each entreating that He should yield.&lt;br /&gt;&lt;br /&gt;

Scattered here and there, his kinfolk stand, but none as Michael.&lt;br /&gt;
He is the soldier, with breastplate and shield, and sword by his side,&lt;br /&gt;
Not drawn since he came to be here; he stands as a stoic sentinel,&lt;br /&gt;
Patient, benevolent, the fire in his spirit not worn with boastful pride.&lt;br /&gt;&lt;br /&gt;

Michael stands in the rain, as he has stood in the blistering Sun,&lt;br /&gt;
And when stars wheel above him; when snow coated, but not numb,&lt;br /&gt;
Rather with exultant wings renewed, he stands vigilant for the One.&lt;br /&gt;
Waiting for his ancient foe, the firstborn seraph, who does not come.&lt;br /&gt;&lt;br /&gt;
&lt;/blockquote&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Virtual folders with Dovecot and Debian</title>
		<link href="http://www.piglets.org/serendipity/archives/108-Virtual-folders-with-Dovecot-and-Debian.html"/>
		<id>http://www.piglets.org/serendipity/archives/108-guid.html</id>
		<updated>2009-12-31T15:06:09+00:00</updated>
		<content type="html">I use client side virtual folders a bit for my mail. Specifically, I tag messages with IMAP flags like &lt;strong&gt;todo&lt;/strong&gt; and &lt;strong&gt;important&lt;/strong&gt;, and then in Icedove / Thunderbird, I set up a special folder as a saved search which shows message that are either unseen, or marked todo in my inbox. It works rather well, and I use the same set-up on my laptop, and work and home desktop machines.&lt;br /&gt;&lt;br /&gt;

But it's not very useful on my phone, which doesn't allow such sophisticated client side behaviour. My phone mail applications shows the most recent 25 messages in a folder, but there are times when it would be really useful to look up messages that are labeled as important but rather old. It would be time consuming to look through the older messages, and difficult to find the one I want anyway.&lt;br /&gt;&lt;br /&gt;

As a result, I've been looking at the possibility of using virtual server side folders using &lt;a href=&quot;http://www.dovecot.org&quot;&gt;dovecot&lt;/a&gt; on my &lt;a href=&quot;http://www.debian.org&quot;&gt;Debian&lt;/a&gt; mail server. I was put off by the &lt;a href=&quot;http://wiki.dovecot.org/Plugins/Virtual&quot;&gt;documentation&lt;/a&gt; which left a lot of questions unanswered.&lt;br /&gt;&lt;br /&gt;

Here's how I did it on Debian. First of all edit the config file &lt;em&gt;/etc/dovecot/dovecot.conf&lt;/em&gt;, back up this file first, so you can restore working behaviour if something goes wrong.
&lt;div class=&quot;dovecot geshi&quot;&gt;&lt;br /&gt;
#&lt;br /&gt;
# You have to add the default namespace&lt;br /&gt;
# which is normally NOT added explicitly before&lt;br /&gt;
#&lt;br /&gt;
namespace private {&lt;br /&gt;
&amp;#160; prefix =&lt;br /&gt;
&amp;#160; separator = /&lt;br /&gt;
&amp;#160; # the next line is very specific to where you keep your mail&lt;br /&gt;
&amp;#160; location = mbox:~/Mail/:INBOX=/var/mail/%u&lt;br /&gt;
&amp;#160; list = yes&lt;br /&gt;
&amp;#160; inbox = yes&lt;br /&gt;
&amp;#160; subscriptions = yes&lt;br /&gt;
&amp;#160; hidden = no&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Then add the virtual namespace&lt;br /&gt;
#&lt;br /&gt;
namespace private {&lt;br /&gt;
&amp;#160; &amp;#160; prefix = virtual/&lt;br /&gt;
&amp;#160; &amp;#160; separator = /&lt;br /&gt;
&amp;#160; &amp;#160; # pick where the virtual folders will be&lt;br /&gt;
&amp;#160; &amp;#160; location = virtual:~/Mail/virtual&lt;br /&gt;
&amp;#160; &amp;#160; list = yes&lt;br /&gt;
&amp;#160; &amp;#160; inbox = no&lt;br /&gt;
&amp;#160; &amp;#160; subscriptions = yes&lt;br /&gt;
&amp;#160; &amp;#160; hidden = no&lt;br /&gt;
}&lt;br /&gt;
&amp;#160;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;

You must also add the virtual folder plugin.
&lt;div class=&quot;dovecot geshi&quot;&gt;&lt;br /&gt;
##&lt;br /&gt;
## IMAP specific settings&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
protocol imap {&lt;br /&gt;
&lt;br /&gt;
&amp;#160; # ... you need to enable the plugin&lt;br /&gt;
&amp;#160; mail_plugins = virtual&lt;br /&gt;
&amp;#160;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;

Now restart dovecot and check your normal folders are working.
&lt;div class=&quot;bash geshi&quot;&gt;&lt;br /&gt;&lt;span&gt;/&lt;/span&gt;etc&lt;span&gt;/&lt;/span&gt;init.d&lt;span&gt;/&lt;/span&gt;dovecot restart&lt;br /&gt;&amp;#160;&lt;/div&gt;

Note that I found &lt;strong&gt;dovecot will generally not serve physical folders correctly if the virtual mail folder (even if empty) does not exist&lt;/strong&gt;. I consider this a bug, but one that needs to be worked around, at least for me.&lt;br /&gt;&lt;br /&gt;

If that's all done and working you can begin to create virtual folders. I created two directories within my &lt;em&gt;~/Mail/virtual&lt;/em&gt; folders; which were &lt;em&gt;inbox-todo&lt;/em&gt; and &lt;em&gt;inbox-important&lt;/em&gt; respectively. Inside each I put the following files.&lt;br /&gt;&lt;br /&gt;

&lt;div class=&quot;dovecot geshi&quot;&gt;&lt;br /&gt;
# ~/Mail/virtual/inbox-todo/dovecot-virtual&lt;br /&gt;
INBOX&lt;br /&gt;
&amp;#160; OR (OR (OR KEYWORD $TODO KEYWORD todo) KEYWORD $label4) unseen&lt;br /&gt;
&amp;#160;&lt;/div&gt;

which shows all unseen and mail labelled todo in my inbox and

&lt;div class=&quot;dovecot geshi&quot;&gt;&lt;br /&gt;
# ~/Mail/virtual/inbox-important/dovecot-virtual&lt;br /&gt;
INBOX&lt;br /&gt;
&amp;#160; OR (OR KEYWORD $IMPORTANT KEYWORD important) KEYWORD $label1&lt;br /&gt;
&amp;#160;&lt;/div&gt;

which shows only important mail in my inbox.&lt;br /&gt;&lt;br /&gt;

It seems to be working, my normal folders appear to be working perfectly correctly (but I'll know better in a couple more hours/days); my phone has successfully subscribed to the two virtual folders, though the folder list shows a number of files which I'm certain it should not, again, this looks like a dovecot bug to be honest.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Neat find of the day: inputlirc</title>
		<link href="http://www.earth.li/~noodles/blog/2009/12/neat-find-of-the-day-inputlirc.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.230</id>
		<updated>2009-12-24T00:19:57+00:00</updated>
		<content type="html" xml:lang="en">I've recently been fixing up my &lt;a href=&quot;http://www.tvdr.de/&quot;&gt;VDR&lt;/a&gt; setup to work with &lt;a href=&quot;http://www.freesat.co.uk/&quot;&gt;FreeSat&lt;/a&gt; and make it brother/parent friendly. I've applied the &lt;a href=&quot;http://www.rst38.org.uk/vdr/&quot;&gt;EPG patches&lt;/a&gt; to get the 7 day guide, setup an autologging in user under gdm with vdr-sxfe running and that left getting the remote working. For some reason my old serial dongle wasn't happy with &lt;a href=&quot;http://www.lirc.org/&quot;&gt;lirc&lt;/a&gt; - it got detected ok, and would show some signal when buttons were pressed but didn't work with the old config. The entire hardware of the box has changed, so it seems likely something isn't quite right (in particular the lirc drivers spew out warnings about SMP bits so I should probably try the dongle under a single core setup to rule that out, but there's also a move to 64 bit involved).&lt;br /&gt;&lt;br /&gt;The easy solution to have something sorted for Christmas was to pickup a cheap remote from &lt;a href=&quot;http://www.ebay.co.uk/&quot;&gt;eBay&lt;/a&gt;. This ended up being a Cyberlink remote + USB dongle combo. Worked just fine when plugged in, turning up as a normal input device and the obvious keys doing the obvious things. I wanted &lt;i&gt;all&lt;/i&gt; the keys to work though, as I'd got used to having a lot of the VDR functions instantly accessible rather than having to work my way through the menus. Various searches suggested I'd need to use LIRC to access the odder keys. That seemed a lot of hassle for something that was doing the decoding itself. Some playing with xev turned up keycodes for a number of the keys, but there were still a few missing (and important ones at that, such as Red/Green/Yellow/Blue). Further digging found me a suggestion of an Xorg keyboard map that would map the KEY_RED etc from the evdev device into something workable under X. And then I found &lt;a href=&quot;http://svn.sliepen.eu.org/inputlirc/trunk/&quot;&gt;inputlirc&lt;/a&gt; via the &lt;a href=&quot;http://packages.debian.org/inputlirc&quot;&gt;Debian package&lt;/a&gt;. This is really bloody neat - point it at an evdev device and it will present all of the KEY_* codes out as lirc keys. If you pass the &lt;tt&gt;-g&lt;/tt&gt; parameter it makes sure the key presses &lt;i&gt;only&lt;/i&gt; go to lirc as well. Exactly what I want and a doddle to setup - no messing with a big configuration file, just edit &lt;tt&gt;/etc/defaults/inputlirc&lt;/tt&gt; to point to the correct &lt;tt&gt;/dev/input/by-id/&lt;/tt&gt; file, add the &lt;tt&gt;-g&lt;/tt&gt; to the options in that file and restart.&lt;br /&gt;&lt;br /&gt;Now the main remaining task is to get it working with BBC/ITV HD.&lt;br /&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Fixing g1 Accelerometer</title>
		<link href="http://www.piglets.org/serendipity/archives/107-Fixing-g1-Accelerometer.html"/>
		<id>http://www.piglets.org/serendipity/archives/107-guid.html</id>
		<updated>2009-12-22T22:56:23+00:00</updated>
		<content type="html">I had noted before that &lt;a href=&quot;http://www.piglets.org/serendipity/archives/106-Cyanogen-Android-ROM-on-the-g1.html&quot;&gt;my accelerometer had broken on my Android g1 phone&lt;/a&gt;, so that one axis was out by about 40 degrees. Despite lots of &quot;helpful&quot; suggestions from my friends on how to fix it (you know who you are), nothing worked. This did.&lt;br /&gt;&lt;br /&gt;

Connect to the phone with adb (from the &lt;a href=&quot;http://developer.android.com/sdk/index.html&quot;&gt;Android SDK&lt;/a&gt;), in the following way.&lt;br /&gt;&lt;br /&gt;

&lt;div class=&quot;shell geshi&quot;&gt;&lt;br /&gt;
./adb start-server&lt;br /&gt;
./adb shell&lt;br /&gt;
# cd /data/misc/&lt;br /&gt;
# mv amkd_set.txt amkd_old.txt&lt;br /&gt;
# killall amkd&lt;br /&gt;
&amp;#160;&lt;/div&gt;

Now it works.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Cyanogen Android ROM on the g1</title>
		<link href="http://www.piglets.org/serendipity/archives/106-Cyanogen-Android-ROM-on-the-g1.html"/>
		<id>http://www.piglets.org/serendipity/archives/106-guid.html</id>
		<updated>2009-12-15T21:37:25+00:00</updated>
		<content type="html">I've had my Google development phone, the g1, for some time now. I haven't had the luxury of time to write anything for it, but I mainly wanted it to try out Android anyway. I've &lt;a href=&quot;http://www.piglets.org/serendipity/archives/82-HTC-Android-G1.html&quot;&gt;reviewed the phone&lt;/a&gt; before, and again after &lt;a href=&quot;http://www.piglets.org/serendipity/archives/84-Android-1.5-Cupcake-firmware.html&quot;&gt;some&lt;/a&gt; &lt;a href=&quot;http://www.piglets.org/serendipity/archives/102-Android-1.6-Donut-initial-thoughts.html&quot;&gt;canonical&lt;/a&gt; firmware upgrades.&lt;br /&gt;&lt;br /&gt;

I use the truly excellent &lt;a href=&quot;http://code.google.com/p/k9mail/&quot;&gt;K9&lt;/a&gt; application for mail, it has good support for self signed certificates, now has IMAP push support and is generally excellent. However, &lt;a href=&quot;http://code.google.com/p/k9mail/issues/detail?id=210&amp;amp;q=sd&amp;amp;colspec=ID%20Product%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&quot;&gt;it stores all the mail&lt;/a&gt; on the &lt;a href=&quot;http://www.htc.com/www/product/g1/specification.html&quot;&gt;shockingly limited internal memory&lt;/a&gt; on the device. That, and upgrades to things like Google Maps, adding truly excellent new functionality, left me constantly looking for applications to remove.&lt;br /&gt;&lt;br /&gt;

This is why in the end I decided to try &lt;a href=&quot;http://www.cyanogenmod.com/&quot;&gt;Cyanogen's ROMs&lt;/a&gt;. Since I have a development phone, I didn't need to root it, and just followed the &lt;a href=&quot;http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_ADP1_Firmware_to_CyanogenMod&quot;&gt;relevant instructions&lt;/a&gt; (in truth, I couldn't be bothered to downgrade the OS to root it first).&lt;br /&gt;&lt;br /&gt;

Here are some observations about the new ROM:&lt;br /&gt;&lt;br /&gt;

&lt;ul&gt;
  &lt;li&gt;Apps2sd is amazing.&lt;br /&gt;
  I have the whole pleasure of trying different apps all over again, without sweating about every byte. I don't have to worry about how much data is in my contacts (whether I assign them icons), my emails, and so on. I have plenty of room. I was delighted to be able to install DocumentsToGo. Which makes the phone &lt;strong&gt;much&lt;/strong&gt; more useful for work emails. Loads of great apps I had to remove have been reinstated, and I can play with others, like the awesome Google Googles.
  &lt;li&gt;Extra workspaces&lt;br /&gt;
  There are five workspaces, making for more widget playroom. I now have a calendar app taking up a whole workspace with the events to come. Excellent.
  &lt;li&gt;It fixes several problems I had with MMS functionality.&lt;br /&gt;
  &lt;ul&gt;
    &lt;li&gt;It fakes a variety of user agents, meaning that a test video message I sent myself on o2 finally worked, for the first time ever.&lt;/li&gt;
    &lt;li&gt;The stock ROM allows you to prevent data access when roaming, which is good. But it also doesn't fetch MMS when roaming, which is (for me) a nuisance, and these are usually on a different tariff system. So when you receive an MMS on roaming, you end up enabling all data access to quickly receive the MMS, and then turn it off again. The Cyanogen ROM has an option to retrieve MMS on roaming.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;li&gt;UI feels snappier&lt;/li&gt;
  &lt;li&gt;USB tethering&lt;br /&gt; can be enabled, which JustWorks (TM) with Debian. Excellent.
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;

On the downside, I have had some reset problems, but admittedly I have sometimes been pushing the phone very hard indeed to test it. And the battery life on the g1 is still awful. I know &lt;a href=&quot;http://www.earth.li/~noodles/&quot;&gt;Noodles&lt;/a&gt; has solved the problem by not actually using his phone :-), but I want to use mine.&lt;br /&gt;&lt;br /&gt;

Another minor problem I encountered some weeks ago was the accelerometer suddenly starting serious misreporting on one axis. This problem seems to be becoming less severe, but even reinstalling the stock and then cyanogen ROM did not fix it. However, note I did &lt;strong&gt;not&lt;/strong&gt; wipe the user data.&lt;br /&gt;&lt;br /&gt;

Cyanogen has made my phone fun to have again. And I will still replace it when a new Android handset comes out that I really like, but a lot of the urgency has gone. I'll certainly buy him a beer for Christmas.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Crules and Intermediate Representation</title>
		<link href="http://redbrain.co.uk/?p=491"/>
		<id>http://redbrain.co.uk/?p=491</id>
		<updated>2009-12-03T02:47:00+00:00</updated>
		<content type="html">&lt;p&gt;If you follow my blog you may have noticed i have been quiet and thats because i&amp;#8217;ve been working on &lt;a href=&quot;http://crules.org&quot;&gt;http://crules.org&lt;/a&gt; Its the new homepage for my project Crules, its got some good content on it but nothing really on the language yet. Though today i spend a very long time on the&lt;a href=&quot;http://crules.org/doku.php?id=hacking&quot;&gt; HACKING&lt;/a&gt; article And i explain a lot on how Intermediate Representation&amp;#8217;s work and &lt;a href=&quot;http://en.wikipedia.org/wiki/Three_address_code&quot;&gt;3-address code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So lets just take an extract since i am lazy: So in compilers or interpreters how do we represent:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x + y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; -- &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x + y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; * &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x -- y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x + y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; * &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x -- y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Lets see it in a diagram first then in IR code:&lt;/p&gt;
&lt;div class=&quot;wp-caption alignleft&quot;&gt;&lt;a href=&quot;http://farm3.static.flickr.com/2718/4153843445_7f33be00d2.jpg&quot;&gt;&lt;img title=&quot;Expression DAG&quot; src=&quot;http://farm3.static.flickr.com/2718/4153843445_7f33be00d2.jpg&quot; alt=&quot;Expression&quot; width=&quot;271&quot; height=&quot;202&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Expression&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;So what is this? Well early on when i was getting into compiler construction when doing semantic analysis you will need to find a way of representing these semantics for your language, and you will find generally that there are 3 things you need to know: &lt;strong&gt;DESTINATION OPERAND A and OPERAND B&lt;/strong&gt;. This is what&amp;#8217;s called &lt;a title=&quot;http://en.wikipedia.org/wiki/Three_address_code&quot; rel=&quot;nofollow&quot; href=&quot;http://en.wikipedia.org/wiki/Three_address_code&quot;&gt;3-address code&lt;/a&gt;. This is what sets compilers apart and can make or break them! Its what gives implementations flexibility and the ability to &amp;#8216;&lt;strong&gt;control the flow&lt;/strong&gt;&amp;#8216; of execution! Any good compiler book will give you more detailed discussion on this topic its my main interest in compilers since this is what gives an implementation its logic. So lets give it a syntax we can write down to illustrate how mine works: it just so happens a &lt;a title=&quot;http://en.wikipedia.org /wiki/Lisp_%28programming_language%29&quot; rel=&quot;nofollow&quot; href=&quot;http://en.wikipedia.org%20/wiki/Lisp_%28programming_language%29&quot;&gt;LISP&lt;/a&gt; &amp;#8216;ish syntax can show this very well!&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; IDENTIFIER &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; TYPE &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OPERAND A &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OPERAND B &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Since the parser is precedence aware it will construct the tree as shown in a symbol language which looks like this if it was output ( outputting the IR like this is a future TODO ); It may look a little like &lt;a title=&quot;http://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html&quot; rel=&quot;nofollow&quot; href=&quot;http://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html&quot;&gt;GIMPLE&lt;/a&gt; but this IR I have as I will demonstrate more examples can encompass much much more..  ( this is a 3-address code by the way )&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_ADD &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_SUBTRACT &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_ADD &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;x&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;y&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_MULTIPLY &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_ADD &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;x&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;y&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_SUBTRACT &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;x&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;y&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_MULTIPLY &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_ADD &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;x&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;y&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; OP_SUBTRACT &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;x&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; SYMBOL_ACCESS &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &amp;#8216;y&amp;#8217; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;NIL&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;; )&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;co1&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&quot;wp-caption alignright&quot;&gt;&lt;a href=&quot;http://icanhascheezburger.files.wordpress.com/2009/11/funny-pictures-cat-will-unroll-all-toilet-paper.jpg&quot;&gt;&lt;img title=&quot;Busy catz&quot; src=&quot;http://icanhascheezburger.files.wordpress.com/2009/11/funny-pictures-cat-will-unroll-all-toilet-paper.jpg&quot; alt=&quot;busy!&quot; width=&quot;270&quot; height=&quot;201&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;busy!&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Though one big note its is ok for me to leave the representation like this since in my interpreter i just evaluate this at run time but how does this affect things like code-generators like proper Compilers? Well its quite simple in a sane compiler like GCC ( although most compilers will follow this idiom i am sure) introduce another layer for IR called RTL ( &lt;a href=&quot;http://en.wikipedia.org/wiki/Register_transfer_language&quot;&gt;Register Transfer Language&lt;/a&gt; ). The wikipedia article lacks and most compiler books overlook this section very much since, most books are written by the academics and generally stay away from the &lt;a href=&quot;http://en.wikipedia.org/wiki/Compiler#Back_end&quot;&gt;back-end of compilers&lt;/a&gt; since that is the actual hard part since a code-gen is very specific to the instruction set your targeting and register allocation algorithms are very difficult and is a huge research project.  Its said in computer science the most difficult things to build software wise is a good JIT or any Code-Generator for that matter.  Anyways back to the problem lets take a smaller expression for sleep&amp;#8217;s sake the expression:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;unsigned&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; retval = &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; x * &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; / &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; + y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Will generate something like:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;t1 = x * &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;t2 = &lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt; + y;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;t3 = t1 / t2;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;retval = t3;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Anyways you&amp;#8217;ll notice in my the IR keywords such as SYMBOL_ACCESS or SYMBOL_ITEM or OP_ADD etc, these are what&amp;#8217;s called OP_Codes and are generally represented by some symbolic hex values since its cheap to check against for the implementation to figure out what to do with symbol &amp;#8216;x&amp;#8217;; So ok thats a quick and dirty intro to Intermediate Representation&amp;#8217;s!&lt;/p&gt;
&lt;p&gt;I think this lolcat will sum up your feelings at the end of reading this blog post:&lt;/p&gt;
&lt;p&gt;And i started getting out my old grunge cd&amp;#8217;s which include my &lt;a href=&quot;http://www.last.fm/music/Silverchair&quot;&gt;Silverchair&lt;/a&gt; collection and this is on of my favourite bands of all time and this is a pretty good song!&lt;/p&gt;
&lt;p&gt;&lt;!-- Smart Youtube --&gt;&lt;span class=&quot;youtube&quot;&gt;&lt;/span&gt;&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">DIY laptop SSD &quot;upgrade&quot;</title>
		<link href="http://www.earth.li/~noodles/blog/2009/11/diy-laptop-ssd-upgrade.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.229</id>
		<updated>2009-11-29T17:32:57+00:00</updated>
		<content type="html" xml:lang="en">I'm due a new laptop; my Portege R200 is over 4 years old now, I find it much slower than my desktop (no surprise; P-M 1.2GHz/1.2GB vs Core 2 2GHz/4GB), it's had a new battery and it has an annoying whine on the screen unless you press the side in just the right way. It's still better for long periods of use than my EEE 901, which is why I keep it. In particular I'm off to &lt;a href=&quot;http://www.lca2010.org.nz/&quot;&gt;LCA2010&lt;/a&gt; in January, along with some associated travel beforehand, and I'll want more than the EEE for that, but probably not a brand new laptop. Which meant that when the R200 started throwing disk errors recently I wasn't particularly happy.&lt;br /&gt;&lt;br /&gt;Having decided it wasn't worth buying a new 1.8&quot; drive I looked for alternatives. &lt;a href=&quot;http://www.ebay.co.uk/&quot;&gt;eBay&lt;/a&gt; offered plenty of options for 1.8&quot; IDE to CF adaptors and I picked up a Kingston 32GB CF card from &lt;a href=&quot;http://www.ebuyer.com/&quot;&gt;eBuyer&lt;/a&gt;. I copied across the data from the old drive using a USB adaptor, frobbed grub sufficiently that I got it installed on the CF, then swapped out the drive for the adaptor + CF. I had to do the swap a few times; the first I forgot to have a kernel with ext2 support (the HDD was ext3, but I went back to ext2 for the CF). The second I'd done my usual trick of forgetting to populate /dev with things like console and sda* (ie enough to get to the point where udev will run). And then grub needed some prodding to boot without intervention. I got there in the end and I'm currently writing this from said laptop.&lt;br /&gt;&lt;br /&gt;I've made a few changes to the Debian install in an attempt to make things smoother; basically the same tricks people have been using on EEEs or other slow SSD devices. No swap, Iceweasel synchronous toolkit writes disabled, filesystems mounted with noatime, /tmp on tmpfs, various daemons that I don't really use disabled. It's still noticably slower than with the HDD, particularly on writes. However it's quieter and as long as it lasts for the next 3 months I'm happy (plus after that I can reuse the 32G CF card somewhere else, which I couldn't have done with a 1.8&quot; HDD as easily).&lt;br /&gt;&lt;br /&gt;Now, back to eying the Lenovo &lt;a href=&quot;http://www.thinkwiki.org/wiki/Category:X200s&quot;&gt;X200s&lt;/a&gt; (ugly, trackpoint but 1440x900 display, good battery life) and Toshiba &lt;a href=&quot;http://laptops.toshiba.com/laptops/portege/R600&quot;&gt;R600&lt;/a&gt; (slower, lower res but pretty and trackpad).as potential replacements. Maybe there'll be something even shinier in 12&quot; by next year...&lt;br /&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Intel C++ Complilers Linux</title>
		<link href="http://redbrain.co.uk/?p=485"/>
		<id>http://redbrain.co.uk/?p=485</id>
		<updated>2009-11-28T16:15:27+00:00</updated>
		<content type="html">&lt;p&gt;So if you know me you&amp;#8217;ll know i think compilers are cool&amp;#8230; yeah i know i am weird lol. So any-way&amp;#8217;s this is something i never really got around to until last night. Which was setting up the Intel C/C++ compilers in my Computer which is running Debian. If  you ever look at using compilers other than GCC such as like Sun Studio and Intel C++ you may find its very messy feeling. What i mean is they have like a nasty install.sh, and to be quite honest they fail lol. Since they generally only cared about creating RPM&amp;#8217;s and hoping your running Red Hat since most customers who would buy these compilers would be running a Red Hat server farm. So if your project is using Autoconf and Automake you dont have to worry about a thing, once the compilers are installed it will be one quick minor change to your configure.ac. And your all set!&lt;/p&gt;
&lt;p&gt;First off go and download the 750mb tarball of the Intel C compilers over at: &lt;a href=&quot;http://software.intel.com/en-us/intel-compilers/&quot;&gt;http://software.intel.com/en-us/intel-compilers/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;% tar zxvf l_cproc_p_11.1.059_ia32.tgz&lt;/p&gt;
&lt;p&gt;% cd l_cproc_p_11.1.059_ia32&lt;/p&gt;
&lt;p&gt;% ./install.sh&lt;/p&gt;
&lt;p&gt;# follow all the instructions it complained i didn&amp;#8217;t have java installed but you don&amp;#8217;t need it. Once your finished it should all be installed to /opt/intel/Compiler&lt;/p&gt;
&lt;p&gt;% PATH=$PATH:/opt/intel/Compiler/11.0/069/bin/ia32&lt;/p&gt;
&lt;p&gt;% LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/Compiler/11.1/059/lib/ia32/:/usr/lib/&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You should be able to run &amp;#8216;icc&amp;#8217; but you will probably get the error: &amp;#8221; /opt/intel/Compiler/11.1/059/bin/ia32/mcpcom: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory&lt;/p&gt;
&lt;p&gt;compilation aborted for test.c (code 127)&amp;#8221;&lt;/p&gt;
&lt;p&gt;So you need to install an older libstdc++ on debian it is:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;% aptitude install libstdc++5&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That should be it lets give it a test:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; main&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; ;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li2&quot;&gt;
&lt;div class=&quot;de2&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;blockquote&gt;&lt;p&gt;% icc test.c&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Should work now! If your project uses a Configure.ac lets make a quick change:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Change your AC_PROG_CC to:&lt;br /&gt;
AC_PROG_CC([icc gcc cc cl])&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is the order in which the configure should search for each compiler. Since you need GCC installed to use Intel C++ you need to put ICC at the top of the list! Hope this helps someone!&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">C++ Templates for XCode 3.2</title>
		<link href="http://stuarthacking.com/wordpress/?p=229"/>
		<id>http://stuarthacking.com/wordpress/?p=229</id>
		<updated>2009-11-19T16:17:02+00:00</updated>
		<content type="html">Here are a couple of Project templates I made for XCode 3.2. One for a WxWidgets based project (wxMac 2.8), and one for a GLUT project. Hope they work.
&lt;ul&gt;&lt;br /&gt;	&lt;li&gt;&lt;a href=&quot;http://www.stuarthacking.com/pub/xcode/C++_GLUT_App.zip&quot;&gt;GLUT C++ Project&lt;/a&gt; &amp;#8211; Initializes GLUT and creates a scene containing a cube which can be rotated using the keyboard arrow keys. toggle an axis widget using &amp;#8216;w&amp;#8217;, toggle fullscreen using &amp;#8216;o&amp;#8217; and exit using ESC. The FPS is displayed in the titlebar.&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.stuarthacking.com/pub/xcode/WxWidgets_App.zip&quot;&gt;WxWidgets C++ Project&lt;/a&gt; &amp;#8211; Initializes a WxWidgets based app with an empty frame.&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Stuart Hacking</name>
			<uri>http://stuarthacking.com/wordpress</uri>
		</author>
		<source>
			<title type="html">Stuart Hacking</title>
			<link rel="self" href="http://blog.stuarthacking.com/?feed=rss2"/>
			<id>http://blog.stuarthacking.com/?feed=rss2</id>
			<updated>2009-11-20T14:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">三年間</title>
		<link href="http://martian.org/marty/2009/11/18/%e4%b8%89%e5%b9%b4%e9%96%93/"/>
		<id>http://martian.org/marty/?p=210</id>
		<updated>2009-11-18T16:09:23+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://martian.org/karen/&quot;&gt;Karen&lt;/a&gt; and I have now been living in Japan for three years.  When we decided to move here we thought it would be an adventure, and it has been.  We&amp;#8217;ve had some problems, we&amp;#8217;ve had some fun, and we&amp;#8217;ve had lots of fun-problem combinations.  I think we made the right choice.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">More about LHC black holes</title>
		<link href="http://www.piglets.org/serendipity/archives/105-More-about-LHC-black-holes.html"/>
		<id>http://www.piglets.org/serendipity/archives/105-guid.html</id>
		<updated>2009-11-15T23:20:41+00:00</updated>
		<content type="html">Last week &lt;a href=&quot;http://www.piglets.org/serendipity/archives/104-Black-Hole-Radius,-or-How-I-came-to-love-the-LHC.html&quot;&gt;I wrote a little about the size of black holes&lt;/a&gt;, and incidentally discussed &lt;strong&gt;very&lt;/strong&gt; primitive calculations I did on the lifespan of any black hole created by the LHC.&lt;br /&gt;&lt;br /&gt;

A few days later, this &lt;a href=&quot;http://news.discovery.com/space/the-lhc-black-hole-no-braner.html&quot;&gt;interesting article&lt;/a&gt; showed the results of professional physicists on just how little such little black holes could grow, in some cases even if their lifetime was not restricted. Enjoy.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Playing with an e-reader</title>
		<link href="http://www.earth.li/~noodles/blog/2009/11/playing-with-an-e-reader.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.228</id>
		<updated>2009-11-15T14:25:09+00:00</updated>
		<content type="html" xml:lang="en">I've always preferred dead tree to reading things on screen; I just find it easier. I've tried reading fiction in the past off a laptop and just didn't find it as enjoyable an experience; whether it was the form factor (hard to curl up with a laptop, even a netbook), the quality of the screen or the interface I don't know. Equally with technical documentation if it's something I'm using a lot I prefer a printed copy to flick through. However e-ink based e-readers are becoming much more common and affordable and I figured I should give the whole ebook experience another try.&lt;br /&gt;&lt;br /&gt;I spent 3 weeks in October in the Bay Area on work, so I borrowed my Dad's Sony &lt;a href=&quot;http://wiki.mobileread.com/wiki/PRS505&quot;&gt;PR505&lt;/a&gt; for the trip. First problem is that it's picky about USB charging - works fine if attached to a computer, but using a Blackberry charger &lt;i&gt;looks&lt;/i&gt; like it's fine but then results in what looks like a hanging reader. However once charged it lasts for ages - I charged it before I went and only hooked it up to my laptop once during the trip to transfer some new content onto it. The form factor is also quite good; a bit heavier than a book, but not excessively so. Holdable in one hand, big enough screen that I wasn't squinting at it. Slightly too big physically to easily go in a coat pocket the way a paperback would unfortunately, but perfectly fine for taking to read at breakfast every morning in the hotel.&lt;br /&gt;&lt;br /&gt;The screen was also much better than I'd expected. I knew the technology was different and supposed to be easier to read than traditional LCDs, but I was sceptical. Overall I had no problems with it. I was even quite impressed with the Sony's zoom function - one of the PDFs I was reading was too small when view full screen, so I zoomed in so it was readable. The nice feature was that then the &quot;next page&quot; button gave me the next bit of text to read, rather than the actual next page, so it remained very easy to navigate through as I read. A small touch, but very welcome.&lt;br /&gt;&lt;br /&gt;This isn't intended to be a review of the Sony reader; that just happened to be the model I was easily able to borrow. I happened to see a Kindle in use on the plane and I was struck by how much bulkier it seemed, though having looked at the relative specs it seems this is entirely due to the keyboard rather than any difference in screen size. The &lt;a href=&quot;http://www.barnesandnoble.com/nook/&quot;&gt;Nook&lt;/a&gt; was also announced during my trip and I'd quite like a play with that as it looks quite nice.&lt;br /&gt;&lt;br /&gt;Despite my positive experience with the Sony I'm not planning to go out and get one just yet. And that's the lack of sensibly priced content. When I bought my first mp3 player I could take my exising CD collection, rip it and be able to play it on my new device. This meant I got an immediate benefit of having my entire music collection with me all the time, just by buying the player. If I buy an e-reader then in order to get all my existing books on it I have to go and buy them again. What's worse is they'll cost me the same or more than I paid for the paperbacks. I can't go and exchange my Pratchett collection for the electronic versions for a nominal fee. I can't easily scan them in myself and produce some decent ebooks. I can't even go and buy the entire set for £20; I'd have to spend something like ten times that. With mp3s I can continue to buy the real item and also have it on my portable player. Or, while albums still don't seem to be much cheaper electronically than on CD, there is at least the ability to buy a single track if that's all I want. Books don't have a comparison. I'm not going to want to buy a single chapter, am I?&lt;br /&gt;&lt;br /&gt;There are some sites out there that can provide cheaper ebooks - Rachel Willmer runs &lt;a href=&quot;http://www.ebookprice.info/&quot;&gt;ebookprice.info&lt;/a&gt; which lets you compare pricing from different vendors. There's also &lt;a href=&quot;http://www.gutenberg.org/wiki/Main_Page&quot;&gt;Project Gutenberg&lt;/a&gt; if you're looking for out of copyright books. Finally Peter Corlett pointed me at the &lt;a href=&quot;http://www.baen.com/library/&quot;&gt;Baen Free Library&lt;/a&gt;, which I haven't downloaded anything from but will definitely investigate at some point. I still maintain that none of these are enough and that content provision will continue to be a hinderance for e-reader mass adoption until there is some fundemental change in the way its provision is handled.&lt;br /&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Nethack on OS X 10.6 (Snow Leopard)</title>
		<link href="http://stuarthacking.com/wordpress/?p=222"/>
		<id>http://stuarthacking.com/wordpress/?p=222</id>
		<updated>2009-11-13T14:47:16+00:00</updated>
		<content type="html">O.K. So, this is kind of a followup to a &lt;a title=&quot;The old Nethack post&quot; href=&quot;http://stuarthacking.com/wordpress/?p=39&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt; I did about how I like to setup &lt;a title=&quot;Nethack official Site&quot; href=&quot;http://www.nethack.org&quot; target=&quot;_blank&quot;&gt;Nethack&lt;/a&gt; on my Mac. However, more recently, some of the patches I had used stopped working on later versions of Mac OS (10.5 and 10.6). So I spent a bit of time looking into this today and I got some positive results. (update: I think the problem I had with Menucolor compiling was that it didn&amp;#8217;t like the regexp method &amp;#8211; I changed this to simply use the wildcard matching.)&lt;br /&gt;&lt;br /&gt;&lt;div id=&quot;attachment_224&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://stuarthacking.com/wordpress/wp-content/uploads/2009/11/Screen-shot-2009-11-13-at-14.34.00.png&quot; rel=&quot;shadowbox[post-222];player=img;&quot;&gt;&lt;img class=&quot;size-medium wp-image-224 &quot; title=&quot;Nethack with Status Colors and Menu Colors&quot; src=&quot;http://stuarthacking.com/wordpress/wp-content/uploads/2009/11/Screen-shot-2009-11-13-at-14.34.00-300x185.png&quot; alt=&quot;Nethack with Status Colors and Menu Colors&quot; width=&quot;300&quot; height=&quot;185&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Nethack with Status Colors and Menu Colors&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, because the two patches I&amp;#8217;m applying have resulting conflicts- it meant manually applying the patches to the source code in some cases (also: I&amp;#8217;m lazy). I, therefore, don&amp;#8217;t have an elegant method of actually applying the two patches that I can pass on. What I am doing instead is providing two things: The complete refined archive of the patched Nethack source which should be ready-to-compile on OS 10.6; And also the .diff file produced from a vanilla copy of the source and my own patched version. I will also provide my new updated nethackrc file. (ok&amp;#8230; 3 things &lt;img src=&quot;http://stuarthacking.com/wordpress/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; /&gt;  )&lt;br /&gt;&lt;br /&gt;Here&amp;#8217;s some details about the setup this provides:
&lt;ol&gt;&lt;br /&gt;	&lt;li&gt;The Status Colors patch is applied. This is a configurable patch allowing you to color code status effects &amp;#8211; hunger, blindness, HP, Gold, AC, etc. It&amp;#8217;s very, very cool! &lt;img src=&quot;http://stuarthacking.com/wordpress/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/li&gt;
	&lt;li&gt;Menucolors patch applied. This is a configurable patch that let&amp;#8217;s you apply colors to popup menus. e.g. inventory items can be red for cursed, green for blessed, etc. Again, this patch is very neat!&lt;/li&gt;
	&lt;li&gt;The initial configuration for getting Nethack to build on mac has been taken care of.&lt;/li&gt;
&lt;/ol&gt;
So Here are the links to get everything up and running. I should say at this point that this stuff works on &lt;em&gt;my machine&lt;/em&gt; and YMMV. If something is broken and you want my to take a look at it just leave a comment of send an email &amp;#8211; I&amp;#8217;ll try to fix it if I have time. You may also want to dig through the changes in the patch.
&lt;ol&gt;&lt;br /&gt;	&lt;li&gt;&lt;a href=&quot;http://www.stuarthacking.com/pub/nethack-3.4.3-patched.zip&quot;&gt;nethack-3.4.3-patched.zip&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.stuarthacking.com/pub/nh343_menustatus_orig.diff&quot;&gt;nh343-_menustatus_orig.diff&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.stuarthacking.com/pub/nethackrc.txt&quot;&gt;.nethackrc&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
I hope this is useful for someone who wants a nice shiny setup of Nethack on Snow Leopard. &lt;img src=&quot;http://stuarthacking.com/wordpress/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; /&gt;</content>
		<author>
			<name>Stuart Hacking</name>
			<uri>http://stuarthacking.com/wordpress</uri>
		</author>
		<source>
			<title type="html">Stuart Hacking</title>
			<link rel="self" href="http://blog.stuarthacking.com/?feed=rss2"/>
			<id>http://blog.stuarthacking.com/?feed=rss2</id>
			<updated>2009-11-20T14:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Black Hole Radius, or How I came to love the LHC</title>
		<link href="http://www.piglets.org/serendipity/archives/104-Black-Hole-Radius,-or-How-I-came-to-love-the-LHC.html"/>
		<id>http://www.piglets.org/serendipity/archives/104-guid.html</id>
		<updated>2009-11-09T14:58:39+00:00</updated>
		<content type="html">I allowed myself to become rather distracted by my second years last week as the class was finishing. They were talking about an &lt;a href=&quot;http://www.bbc.co.uk/iplayer/episode/b00nslc4/Horizon_20092010_Whos_Afraid_of_a_Big_Black_Hole/&quot;&gt;episode&lt;/a&gt; of &lt;a href=&quot;http://www.bbc.co.uk/horizon/&quot;&gt;Horizon&lt;/a&gt; that discussed &lt;a href=&quot;http://en.wikipedia.org/wiki/General_relativity&quot;&gt;General Relativity&lt;/a&gt; and theories of &lt;a href=&quot;http://en.wikipedia.org/wiki/Quantum_gravity&quot;&gt;Quantum Gravity&lt;/a&gt;. What followed was a free ranging discussion on the nature of infinity, mentioned briefly in the program. But we also talked about the nature of a &lt;a href=&quot;http://en.wikipedia.org/wiki/Black_hole&quot;&gt;black hole&lt;/a&gt; and its size.&lt;br /&gt;&lt;br /&gt;

It's surprisingly easy to calculate this with &lt;em&gt;reasonably&lt;/em&gt; elementary maths and physics. I first did this when I was about 17 (how very sad) using classical physics equations, and was astounded to discover that even so, the answer was correct (I checked it in the &lt;a href=&quot;http://www.britannica.com/&quot;&gt;Encyclopedia Britannica&lt;/a&gt; in the library at the time).&lt;br /&gt;&lt;br /&gt;

Here is Newton's universal law of gravitation, between two bodies. It describes the force &lt;em&gt;F&lt;/em&gt; between two bodies that are &lt;em&gt;r&lt;/em&gt; metres apart. Let's take the one with mass &lt;em&gt;M&lt;/em&gt; to be the black hole. &lt;em&gt;G&lt;/em&gt; is a small (&lt;a href=&quot;http://en.wikipedia.org/wiki/Gravitational_constant&quot;&gt;though mysterious&lt;/a&gt;) constant.&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=F%20%3D%20%5Cfrac%7BGMm%7D%7Br%5E2%7D&quot; title=&quot;F = \frac{GMm}{r^2}&quot; alt=&quot;F = \frac{GMm}{r^2}&quot; /&gt;&lt;br /&gt;&lt;br /&gt;

You can work out the energy needed to escape the black hole using the old stand by equation that work done is the force times distance traveled against that force, but that only works with a constant force, this force will change as we move, so we need to use the big daddy of multiplication, integration.&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=%20WD%20%3D%20%5Cint_a%5Eb%20F%20dr%20&quot; title=&quot; WD = \int_a^b F dr &quot; alt=&quot; WD = \int_a^b F dr &quot; /&gt;&lt;br /&gt;&lt;br /&gt;

Specifically, we will work out the energy needed to escape from the &lt;a href=&quot;http://en.wikipedia.org/wiki/Event_horizon&quot;&gt;event horizon&lt;/a&gt;, the surface at which the escape velocity is the speed of light, which is &lt;em&gt;c&lt;/em&gt; (299,792,458 m/s). So the energy will be given by moving my little mass &lt;em&gt;m&lt;/em&gt; from the radius of the event horizon, let's call is &lt;em&gt;R&lt;/em&gt; to infinity, to show we have broken away.&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=%20WD%20%3D%20%5Cint_%7BR%7D%5E%7B%5Cinfty%7D%20%5Cfrac%7BGMm%7D%7Br%5E2%7D%20dr%20%3D%20%5Cleft%20%5B%20-%5Cfrac%7BGMm%7D%7Br%7D%20%5Cright%20%5D_%7BR%7D%5E%7B%5Cinfty%7D%20%3D%20%5Cfrac%7BGMm%7D%7BR%7D%20&quot; title=&quot; WD = \int_{R}^{\infty} \frac{GMm}{r^2} dr = \left [ -\frac{GMm}{r} \right ]_{R}^{\infty} = \frac{GMm}{R} &quot; alt=&quot; WD = \int_{R}^{\infty} \frac{GMm}{r^2} dr = \left [ -\frac{GMm}{r} \right ]_{R}^{\infty} = \frac{GMm}{R} &quot; /&gt;&lt;br /&gt;&lt;br /&gt;

Now, this should just balance the kinetic energy possessed by my little mass &lt;em&gt;m&lt;/em&gt; traveling at the speed of light.&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=%20%5Cfrac%7B1%7D%7B2%7D%20mc%5E2%20%3D%20%5Cfrac%7BGMm%7D%7BR%7D%20&quot; title=&quot; \frac{1}{2} mc^2 = \frac{GMm}{R} &quot; alt=&quot; \frac{1}{2} mc^2 = \frac{GMm}{R} &quot; /&gt;&lt;br /&gt;&lt;br /&gt;

and if we rearrange for &lt;em&gt;R&lt;/em&gt; we get that&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=%20R%20%3D%20%5Cfrac%7B2GM%7D%7Bc%5E2%7D%20&quot; title=&quot; R = \frac{2GM}{c^2} &quot; alt=&quot; R = \frac{2GM}{c^2} &quot; /&gt; &lt;br /&gt;&lt;br /&gt;

In other words, the radius of the event horizon, the bit we think of as the &quot;hole&quot; is dependent entirely upon the mass of the object. Please note this is based on a very simple model of a non rotating black hole. Nevertheless we can do some nice calculations from this.&lt;br /&gt;&lt;br /&gt;

The Sun, would have to be compressed from its diameter of about 700 &lt;em&gt;million&lt;/em&gt; kilometres into a radius of just under 3 kilometres. The Earth's mass would need to be compressed so much to form a black hole you would need to squeeze its radius of over 6 thousand kilometres into a radius of around 9 millimetres. That's how dense we're talking here.&lt;br /&gt;&lt;br /&gt;

We can also consider the radius as described by the contained energy of the black hole, since we know that&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=E%3Dmc%5E2&quot; title=&quot;E=mc^2&quot; alt=&quot;E=mc^2&quot; /&gt;&lt;br /&gt;&lt;br /&gt;

and so, replacing our &lt;em&gt;M&lt;/em&gt; in our above equation we get&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=%20R%20%3D%20%5Cfrac%7B2GE%7D%7Bc%5E4%7D%20&quot; title=&quot; R = \frac{2GE}{c^4} &quot; alt=&quot; R = \frac{2GE}{c^4} &quot; /&gt; &lt;br /&gt;&lt;br /&gt;

Wow. Remember &lt;em&gt;c&lt;/em&gt; is a big number, taking it to the power of four is a lot. So why do this? There's been a lot of speculation about the possibility the &lt;a href=&quot;http://en.wikipedia.org/wiki/Large_Hadron_Collider&quot;&gt;Large Hadron Collider&lt;/a&gt; (LHC) could create a black hole. This has caused a fair degree of panic, and &lt;a href=&quot;http://news.bbc.co.uk/1/hi/world/south_asia/7609631.stm&quot;&gt;at least one suicide&lt;/a&gt;. It's a physicist's &lt;em&gt;dream&lt;/em&gt; that a black hole might be created. I just looked up the &quot;high&quot; energies used by the LHC, and high is a relative term. It plans to bash protons together with 7 TeV (Tera electron volts) of energy each, or lead nucleii with 574 TeV each, let's take the latter. Just how much energy is that in a collision? Well, doubling and converting to good old Joules gives 184 micro Joules. That's really not a lot, 184 millionth's of a Joule. A 100W light bulb uses 100 Joules each and every second. How big would the radius of such a black hole that might form be, from that energy? Check the maths, because so far I haven't but I get.&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=R%20%3D%203.040%20%5Ctimes%2010%5E%7B-48%7D&quot; title=&quot;R = 3.040 \times 10^{-48}&quot; alt=&quot;R = 3.040 \times 10^{-48}&quot; /&gt; metres&lt;br /&gt;&lt;br /&gt;

which is 0.000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,003 metres wide (I hope, I didn't double check the zeros either), which is probably not the planet swallower of people's imagination (but &lt;a href=&quot;http://www.cyriak.co.uk/lhc/lhc-webcams.html&quot;&gt;this&lt;/a&gt; is fun). But the problem is people think this tiddler will grow very rapidly, but that's because they don't know about &lt;a href=&quot;http://en.wikipedia.org/wiki/Hawking_radiation&quot;&gt;Hawking Radiation&lt;/a&gt;. This is an interesting quantum effect that means black holes aren't really black, they do emit a little radiation. Large holes would gather surrounding matter faster than their low radiation rate, but small holes have the opposite situation, they radiate more rapidly. The maths for all that is pretty complex, and you need to make lots of assumptions, but the time taken for our little black hole to &quot;evaporate&quot; is (hurriedly calculated by me)&lt;br /&gt;&lt;br /&gt;

&lt;img src=&quot;http://www.piglets.org/serendipity/plugin/mimetex.php?q=t%20%3D%207.21%20%5Ctimes%2010%5E%7B-79%7D%20s&quot; title=&quot;t = 7.21 \times 10^{-79} s&quot; alt=&quot;t = 7.21 \times 10^{-79} s&quot; /&gt;&lt;br /&gt;&lt;br /&gt;

a tiny, tiny fraction of a second. Even allowing for the ambient temperature and some fall in of matter, this little baby is not in equilibrium, it's not getting mass fast enough to accumulate more. It's safe*.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;

* &lt;small&gt;All disclaimers apply. No liability is assumed for foolish unvalidated experiments done by you or other members of your species. Do not attempt to create black holes in your garage. Any subsequent destruction of your civilization, planet or solar system is at your own risk, and any &quot;EPIC FAIL&quot; signs placed by aliens on the remains is not due to me or my calculation. No calculations have been done on the matter of strange matter either. If you break the planet / system / galaxy or universe you own all the parts.&lt;/small&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Whoops</title>
		<link href="http://redbrain.co.uk/?p=484"/>
		<id>http://redbrain.co.uk/?p=484</id>
		<updated>2009-11-07T03:46:40+00:00</updated>
		<content type="html">&lt;p&gt;So yeah i have lost a fair bit of content but i had some server trouble and reverted to an old backup &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt;  but at least the other people i host on here didn&amp;#8217;t seem to loose anything so that was a huge weight off my mind &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  anyways its nearly 4 am and its nearly all setup now just need a quick bit of exim tinkering and various bits of pluming to be checked out! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  So hopefully it will be fine!&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Eat the Jam!</title>
		<link href="http://stuarthacking.com/wordpress/?p=218"/>
		<id>http://stuarthacking.com/wordpress/?p=218</id>
		<updated>2009-11-01T17:46:26+00:00</updated>
		<content type="html">Ladies and gentlemen, May I present &amp;#8220;Eat the Jam!&amp;#8221; The only game which combines a high powered pop culture quiz with a taxing conserve based forfeit.&lt;br /&gt;&lt;br /&gt;</content>
		<author>
			<name>Stuart Hacking</name>
			<uri>http://stuarthacking.com/wordpress</uri>
		</author>
		<source>
			<title type="html">Stuart Hacking</title>
			<link rel="self" href="http://blog.stuarthacking.com/?feed=rss2"/>
			<id>http://blog.stuarthacking.com/?feed=rss2</id>
			<updated>2009-11-20T14:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Vidzone working at last!</title>
		<link href="http://www.piglets.org/serendipity/archives/103-Vidzone-working-at-last!.html"/>
		<id>http://www.piglets.org/serendipity/archives/103-guid.html</id>
		<updated>2009-10-20T22:57:09+00:00</updated>
		<content type="html">Success at last. I've &lt;a href=&quot;http://www.piglets.org/serendipity/archives/99-Virgin-Media,-Netgear-and-Vidzone.html&quot;&gt;written before&lt;/a&gt; about my problems getting &lt;a href=&quot;http://www.vidzone.tv&quot;&gt;vidzone&lt;/a&gt; working, and tonight while taking a breather from some work I tried the Oracle of Google again, and I found a solution. As I suspected, it wasn't a network problem at all.&lt;br /&gt;&lt;br /&gt;

Kudos to &lt;a href=&quot;http://community.eu.playstation.com/playstationeu/profile?user.id=293748&quot;&gt;lyonix&lt;/a&gt;, who suggested that deleting a corrupt cache for Vidzone from the game data utility often works. It worked perfectly for me, (note even removing and reinstalling the software doesn't affect that).</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Perl&amp;#8217;s XML::Twig</title>
		<link href="http://martian.org/marty/2009/10/14/perls-xmltwig/"/>
		<id>http://martian.org/marty/?p=202</id>
		<updated>2009-10-13T16:24:20+00:00</updated>
		<content type="html">&lt;p&gt;I was asked to &amp;#8220;Free the code&amp;#8221; from my &lt;a href=&quot;http://martian.org/marty/2009/10/07/beating-down-the-xml/&quot;&gt;XML parsing experiment&lt;/a&gt; , so I will post some here.  It may be a bit disappointing though, since these are only some short scripts, and they&amp;#8217;re a bit ugly.  I&amp;#8217;ll explain the Perl one today, and do the Haskell sometime soon.&lt;/p&gt;

&lt;p&gt;I was playing with &lt;a href=&quot;http://www.csse.monash.edu.au/~jwb/jmdict.html&quot;&gt;Jim Breen&amp;#8217;s Japanese dictionary&lt;/a&gt; and I wanted to make a list of the first kanji component in each entry.  I wanted one result for each entry, so I used &amp;#8220;(none)&amp;#8221; if the entry has no kanji part.  This is not a difficult problem, although XML makes it as slow and memory intensive as many difficult problems.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;use XML::Twig;
my @keb = (); # for the results

sub entry {
    my ($t, $e) = @_;
    my $kt = &quot;(none)&quot;;
    if (my $k = $e-&amp;gt;first_child(&quot;k_ele&quot;)) {
        if(my $keb = $k-&amp;gt;first_child(&quot;keb&quot;)) {
            $kt = $keb-&amp;gt;text();
        }
    }
    $e-&amp;gt;purge;
    push @keb, $kt;
}

my $twig = XML::Twig-&amp;gt;new(
    twig_handlers =&amp;gt; { entry =&amp;gt; \&amp;amp;entry }
);
$twig-&amp;gt;parsefile($ARGV[0]);
$twig-&amp;gt;purge;

# now the results are in @keb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using XML::Twig is quite simple.  When I create the parser I tell it how to handle the elements I care about, and in this case I only care about &amp;#8220;entry&amp;#8221; elements.  When the parser finds an entry, it calls my &lt;code&gt;entry&lt;/code&gt; subroutine, passing the entry&amp;#8217;s object as the second parameter, &lt;code&gt;$e&lt;/code&gt;.  Inside the &lt;code&gt;entry&lt;/code&gt; routine I can use DOM-style methods on &lt;code&gt;$e&lt;/code&gt; to extract the data I want.  Notice that I call &lt;code&gt;$e-&amp;gt;purge&lt;/code&gt; when I&amp;#8217;ve got the data out.  This tells the parser that I won&amp;#8217;t need that element again, so it can free the memory.  This is how XML::Twig manages to parse a file that most other modules can&amp;#8217;t.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">What to wear?</title>
		<link href="http://www.earth.li/~noodles/blog/2009/10/what-to-wear.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.227</id>
		<updated>2009-10-13T06:17:08+00:00</updated>
		<content type="html" xml:lang="en">I tend to dress quite casually - unless there's a good reason to do otherwise I'll be in jeans and a t-shirt, or something similar. I'm comfortable in it and I take the view point that in general people shouldn't be making assumptions based on what I'm wearing. Of course they do, and while this can be infuriating at times it can also be amusing. The man at the RBoS who witnessed me signing the personal DD guarantee form for Black Cat obviously couldn't reconcile my appearance with what I was there to do, for example.
&lt;br /&gt;
&lt;br /&gt;
I'd never thought about this from the other side until a few weeks ago. I spoke to someone who explained how difficult it had become to conduct
business meetings with other companies with the increased level of business casual. In fact on occasion different branches of the same company that he'd be meeting with would have different dress codes, so he'd go to something involving casual dress in the morning and something
with full business suit attire in the afternoon and end up feeling over or under dressed.
&lt;br /&gt;
&lt;br /&gt;
This isn't likely to make me change my own behaviour in the immediate future (I don't have to interact with external parties as part of my current job). It did help me realise that there was another explanation for awkward behaviour when I'm my usual scruffy self that wasn't just about judging on appearances though.
&lt;br /&gt;
&lt;br /&gt;
(All of the above blatantly obvious once you think about it, but it took that conversation for me to do so.)</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Android 1.6 (Donut) initial thoughts</title>
		<link href="http://www.piglets.org/serendipity/archives/102-Android-1.6-Donut-initial-thoughts.html"/>
		<id>http://www.piglets.org/serendipity/archives/102-guid.html</id>
		<updated>2009-10-08T00:40:33+00:00</updated>
		<content type="html">I installed donut earlier this week. This is on my G1 devphone, so I don't recommend you use &lt;a href=&quot;http://developer.htc.com/adp.html&quot;&gt;the htc&lt;/a&gt; page otherwise. This time I didn't bother going through all the nonsense with the tools, I just mounted the phone on USB and slapped the image across one by one into the SD card as update.zip.&lt;br /&gt;&lt;br /&gt;

This is not as significant an upgrade as &lt;a href=&quot;http://www.piglets.org/serendipity/archives/84-Android-1.5-Cupcake-firmware.html&quot;&gt;cupcake was&lt;/a&gt; but nevertheless, it's improved the phone in a number of key ways.

&lt;ul&gt;
  &lt;li&gt;the search widget now searches phone content as well internet content, this works very smoothly;&lt;/li&gt;
  &lt;li&gt;the camera / camcorder apps are now easy to switch between, and much faster;&lt;/li&gt;
  &lt;li&gt;the gallery &lt;em&gt;is&lt;/em&gt; quicker, but only after it takes a complete age to index/whatever;&lt;/li&gt;
  &lt;li&gt;the market application is hugely improved, and as a bonus, lots of content that was previously unavailable on the devphone is now listed;&lt;/li&gt;
  &lt;li&gt;the speech synthesis stuff is installed, but I don't really see it does much just yet;&lt;/li&gt;
  &lt;li&gt;the battery monitor app is very useful, especially since the g1 battery life sucks so badly.&lt;/li&gt;
&lt;/ul&gt;

My battery life is, by the way, 29% taken up by wifi (forgot to switch it off today), 18% by display, 14% cell standby, and so on. 8% was taken up by voice calls.&lt;br /&gt;&lt;br /&gt;

Be warned, the new upgrade seems to suck up more space, and takes a long time to start-up after first reboot.&lt;br /&gt;&lt;br /&gt;

You can see a full list of the changes &lt;a href=&quot;http://developer.android.com/sdk/android-1.6-highlights.html&quot;&gt;here&lt;/a&gt;, and though it's modest, I think it's a nice upgrade in lots of ways. At this time, it's hard to know how much limitations in the G1 experience are from the hardware or the OS, I'm looking forward to seeing how android behaves on new hardware.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Gallium3D on AROS</title>
		<link href="http://irukado.org/2009/10/08/gallium3d-on-aros"/>
		<id>http://irukado.org/2009/10/08/gallium3d-on-aros</id>
		<updated>2009-10-08T00:10:38+00:00</updated>
		<content type="html">&lt;p&gt;Seems that &lt;a href=&quot;http://www.youtube.com/watch?v=H-Itj_SiihQ&quot;&gt;Gallium 3D acceleration is being ported to AROS&lt;/a&gt;.  Haiku, another non-mainstream OS, has some support already, and of course, Linux and Windows have always been target platforms for Gallium.&lt;/p&gt;
&lt;p&gt;At this rate, Gallium might just be the thing we&amp;#8217;ve been missing, that can bring 3D features to all platforms, in the same way that all platforms have been able to do decent 2D for a long time.  If so, this will be a very welcome change to the IT landscape.&lt;/p&gt;</content>
		<author>
			<name>Lee Braiden</name>
			<uri>http://irukado.org</uri>
		</author>
		<source>
			<title type="html">Lee Braiden's Blog » FOSS</title>
			<subtitle type="html">Peace, Love, Tech, and random life stuff.</subtitle>
			<link rel="self" href="http://irukado.org/archives/tag/foss/feed/atom/"/>
			<id>http://irukado.org/feed/atom/</id>
			<updated>2009-10-08T01:00:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">GUI Kernel OOPs Dialogs</title>
		<link href="http://irukado.org/2009/10/07/gui-kernel-oops-dialogs"/>
		<id>http://irukado.org/2009/10/07/gui-kernel-oops-dialogs</id>
		<updated>2009-10-07T10:49:12+00:00</updated>
		<content type="html">&lt;p&gt;Hmm.  I&amp;#8217;m running debian/KDE in virtualbox.  A lot of syslog entries just popped up from the systray, quickly followed by some analysis/explanation: the kernel just panicked, and I can submit a bug report.&lt;/p&gt;
&lt;p&gt;This is highly cool.  Last I knew, kernels just locked up on panic.  But to keep going, present nice GUI prompts, and let me submit bug reports over the net?  Very nice.&lt;/p&gt;</content>
		<author>
			<name>Lee Braiden</name>
			<uri>http://irukado.org</uri>
		</author>
		<source>
			<title type="html">Lee Braiden's Blog » FOSS</title>
			<subtitle type="html">Peace, Love, Tech, and random life stuff.</subtitle>
			<link rel="self" href="http://irukado.org/archives/tag/foss/feed/atom/"/>
			<id>http://irukado.org/feed/atom/</id>
			<updated>2009-10-08T01:00:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Union Hand-Roasted sumatra (dark insight)</title>
		<link href="http://www.mccartney.ie/wordpress/2009/10/07/union-hand-roasted-sumatra-dark-insight/"/>
		<id>http://www.mccartney.ie/wordpress/?p=192</id>
		<updated>2009-10-06T23:15:55+00:00</updated>
		<content type="html">&lt;p&gt;Brand: &lt;a href=&quot;http://www.unionroasted.com/&quot;&gt;Union hand-roasted&lt;/a&gt;&lt;br /&gt;
Bean: sumatra, extra fancy&lt;br /&gt;
Region/Producer: &lt;a href=&quot;http://www.unionroasted.com/farms/farm.aspx?id=21&quot;&gt;Gayo Mountain Co-Operative, Aceh&lt;/a&gt;.&lt;br /&gt;
Roast:&lt;br /&gt;
Grind: Cafetière&lt;/p&gt;
&lt;p&gt;Test brew: Espresso&lt;br /&gt;
Test Equipment: Kenwood Cremissimo&lt;/p&gt;
&lt;p&gt;Full bodied, deep rich taste, minimal bitter aftertaste, but not overly sweet. Very impressed. 4/5&lt;/p&gt;</content>
		<author>
			<name>simonm</name>
			<uri>http://www.mccartney.ie/wordpress</uri>
		</author>
		<source>
			<title type="html">ze blog of simon</title>
			<subtitle type="html">too boring to have a real blog</subtitle>
			<link rel="self" href="http://www.mccartney.ie/wordpress/feed/atom/"/>
			<id>http://www.mccartney.ie/wordpress/feed/atom/</id>
			<updated>2010-02-22T12:00:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Beating down the XML</title>
		<link href="http://martian.org/marty/2009/10/07/beating-down-the-xml/"/>
		<id>http://martian.org/marty/?p=199</id>
		<updated>2009-10-06T18:04:38+00:00</updated>
		<content type="html">&lt;p&gt;XML is still &lt;a href=&quot;http://martian.org/marty/2009/09/30/xml-is-a-huge-mess/&quot;&gt;a huge mess&lt;/a&gt;, but at least now I have managed to get a few programs that can handle it with reasonable-ish memory requirements.&lt;/p&gt;

&lt;p&gt;For Perl, as I had thought, the XML::Twig module gave me a pleasant interface and was able to easily handle the document.&lt;/p&gt;

&lt;p&gt;For Haskell it was a little bit trickier.  I used the SAX parser in HaXml, but it is not like a regular SAX parser, since Haskell is so unlike any regular language.  The parser returns a lazy list of SAX events, so I had to make sure I processed the list without evaluating the whole thing into memory.&lt;/p&gt;

&lt;p&gt;Now that I&amp;#8217;ve dealt with the memory issue it appears that I have a speed issue to deal with next.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Compassion in the Martial Arts</title>
		<link href="http://www.piglets.org/serendipity/archives/101-Compassion-in-the-Martial-Arts.html"/>
		<id>http://www.piglets.org/serendipity/archives/101-guid.html</id>
		<updated>2009-10-04T23:49:00+00:00</updated>
		<content type="html">I recently had a conversation with some people who wondered if there could be any place for compassion in the martial arts in general, and certainly in Iaido, or Japanese swordsmanship in particular.&lt;br /&gt;&lt;br /&gt;

It may be useful to start by considering the idea of &lt;a href=&quot;http://en.wikipedia.org/wiki/Bushid%C5%8D&quot;&gt;Bushido&lt;/a&gt;, or &quot;the Way of the Warrior&quot;. A lot of people have heard about Bushido, but often through a very distorted perspective. This is not least because the ideas have been smeared by the inexcusable behaviour of some Japanese in the Second World War. These individuals were not, by the way, samurai. That class had long since been dissolved in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Meiji_restoration&quot;&gt;Meiji Restoration&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;

The closest analogous concept for us in the West is that of &lt;a href=&quot;http://en.wikipedia.org/wiki/Chivalry&quot;&gt;Chivalry&lt;/a&gt; and the word has similar linguistic roots. Now, we do not believe that Christian knights always behaved in a way that was above reproach, do we? &lt;a href=&quot;http://atheism.about.com/od/crusades/a/crusades_4.htm&quot;&gt;Certainly not&lt;/a&gt;, but we do not throw out the baby with the bath water. The legend of &lt;a href=&quot;http://en.wikipedia.org/wiki/King_Arthur&quot;&gt;Arthur&lt;/a&gt; is a romanticised and idealised idea of chivalry but one that has inspired many to better conduct.&lt;br /&gt;&lt;br /&gt;

Bushido lists seven virtues (some say the seven folds in a &lt;a href=&quot;http://en.wikipedia.org/wiki/Hakama&quot;&gt;hakama&lt;/a&gt; represent these), which I will borrow the listing of from wikipedia rather than mess with the kanji myself:

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/rectitude&quot; class=&quot;extiw&quot; title=&quot;wiktionary:rectitude&quot;&gt;Rectitude&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;義&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;gi&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/courage&quot; class=&quot;extiw&quot; title=&quot;wiktionary:courage&quot;&gt;Courage&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;勇&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;yuu&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/benevolence&quot; class=&quot;extiw&quot; title=&quot;wiktionary:benevolence&quot;&gt;Benevolence&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;仁&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;jin&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/respect&quot; class=&quot;extiw&quot; title=&quot;wiktionary:respect&quot;&gt;Respect&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;礼&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;rei&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/honesty&quot; class=&quot;extiw&quot; title=&quot;wiktionary:honesty&quot;&gt;Honesty&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;誠&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;makoto or 信 shin&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/honour&quot; class=&quot;extiw&quot; title=&quot;wiktionary:honour&quot;&gt;Honor&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;誉&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;yo&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wiktionary.org/wiki/loyalty&quot; class=&quot;extiw&quot; title=&quot;wiktionary:loyalty&quot;&gt;Loyalty&lt;/a&gt; &lt;span&gt;(&lt;span class=&quot;t_nihongo_kanji&quot; lang=&quot;ja&quot;&gt;忠&lt;/span&gt;&lt;span class=&quot;t_nihongo_comma&quot;&gt;,&lt;/span&gt; &lt;i&gt;chuu&lt;/i&gt;&lt;span class=&quot;t_nihongo_help noprint&quot;&gt;&lt;sup&gt;&lt;a href=&quot;http://www.piglets.org/wiki/Help:Installing_Japanese_character_sets&quot; title=&quot;Help:Installing Japanese character sets&quot;&gt;&lt;span class=&quot;t_nihongo_icon&quot;&gt;?&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/li&gt;

&lt;/ul&gt;

Do you find any of this list surprising? It might temper your view of how a warrior might see himself. Perhaps you did not expect respect and benevolence to make such a list.&lt;br /&gt;&lt;br /&gt;

I think it's a nice list to consider with a martial art like &lt;a href=&quot;http://www.piglets.org/serendipity/pages/aikido.html&quot;&gt;aikido&lt;/a&gt; which is a modern budo that seeks to avoid gratuitous damage to the &quot;opponent&quot;. For the practitioners of such an art, it provides a compass for our behaviour. I constantly emphasise the importance of compassion in aikido when I teach, and strive to embody it in practice. There are actually pragmatic and selfish reasons why this behaviour is martially more effective; you do not damage joints you need to effect control; you do not provoke responses you need to contain and so on. Some might argue if compassion with self-interest is still compassion. The concept of cause and effect, or &lt;a href=&quot;http://en.wikipedia.org/wiki/Karma&quot;&gt;karma&lt;/a&gt; provides a strong incentive for acting appropriately, isn't it a bonus that it is not merely &quot;right&quot; but also effective?&lt;br /&gt;&lt;br /&gt;

But the sword is not a weapon designed to control or subdue but to kill. There is a Japanese word &lt;a href=&quot;http://www.koryu.com/library/eamdur3.html&quot;&gt;katsujinken&lt;/a&gt;, the sword that gives life. What can that mean? It can have many meanings. It could mean to not use the sword when not necessary, to fight without fighting.&lt;br /&gt;&lt;br /&gt;

&lt;a href=&quot;http://en.wikipedia.org/wiki/Compassion&quot;&gt;Compassion&lt;/a&gt; requires the love of others. I feel I have long understood that. It has taken me longer to realise it also implies the love of one's self, and I still struggle with the consequences of that. Compassion can manifest itself in many ways. Exercising compassion may require hard and apparently brutal choices to avoid greater suffering caused by another path. Such choices can be be traumatic for the one who acts as well as to those whom it &lt;strong&gt;appears&lt;/strong&gt; to affect the most. Reconsider the list of seven virtues in that context if you will. The samurai were required to take quick, just decisions, and see them through, with all that entailed.&lt;br /&gt;&lt;br /&gt;

To &lt;a href=&quot;http://en.wikipedia.org/wiki/Kaishaku&quot;&gt;assist another&lt;/a&gt; as they commit &lt;a href=&quot;http://en.wikipedia.org/wiki/Seppuku&quot;&gt;Seppuku&lt;/a&gt; was (it is now illegal in Japan) an act of respect, benevolence and compassion. There are many stories of samurai acting as seconds for both their closest friends, and their defeated enemies to shorten their suffering. To regretfully, but decisively take a life to protect one's own can be an act of compassion (to one's self), and in many cases as an act to protect the lives of many innocent others.&lt;br /&gt;&lt;br /&gt;

A final thought from the modern era. If you found yourself in a hijacked plane post 2001, with the split second opportunity and means to kill the hijacker, would it not be a compassionate act to swiftly and decisively kill that person before they could take any action to kill so many others? Might it not even be an act of compassion towards that person and their family?&lt;br /&gt;&lt;br /&gt;

&lt;blockquote&gt;If you seek mastery of the sword, seek first sincerity of the heart, for the former is but a reflection of the latter.&lt;/blockquote&gt;&lt;em&gt;Iwakura Yoshinori&lt;/em&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Derren Brown tells porky pies, get over it</title>
		<link href="http://www.piglets.org/serendipity/archives/100-Derren-Brown-tells-porky-pies,-get-over-it.html"/>
		<id>http://www.piglets.org/serendipity/archives/100-guid.html</id>
		<updated>2009-10-04T22:14:45+00:00</updated>
		<content type="html">&lt;a href=&quot;http://derrenbrown.co.uk&quot;&gt;Derren Brown&lt;/a&gt; has been back on our screens recently with a &lt;a href=&quot;http://derrenbrown.channel4.com/&quot;&gt;series of big events&lt;/a&gt;. It's brought him a lot of publicity, and a lot of the public comment has been amusing to say the least. I've been watching everyone comment on the TV and Radio that he's a trickster, and his explanations of how he does things are often bogus.&lt;br /&gt;&lt;br /&gt;

Yes.... Yes... That's the point. He's a magician, a showman, he tells you right up front at the start of the show. Misdirection, magic, showmanship and more. It's entertainment. He is the first to make it clear that what he does is a trick. He doesn't claim otherwise. If you can't bring yourself to enjoy that, I humbly suggest you watch something else. And while we are on it, I'm relieved people see it's a trick. I think &lt;a href=&quot;http://en.wikipedia.org/wiki/David_blaine&quot;&gt;David Blaine's&lt;/a&gt; closeup magic is among the most impressive I have ever seen, and I shudder when those around him don't even seem to consider it's just a trick.&lt;br /&gt;&lt;br /&gt;

Personally, I love Derren, I love his cheeky smug as hell smile as he gets away with it. I enjoy his faked discomfiture. I enjoy it when he fakes near success in tricks to make them more convincing. I enjoy calling him names as I laugh as he lies through his teeth to the audience. I have casually studied a bit of magic in my time, and he is a fine magician. Many big stage magicians rely on assistants, who actually do all the hard work, but he is clearly the architect of most of his own tricks. I'm reading his &lt;a href=&quot;http://www.amazon.co.uk/Tricks-Mind-Derren-Brown/dp/1905026358/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1254694935&amp;amp;sr=8-1&quot;&gt;book&lt;/a&gt; and it is informative and very amusing to me, and I very much respect him as a fellow in fight against (rampant) &lt;a href=&quot;http://www.amazon.co.uk/Irrationality-Stuart-Sutherland/dp/1905177070/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1254695687&amp;amp;sr=8-1&quot;&gt;irrationality&lt;/a&gt; (a little bit can be a fine thing).&lt;br /&gt;&lt;br /&gt;

Sadly I've missed a few of the &quot;events&quot;, since it clashes with my &lt;a href=&quot;http://www.piglets.org/serendipity/pages/iaido.html&quot;&gt;Iaido&lt;/a&gt; class and I wasn't organised enough to record it. I'm slowly catching up on &lt;a href=&quot;http://www.channel4.com/programmes/4od&quot;&gt;4OD&lt;/a&gt;. But I did see the program on how he stole the lottery. And I'm a mathematician, and I laughed and laughed at it. I didn't believe a word of it, but even the deceit was cleverly convincing and it's not trivial to say exactly what he really did.&lt;br /&gt;&lt;br /&gt;

He claims he averaged the results of a crowd of people picking lottery numbers. There's a consequence to this. Consider this: how many ways can 50 people pick a number that averages to 1? How many ways can they pick numbers that average to 30? If you understand this point you'll see the possible &quot;answers&quot; from the crowd have an odd distribution. But the cover story was very amusing in its own right. You don't want to know how he really did it, it'll be shockingly dull.&lt;br /&gt;&lt;br /&gt;

So yes. We know he didn't show the numbers in advance of the draw. Yes, we know his explanation is nonsense. It's a trick. That's the point. Enjoy it and smile along with his insufferable smugness &lt;img src=&quot;http://www.piglets.org/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Virgin Media, Netgear and Vidzone</title>
		<link href="http://www.piglets.org/serendipity/archives/99-Virgin-Media,-Netgear-and-Vidzone.html"/>
		<id>http://www.piglets.org/serendipity/archives/99-guid.html</id>
		<updated>2009-10-04T21:53:48+00:00</updated>
		<content type="html">The PS3 has an free network application called Vidzone. I downloaded it when it originally came out some time ago, but it never actually worked. It would load, show playlists, adverts, and the seize up the whole console when I tried to actually play videos. It's a shame, because it looked like a nice app for putting on some music.&lt;br /&gt;&lt;br /&gt;

Since then the PS3 itself has had a big firmware upgrade to 3.0.1 and Vidzone was upgraded to 1.0.4. Worth trying again I figured. Well, initially I couldn't get the application to crash the console anymore (I did later!), but certainly it wouldn't play videos. It did show adverts, even video adverts, playlists, everything but actually play videos. Which is weird to say the least. So to be honest, it looks like the problem is somewhere at the PS3/Vidzone end, since absolutely all other network functionality works on the PS3.&lt;br /&gt;&lt;br /&gt;

But, as a precaution I thought it was worth checking out that old bugbear, the router firmware, and there are some &lt;a href=&quot;http://www.computerandvideogames.com/article.php?id=223324&quot;&gt;hints that's an issue&lt;/a&gt;. I'm a Virgin Media customer at the moment, for complex reasons I don't really have a choice at the moment, and they supplied a cable modem and router when they connected me (rather late as it happened). When I looked at the router firmware, it's shockingly old. So I clicked on the link for the knowledge base and downloaded the latest firmware. It failed to upload, no explanation of why. I tried every intermediate release, which took quite a while to do. They all failed.&lt;br /&gt;&lt;br /&gt;

So now I'm suspicious and confirm that, yes... Virgin are &lt;a href=&quot;http://community.virginmedia.com/t5/General-broadband-questions/Firmware-upgrades-for-WGR614v9-router/td-p/2659%3Bjsessionid=796BD8B91748D2F6302ADDA79828D562&quot;&gt;specifically blocking updates&lt;/a&gt;, even though many, many bugs have been fixed in the new releases. I find this pretty puzzling.&lt;br /&gt;&lt;br /&gt;

I phoned their tech support to try and confirm this in person. I suggested that I would have to buy my own router if I wanted to get round these problems, and they informed me I wouldn't be supported. I put it to them that I seem to have a choice between being supported with no actual support and no means to help myself, or getting new hardware, being officially unsupported but able to help myself. He put me on hold to check it out, a minute later the line went dead. &lt;img src=&quot;http://www.piglets.org/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;&lt;br /&gt;

So if you're out there googling for &quot;vidzone doesn't work&quot;, this might be part of the reason, but who knows? It seems it could be fixed at the PS3 end in any case. But it's a cautionary tale that the stock VM hardware might come with lots of problems you can't fix.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">XML is a huge mess</title>
		<link href="http://martian.org/marty/2009/09/30/xml-is-a-huge-mess/"/>
		<id>http://martian.org/marty/?p=196</id>
		<updated>2009-09-29T16:27:28+00:00</updated>
		<content type="html">&lt;p&gt;I have a 39 MB XML file that I wanted to process.  I wasn&amp;#8217;t expecting it to be so difficult.  Writing the code, in multiple languages, was not difficult.  But running the programs was a big problem.&lt;/p&gt;

&lt;p&gt;My first attempt was a simple Haskell program, but I had to kill it after it ate over 1.3 GB (yes, 1.3 GB) of ram!&lt;/p&gt;

&lt;p&gt;Haskell&amp;#8217;s strings are known to be memory hogs, and the HaXml module I was using was making them even worse by not sensible decoding the UTF-8 text correctly.  I decided to write a leaner Haskell program later, and switch to Perl to get the job done.&lt;/p&gt;

&lt;p&gt;At this point I also decided to set a limit to the amount of memory the programs could consume.  For a 39 MB file I hoped that 10 times that would be enough, so I rounded up and set the limit at 512 MB.&lt;/p&gt;

&lt;p&gt;But Perl, using the XML::LibXML module, couldn&amp;#8217;t process the file with that memory limit.  I also ran a quick one-liner in Erlang, just to watch it crash out of memory too.  I&amp;#8217;m going to try some other languages to see if I can find one that can work in 512 MB.&lt;/p&gt;

&lt;p&gt;My next useful step is to try the &lt;a href=&quot;http://xmltwig.com/&quot;&gt;XML::Twig&lt;/a&gt; module in Perl.  I&amp;#8217;ve had good experiences with it before.  It won&amp;#8217;t be as fast as LibXML, but it probably has the best chance of surviving within my 512 MB limit.  For Haskell, I think I&amp;#8217;ll have to resort to a SAX style parser.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Amazon 1 - 0 Waterstones, aka this morning's rant.</title>
		<link href="http://pgregg.com/blog/2009/09/amazon-1---0-waterstones-aka-this-mornings-rant.html"/>
		<id>tag:pgregg.com,2009:/blog//2.338</id>
		<updated>2009-09-29T10:24:10+00:00</updated>
		<content type="html" xml:lang="en">SWMBO asked me to order a book for her this morning, so being the tightwad that I am, I go hunting for the ISBN and the cheapest place to buy it.&lt;br /&gt;Amazon has it for £17.24 and Waterstone's for £18.49 (but if I order through &lt;a href=&quot;http://www.quidco.com/&quot;&gt;quidco&lt;/a&gt;, then I receive another 8% cashback, making Waterstone's cheaper).&lt;br /&gt;&lt;br /&gt;Waterstone's need me to create an account, fair enough and state &quot;Also, please be aware that passwords are case sensitive, and must be a
minimum of seven characters long and at least one character must be
numeric.&quot;&amp;nbsp; Again, all fairly standard.&lt;br /&gt;&lt;br /&gt;So each time I try to enter a password which meets this criteria I'm hit with a javascript popup that claims: &quot;Your new password must be at least 7 characters long and contain at least one digit.&quot;&lt;br /&gt;&lt;br /&gt;&quot;But it is!&quot;, I yell in frustration.&lt;br /&gt;&lt;br /&gt;Using the Firefox &quot;Web Developer&quot; plugin I unhide the password boxes and see that my password doesn't have digits... wtf!&amp;nbsp;&amp;nbsp; I enter the digits again and find there is another hidden rule:&lt;br /&gt;&lt;pre id=&quot;line696&quot;&gt;&amp;lt;&lt;span class=&quot;start-tag&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt; name&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;newPassword&quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;password&quot;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;fPassword&quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;size&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;40&quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;maxlength&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;16&quot; &lt;/span&gt;&lt;span class=&quot;attribute-name&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;attribute-value&quot;&gt;&quot;&quot; &lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&lt;span class=&quot;attribute-name&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;Yes, an upper limit of 16 characters on the password.&lt;br /&gt;&lt;br /&gt;Right ok, make a password of 16 chars or under and move on...&lt;br /&gt;&lt;br /&gt;Add name, postcode to the next form and it finds my address ok - click continue to (I presume) proceed to the CC entry form and voila!&lt;br /&gt;&lt;br /&gt;Well not quite.&lt;br /&gt;&lt;br /&gt;&quot;There has been a problem processing this request
&lt;br /&gt;Please use the refresh button on your browser to try again.&lt;br /&gt;&lt;br /&gt;Thank you.&quot;&lt;br /&gt;&lt;br /&gt;A few refreshes later, it is apparent that Waterstone's has no intention of working, sod it, for 20p more I can have less hassle at Amazon.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content>
		<author>
			<name>Paul Gregg</name>
			<uri>http://pgregg.com/blog/</uri>
		</author>
		<source>
			<title type="html">Plop in the Ocean</title>
			<link rel="self" href="http://pgregg.com/blog/atom.xml"/>
			<id>tag:pgregg.com,2009-02-01:/blog//2</id>
			<updated>2010-02-25T13:00:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Class::Accessor can has &amp;#8220;has&amp;#8221;</title>
		<link href="http://martian.org/marty/2009/09/21/classaccessor-can-has-has/"/>
		<id>http://martian.org/marty/?p=191</id>
		<updated>2009-09-20T15:20:58+00:00</updated>
		<content type="html">&lt;p&gt;I maintain the Class::Accessor module.  It appears to be used a lot, but the API
is a bit ugly.  In YAPC::Asia the ugly API was criticised in at least three
different talks, and each time it was compared to the fashionable Moose API.&lt;/p&gt;

&lt;p&gt;In one of these talks JRockway asked Shawn Moore how to turn a bad API into
a good API, so I&amp;#8217;m going to try that: adding antlers to Class::Accessor!&lt;/p&gt;

&lt;p&gt;So now instead of writing:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package Foo;
use base qw(Class::Accessor);
Foo-&amp;gt;mk_accessors(qw(alpha beta gamma));
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you prefer Moose-style you can write:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package Foo;
use Class::Accessor &quot;antlers&quot;;
has alpha =&amp;gt; ( is =&amp;gt; &quot;rw&quot; );
has beta  =&amp;gt; ( is =&amp;gt; &quot;rw&quot; );
has gamma =&amp;gt; ( is =&amp;gt; &quot;rw&quot; );
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The original API is still available, and everything is the same underneath.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Snow Leopard can DIAF</title>
		<link href="http://stuarthacking.com/wordpress/?p=182"/>
		<id>http://stuarthacking.com/wordpress/?p=182</id>
		<updated>2009-09-16T21:50:12+00:00</updated>
		<content type="html">Hurray! Apple fanboys should be pleased with the release of OS X, version 10.6. Snow Leopard panders to their desire for an &lt;em&gt;all Apple&lt;/em&gt; platform. For the rest of us sensible users, Apple have screwed the pooch.&lt;br /&gt;&lt;br /&gt;Okay, we have new shiny toys like Quicktime X and &amp;#8211; well, that&amp;#8217;s about the height of noticeable changes. I&amp;#8217;m all for enhancing the user experience, but in this case, in my opinion, it has come at the expense of developer comfort.&lt;br /&gt;&lt;br /&gt;What I&amp;#8217;m referring to here is the lack of Java support in the new XCode 3.2. I&amp;#8217;ve always felt that XCode was a fairly elegant environment for writing all C/C++, Java and Objective-C projects. So- why, Apple, would you arbitrarily drop support for a language? Out of spite? You didn&amp;#8217;t even drop support &amp;#8211; you just made it frigging irritating to use. Do you enjoy kicking your users in the nuts with each new release?&lt;br /&gt;&lt;br /&gt;I&amp;#8217;m not even surprised at this stage. I guess I could add the XCode templates back in manually but I&amp;#8217;m more in favour of adopting a more portable command line build process&amp;#8230; It seems the best way to get away from Apple&amp;#8217;s user abuse.</content>
		<author>
			<name>Stuart Hacking</name>
			<uri>http://stuarthacking.com/wordpress</uri>
		</author>
		<source>
			<title type="html">Stuart Hacking</title>
			<link rel="self" href="http://blog.stuarthacking.com/?feed=rss2"/>
			<id>http://blog.stuarthacking.com/?feed=rss2</id>
			<updated>2009-11-20T14:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">It&amp;#8217;s alive!</title>
		<link href="http://martian.org/marty/2009/09/15/its-alive/"/>
		<id>http://martian.org/marty/?p=184</id>
		<updated>2009-09-14T17:53:19+00:00</updated>
		<content type="html">&lt;h3&gt;My blog: it&amp;#8217;s alive!&lt;/h3&gt;

&lt;p&gt;I don&amp;#8217;t post very often, but I&amp;#8217;m going to try to change that.  Is this my fifth attempt?&lt;/p&gt;

&lt;p&gt;This time, to give myself a goal, I joined the &lt;a href=&quot;http://ironman.enlightenedperl.org/&quot; title=&quot;Perl Ironman&quot;&gt;Perl Ironman Challenge&lt;/a&gt; and I will try to blog at least once a week about Perl.  So&amp;#8230;&lt;/p&gt;

&lt;h3&gt;Perl: it&amp;#8217;s alive!&lt;/h3&gt;

&lt;p&gt;There have been lots of reports over the last few years about Perl being dead.  Those reports upset a lot of Perl mongers, and I didn&amp;#8217;t fully understand that.  Perl was not a family member, friend, or pet; so why the strong emotion?  It was never really &amp;#8220;alive&amp;#8221;, so how did it &amp;#8220;die&amp;#8221;?  And all these upset people were still using Perl, so they kept it breathing.  And there were many more Perl users who weren&amp;#8217;t upset, maybe because they never heard about the death.&lt;/p&gt;

&lt;p&gt;It seems to me that Perl never died: it just became unfashionable for a while.  And during the unfashionable period Perl did have some self-image issues, and maybe a lot of misdirected energy.  But being unfashionable isn&amp;#8217;t life-threatening.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Windows updates</title>
		<link href="http://stuarthacking.com/wordpress/?p=180"/>
		<id>http://stuarthacking.com/wordpress/?p=180</id>
		<updated>2009-09-10T14:25:28+00:00</updated>
		<content type="html">I am forced to use a Windows based laptop in work and one of the more frustrating features is the updates that get pushed out by the IT &amp;#8217;services&amp;#8217; group. Of course, updates are a good thing, but we do them during downtime when it won&amp;#8217;t disrupt actual work. Here are the things I most hate about these Windows updates:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Do it now, or else.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are updates available for your computer. You can install them now or they will automatically be installed in 15 minutes. After installation your computer will be restarted.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I&amp;#8217;m sorry, were you busy?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As if point 1 didn&amp;#8217;t irritate me enough (which is most certainly does), updates frequently occur right in the middle of a large task. Copying a large file or set of files is doomed to failure. In other cases the updates will simply interrupt anything you happened to be doing, forcing you to break your concentration.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Update Dependencies&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;OK, I&amp;#8217;ll install your updates already! Tick, tick, tick&amp;#8230; *reboot*&lt;br /&gt;Your updates have been installed. There are new updates to install.&lt;br /&gt;&lt;br /&gt;Yes, some updates rely on the presence of previous updates so it takes a couple of runs to get them all installed. which also means a couple of reboots; a couple more minutes of your precious day.&lt;br /&gt;&lt;br /&gt;And one of my personal favourites: The &amp;#8220;Your computer must be restarted dialog&amp;#8221; which always stays on top of other windows. In case you forget.</content>
		<author>
			<name>Stuart Hacking</name>
			<uri>http://stuarthacking.com/wordpress</uri>
		</author>
		<source>
			<title type="html">Stuart Hacking</title>
			<link rel="self" href="http://blog.stuarthacking.com/?feed=rss2"/>
			<id>http://blog.stuarthacking.com/?feed=rss2</id>
			<updated>2009-11-20T14:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Jedi training in Belfast?</title>
		<link href="http://www.piglets.org/serendipity/archives/98-Jedi-training-in-Belfast.html"/>
		<id>http://www.piglets.org/serendipity/archives/98-guid.html</id>
		<updated>2009-09-01T08:43:47+00:00</updated>
		<content type="html">Ok, ok, bear with me here &lt;img src=&quot;http://www.piglets.org/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;.&lt;br /&gt;&lt;br /&gt;

&lt;a href=&quot;http://www.sensei-winbeforehand.co.uk/allen/&quot;&gt;Allen Baird&lt;/a&gt; and &lt;a href=&quot;http://www.thecreativityhub.com/company-information/company-info/rory-profile.php&quot;&gt;Rory O'Connor&lt;/a&gt; will be offering a &lt;a href=&quot;http://jediknight.eventbrite.com/&quot;&gt;personal development seminar&lt;/a&gt; in Belfast on the 17th October, but with a twist. Like a &lt;a href=&quot;http://www.sensei-winbeforehand.co.uk/2008/09/10/feel-the-force-how-to-train-in-the-jedi-way/&quot;&gt;previous event&lt;/a&gt; that Allen has offered, the whole thing is steeped in metaphors related to the Star Wars movies, in order to put over some serious ideas in an accessible and fun way.&lt;br /&gt;&lt;br /&gt;

The event will explore lots of concepts like non violent communication, body language, assertiveness among others. I will be offering a slot at the end with a little aikido, to explain how it physically embodies some of the other concepts in resolving conflict with a minimum of force. And I'll be helping John Donaldson demonstrate some iaido, and finally we'll have some fun (I hope) with the lightsabers Allen and Rory are giving out to to the delegates as part of the package.&lt;br /&gt;&lt;br /&gt;

And then, we will go home and rethink our lives. &lt;img src=&quot;http://www.piglets.org/serendipity/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;&lt;br /&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Campaign for an apology for treatment of Alan Turing</title>
		<link href="http://www.piglets.org/serendipity/archives/97-Campaign-for-an-apology-for-treatment-of-Alan-Turing.html"/>
		<id>http://www.piglets.org/serendipity/archives/97-guid.html</id>
		<updated>2009-08-31T17:09:27+00:00</updated>
		<content type="html">The website for &lt;a href=&quot;http://www.number10.gov.uk/&quot;&gt;Number 10 Downing Street&lt;/a&gt; has a new &lt;a href=&quot;http://petitions.number10.gov.uk/turing/&quot;&gt;petition calling for an apology&lt;/a&gt; for the treatment which led &lt;a href=&quot;http://en.wikipedia.org/wiki/Alan_turing&quot;&gt;Alan Turing&lt;/a&gt; to commit suicide at the age of 41, rather than submit to having his homosexuality &quot;cured&quot; by chemical castration.&lt;br /&gt;&lt;br /&gt;

Turing was, not only a founding father of Computer Science, but a leading member of the dedicated team at &lt;a href=&quot;http://www.bletchleypark.org.uk/&quot;&gt;Bletchley Park&lt;/a&gt;, who decoded the Nazi Enigma code. This work saved thousands of lives.&lt;br /&gt;&lt;br /&gt;

As reported on the &lt;a href=&quot;http://news.bbc.co.uk/1/hi/technology/8226509.stm&quot;&gt;BBC&lt;/a&gt;, the originator of the petition, &lt;a href=&quot;http://www.jgc.org&quot;&gt;John Graham-Cumming&lt;/a&gt;, is not only suggesting an apology, but a &lt;a href=&quot;http://www.jgc.org/blog/2009/08/letter-to-her-majesty-queen.html&quot;&gt;posthumous knighthood&lt;/a&gt; for Turing. It would seem the least his country could do for him, after all he did for his country, mathematics and computing.&lt;br /&gt;&lt;br /&gt;

If you're a UK resident, please consider signing the petition.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Python, GCC and Crules :-)</title>
		<link href="http://redbrain.co.uk/?p=446"/>
		<id>http://redbrain.co.uk/?p=446</id>
		<updated>2009-08-25T17:28:33+00:00</updated>
		<content type="html">&lt;p&gt;Hey guys, I&amp;#8217;ve been pretty quiet this summer i guess so as it may seem, but I&amp;#8217;ve been working frigging hard. I&amp;#8217;m starting to get things coming together! So what am i doing? I&amp;#8217;ve been doing a little freelance server work, I&amp;#8217;ve been working on CRULES which is coming along nicely a lot of the back-end is working pretty nice now and i just need to keep working at it, but i am also trying to start a new front-end into GCC. So what does that mean, so in &lt;a href=&quot;http://gcc.gnu.org/&quot;&gt;GCC &lt;/a&gt;the gnu compiler collection its a collection of compilers i am writing a small paper on the architecture of GCC and how to build a new front-end but more on that later, but what i mean is each language in GCC be it ADA, Fortran, C, C++, Java they are all front-ends to GCC, that is the part which does the semantic analysis and parsing of the pain text source code into the GIMPLE tree for middle end optimization from there code-generation.&lt;/p&gt;
&lt;p&gt;So i am making a Python compiler(front-end), well starting too its going quite slow because i am in the middle of finishing up some &lt;a href=&quot;http://www.gnu.org/software/automake/&quot;&gt;automake&lt;/a&gt; work, and crules definitions. And GCC is quite complex in its development but its quite amazing and the most amazing project i have ever seen. I mean its development consists of many little files in different languages that aren&amp;#8217;t even front-ends in GCC. For example a .md machine description is written in LISP that describes the architecture of an OS or Processor this makes it easier to port GCC to new systems, &lt;a href=&quot;http://gcc.gnu.org/wiki/GIMPLE&quot;&gt;GIMPLE the IR&lt;/a&gt; was a language called SIMPLE but its GNU/Simple = GIMPLE, this gives the IR a better formalization, lang.opt files for command line options so you dont have to do any command line parsing in your front-end thats up to the gcc driver program( I&amp;#8217;ll explain this some other time), Make-lang.in GNU/Make on how your code should be compiled, config-lang.in its in bash but does all the configuration on how the front-end is build with respect to Stage-x as in the boot-strap if it requires libraries to be built like JAVA needs libjava or if its an optional language.&lt;/p&gt;
&lt;div class=&quot;wp-caption alignright&quot;&gt;&lt;a href=&quot;http://ihasahotdog.files.wordpress.com/2009/08/funny-dog-pictures-uses-force.jpg?w=500&amp;amp;h=332&quot;&gt;&lt;img title=&quot;o_O&quot; src=&quot;http://ihasahotdog.files.wordpress.com/2009/08/funny-dog-pictures-uses-force.jpg?w=500&amp;amp;h=332&quot; alt=&quot;The force!&quot; width=&quot;300&quot; height=&quot;199&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;The force!&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Thats a lot of stuff people probably don&amp;#8217;t care about! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  But its interesting what other project uses a cool a setup as that! I mean &lt;a href=&quot;http://en.wikipedia.org/wiki/Lisp_(programming_language)&quot;&gt;LISP&lt;/a&gt;, there isn&amp;#8217;t even a lisp compiler in there but there its a bit of a one in the backend. There are some exciting things coming from GCC at the moment, &lt;a href=&quot;http://gcc.gnu.org/wiki/LinkTimeOptimization&quot;&gt;LTO &lt;/a&gt;or &lt;a href=&quot;http://gcc.gnu.org/wiki/Graphite&quot;&gt;graphite&lt;/a&gt; springs to mind, they aren&amp;#8217;t ready yet, but LTO mean Link time optimization, so when you compile your program with gcc in whatever language, you compile each file to object code individually but you use gcc to link each object code and library together instead of using LD explicitly because it works nicer, so on Link time optimization when your linking all the code together another pass of the optimizations goes over a huge IR of all the object code to re-structure of remove dead code etc all the usual optimizations. And with OPEN/MP becoming pretty popular graphite you can pass flags like -fparallelize-all to extract loops even dependence loops to push in open/mp pragmas to make fully parallelized code without having to lift a finger. I&amp;#8217;m working quite slowly to write 3 papers in total, a long thesis on Crules you can check it in my git-repos over at &lt;a href=&quot;http://code.redbrain.co.uk&quot;&gt;http://code.redbrain.co.uk&lt;/a&gt; and i am working on a thesis on the python-front-end as-well as a little paper on the gcc architecture. There is a tagged branch for a front-end-skeleton here on my git-repos: &lt;a href=&quot;http://code.redbrain.co.uk/cgit.cgi/gcc-python/&quot;&gt;http://code.redbrain.co.uk/cgit.cgi/gcc-python/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So there is a lot of work there. And i chose to do a python front-end due to the fact everyone can say python is an awesome language no-one can deny that, it has been very well designed; language design is something a lot of people can over-look or take too far and python was a good mix in my opinion. What i mean is if you spend too long on language design your language will become very messy and hard for users to become comfortable with, something that has happened Haskell in my opinion although the way non-determinism is very clever in how Haskell has implemented it. On the other hand if you don&amp;#8217;t spend enough time designing your language its going to be very messy and not much re-use of syntax. One thing to remember in design there is always a reason for the smallest of things be it the reason of using an identifier to using a &amp;#8216;.&amp;#8217; for access or &amp;#8216;- &amp;gt;;&amp;#8217; for pointer access, keywords have to make sense etc.&lt;/p&gt;
&lt;p&gt;I was invited to join the graphite project i posted a quick patch to fix a part of their build-system, but i am not sure what i can really contribute because i would need to work full-time on it because its been going for some time now. Some of the work is pretty exciting. I am going to see later if i can maby merge the actual python parser from python into my GCC front-end because this would make a very nice setup to mirror the language features of python to an extend but there will be differences an GNU&amp;#8217;isms because the mere fact that this will be compiled handling things like IO will rely on linking against libraries and the python pre-processor functions like import and from etc will be fiddly to work but i should be  able to take alot of work from the gnuJava front-end as there are similarities in how certain things work.&lt;/p&gt;
&lt;p&gt;
&lt;div class=&quot;wp-caption alignleft&quot;&gt;&lt;a href=&quot;http://icanhascheezburger.files.wordpress.com/2009/08/funny-pictures-kitten-wonders-where-gravity-went.jpg&quot;&gt;&lt;img title=&quot;Distracting&quot; src=&quot;http://icanhascheezburger.files.wordpress.com/2009/08/funny-pictures-kitten-wonders-where-gravity-went.jpg&quot; alt=&quot;Something to Distract you! :)&quot; width=&quot;300&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Something to Distract you! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;Anyways from my goggling i haven&amp;#8217;t been able to find an implementation of python that is compiled properly i mean natively compiled, some people mix the up the fact that python does create byte-code like java think its compiled code and it really isn&amp;#8217;t. I remember at university a lecturer told us that compiling JAVA code you were creating Machine code to run natively on a computer. And he got the pipeline so wrong in creating a binary. They always made it seem that a compiler was a piece of magic that made a binary and java is NOT a compiled language unless you use GCJ. I personally find &lt;a href=&quot;http://en.wikipedia.org/wiki/Linker&quot;&gt;linkers&lt;/a&gt; are a piece of magic these days a lot of the know-how in how linkers are build is quite complicated in some ways. Although what you are essentially doing is taking the object code output from an assembler and creating an &lt;a href=&quot;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format&quot;&gt;ELF&lt;/a&gt; format file with the object code in the correct segments and data in the top segment etc. And on windows its a &lt;a href=&quot;http://en.wikipedia.org/wiki/COFF&quot;&gt;COFF&lt;/a&gt; format i think, but even at that what are you doing and what does object code look-like is it literally the binary format of instructions in order from the corresponding assembly code?!&lt;/p&gt;
&lt;p&gt;I would love to understand more on how that all works, but i mean an object code file is a not a plain text binary file so yeah i even posted to comp.compilers a thread on manging the jit you can look for it in the archives but its something that is still quite hidden, and only a few people who implemented it understand, i see how it all partly works because of the libjit project. like the defintions of an a.out and ELF were quite understandable i guess. But with a&lt;a href=&quot;http://en.wikipedia.org/wiki/Just-in-time_compilation&quot;&gt; jit&lt;/a&gt; if your able to for example jit a function like:&lt;/p&gt;
&lt;div class=&quot;dean_ch&quot;&gt;
&lt;ol&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; multiply&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; x, &lt;span class=&quot;kw4&quot;&gt;int&lt;/span&gt; y &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&amp;nbsp; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; x*y;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;If you are able to make target assembly code for this, and you assemble it and link it properly you have a binary how do you actually execute it in a useful way for an interpreter?! I mean do you keep adding new functions into this image and use dlopen functions and treat the symbols like a dynamic library and execute them that way through &lt;a href=&quot;http://en.wikipedia.org/wiki/Dynamic_loading&quot;&gt;dlopen&lt;/a&gt;? I mean this is what the &lt;a href=&quot;http://llvm.org/&quot;&gt;LLVM&lt;/a&gt; project hides from the users very well but anyways enough of that. &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Anyways thats what I&amp;#8217;ve been doing for a summer what have you been up to?! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  You can follow some of my stuff on several mailing lists like bison,&lt;a href=&quot;http://www.gnu.org/software/autoconf/&quot;&gt;autoconf&lt;/a&gt;, automake, gcc-help, gcc,comp.compilers. I helped a guy a while back on his bison parser, bison is a very useful tool, but for doing more free-form grammars is a pain I&amp;#8217;ve found and i like to think i know &lt;a href=&quot;http://en.wikipedia.org/wiki/Yacc&quot;&gt;YACC&lt;/a&gt; pretty well now from using it for about a year.&lt;/p&gt;
&lt;p&gt;By the way I&amp;#8217;ll be posting a &lt;a href=&quot;http://wiki.redbrain.co.uk&quot;&gt;wiki&lt;/a&gt; links on crules soon for example on how the language works etc and why but i would really like it if people read my thesis when its finished because i designed this language from a very specific set of reasons in the beginning for a specific application, but its become a fully multi-paradigm language in its design now, and this is what my thesis on it describes.&lt;/p&gt;
&lt;p&gt;Anyways i&amp;#8217;m going back to get some work done and i have &lt;a href=&quot;http://www.belfastlinux.org/wiki/Main_Page&quot;&gt;BLUG&lt;/a&gt; tomorrow! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt;  Oh hey i found a new favourite band bought their album as soon as i heard this, its a polish metal band they are probably the a new &lt;a href=&quot;http://www.nightwish.com/&quot;&gt;Nightwish&lt;/a&gt; i guess! They are very good!&lt;/p&gt;
&lt;p&gt;&lt;!-- Smart Youtube --&gt;&lt;span class=&quot;youtube&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I think thats enough for now i have some photos to upload but i&amp;#8217;ll do that next time &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Choosing a development hosting solution</title>
		<link href="http://www.piglets.org/serendipity/archives/94-Choosing-a-development-hosting-solution.html"/>
		<id>http://www.piglets.org/serendipity/archives/94-guid.html</id>
		<updated>2009-08-10T16:02:00+00:00</updated>
		<content type="html">I'm considering changing the &lt;a href=&quot;http://foss.ulster.ac.uk&quot;&gt;development environment&lt;/a&gt; we use to host our projects in work and I'm &lt;a href=&quot;http://changelog.complete.org/archives/1123-free-software-project-hosting&quot;&gt;not alone&lt;/a&gt;. The reason why will become more clear further down. To be honest this article is partly to help me work out what my priorities for this are, and to appeal to the lazy web for any other suggestions.&lt;br /&gt;&lt;br /&gt;

So first of all, here are the things I'm looking for in this project.&lt;br /&gt;&lt;br /&gt;

These are &lt;strong&gt;essential&lt;/strong&gt;:

&lt;ol&gt;
  &lt;li&gt;must be free software;&lt;/li&gt;
  &lt;li&gt;must have flexible issue tracking with user defined fields;&lt;/li&gt;
  &lt;li&gt;must be able to handle multiple projects;&lt;/li&gt;
  &lt;li&gt;must be extremely transparent to non developer users;&lt;/li&gt;
  &lt;li&gt;must support svn and git and graphical front ends to them;&lt;/li&gt;
  &lt;li&gt;must support some kind of announcement system.&lt;/li&gt;
&lt;/ol&gt;

These are &lt;strong&gt;desireable&lt;/strong&gt;:

&lt;ol&gt;
  &lt;li&gt;should integrate in some way to mailing lists;&lt;/li&gt;
  &lt;li&gt;should support ad hoc tar bar downloads from scm;&lt;/li&gt;
  &lt;li&gt;should be easy to search issues;&lt;/li&gt;
  &lt;li&gt;should graphically depict progress on releases;&lt;/li&gt;
  &lt;li&gt;should have documentation (wiki like) integration;&lt;/li&gt;
  &lt;li&gt;should handles news and download areas;&lt;/li&gt;
  &lt;li&gt;should be able to exchange data (like issues) on projects;&lt;/li&gt;
  &lt;li&gt;should actively maintained;&lt;/li&gt;
  &lt;li&gt;should automate most sysadmin activity, account creation etc.;&lt;/li&gt;
  &lt;li&gt;should be packaged for Debian ideally.&lt;/li&gt;
&lt;/ol&gt;

The contenders thus far are:

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Savane&lt;/strong&gt;, which we are currently using;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Fusion Forge&lt;/strong&gt;;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Redmine&lt;/strong&gt;;
  &lt;li&gt;&lt;strong&gt;Trac&lt;/strong&gt;.
&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;

Let's take these one at a time.&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;Savane&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;

&lt;a href=&quot;https://gna.org/projects/savane/&quot;&gt;Savane&lt;/a&gt; currently supports all the essential features, with the exception of git support. Being a &lt;a href=&quot;http://en.wikipedia.org/wiki/GNU_Savannah&quot;&gt;fork from the original SourceForge&lt;/a&gt; software it works in a similar way. A web front end (in PHP), with back end functionality (in Perl) that creates shell users and groups, interfaces with mailman and so on.&lt;br /&gt;&lt;br /&gt;

But there are some problems. First of all the official project seems to have ground to a complete halt. Fixes that were submitted by users are not applied, there seems to be no forward momentum whatsoever. This is a problem, the offical version needs patched (modestly) to run on PHP 5, and the code base is a mess, with a few pages still requiring register_globals to be on. Bad.&lt;br /&gt;&lt;br /&gt;

However, another &lt;a href=&quot;http://savannah.nongnu.org/projects/savane-cleanup&quot;&gt;fork&lt;/a&gt; was taken some time ago which addresses all these problems including git support, well actually, the code base is still probably in need or work, but most apps of a certain age have this problem. What I'd like to see in Savane is better graphical tools to monitor project progress, better documentation features and incidentally better &lt;a href=&quot;http://www.debian.org&quot;&gt;Debian packaging&lt;/a&gt;, but I've signed up to the fork to work on the latter on the first instance (this looks like it will be quite a bit of work, it's non &lt;a href=&quot;http://www.debian.org/doc/debian-policy/&quot;&gt;Debian policy&lt;/a&gt; compliant in many ways right now). The new fork is going to be forked again by the way, into a Python version. Could be interesting.&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;Fusion Forge&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;

Previously known, or descended from GForge, &lt;a href=&quot;http://fusionforge.org/&quot;&gt;Fusion Forge&lt;/a&gt; is another fork of the original SourceForge source code. It is well packaged for Debian (naturally, it runs Debian's own code hosting environment, &lt;a href=&quot;http://alioth.debian.org/&quot;&gt;Alioth&lt;/a&gt;) and well maintained. It has many of the features of Savane, which probably makes it puzzling why I didn't choose it in the first place. Well, there's one reason why, in my opinion the front pages of FusionForge are rather un-user friendly, I mean what the heck is &quot;Code Snippets&quot; doing there? They feel very aimed at developers, which is great... but I need a nice straightforward interface for less savvy users. Looking today, the navigation still feels it's just too developer centric, but as these sites double as developer sites and user sites (to acquire the software, report bugs and so on), that's not great. I really don't know yet whether Fusion Forge has better graphical tools than Savane.&lt;br /&gt;&lt;br /&gt;

In a conversation about this last week, &lt;a href=&quot;http://www.earth.li/~noodles&quot;&gt;Noodles&lt;/a&gt; suggested I should look at the ease with which the interface could be changed. A sensible suggestion I shall follow up.&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;Redmine&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;

Written in Ruby on Rails and advocated by my work colleage Paul Vitty, &lt;a href=&quot;http://www.redmine.org/&quot;&gt;Redmine&lt;/a&gt; is clean and elegant looking. It shows all the signs of benefiting from being a later generation project and has a plugin architecture that seems excellent too. It has easy clean wiki integration, graphical road maps and Gannt charts; and these things make a difference. I don't think it's as remotely scalable as the design of the first two systems, which isn't a huge problem for me, but I mention it in passing.&lt;br /&gt;&lt;br /&gt;

On the other hand, it seems to have little or no automated integration into the backend, user and group creation, mailing lists and so on. on the other hand it has a very rich set of plug ins, so it may already have such support or it may be possible to implement it.&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;Trac&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;

Written in Python, &lt;a href=&quot;http://trac.edgewall.org/&quot;&gt;Trac&lt;/a&gt; feels like Redmine lite, and that's in the wrong direction for me. It explicitly does not have multiple project support and that's a deal breaker for me.&lt;br /&gt;&lt;br /&gt;

I haven't come to a strong conclusion about this so far. I note John (whom I linked above) notes that Redmine is difficult to install and upgrade because of Ruby, this is a hassle I just don't need, but he also thinks it may be the best of the field. For me, it is probably more trouble free to migrate to the fork of Savane or to FusionForge. More thought needed, and your thoughts are most welcome!&lt;br /&gt;&lt;br /&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Violence and Gender</title>
		<link href="http://www.piglets.org/serendipity/archives/95-Violence-and-Gender.html"/>
		<id>http://www.piglets.org/serendipity/archives/95-guid.html</id>
		<updated>2009-08-10T15:17:35+00:00</updated>
		<content type="html">Recently, I've spoken to a few people about an English tourist &lt;a href=&quot;http://news.bbc.co.uk/newsbeat/hi/health/newsid_10000000/newsid_10000800/10000845.stm&quot;&gt;having his genitals set alight&lt;/a&gt; in Crete. Apparently he was exposing himself to a local girl and fondling her.&lt;br /&gt;&lt;br /&gt;

If so, his behaviour was just plain disgraceful, and regardless of the justice of the situation as defined by the law, a stern reminder to him and others that actions have consequences, no matter how fair those may or may not be.&lt;br /&gt;&lt;br /&gt;

But what interests me most is the almost universal mirthful reaction to this story. It reminds me of the furore around &lt;a href=&quot;http://en.wikipedia.org/wiki/John_and_Lorena_Bobbitt&quot;&gt;John Wayne Bobbit&lt;/a&gt;, which was also regarded as all but universally hilarious by both genders. That relationship was very abusive, and hardly hilarious in its own right. Bobbit seems to have a record of physical as well as other abuse doled out to his partners, but what really interests me is the gender polarity of the amusing violence.&lt;br /&gt;&lt;br /&gt;

Suppose a woman abused her husband in a relationship; and in turn, one night when she was drunk he took a scalpel and removed one of her breasts. Who's laughing now?&lt;br /&gt;&lt;br /&gt;

Suppose it was a British girl in Crete, annoying a man; again who laughs if he sets her on fire? It's interesting how we are programed to trivialise  and laugh concerning violence against men that would be considered an utter disgrace and conversation stopper against a woman.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Back from DebConf9</title>
		<link href="http://www.earth.li/~noodles/blog/2009/08/back-from-debconf9.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.226</id>
		<updated>2009-08-02T19:57:39+00:00</updated>
		<content type="html" xml:lang="en">Finally back home post DebConf9; felt reasonably productive and I have a lengthy todo list which I've even written down and started work on. More on that when any of them come to fruition.&lt;br /&gt;&lt;br /&gt;Very much enjoying the return to easily accessible decent tea and salad/other vegetables. I haven't eaten any fish since my return and hopefully won't for at least a few days. Also I feel the need for an alcohol free week so my liver can recover. Back to work tomorrow - what is it I do again? Also, bets on how my cow orkers will react to my purple hair?</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Update – Interpreter CRULES &amp;amp; Jamedo</title>
		<link href="http://redbrain.co.uk/?p=400"/>
		<id>http://redbrain.co.uk/?p=400</id>
		<updated>2009-07-27T23:51:42+00:00</updated>
		<content type="html">&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		A:link { so-language: zxx } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So hey, its been a little longer than i intended to update my blog! But i&amp;#8217;ve been busy, so i have got rid of my personal work being on repositories all over the show. So I have made:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&lt;a href=&quot;http://code.redbrain.co.uk/&quot;&gt;http://code.redbrain.co.uk&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;There will be public git access soon, but you can download the snapshot tarballs of the branches. And I have a wiki too there isn&amp;#8217;t anything on there yet but it will give me room to stop putting long tutorial article&amp;#8217;s as pages on my blog to proper wiki article&amp;#8217;s:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&lt;a href=&quot;http://wiki.redbrain.co.uk/&quot;&gt;http://wiki.redbrain.co.uk&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } 		A:link { so-language: zxx } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So Compilers, Interpreters and programming languages are my interests&amp;#8230; *yawn! So let me show you my interpreter pipeline for my interpreted language &amp;#8216;CRULES&amp;#8217;: &lt;/span&gt;&lt;/p&gt;
&lt;div id=&quot;attachment_401&quot; class=&quot;wp-caption alignleft&quot;&gt;&lt;a rel=&quot;attachment wp-att-401&quot; href=&quot;http://redbrain.co.uk/?attachment_id=401&quot;&gt;&lt;img class=&quot;size-medium wp-image-401&quot; title=&quot;Crules-arch-diagram&quot; src=&quot;http://redbrain.co.uk/wp-content/uploads/2009/07/Crules-arch-diagram-300x253.png&quot; alt=&quot;Crules&quot; width=&quot;300&quot; height=&quot;253&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Crules&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So I have to admit that&amp;#8217;s the most impressive art I ever done (I know I&amp;#8217;m lame &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt; ). Its my pipeline for my programming language, but I guess a lot of programming languages would follow this kind of model/architecture. So it got me thinking this is nearly the basics for any semi-serious interpreter or &amp;#8216;a&amp;#8217; language so lets talk though it. &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;I am still not going to talk about the details of my language because its not ready yet. Other than I am doing fun things like, so far the only data-structure I let the developer have is lists, so if you do something like:&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;% foo := { 2,3,4,5,6,67,7}&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;#is a list and strings are lists!&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;% str := “bla”&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;#is the same as&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;% str := { &amp;#8216;b&amp;#8217;, &amp;#8216;l&amp;#8217;, &amp;#8216;a&amp;#8217; }&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;It works a lot around the shell so you can also do:&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;% foo := `ls`&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;#it produces a delimited list of strings with the delimited as carriage return or new line etc.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;Though note I am going to implement an api for arrays. But not yet, because lists are going to cause problems unless I implemented a table/array of accessors to the elements in the list so you can do fast access to the elements because it doesn&amp;#8217;t scale no matter what anyone says when say you are doing image processing on a 1024&amp;#215;1024 list&amp;#8230; accessing the elements isn&amp;#8217;t going to scale.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;Anyway so lets get back to looking into the pipeline of it: So first a user creates a program lets look at the helloworld.crl:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;rule main()&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt; echo “Hello World!”&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt; foo := 5 + 2 &amp;#8211; 7&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;all := main;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So first my interpreter will start lexing this using LEX, into tokens like: rule, main &amp;#8216;(&amp;#8217; &amp;#8216;)&amp;#8217;&amp;#8230;. and then the parser starts applying the grammar implemented using YACC. So I start producing symbols to build a symbol table the data-structure looks like this its basicly a more high-level 3 address code:&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;div class=&quot;dean_ch&quot;&gt;&lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; symtab &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; *identifier;&lt;br /&gt;
&amp;nbsp; uint8_t symType;&lt;br /&gt;
&amp;nbsp; uint8_t op_a_t;&lt;br /&gt;
&amp;nbsp; uint8_t op_b_t;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _SYM_LIST_ *list;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;float&lt;/span&gt; flt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int32_t integer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;char&lt;/span&gt; ch;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;co1&quot;&gt;//sym link to function call&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; symtab *syms;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; op_a;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _SYM_LIST_ *list;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;float&lt;/span&gt; flt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; int32_t integer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;co1&quot;&gt;//params to a func_call&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; symstack *syms;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; symtab *sy;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; op_b;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;kw4&quot;&gt;struct&lt;/span&gt; symtab *next;&lt;br /&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; __attribute__&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;aligned&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So first it creates the rule definition! For now just think as rules as entry points to a program so you can add more identifiers to that &amp;#8216;all&amp;#8217; list not just main. It has a deeper meaning but I don&amp;#8217;t want to talk or show this until I have the interpreter and language definitions more concrete!&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So the the rule &amp;#8216;main&amp;#8217; creates a new symbol like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;//the symbol takes the identifer of the rule identifier&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;symbol-&amp;gt;identifer = &amp;#8216;main&amp;#8217;&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;//its a rule symbol&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;symbol-&amp;gt;symType= _SYM _RULE _&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;symbol union_a is the link to the first symbol in that block of statements and union_b is NULL because I don&amp;#8217;t need it until I have rule dependencies it needs to list.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;symbol-&amp;gt;next= NULL, because it is just a definition&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;Then each expression like &amp;#8216; echo “Hello World” &amp;#8216;, creates a symbol and its next = the next expression like the &amp;#8216; foo := 5 + 2 – 7 &amp;#8216;. This creates an interesting one, because this can&amp;#8217;t be reduced to a 3-address code until you split it up, for now I just assume the developer wants it to run as 5+2=7 then 7-7=0; But I am going to add precedence later. So you can be more expressive to have nested expressions in brackets to be executed first etc..&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;But yeah this expression is split up into 3 symbols for now, its an over all variable Assignment but it depends an expression of 5+2 as a temporary symbol then this temporary symbol – 7 then foo = this new temporary symbol and I can push these dead symbols to the garbage collector. &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;When a symbol is allocated, it is allocated memory of a preallocated memory heap of default 32MB, it can be extended or shortened if needs be, but it allows me to control and see how much memory is being occupied at anyone time in the runtime of the interpreter. Any symbols to be kept such as rule definitions, function definitions or variables are kept on one massive stack. So ok, that&amp;#8217;s a problem if you need to search for them, the answer I found was having 3 other tables that link to the symbols in the stack. When any link is broke it becomes garbage, so when I have a new variable re-assignment I can break that link and remove the entry in the variable table it still exists in the symbol stack but the &lt;a href=&quot;http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)&quot;&gt;Garbage collector&lt;/a&gt; is always called on EXIT and the exit of any block statements like loops functions etc, so when you pop your way out of the stack you can have local variables instead of everything global and you have conflicts which will cause a lot of problems. Also the garbage collector is implemented as a &lt;a href=&quot;http://en.wikipedia.org/wiki/POSIX_Threads&quot;&gt;pthread&lt;/a&gt; so you have have to pause for several seconds waiting for it to free the garbage. I haven&amp;#8217;t done this yet because its going to be very awkward to keep the concurrency, the pthread mutex api should handle a lot for me but its still going to be complicated. I have thought I might like to try implementing a lot of different internal using OPEN/MP to make it even speedier, but that won&amp;#8217;t be for a while.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;And then I have been playing with&lt;a href=&quot;http://llvm.org/&quot;&gt; LLVM&lt;/a&gt; to create a &lt;a href=&quot;http://llvm.org/docs/tutorial/index.html&quot;&gt;JIT execution system&lt;/a&gt;, you can see my posts on &amp;#8216;Managing the JIT&amp;#8217; on comp.compilers, I have posted there quite a few times before, its a great list of basically all programming language, compiler and interpreter experts in the world!&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So I have a variable table that links to the variables in the symbol stack and the same for the rules and functions. This speed up searching for specific identifiers.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So that&amp;#8217;s the basics of parsing into symbols I guess, it pains me to say but many people thing a programming language is mainly a parser is so wrong the parser just lets you build your symbols the execution and management of these symbols is much, much more complicated. That&amp;#8217;s not to say implementing a simple programming language is difficult, the problem I see a lot is people are scared of doing it because the vocabulary is huge! I mean if you start working at an interpreter from first principle&amp;#8217;s I&amp;#8217;ll guarantee if you have half a brain you&amp;#8217;ll come to a similar architecture as this. &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;I found it difficult at the start when I knew anything in a programming language can always be brought to 3 things and I got really confused when people talked about symbol tables, 3 address code, IR (intermediate representation) and parse trees or syntax tree&amp;#8217;s. I think a lot of developers have their own prefered meanings to them, but it is mainly a barrier of academics trying to make the subject more complicated than needs be, although when you go at this from first principle&amp;#8217;s you&amp;#8217;ll will soon learn &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; .&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;So thats the main focus of my personal work but I am now also soon to be an approved &lt;a href=&quot;http://gcc.gnu.org/&quot;&gt;GNU/gcc&lt;/a&gt; and &lt;a href=&quot;http://www.gnu.org/software/automake/&quot;&gt;GNU/automake&lt;/a&gt; developer! Can&amp;#8217;t wait, got my FSF paper work signed and sent back it may arrive in Boston soon I guess but yeah I am excited. I am updating the automake documentation to show the best way to handle multiple &lt;a href=&quot;http://en.wikipedia.org/wiki/Lex_programming_tool&quot;&gt;LEX&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Yacc&quot;&gt;YACC&lt;/a&gt; in one program. Its something only one of two people do but its a problem none the less and to make it portable is the actual problem. But I have the solutions to it now &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; .&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;div class=&quot;wp-caption alignright&quot;&gt;&lt;a href=&quot;http://icanhascheezburger.files.wordpress.com/2009/07/funny-pictures-cat-has-pushed-in-face.jpg&quot;&gt;&lt;img title=&quot;Got your attention&quot; src=&quot;http://icanhascheezburger.files.wordpress.com/2009/07/funny-pictures-cat-has-pushed-in-face.jpg&quot; alt=&quot;Got your attention&quot; width=&quot;252&quot; height=&quot;188&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Got your attention&lt;/p&gt;&lt;/div&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;Thing is I would really love it if I had an AIX/FreeBSD/Solaris machine to do more testing on because now that I am doing work on GCC it would be so helpful to have more machines to do testing. But i&amp;#8217;m ok for now, so far in GCC I am doing regression testing to find a regression I can tackle, its extremely difficult some are defunct on the &lt;a href=&quot;http://gcc.gnu.org/bugzilla/&quot;&gt;bugzilla&lt;/a&gt; some are ancient and not perused. And the rest is very active but for MIPS or SPARC, and I don&amp;#8217;t have a &lt;a href=&quot;http://www.scratchbox.org/&quot;&gt;scratchbox&lt;/a&gt; setup to even test that yet. Would just be great to get my hands on even an old ibook for a power-pc cpu or an old IBM p-server. If anyone knows of any available I would be really grateful!&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;Ok this has become a very long post so I&amp;#8217;ll shut up! &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt; . See you guys from &lt;a href=&quot;http://www.belfastlinux.org/wiki/Main_Page&quot;&gt;Beflast LUG&lt;/a&gt; on Wednesday!&lt;/span&gt;&lt;span&gt; One last thing i want to link you to 5 of my favourite bands and they are all off &lt;a href=&quot;http://www.jamendo.com/en/&quot;&gt;Jamendo&lt;/a&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jamendo.com/en/album/26656&quot;&gt;http://www.jamendo.com/en/album/26656&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jamendo.com/en/album/34523&quot;&gt;http://www.jamendo.com/en/album/34523&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jamendo.com/en/album/42122&quot;&gt;http://www.jamendo.com/en/album/42122&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jamendo.com/en/album/34714&quot;&gt;http://www.jamendo.com/en/album/34714&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jamendo.com/en/album/3661&quot;&gt;http://www.jamendo.com/en/album/3661&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Steganography, prevention before is better that detection after</title>
		<link href="http://www.piglets.org/serendipity/archives/93-Steganography,-prevention-before-is-better-that-detection-after.html"/>
		<id>http://www.piglets.org/serendipity/archives/93-guid.html</id>
		<updated>2009-07-27T19:53:24+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.newscientist.com&quot;&gt;New Scientist&lt;/a&gt; recently ran an &lt;a href=&quot;http://www.newscientist.com/article/mg20327176.300-hidden-messages-in-images-leave-telltale-trail.html&quot;&gt;article&lt;/a&gt; about &lt;a href=&quot;http://en.wikipedia.org/wiki/Steganography&quot;&gt;steganography&lt;/a&gt;. If you don't already know, steganography is essentially encryption with a difference. Specifically, encryption is usually obvious. It may be that the data Alice sends via email to Bob with &lt;a href=&quot;http://en.wikipedia.org/wiki/Public_key_cryptography&quot;&gt;public key cryptography&lt;/a&gt; is entirely secure from eves-dropping by &lt;a href=&quot;http://xkcd.com/177/&quot;&gt;Eve&lt;/a&gt; (pun intended, sorry), but Eve will &lt;strong&gt;know&lt;/strong&gt; data is being sent that she might be interested in. Steganography, by contrast, seeks to hide the encrypted data so Eve is not aware of its very existence.&lt;br /&gt;&lt;br /&gt;

 It's a very ancient idea, stretching back to ancient Greece. In modern times a common way to perform the trick is to hide data in an image. One of my more gifted undergraduate students did a final year project on this with me. We used a known password as a seed for a pseudo-random number generator to determine which pixels of the image we would embed the data in. By playing with the least significant bit of one colour in randomly spaced pixels, you can very effectively hide data.&lt;br /&gt;&lt;br /&gt;

The New Scientist article suggests that &lt;strong&gt;if&lt;/strong&gt; you detect the steganography, and &lt;strong&gt;if&lt;/strong&gt; we obtain the computer of the suspect and &lt;strong&gt;if&lt;/strong&gt; they have carelessly wiped the software, there &lt;strong&gt;might be&lt;/strong&gt; traces that tell you this was done. Now let's remember the whole point of steganography is that the first step is improbable, you most likely won't detect it.&lt;br /&gt;&lt;br /&gt;

The issue is, in today's geopolitical situation, reasonably serious. It has been suggested (see the &lt;a href=&quot;http://en.wikipedia.org/wiki/Steganography&quot;&gt;wikipedia&lt;/a&gt; article I linked above), that such techniques were used to exchange data on site like ebay to plan major terrorist attacks. With lots of analysis software only playing with known algorithms, or relying on comparing modified images with the original (where the original may not be available) what can such a major website do to prevent such abuse? Well, I thought an approach would be to essentially employ the same techniques with random data. That is, randomly poking data into bits in pixels here and there will, up to a certain point, not affect image clarity to the naked eye, but unless the encrypted data is loaded with huge amounts of error correcting code, it will destroy the payload. You could easily automatically run such a filter over uploaded data. I'm sure similar approaches would work for digital sound.&lt;br /&gt;&lt;br /&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Receiving Ukemi</title>
		<link href="http://www.piglets.org/serendipity/archives/91-Receiving-Ukemi.html"/>
		<id>http://www.piglets.org/serendipity/archives/91-guid.html</id>
		<updated>2009-07-25T01:04:00+00:00</updated>
		<content type="html">For those not acquainted by martial arts. The title is a bit of a weak play on words, since &quot;ukemi&quot; means something like &quot;receiving through the body&quot;. Uke is generally the receiver of a technique and thus the attacker in aikido, whereas the nage is the thrower to use one possible word.&lt;br /&gt;&lt;br /&gt;

Ukemi is important in Aikido. You will spend literally half your training time attacking and then &quot;receiving&quot; the technique, and all of these aspects can be lumped under the title of ukemi. It's a difficult balance to get right in aikido. It is learned in a very cooperative nature, and so the idea (for some) is be an &quot;appropriate&quot; attacker for each training partner, tailoring your attack to each. Thus, for a student on their first night, you might actually move the student's arms to help them learn the &quot;throw&quot;.&lt;br /&gt;&lt;br /&gt;

Issues tend to arise more in pairings between non beginners. Some advocate that as an uke you can learn aikido by blending completely with the nage. I personally prefer an approach of attacking in a way I believe is probably appropriate for a &quot;normal&quot; attacker, and then protecting myself and blending in the aftermath. I'm probably slightly above average height, weight and strength and so a good model of an attacker, and perhaps somewhat harder to throw.&lt;br /&gt;&lt;br /&gt;

Having said that, I do not prevent people from throwing me. I just don't strive to throw myself, blending so completely that every throw seems to &quot;work&quot; perfectly no matter what.&lt;br /&gt;&lt;br /&gt;

Recently I received a fair amount of verbal and non verbal (expressions and so on) criticism from a student of about a year's experience about the &quot;awkwardness&quot; of my ukemi. I think in retrospect I should have indicated that unhelpful, non constructive criticism is as unpleasant and counterproductive for me as to anyone else. I did however, rather unhelpfully, suggest &quot;you might want to consider that I am not the whole problem&quot;. I was exasperated at the fact that this person thought I was trying to stop her from throwing me, when in fact I was trying to help her explore where things were going well and where they were not. The exasperation was not helped by my conviction (rightly or wrongly) that if I really wanted to stop her from throwing me, I could have done so very easily.&lt;br /&gt;&lt;br /&gt;

The reality is, there are very, very few people to whom I would give concerted &quot;awkwardness&quot; to stop them throwing me, and those are among the people whose aikido I respect the very most, and it would be something I would do rarely, and as a gift to that person (and because it can be a great deal of fun once you are comfortable with another person!). If you're reading this, you know who you are! If I'm trying to be &quot;awkward&quot;, you'll know about it.&lt;br /&gt;&lt;br /&gt;

When I hit 3rd Kyu (around the middle of the white belt grades), I took a decision I simply wasn't going to worry about awkward ukes any more. It's my problem to deal with the uke, not theirs. And now a good few years later (about nine) I find myself teaching Aikido, I emphasise this point to all the students in our &lt;a href=&quot;http://bac.aikidoinireland.org&quot;&gt;club&lt;/a&gt;, and it's very much our philosophy. Nevertheless, there are times I am training with another when I don't &quot;finish&quot; a technique when I feel their ukemi doesn't allow it. Those are times when I feel I would have to be profoundly unkind to do so, or potentially injure someone, especially when the person is (in my opinion) unaware of their own danger. Mostly however, I believe in the importance of finishing, providing I'm not putting my ego above the uke's safety.&lt;br /&gt;&lt;br /&gt;

But I believe awkward (but realistic) ukemi is a gift to receive gratefully, that some people I train with, though I like them very much personally, are so intent on blending perfectly with everything I do before I do it, that I am deprived of a chance to learn from my mistakes. I suppose I should have, with humble sincerity, explained this to my training partner. Better luck next time.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Richard Feynman Lectures</title>
		<link href="http://www.piglets.org/serendipity/archives/92-Richard-Feynman-Lectures.html"/>
		<id>http://www.piglets.org/serendipity/archives/92-guid.html</id>
		<updated>2009-07-25T00:03:10+00:00</updated>
		<content type="html">I hold &lt;a href=&quot;http://en.wikipedia.org/wiki/Richard_feynman&quot;&gt;Richard Feynman&lt;/a&gt; in huge regard. He was a fascinating human being, a Nobel laureate physicist, his research in physics was second to none. But he was also a legendary lecturer, in both the fields of physics, and perhaps surprisingly computer science. And even more, he was an exceptionally well rounded person, a gifted artist, an amateur safe cracker and more besides. I own a copy of his &lt;a href=&quot;http://www.amazon.co.uk/Lectures-Physics-Complete-Set-1-3/dp/0201021153/ref=sr_1_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1248482088&amp;amp;sr=8-2&quot;&gt;lectures on Physics&lt;/a&gt;, bought for me by my Mum who felt (probably correctly) that no-one else would buy an item that sounded so boring, though it was on my Amazon wish list. (Incidentally, I think some pages touch on issues like the paradox I presented on &lt;a href=&quot;http://www.piglets.org/serendipity/archives/68-Crashing-Cars.html&quot;&gt;crashing cars&lt;/a&gt;, I haven't had the leisure to study this more closely).&lt;br /&gt;&lt;br /&gt;

Recently it was announced (and one of my students kindly wrote to tell me) that &lt;a href=&quot;http://science.slashdot.org/story/09/07/15/1635245/Bill-Gates-Puts-Classic-Feynman-Lectures-Online?from=rss&quot;&gt;Bill Gates had bought up the rights to his lecturers and was making them available&lt;/a&gt;. I do praise Bill Gates for his philanthropy, and would have praised him for this, but regrettably, the lectures are only available with &lt;a href=&quot;http://en.wikipedia.org/wiki/Silverlight&quot;&gt;Silverlight&lt;/a&gt;, and so it's another of a long line of Trojan horses to ensure we buy into a new proprietary standard from Microsoft. A huge shame.&lt;br /&gt;&lt;br /&gt;

In my last, marathon article, I talked a little about &lt;a href=&quot;http://www.piglets.org/serendipity/archives/90-Models,-Perception,-Science,-Religion,-Martial-Arts.html&quot;&gt;models of reality&lt;/a&gt;. A point I didn't make is that we have trouble accepting that; no matter how much we dislike aspects of reality, they remain the same despite that. Feynman encapsulated this beautifully in this &lt;a href=&quot;http://www.youtube.com/watch?v=5VMu14mBXAs&quot;&gt;YouTube snippet&lt;/a&gt; of his QED lectures (which I had showed to my final year students). I have attempted a limited transcript below, but you should hear it in Feynman's excellent good humoured Brooklyn accent for full effect.

&lt;blockquote&gt;
And then there's the ... kind of thing which you don't understand. Meaning &quot;I don't believe it, it's crazy, it's the kind of thing I won't accept.&quot;&lt;br /&gt;&lt;br /&gt;

Eh. The other part well... this kind, I hope you'll come along with me and you'll have to accept it because it's the way nature works. If you want to know the way nature works, we looked at it, carefully, [...unsure of this bit...] that's the way it works.&lt;br /&gt;&lt;br /&gt;

You don't like it..., go somewhere else!&lt;br /&gt;&lt;br /&gt;

To another universe! Where the rules are simpler, philosophically more pleasing, more psychologically easy. I can't help it! OK! If I'm going to tell you honestly what the world looks like to the... human beings who have struggled as hard as they can to understand it, I can only tell you what it looks like.&lt;br /&gt;&lt;br /&gt;

And I cannot make it any simpler, I'm not going to do this, I'm not going to simplify it, and I'm not going to fake it. I'm not going to tell you it's something like a ball bearing inside a spring, it isn't.&lt;br /&gt;&lt;br /&gt;

So I'm going to tell you what it really is like, and if you don't like it, that's too bad.

&lt;/blockquote&gt;

If you'd like to hear more from this fascinating man, can I suggest more YouTube videos showing an old BBC interview with him:

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=0XgmrMZ0h54&quot;&gt;Part One&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Wwtbh6wcq78&amp;amp;feature=related&quot;&gt;Part Two&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=-SfJEdkYVuc&amp;amp;feature=related&quot;&gt;Part Three&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=hRAbke411Zw&amp;amp;feature=related&quot;&gt;Part Four&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Nh285sbO4gQ&amp;amp;feature=related&quot;&gt;Part Five&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=OhXzK5RxvUg&amp;amp;feature=related&quot;&gt;Part Six&lt;/a&gt;&lt;/li&gt;

&lt;/ol&gt;</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Home directory on SD card?</title>
		<link href="http://www.earth.li/~noodles/blog/2009/07/home-directory-on-sd-card.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.225</id>
		<updated>2009-07-18T17:26:54+00:00</updated>
		<content type="html" xml:lang="en">&lt;p&gt;I'm off to DebConf next Thursday. I'm looking forward to it; I could do with a change of scenery and some time with friends. I'm having my usual &amp;quot;What do I need to bring?&amp;quot; worries and I got to wondering about which laptop to bring - since last year I've gained an EEE 901, but I still have my Toshiba R200.&lt;/p&gt;

&lt;p&gt;In general I'm using the EEE these days when I'm not using my desktop - it's much more convenient to throw in an overnight bag. However the keyboard and screen &lt;i&gt;are&lt;/i&gt; too small for hard core use. Which suggests I should take the R200. Except the EEE battery life is great and a small laptop is handy for use in talks. So I think I'll bring both. Which led me to think about the fact I don't use the R200 that much these days and why that is. And it's partly about all the various bits that live in my home directory that mean switching machine is a sort of context shift. That applies to my desktops too.&lt;/p&gt;

&lt;p&gt;And then I had a thought. Both laptops have built in SD readers. So do both of the desktops I regularly use. Why not just put my home directory on an SD card? These are machines that I don't log into remotely, so the card being removed when I'm not in front of the machine isn't a problem (it means I have to log out, but I think that's acceptable). I'm not totally sure of the speed of the readers in the various machines, but I guess the best way to find out if it's doable is to try it.&lt;/p&gt;

&lt;p&gt;So, various things to ponder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Card size. Do all my readers support SDHC? In which case I should get an 8G or 16G card. Otherwise 1G is probably the safest maximum size? I suppose I can order one of each; they'll get used somewhere even if it's not for this.&lt;/li&gt;
&lt;li&gt;Card make. I don't want something that's going to die after a week of use; I'll try to ensure cache directories and similar are symlinks to a local piece of storage but I don't have a feel for the number of writes my home directory normally sees. I like Crucial for RAM. How's their flash? Integral? Or just bite the bullet and accept Sandisk are going to be best, if pricey?&lt;/li&gt;
&lt;li&gt;Filesystem. ext3? Or will the journal kill the card faster - I understood this was less of a concern these days. Are ext4 or btrfs ready for this sort of use? Perhaps this is the right time to try; I can keep backups on every machine that uses the card easily enough.&lt;/li&gt;
&lt;li&gt;Crypto. I may as well encrypt the card for security as I doubt that'll end up being the bottleneck for access. Is dm-crypt the right thing? libpam-mount looks like it might let me tie things together in a simplish fashion.&lt;/li&gt;
&lt;li&gt;Union mount? It might be nice to have a basic home directory on every machine so I can login even if I don't have my card with me. Or have local configuration bits specific to each machine. Perhaps something for a bit further down the line - I'm not sure any of the unionfs options are in mainline kernels yet?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I suppose I'll do some card manufacturer investigation and try and get a couple of cards ordered in time to play with over DebConf.&lt;/p&gt;</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Models, Perception, Science, Religion, Martial Arts</title>
		<link href="http://www.piglets.org/serendipity/archives/90-Models,-Perception,-Science,-Religion,-Martial-Arts.html"/>
		<id>http://www.piglets.org/serendipity/archives/90-guid.html</id>
		<updated>2009-07-18T13:42:43+00:00</updated>
		<content type="html">This is quite a long and detailed article, if you have no vague interest in meta-physics or philosophy and associated ideas, it may hold little value for you. You have been warned!&lt;br /&gt;&lt;br /&gt;

I doubt that any human being lives directly in reality. None of us has an exact understanding of reality and generally I suspect that's a good thing. Those human beings who are gifted with an ability to see reality more uncloaked often pay a heavy cost for that, you can see this from reading biographies of our greatest &lt;a href=&quot;http://en.wikipedia.org/wiki/G%C3%B6del&quot;&gt;scientists&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Van_Gogh&quot;&gt;artists&lt;/a&gt;. So in fact, we compose models of reality in our mind. Actually our very brains use models to simplify the massive processing required from our senses, magicians exploit the limitation of these models all the time to entertain us. Martial artists can exploit them for self defence.&lt;br /&gt;&lt;br /&gt;

Models usually start off simply, along the principles of &lt;a href=&quot;http://en.wikipedia.org/wiki/Occam%27s_razor&quot;&gt;Occam's Razor&lt;/a&gt;. So for example when we are young we observe the Sun rising and setting in the sky and we take it as the simplest, and reasonable explanation that the Sun is moving around the Earth and not the other way round. The stars appear as a fixed background that wheels around the Earth, reinforcing the idea of a &lt;a href=&quot;http://en.wikipedia.org/wiki/Geocentric_model&quot;&gt;geocentric universe&lt;/a&gt;. But they are not uniformly distributed, and now we hit a factor that can often run contrary to Occam's razor; humanity's ability to discern patterns in the environment. It's an important ability, and lies at the heart of the innate mathematical ability that defines us a species as much as our gift of language. But it often misfires. It leads us to see &lt;a href=&quot;http://en.wikipedia.org/wiki/Agency_(philosophy)&quot;&gt;agents&lt;/a&gt; where there are none, and we are predisposed to suspect and fear agents that are essentially like us - anthropomorphic. This is also, incidentally, the root of our fondness of &lt;a href=&quot;http://xkcd.com/258/&quot;&gt;conspiracy theories&lt;/a&gt; although the irony of that cartoon appealing to one agency about our intrinsic ability to perceive agency should be considered.&lt;br /&gt;&lt;br /&gt;

We begin to construct theories as to the distribution of the stars, and we prefer solutions of order and agency to randomness. So we see constellations, and we name them by appearance. But why do the stars look like these things? It must have a meaning, so we build stories bringing all of these things together. And then, we notice things that wander against the stellar background, and indeed today we still use the word planet, derived from the greek observation of this wandering. These must be great, special things. And to these we attach godhood. An increasingly, some might say ludicrously complex model of the world emerges.&lt;br /&gt;&lt;br /&gt;

This pattern was, of course, repeated across the world. In the western world we have been significantly shaped by the beliefs of the Egyptians, Jews, Greeks, Romans and the old Norse models of the world. Most of those where themselves derived from others. Each became progressively more complex and intricate as time progressed. Depending on your perspective, Christianity is often blamed or praised for being the greatest influence on our world model today in the west, but in fact I would argue that the Greeks have that dubious honour. And to illustrate how ideas from old models are often patently false but very hard to leave behind, many (perhaps you) still believe &lt;a href=&quot;http://en.wikipedia.org/wiki/Aristotle&quot;&gt;Aristotle&lt;/a&gt; that there are five senses when there are &lt;a href=&quot;http://en.wikipedia.org/wiki/Sense&quot;&gt;more&lt;/a&gt; and we still use words like &quot;quintessential&quot; without much thought as to what they actually &lt;a href=&quot;http://en.wikipedia.org/wiki/Aether_(classical_element)&quot;&gt;meant&lt;/a&gt;. Indeed what we think of as Christianity today is heavily influenced by Greek philosophy.&lt;br /&gt;&lt;br /&gt;

The ideological battle within us between the simple and complex, rich models continued. Most of the world moved towards belief in a single God, laughing at old beliefs of many spirits or many gods. Without commenting on the validity of these religions, it's worth noting that if for example we look at very early Christianity, it was a very simple model of the world. In the centuries that have followed more and more layers of tradition have been tacked on to make a richer, more complex cosmology. Every so often, a schism occurs and a faction tries to return to fundamental simplicity, but usually every branch continues to grow in complexity thereafter.&lt;br /&gt;&lt;br /&gt;

Returning to physics and meta-physics, for a time, we &lt;a href=&quot;http://en.wikipedia.org/wiki/Eratosthenes&quot;&gt;knew the Earth was a sphere&lt;/a&gt;, and then forgot again in favour of flatness as a simpler model. Many suspected the Earth was still round, and then apparently we &lt;a href=&quot;http://en.wikipedia.org/wiki/Christopher_Columbus&quot;&gt;discovered it&lt;/a&gt; (though of course we were mistaken in fact). But the idea of the geocentric universe was generally still very secure, as was our model of humanity being the very purpose of the universe itself.&lt;br /&gt;&lt;br /&gt;

When &lt;a href=&quot;http://en.wikipedia.org/wiki/Galileo&quot;&gt;Galileo&lt;/a&gt; constructed his telescope he used it to look at the greatest planet in our Solar System, named after the greatest Roman God, Jupiter. He saw what anyone alive can see today with a cheap telescope or binoculars, up to four dots near the great planet. Sometimes not all these dots were visible. It was extremely difficult to understand what could be going on. If everything orbited the Earth then the motion of these dots must be exceptionally complicated. But there was a much simpler solution, that these were moons of Jupiter, orbiting the distant planet directly. Four moons, the largest of the numerous moons of Jupiter and still &lt;a href=&quot;http://www.piglets.org/serendipity/galilean moons&quot;&gt;collectively named for Galileo&lt;/a&gt; today. To us, living within a well established (more accurate) model of the Solar System that we have today this seems of no consequence, but this is an example of that overused phrase a &lt;a href=&quot;http://en.wikipedia.org/wiki/Paradigm#Paradigm_shifts&quot;&gt;paradigm shift&lt;/a&gt;. In other words, it required Galileo to make that leap that the model of the world espoused by Aristotle was quite simply wrong. There is an enormous mental inertia to be overcome in such an act; we become very attached to our models, they are nothing short of our perception of the reality we exist in. Remember, one branch of the Christian church only pardoned Galileo for this &quot;heresy&quot; in 1992! But when we can and do embrace the improved model, other deepening of understanding can rapidly follow. So for example, once we accept that moons can directly orbit an entity other than the Earth, we begin to question all the assumptions of what goes around the Earth.&lt;br /&gt;&lt;br /&gt;

And so in a short time, we move from a model, that began so simply and became so complex, where the Sun, Moon, planets and stars revolve around our beloved Earth, to a much simpler model where only the Moon keeps us company in this way. There is massive resistance because of our huge investment in our model; and also because it diminishes us as a species, and our home. But when we accept the truth, or at least our improved model of it, we come to an understanding of the astonishing grandeur of the universe, so much greater than we could ever have believed before.&lt;br /&gt;&lt;br /&gt;

It's happened again since of course, odd little inconsistencies in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Newton&quot;&gt;Newtonian&lt;/a&gt; model of the universe emerged. The pattern observed by &lt;a href=&quot;http://en.wikipedia.org/wiki/Thomas_Samuel_Kuhn&quot;&gt;Kuhn&lt;/a&gt; appears again and again. We greatly resist the evidence against our current model. The model is again, our very perception of reality. Eventually the evidence mounts up so much that we can no longer ignore it; it has to be explained. The explanation that eventually comes is again, shattering intellectually to us. And in fact that is getting worse.&lt;br /&gt;&lt;br /&gt;

Specifically, most people still happily live with the Newtonian model of reality (even most scientists). That's because it's an astonishingly successful approximation to reality, it works brilliantly well in almost all situations. As I write, near the 40th anniversary of the &lt;a href=&quot;http://www.piglets.org/serendipity/apollo 11&quot;&gt;Apollo 11&lt;/a&gt; mission I should note that Newtonian mechanics alone were sufficient to land a man on the Moon. (Incidentally, note that the names of the missions that took us there, first &lt;a href=&quot;http://en.wikipedia.org/wiki/Project_Mercury&quot;&gt;Mercury&lt;/a&gt;, then &lt;a href=&quot;http://en.wikipedia.org/wiki/Project_Gemini&quot;&gt;Gemini&lt;/a&gt;, then &lt;a href=&quot;http://en.wikipedia.org/wiki/Project_Apollo&quot;&gt;Apollo&lt;/a&gt; in the great &lt;a href=&quot;http://en.wikipedia.org/wiki/Saturn_(rocket_family)&quot;&gt;Saturn V&lt;/a&gt; rocket show how we drag our old obsolete models with us centuries later). However, we know the Newtonian model to be wrong. We know that &lt;a href=&quot;http://en.wikipedia.org/wiki/General_relativity&quot;&gt;General Relativity&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Quantum_mechanics&quot;&gt;Quantum Mechanics&lt;/a&gt; are better models, and unfortunately, they are not simpler. In fact they are so complex, we fight our mind and brain, evolved to understand a Newtonian world, as we try to encompass these theories.&lt;br /&gt;&lt;br /&gt;

And for the first time physicists are facing a shocking possible addition to reality, one that rocks them to the core in the same way the &lt;a href=&quot;http://www.piglets.org/serendipity/incompleteness theorem&quot;&gt;incompleteness theorem&lt;/a&gt; did for mathematicians. We may simply not have a sufficiently evolved brain to totally perceive reality. Perhaps all our models are such a simplification of reality that in the same way a dog cannot understand general relativity or quantum electro-dynamics, we shall never be able to understand the true &lt;a href=&quot;http://en.wikipedia.org/wiki/Theory_of_everything&quot;&gt;Theory of Everything&lt;/a&gt; if it exists. Certainly it is harder than ever to train young humans to the summit of current understanding in their twenties, when their brains are still supple enough to probe reality (few great discoveries in science and mathematics were made by older people).&lt;br /&gt;&lt;br /&gt;

But suppose for a moment that the theory of everything exists, and is simple. Many people believe this would give us full predictive power over all the emergent behaviour that arises (i.e. literally everything, including love, music and art). Of course that doesn't reckon with, just to begin with,  &lt;a href=&quot;http://en.wikipedia.org/wiki/Chaos_theory&quot;&gt;chaos theory&lt;/a&gt; which actually doesn't mean what most lay people think it means, especially since Jeff Goldblum propounded it in Jurassic Park in a way, that to me, sounded much more like the totally different &lt;a href=&quot;http://en.wikipedia.org/wiki/Catastrophe_theory&quot;&gt;catastrophe theory&lt;/a&gt;. (By the way, following that film, I have watched the total bemusement on the face of a kindly elder pure mathematics professor as he was asked by a prospective student if he was a &quot;chaotician&quot;.)&lt;br /&gt;&lt;br /&gt;

But actually, and coming to martial arts in this, the truth can often be safely hidden in plain view. Most of us will never find it or believe it. Note I include myself in &quot;us&quot;. As human beings, we actually love complexity and tradition and can't accept simple truth any more than we can understand complex mind bending theories. For now, I set aside the fact that some will always use complexity and tradition to exploit us by hiding reality from us, it's quite enough to deal with self-deception at the moment.&lt;br /&gt;&lt;br /&gt;

When a new student sits on the side of the mats watching an instructor demonstrate &lt;a href=&quot;http://en.wikipedia.org/wiki/Aikido&quot;&gt;aikido&lt;/a&gt; (for the sake of argument) they are looking at two human beings with flawed models of reality attempting to do their best to demonstrate an underlying reality. No matter how hard they try, or what they know, it will not be perfect. They fight the interpretation of what the other is, what they are doing, what they themselves are and what they are doing. In his recently &lt;a href=&quot;http://www.lulu.com/content/paperback-book/aikido-memoirs/7408469&quot;&gt;published memoirs&lt;/a&gt; Alan Ruddock discusses how the mental aspects of this for each of us are shown by analogy in the old Chinese book &lt;a href=&quot;http://en.wikipedia.org/wiki/Journey_to_the_West&quot;&gt;Journey to the West&lt;/a&gt; introduced to many of us by the &lt;a href=&quot;http://en.wikipedia.org/wiki/Monkey_(TV_series)&quot;&gt;Monkey&lt;/a&gt; TV series. &lt;br /&gt;&lt;br /&gt;

Add to this mix that the student, actually whether they are a beginner or not, views the whole proceedings through their own flawed model and perception. What they see is rarely (possibly never) what is exactly happening. Watching a particular &quot;throw&quot; the student can see a start with two people standing, and a finish with one lying on the ground. The arms are used to cause the throw to &quot;happen&quot; and so a very simple model is that the person still standing at the end essentially struck the other person to force them on the ground. I've watched this very process happen in a room filled with beginning students, who after witnessing a fluid gentle throw that brought no harm to the &quot;victim&quot;, proceed to stand with their equally inexperienced partner and more or less try to knock them onto the ground in a very crude approximation of the throw they watched.&lt;br /&gt;&lt;br /&gt;

So it is for beginners, but actually with experience it's just the depth of the misconceptions that alters. For instance, person &quot;Anne&quot; throws person &quot;Barry&quot; while person &quot;Clare&quot; watches. Suppose to simplify things that Anne does a perfect (if such a thing exists) aikido throw on Barry who is gripping both of Anne's wrists with his hands. She moves in complete harmony with Barry so well that Barry cannot resist and is thrown perfectly. As Anne moves - Barry, who is gripping her moves too - and his body position relative to hers changes, this in turn changes his grip and as a consequence he rotates Anne's arms. Anne neither opposes nor amplifies this, she merely continues to move where she can till Barry loses his balance and falls.&lt;br /&gt;&lt;br /&gt;

But Clare, watching from the sidelines, knows it cannot be that simple. Anne must know a special trick or two. She has so much to watch. So much information to assimilate into her model: how Anne's face moves, her arms, her legs. After all, Anne is &quot;doing the throw&quot; to Barry, so Anne must be doing the special things. She sees that Anne's arms rotate as she performs the throw. She cannot possibly perceive that actually it is Barry that is doing this, and even if she could, even if her highly sophisticated mind could believe it, is is likely that the primitive model most of us have will prevent her from being able to accept it.&lt;br /&gt;&lt;br /&gt;

And so Clare learns to perform this throw by moving her arms. It's a flawed model, but actually it may not be too far from the truth, so mainly it works. The times it doesn't, well these are just aberrations that can be put down to other factors (just as Kuhn has observed in science). The longer Clare trains this way, the more deeply ingrained this flawed model becomes. She starts to tack on little adjustments that help correct for the times it diverges from reality. She learns a host of tricks to deal with times that this causes the &quot;throw&quot; to begin to fail, so she can &quot;make it work&quot;.&lt;br /&gt;&lt;br /&gt;

Perhaps one day Clare starts to teach others. She teaches them honestly, sincerely, as best as she can, but from a seriously flawed model. The model propagates to many other people. It's an interesting example that &lt;a href=&quot;http://en.wikipedia.org/wiki/Memetics&quot;&gt;memetics&lt;/a&gt; doesn't guarantee that &quot;good&quot; memes or models of the world survive and prosper. The correct model Anne tried to demonstrate is astonishingly simple, much simpler than the one Clare has assimilated. But now, the intellectual investment Clare has made makes it unlikely that she will ever really see the true model. Worse yet, the model she has learned has crept into her every body movement. Even if she could somehow intellectually grasp the correct model, she must fight every &quot;lower&quot; part of her body to effect it.&lt;br /&gt;&lt;br /&gt;

Perhaps there can be seen here the parallels between these threads. That models spread rather like religions whatever their nature is. Loyalty to a personality or a concept can be laudable, but it can prevent people from questioning things for themselves, preferring to attach themselves to the models espoused by others. But however much we may respect another human being and attach value to their beliefs, I believe it's our responsibility to ourselves, and to them, to remember that they are fundamentally like us, imperfect, doing the best they can. If they falsely believe something however sincerely and we come to believe it too out of loyalty, we only increase their attachment to their incorrect model, and the chance they will never move from it.&lt;br /&gt;&lt;br /&gt;

So again, even leaving aside the malevolent attempts by some people to deliberately deceive ourselves (and a yet deeper discussion would examine our beliefs about such motivations as we are predisposed to see malevolence where there is none), our very nature is our greatest enemy. We resist perceiving reality as it really is, we each have rival models of reality which leads us to clash with each other when we &quot;cannot see things from each other's point of view&quot;. We literally cannot. We naturally embellish models to make them more complex than they need to be, we enjoy it. We struggle to believe things could be simple. We often conflate the ideas of &quot;simple&quot; and &quot;easy&quot;. Simple things can be hard to do.&lt;br /&gt;&lt;br /&gt;

All we can do is make a massive effort to see things as they are, as individuals, or as as close as we can. In the Japanese martial arts, we would say that we should strive for shoshin, &quot;beginner's mind&quot;. We need to constantly challenge our assumptions about the world and other people. In many senses it's a very Buddhist philosophy. It's arguable whether it is always an act of kindness to help others refine their models. It may be, in extreme cases, an act of violence to attempt to wrest someone from a model they are so deeply attached to. And yet some of those models can themselves be damaging to the individuals that hold them and those around them. Few would argue that attempting to refine the model of a man who despises and may injure people of a given race because of his deeply but incorrectly held views would be a bad thing. But incorrect can be a hard thing to judge. None of us is perfect, none of us perceives reality as it is. Is it right for an atheist who is absolutely convinced of the absence of a God to try and disturb the world model of a terminally ill believer who derives much happiness from their model, whether it is correct or not?</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Hello, Lifeforms!</title>
		<link href="http://irukado.org/2009/07/12/hello-lifeforms"/>
		<id>http://irukado.org/?p=1467</id>
		<updated>2009-07-12T16:42:01+00:00</updated>
		<content type="html">&lt;p&gt;Let&amp;#8217;s start with the results, so everyone&amp;#8217;s clear what this is about.&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;text&quot;&gt;UmS6D0aW62+q!'%S2 (perfection:   0%) Evolving        2nd generation.
aUKahChc.5,e&amp;amp;8:?1 (perfection:   0%) Evolving        3rd generation.
bYJo$F?O2;aTV'q'? (perfection:   0%) Evolving        4th generation.
P]N0+dC=p-GVh&amp;lt;p1E (perfection:   0%) Evolving        5th generation.
P]N0+dC=p-GPQ&amp;gt;+6b (perfection:   0%) Evolving        6th generation.
Q?T1LHOp=LSj*VUr0 (perfection:   0%) Evolving        7th generation.
ob3&amp;lt;2Ih=p-CO^f#`5 (perfection:   0%) Evolving        8th generation.
dK8:SCn^omSj*VO ` (perfection:   0%) Evolving        9th generation.
X@Z'H&amp;lt;f.)T?f&amp;amp;(i6. (perfection:   6%) Evolving       10th generation.
g&amp;amp;H0+)DG^J%GV(\(l (perfection:   0%) Evolving       11th generation.
dK9K3Vf.)T?f&amp;amp;`Kfq (perfection:   6%) Evolving       12th generation.
8@Zm`,jZ-*jf38&amp;quot;:; (perfection:  12%) Evolving       13th generation.
g&amp;amp;l:7O^q0jGA2r2,&amp;amp; (perfection:  12%) Evolving       14th generation.
j^4'N.:L0fV.9_Psi (perfection:  18%) Evolving       15th generation.
co2sL:BLffGA2((Y! (perfection:  18%) Evolving       16th generation.
MHX&amp;lt;oUL$EP`&amp;lt;o(\si (perfection:  18%) Evolving       17th generation.
g9l#bkrL$+e &amp;amp;&amp;gt;Tsr (perfection:  24%) Evolving       18th generation.
Pibho,MYilkEo(.sj (perfection:  29%) Evolving       19th generation.
cel/opLRP2aEerTs! (perfection:  35%) Evolving       20th generation.
HR(so ELrfef/\-s&amp;amp; (perfection:  41%) Evolving       21st generation.
ce&amp;gt;l9dr3iPef?r2sc (perfection:  41%) Evolving       22nd generation.
HRl#) EaibkforTs! (perfection:  47%) Evolving       23rd generation.
Ho9ho, LJ-?fY&amp;gt;ms! (perfection:  53%) Evolving       24th generation.
He^j`,YLrfeHFlms! (perfection:  53%) Evolving       25th generation.
HRli*/ Lrfe &amp;amp;rms! (perfection:  59%) Evolving       26th generation.
HelBNd Lrfe &amp;amp;rms! (perfection:  65%) Evolving       27th generation.
HeGlo,jLifGf&amp;amp;rm]! (perfection:  71%) Evolving       28th generation.
ce4lod &amp;gt;iWeforms! (perfection:  71%) Evolving       29th generation.
H&amp;amp;lho, Lif@forms! (perfection:  82%) Evolving       30th generation.
HRllo, &amp;gt;ifeforms! (perfection:  88%) Evolving       31st generation.
Hello,:Lif@forms! (perfection:  88%) Evolving       32nd generation.
He9lo, Lifeforms! (perfection:  94%) Evolving       33rd generation.
Hello, LifeformN! (perfection:  94%) Evolving       34th generation.
HelloV Lifeforms! (perfection:  94%) Evolving       35th generation.
Hello, LifefKrms! (perfection:  94%) Evolving       36th generation.
Evolved to 100% perfection. Concluding.
&amp;nbsp;
35,000 individuals sacrificed their lives
so that their species could eventually say:
&amp;nbsp;
        Hello, Lifeforms!&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2&gt;The Challenge&lt;/h2&gt;
&lt;p&gt;So&amp;#8230; the other day, &lt;a href=&quot;http://www.daikaiju.org.uk/~steve/cnot/&quot;&gt;Steve&lt;/a&gt; drew my attention to this &lt;a href=&quot;http://sfbay.craigslist.org/sfc/eng/1246353621.html&quot;&gt;craigslist &amp;#8220;to all those who think themselves a programmer&amp;#8221; challenge&lt;/a&gt;.  To cut a long story short, the advert included a programming challenge, and mentioned that a genetic algorithm that could say Hello World using the sacrificial efforts of billions of evolving entities would be one of the winners.&lt;/p&gt;
&lt;p&gt;Now, it just so happens that I wrote a pretty fun Genetic Programming app as my first foray into linux C++ programming back in the mid 90&amp;#8217;s, and had lost the code for it.  So, last night, I rewrote a cut-down version of it in Python.&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;python&quot;&gt;&lt;span&gt;#!/usr/bin/env python2.6&lt;/span&gt;
&lt;span&gt;#&lt;/span&gt;
&lt;span&gt;# Copyright (c) 2009 Lee Braiden &amp;lt;lee.b@irukado.org&amp;gt;&lt;/span&gt;
&lt;span&gt;# Released under the GNU General Public License, version 3.&lt;/span&gt;
&lt;span&gt;# http://www.gnu.org/licenses/gpl.html for details.&lt;/span&gt;
&lt;span&gt;#&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;import&lt;/span&gt; &lt;span&gt;sys&lt;/span&gt;
&lt;span&gt;from&lt;/span&gt; &lt;span&gt;random&lt;/span&gt; &lt;span&gt;import&lt;/span&gt; randint, sample
&amp;nbsp;
&lt;span&gt;class&lt;/span&gt; Mirror:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Stores certain details that individuals must analyse
	and evolve themselves against.  Named after the
	psychology concept of being a mirror for an individual's
	own thoughts.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	&lt;span&gt;def&lt;/span&gt; &lt;span&gt;__init__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, destiny&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Takes a string, 'destiny', which creatures must
		evolve to say.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;UPPER&lt;/span&gt; = &lt;span&gt;max&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt; &lt;span&gt;ord&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;x&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;for&lt;/span&gt; x &lt;span&gt;in&lt;/span&gt; destiny &lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;LOWER&lt;/span&gt; = &lt;span&gt;min&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt; &lt;span&gt;ord&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;x&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;for&lt;/span&gt; x &lt;span&gt;in&lt;/span&gt; destiny &lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;destiny&lt;/span&gt; = destiny
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; chromosome_len&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Returns the number of chromosomes in an individual's
		genes.  In other words, this is the length of the message
		characters should evolve to say.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;destiny&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; &lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;A quick (readability-)helper function, which allows looping
		over each gene.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; &lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, &lt;span&gt;self&lt;/span&gt;.&lt;span&gt;chromosome_len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;class&lt;/span&gt; Individual:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Represents an individual beastie which will be created, can
	breed, can mutate, can attempt to solve the problem at hand,
	and can be tested for fitness, among other things.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	&lt;span&gt;def&lt;/span&gt; &lt;span&gt;__init__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, chromosome_len, mutation_rarity&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;self&lt;/span&gt;._genes =  &lt;span&gt;&amp;quot; &amp;quot;&lt;/span&gt; &lt;span&gt;*&lt;/span&gt; chromosome_len
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;fitness&lt;/span&gt; = &lt;span&gt;0&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;mutation_rarity&lt;/span&gt; = mutation_rarity
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _gene_val&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Create a random gene value&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; &lt;span&gt;chr&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;randint&lt;span&gt;&amp;#40;&lt;/span&gt;mirror.&lt;span&gt;LOWER&lt;/span&gt;, mirror.&lt;span&gt;UPPER&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _randomise_genes&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Initialise all of the individual's genes randomly.  Used
		during creation, rather than breeding&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._genes = &lt;span&gt;&amp;quot;&amp;quot;&lt;/span&gt;.&lt;span&gt;join&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;._gene_val&lt;span&gt;&amp;#40;&lt;/span&gt;mirror&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;for&lt;/span&gt; idx &lt;span&gt;in&lt;/span&gt; mirror.&lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _choose_gene&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Choose an individual gene to target.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; randint&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._genes&lt;span&gt;&amp;#41;&lt;/span&gt;-&lt;span&gt;1&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _freaky&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Roll a dice, and see if this individual is (un)lucky enough
		to gain a mutation.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; randint&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, &lt;span&gt;self&lt;/span&gt;.&lt;span&gt;mutation_rarity&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; == &lt;span&gt;0&lt;/span&gt;
&amp;nbsp;
	@&lt;span&gt;classmethod&lt;/span&gt;
	&lt;span&gt;def&lt;/span&gt; conjure&lt;span&gt;&amp;#40;&lt;/span&gt;cls, mirror, mutation_rarity&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Create an individual from scratch.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		i = cls&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mirror.&lt;span&gt;destiny&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;, mutation_rarity&lt;span&gt;&amp;#41;&lt;/span&gt;
		i._randomise_genes&lt;span&gt;&amp;#40;&lt;/span&gt;mirror&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; i
&amp;nbsp;
	@&lt;span&gt;classmethod&lt;/span&gt;
	&lt;span&gt;def&lt;/span&gt; breed&lt;span&gt;&amp;#40;&lt;/span&gt;cls, mirror, mom, dad&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Breed an individual from two parents.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		mutation_rarity = &lt;span&gt;float&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mom.&lt;span&gt;mutation_rarity&lt;/span&gt; + dad.&lt;span&gt;mutation_rarity&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; / &lt;span&gt;2.0&lt;/span&gt;
		kid = cls&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mirror.&lt;span&gt;destiny&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;, mutation_rarity&lt;span&gt;&amp;#41;&lt;/span&gt;
		x = kid._choose_gene&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		kid._genes = &lt;span&gt;&amp;quot;&amp;quot;&lt;/span&gt;.&lt;span&gt;join&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mom._genes&lt;span&gt;&amp;#91;&lt;/span&gt;:x&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; + &lt;span&gt;&amp;quot;&amp;quot;&lt;/span&gt;.&lt;span&gt;join&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;dad._genes&lt;span&gt;&amp;#91;&lt;/span&gt;x:&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;if&lt;/span&gt; kid._freaky&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
			kid._mutate&lt;span&gt;&amp;#40;&lt;/span&gt;mirror&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;return&lt;/span&gt; kid
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _mutate&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Mutate a random gene&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		orig_genes = &lt;span&gt;self&lt;/span&gt;._genes
		idx = &lt;span&gt;self&lt;/span&gt;._choose_gene&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		els = &lt;span&gt;&amp;#91;&lt;/span&gt; x &lt;span&gt;for&lt;/span&gt; x &lt;span&gt;in&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;._genes &lt;span&gt;&amp;#93;&lt;/span&gt;
		els&lt;span&gt;&amp;#91;&lt;/span&gt;idx&lt;span&gt;&amp;#93;&lt;/span&gt; = &lt;span&gt;self&lt;/span&gt;._gene_val&lt;span&gt;&amp;#40;&lt;/span&gt;mirror&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._genes = &lt;span&gt;&amp;quot;&amp;quot;&lt;/span&gt;.&lt;span&gt;join&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;els&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; self_evaluate&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Evaluate 'fitness', or the ability to solve the given
		problem.  In other words, measure how close the individual
		is to the correct message text, and assign a score
		accordingly.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		fitness = max_fitness = &lt;span&gt;float&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._genes&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;for&lt;/span&gt; idx &lt;span&gt;in&lt;/span&gt; &lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._genes&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
			&lt;span&gt;if&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;._genes&lt;span&gt;&amp;#91;&lt;/span&gt;idx&lt;span&gt;&amp;#93;&lt;/span&gt; == mirror.&lt;span&gt;destiny&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;idx&lt;span&gt;&amp;#93;&lt;/span&gt;:
				&lt;span&gt;continue&lt;/span&gt;
			&lt;span&gt;else&lt;/span&gt;:
				fitness -= &lt;span&gt;1&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;fitness&lt;/span&gt; = &lt;span&gt;100.0&lt;/span&gt; &lt;span&gt;*&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;fitness / max_fitness&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; &lt;span&gt;__cmp__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, competitor&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Comparison function, used for sorting populations to find
		the fittest.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;if&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;.&lt;span&gt;fitness&lt;/span&gt; &lt;span&gt;&amp;gt;&lt;/span&gt; competitor.&lt;span&gt;fitness&lt;/span&gt;:
			&lt;span&gt;return&lt;/span&gt; &lt;span&gt;1&lt;/span&gt;
		&lt;span&gt;elif&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;.&lt;span&gt;fitness&lt;/span&gt; == competitor.&lt;span&gt;fitness&lt;/span&gt;:
			&lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;
		&lt;span&gt;else&lt;/span&gt;:
			&lt;span&gt;return&lt;/span&gt; -&lt;span&gt;1&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;class&lt;/span&gt; World:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Represents a world populated by Individuals, which breed
	together, subject to natural selection, to reach an evolutionary
	goal.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	&lt;span&gt;def&lt;/span&gt; &lt;span&gt;__init__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror, population_size=&lt;span&gt;1000&lt;/span&gt;, mutation_rarity=&lt;span&gt;1000&lt;/span&gt;, fitness_required=&lt;span&gt;100.0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Initialise a population of population_size members, mutating
		one in every mutation_rarity breeds.  Evolution will stop when
		fitness reaches fitness_required percent.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._mirror = mirror
		&lt;span&gt;self&lt;/span&gt;._population = &lt;span&gt;&amp;#91;&lt;/span&gt; Individual.&lt;span&gt;conjure&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mirror, mutation_rarity&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;for&lt;/span&gt; i &lt;span&gt;in&lt;/span&gt; &lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, population_size&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#93;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;sacrifice_count&lt;/span&gt; = &lt;span&gt;0&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._fitness_required = &lt;span&gt;100.0&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._mutation_rarity = mutation_rarity
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _natural_select&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, exclusion_list=&lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Select two individuals from a population, choosing the most
		'fit' for breeding.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		a,b = sample&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._population, &lt;span&gt;2&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;a &lt;span&gt;&amp;gt;&lt;/span&gt; b&lt;span&gt;&amp;#41;&lt;/span&gt;:
			&lt;span&gt;return&lt;/span&gt; a
		&lt;span&gt;else&lt;/span&gt;:
			&lt;span&gt;return&lt;/span&gt; b
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _breeding_pairs&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Select enough breeding pairs from a population to create a
		new population of equal size, assuming one child per couple.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		bp = &lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;
		pop_size = &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._population&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;for&lt;/span&gt; i &lt;span&gt;in&lt;/span&gt; &lt;span&gt;range&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;, pop_size&lt;span&gt;&amp;#41;&lt;/span&gt;:
			mom = &lt;span&gt;self&lt;/span&gt;._natural_select&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
			dad = &lt;span&gt;self&lt;/span&gt;._natural_select&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;mom&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
			bp.&lt;span&gt;append&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mom,dad&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;return&lt;/span&gt; bp
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _breed_new_generation&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;, mirror&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Create a new generation, breeding it from the older
		generation using natural selection.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		new_gen = &lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;
		bp = &lt;span&gt;self&lt;/span&gt;._breeding_pairs&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;for&lt;/span&gt; mom,dad &lt;span&gt;in&lt;/span&gt; bp:
			kid = Individual.&lt;span&gt;breed&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;mirror, mom,dad&lt;span&gt;&amp;#41;&lt;/span&gt;
			new_gen.&lt;span&gt;append&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;kid&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;sacrifice_count&lt;/span&gt; += &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._population&lt;span&gt;&amp;#41;&lt;/span&gt;
		&lt;span&gt;self&lt;/span&gt;._population = new_gen
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; _analyse_population&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Evaluate the genetic fitness of the entire population.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		&lt;span&gt;for&lt;/span&gt; i &lt;span&gt;in&lt;/span&gt; &lt;span&gt;self&lt;/span&gt;._population:
			i.&lt;span&gt;self_evaluate&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._mirror&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;self&lt;/span&gt;._population.&lt;span&gt;sort&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		most_civilised = &lt;span&gt;self&lt;/span&gt;._population&lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
		&lt;span&gt;return&lt;/span&gt; most_civilised
&amp;nbsp;
	&lt;span&gt;def&lt;/span&gt; evolve_civilisation&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
		&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Evolve this civilisation until the required fitness_level
		is reached.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
		generation_count = &lt;span&gt;1&lt;/span&gt;
		last_str_len = &lt;span&gt;0&lt;/span&gt;
		&lt;span&gt;while&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;generation_count&lt;span&gt;&amp;#41;&lt;/span&gt;:
			most_civilised = &lt;span&gt;self&lt;/span&gt;._analyse_population&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
			gen_ord = ordinal&lt;span&gt;&amp;#40;&lt;/span&gt;generation_count + &lt;span&gt;1&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
			&lt;span&gt;if&lt;/span&gt; most_civilised.&lt;span&gt;fitness&lt;/span&gt; &lt;span&gt;&amp;gt;&lt;/span&gt;= &lt;span&gt;self&lt;/span&gt;._fitness_required:
				&lt;span&gt;print&lt;/span&gt; &lt;span&gt;&amp;quot;Evolved to %3.0f%% perfection. Concluding.&amp;quot;&lt;/span&gt; &lt;span&gt;%&lt;/span&gt; most_civilised.&lt;span&gt;fitness&lt;/span&gt;
				&lt;span&gt;return&lt;/span&gt; most_civilised
			&lt;span&gt;else&lt;/span&gt;:
				&lt;span&gt;print&lt;/span&gt; &lt;span&gt;&amp;quot;%s (perfection: %3.0f%%) Evolving % 10s generation.&amp;quot;&lt;/span&gt; &lt;span&gt;%&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;most_civilised._genes, most_civilised.&lt;span&gt;fitness&lt;/span&gt;, gen_ord&lt;span&gt;&amp;#41;&lt;/span&gt;
				&lt;span&gt;self&lt;/span&gt;._breed_new_generation&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;._mirror&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
			generation_count += &lt;span&gt;1&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# a couple of helper functions #############&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;def&lt;/span&gt; ordinal&lt;span&gt;&amp;#40;&lt;/span&gt;n&lt;span&gt;&amp;#41;&lt;/span&gt;:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;borrowed from John Machin's python-list post.  Appends an
	ordinal suffix to a number.  For example, 1 becomes 1st,
	2 becomes 2nd, etc.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	&lt;span&gt;if&lt;/span&gt; &lt;span&gt;10&lt;/span&gt; &lt;span&gt;&amp;lt;&lt;/span&gt;= n &lt;span&gt;%&lt;/span&gt; &lt;span&gt;100&lt;/span&gt; &lt;span&gt;&amp;lt;&lt;/span&gt; &lt;span&gt;20&lt;/span&gt;:
		&lt;span&gt;return&lt;/span&gt; &lt;span&gt;str&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;n&lt;span&gt;&amp;#41;&lt;/span&gt; + &lt;span&gt;'th'&lt;/span&gt;
	&lt;span&gt;else&lt;/span&gt;:
		&lt;span&gt;return&lt;/span&gt;  &lt;span&gt;str&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;n&lt;span&gt;&amp;#41;&lt;/span&gt; + &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt; : &lt;span&gt;'st'&lt;/span&gt;, &lt;span&gt;2&lt;/span&gt; : &lt;span&gt;'nd'&lt;/span&gt;, &lt;span&gt;3&lt;/span&gt; : &lt;span&gt;'rd'&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;.&lt;span&gt;get&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;n &lt;span&gt;%&lt;/span&gt; &lt;span&gt;10&lt;/span&gt;, &lt;span&gt;&amp;quot;th&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span&gt;def&lt;/span&gt; PrintLargeNumber&lt;span&gt;&amp;#40;&lt;/span&gt;n,width=&lt;span&gt;2&lt;/span&gt;,delim=&lt;span&gt;','&lt;/span&gt;,&lt;span&gt;decimal&lt;/span&gt;=&lt;span&gt;'.'&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Converts a float to a string with appropriately placed commas.
&amp;nbsp;
	Floats will be shown with 'width' digits right of the decimal.
	'delim' specifies the thousands delimiter.
	'decimal' specifies the decimal character.
&amp;nbsp;
	Copyright 2007 Regents of the University of California
	Written by David Isaacson at the University of California,
	Davis BSD License&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	&lt;span&gt;if&lt;/span&gt; width &lt;span&gt;&amp;gt;&lt;/span&gt;= &lt;span&gt;0&lt;/span&gt;: s = &lt;span&gt;&amp;quot;%.*f&amp;quot;&lt;/span&gt; &lt;span&gt;%&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;width,n&lt;span&gt;&amp;#41;&lt;/span&gt;
	&lt;span&gt;else&lt;/span&gt;: s = &lt;span&gt;str&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;n&lt;span&gt;&amp;#41;&lt;/span&gt;
	dec = s.&lt;span&gt;find&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;decimal&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
	&lt;span&gt;if&lt;/span&gt; dec == -&lt;span&gt;1&lt;/span&gt;: dec = &lt;span&gt;len&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;s&lt;span&gt;&amp;#41;&lt;/span&gt;
	threes = &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;dec-&lt;span&gt;1&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;/&lt;span&gt;3&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;# we don't need a comma at the start&lt;/span&gt;
	&lt;span&gt;for&lt;/span&gt; i &lt;span&gt;in&lt;/span&gt; &lt;span&gt;xrange&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;threes&lt;span&gt;&amp;#41;&lt;/span&gt;:
		loc = dec-&lt;span&gt;3&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;i+&lt;span&gt;1&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
		s = s&lt;span&gt;&amp;#91;&lt;/span&gt;:loc&lt;span&gt;&amp;#93;&lt;/span&gt; + delim + s&lt;span&gt;&amp;#91;&lt;/span&gt;loc:&lt;span&gt;&amp;#93;&lt;/span&gt;
	&lt;span&gt;return&lt;/span&gt; s
&amp;nbsp;
&lt;span&gt;############################################&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;def&lt;/span&gt; evolve_from_nothingness&lt;span&gt;&amp;#40;&lt;/span&gt;msg&lt;span&gt;&amp;#41;&lt;/span&gt;:
	&lt;span&gt;&amp;quot;&amp;quot;&amp;quot;Evolve an individual capable of saying the given msg.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
	world = World&lt;span&gt;&amp;#40;&lt;/span&gt;Mirror&lt;span&gt;&amp;#40;&lt;/span&gt;msg&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
	greeter = world.&lt;span&gt;evolve_civilisation&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	large_num_str = PrintLargeNumber&lt;span&gt;&amp;#40;&lt;/span&gt;world.&lt;span&gt;sacrifice_count&lt;/span&gt;, width=&lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;print&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;\n&lt;/span&gt;%s individuals sacrificed their lives&lt;span&gt;\n&lt;/span&gt;so that their species could eventually say:&lt;span&gt;\n&lt;/span&gt;&lt;span&gt;\n&lt;/span&gt;&lt;span&gt;\t&lt;/span&gt;%s&lt;span&gt;\n&lt;/span&gt;&lt;span&gt;\n&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;%&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;large_num_str, greeter._genes&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
&lt;span&gt;if&lt;/span&gt; __name__ == &lt;span&gt;&amp;quot;__main__&amp;quot;&lt;/span&gt;:
	evolve_from_nothingness&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;quot;Hello, Lifeforms!&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span&gt;sys&lt;/span&gt;.&lt;span&gt;stdout&lt;/span&gt;.&lt;span&gt;write&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;quot;Press return: &amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
	&lt;span&gt;sys&lt;/span&gt;.&lt;span&gt;stdout&lt;/span&gt;.&lt;span&gt;flush&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
	&lt;span&gt;sys&lt;/span&gt;.&lt;span&gt;stdin&lt;/span&gt;.&lt;span&gt;readline&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;All in all, it&amp;#8217;s pretty sweet.  It evolves fairly constantly, straight to the answer, in less than 40 generations.  Completes in a few seconds as well.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve no doubt the SF Bay guys would find problems with this.  They&amp;#8217;re into pointlessly obfuscated code, FP, and lambdas, for instance.  I&amp;#8217;m into pointedly unobfuscated code, and using FP only when it makes things much clearer.  And optimisation is for compilers long after your algorithms and portability have done their thing.  That said, most of this IS off the top of my head, and I&amp;#8217;m sure there are better ways to do it, so let me know if there are obvious (or not so obvious) improvements that can be made.&lt;/p&gt;
&lt;p&gt;Anyway&amp;#8230; for me, this is what programming&amp;#8217;s all about.  In what other fields can you create worlds, create lifeforms, prove that evolution works, test yourself, frustrate yourself, and enjoy seeing your project finally work, all in the space of a few hours?&lt;/p&gt;
&lt;p&gt;I should probably thank the python guys for a lot of that rapid development; the C++ version took much longer.  Then again, it had a virtual CPU and datatyped I/O etc.  I think it was threaded, too, if I remember correctly.  It also took hours to work out that the way to get 4 out of two 2s was to add them.  I might try that again someday, with a tweaked CPU/instruction set/program model.&lt;/p&gt;</content>
		<author>
			<name>Lee</name>
			<uri>http://irukado.org</uri>
		</author>
		<source>
			<title type="html">Lee Braiden's Blog » FOSS</title>
			<subtitle type="html">Peace, Love, Tech, and random life stuff.</subtitle>
			<link rel="self" href="http://irukado.org/archives/tag/foss/feed/atom/"/>
			<id>http://irukado.org/feed/atom/</id>
			<updated>2009-10-08T01:00:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">All your base are belong to us</title>
		<link href="http://martian.org/marty/2009/07/08/all-your-base-are-belong-to-us/"/>
		<id>http://martian.org/marty/?p=175</id>
		<updated>2009-07-07T16:45:07+00:00</updated>
		<content type="html">&lt;p&gt;We were all amused by the bad translation in the &amp;#8220;All your base&amp;#8221; meme some years ago.  I was thinking about it recently (for other reasons) and wondered how &lt;a href=&quot;http://translate.google.com/translate_t#ja|en|%E5%90%9B%E9%81%94%E3%81%AE%E5%9F%BA%E5%9C%B0%E3%81%AF%E3%80%81%E5%85%A8%E3%81%A6CATS%E3%81%8C%E3%81%84%E3%81%9F%E3%81%A0%E3%81%84%E3%81%9F%E3%80%82%0A%0A%0A&quot;&gt;Google translate&lt;/a&gt; would handle the same Japanese source material: 「君達の基地は、全てCATSがいただいた」&lt;/p&gt;

&lt;p&gt;Google said: &amp;#8220;You are our base, all you CATS&amp;#8221;.  I contributed a &lt;em&gt;better&lt;/em&gt; translation.&lt;/p&gt;

&lt;p&gt;I thought the original phrase would be entertaining because it contains a Japanese verb that Google mistranslates brilliantly: いただく。&lt;/p&gt;

&lt;p&gt;「いただく」 means &amp;#8220;receive&amp;#8221; or &amp;#8220;accept&amp;#8221;.  But it&amp;#8217;s a humble verb, so the receiver has a lower status than the giver and so receives with gratitude.  I suspect that Oliver Twist would use a form of this verb when asking for more gruel.&lt;/p&gt;

&lt;p&gt;If you were the receiver and used this verb you would most likely use it in the form of 「いただきます」(the same verb with the normal polite ending).  And this is where Google translate gets really confused.  Because, unless you frequently get gifts from important people or work in a shop, the most common situation where you would use this word is at the start of a meal: you&amp;#8217;ve just been given some food, and you&amp;#8217;re thankful, so you say &amp;#8220;I (gratefully) accept (this food)&amp;#8221;.  It&amp;#8217;s slightly idiomatic, although the meaning is clear.  It&amp;#8217;s a bit like &amp;#8220;saying grace&amp;#8221;.  But a popular idiomatic expression used in that situation by many English speakers is (the French phrase) &amp;#8220;Bon appétit&amp;#8221;.  Therefore Google always (as far as I can tell) translates 「いただきます」 as &amp;#8220;Bon appétit&amp;#8221;.&lt;/p&gt;

&lt;p&gt;That really doesn&amp;#8217;t work well if the main verb in your sentence is &amp;#8220;receive&amp;#8221;.  One example, appropriate at this time of day, would be 「お休みをいただきます」, for which I would say &amp;#8220;thankfully I&amp;#8217;ll get some rest&amp;#8221;.  Google says &amp;#8220;Rest for a bon appétit&amp;#8221;.&lt;/p&gt;</content>
		<author>
			<name>Marty</name>
			<uri>http://martian.org/marty</uri>
		</author>
		<source>
			<title type="html">バカな火星人</title>
			<subtitle type="html">Marty was here!</subtitle>
			<link rel="self" href="http://martian.org/marty/feed/atom/"/>
			<id>http://martian.org/marty/feed/atom/</id>
			<updated>2009-11-18T17:00:19+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Mono in Debian</title>
		<link href="http://www.piglets.org/serendipity/archives/89-Mono-in-Debian.html"/>
		<id>http://www.piglets.org/serendipity/archives/89-guid.html</id>
		<updated>2009-06-29T12:20:32+00:00</updated>
		<content type="html">I note that the &lt;a href=&quot;http://www.osnews.com/story/21660/Mono_Part_of_Debian_s_Default_Desktop_Install_&quot;&gt;controversy of Mono in Debian&lt;/a&gt; which reached fever pitch with the inclusion of &lt;a href=&quot;http://projects.gnome.org/tomboy/&quot;&gt;Tomboy&lt;/a&gt; as part of the default Gnome applications rages on, and now &lt;a href=&quot;http://stallman.org/&quot;&gt;RMS&lt;/a&gt; has &lt;a href=&quot;http://www.fsf.org/news/dont-depend-on-mono&quot;&gt;entered the fray&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;

I respect Stallman a lot. I'm a fellow of FSFE. His positions are usually well thought and argued, though I can't say I agree with him on all of them, and I don't agree with this one.&lt;br /&gt;&lt;br /&gt;

On the issue of the plain &lt;strong&gt;usefulness&lt;/strong&gt; of Mono apps; well some of them are just excellent. I use &lt;a href=&quot;http://f-spot.org&quot;&gt;f-spot&lt;/a&gt; for managing my photo collection and have to say no other application I've used comes close. Tomboy is itself a considerable improvement on the almost useless sticky notes applet that's been in Gnome for some time; though I've yet to work out what minimum I need for ssh synchronization (to be fair, I've hardly tried).&lt;br /&gt;&lt;br /&gt;

And I should declare an interest. I thought &lt;a href=&quot;http://do.davebsd.com/&quot;&gt;Gnome-Do&lt;/a&gt; was absolutely excellent when I stumbled upon it, and I helped in a modest way to initially package it for Debian (specifically I updated the Ubuntu stuff for the plugins package and prepared that for its initial import to the archive), albeit I haven't worked on it since. It's fairly clear to me that implementing this in, for example, C++ looks like it could be a lot more work. I can't say I've studied it in total depth, but that was my feeling when working with the code.&lt;br /&gt;&lt;br /&gt;

Anyway, never mind all the issues of sheer practicality; Jo Shields of the Debian Mono team, wrote an excellent &lt;a href=&quot;http://www2.apebox.org/wordpress/rants/124/&quot;&gt;rebuttal&lt;/a&gt; to some of the nonsense that was posted about Mono. It makes excellent reading. It is calmly delivered (with an undertone of quite justified and controlled anger), carefully argued and a cautionary tale about some of the nonsense we in the Free Software community can get wrapped up in, it's value extends well beyond the current debacle.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Swap my memory!</title>
		<link href="http://redbrain.co.uk/?p=361"/>
		<id>http://redbrain.co.uk/?p=361</id>
		<updated>2009-06-23T16:26:58+00:00</updated>
		<content type="html">&lt;p&gt;So its been a while since i have updated, while i was offline i guess, i have been moving to a new server! I have had a few teething problems but i think its all going fine now!&lt;/p&gt;
&lt;p&gt;I decided for a VPS off: &lt;a href=&quot;http://www.vpsville.ca/index&quot;&gt;http://www.vpsville.ca/index&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I got the CITY plan Its very powerful because its running in some kind of container VPS, i get to see the full &amp;#8216;$ cat /proc/cpuinfo&amp;#8217;. And it 8 core&amp;#8217;s of the new Intel core i7! But i only have 256mb ram which was the teething problem so i turned off innodb in mysql and limited php memory usage to help compensate. It was nice Debian Server has all the mysql.conf and php.conf files all documenated very well so you generaly have an idea what your changing.&lt;/p&gt;
&lt;p&gt;This is a very useful link for mysql tunning: &lt;a href=&quot;http://howtoforge.com/tuning-mysql-performance-with-mysqltuner&quot;&gt;http://howtoforge.com/tuning-mysql-performance-with-mysqltuner&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&amp;#8212;&amp;#8212;&amp;#8211; General Statistics &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8211;&lt;br /&gt;
[--] Skipped version check for MySQLTuner script&lt;br /&gt;
[OK] Currently running supported MySQL version 5.0.75-0ubuntu10.2&lt;br /&gt;
[OK] Operating on 32-bit architecture with less than 2GB RAM&lt;/p&gt;
&lt;p&gt;&amp;#8212;&amp;#8212;&amp;#8211; Storage Engine Statistics &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;-&lt;br /&gt;
[--] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster&lt;br /&gt;
[--] Data in MyISAM tables: 940K (Tables: 32)&lt;br /&gt;
[--] Data in MEMORY tables: 0B (Tables: 1)&lt;br /&gt;
[!!] Total fragmented tables: 2&lt;/p&gt;
&lt;p&gt;&amp;#8212;&amp;#8212;&amp;#8211; Performance Metrics &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;-&lt;br /&gt;
[--] Up for: 2h 45m 48s (6K q [0.612 qps], 214 conn, TX: 11M, RX: 1M)&lt;br /&gt;
[--] Reads / Writes: 74% / 26%&lt;br /&gt;
[--] Total buffers: 58.0M global + 2.6M per thread (100 max threads)&lt;br /&gt;
[!!] Maximum possible memory usage: 320.5M (125% of installed RAM)&lt;br /&gt;
[OK] Slow queries: 0% (0/6K)&lt;br /&gt;
[OK] Highest usage of available connections: 4% (4/100)&lt;br /&gt;
[OK] Key buffer size / total MyISAM indexes: 16.0M/331.0K&lt;br /&gt;
[OK] Key buffer hit rate: 99.7% (29K cached / 87 reads)&lt;br /&gt;
[OK] Query cache efficiency: 58.5% (2K cached / 4K selects)&lt;br /&gt;
[OK] Query cache prunes per day: 0&lt;br /&gt;
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 291 sorts)&lt;br /&gt;
[!!] Temporary tables created on disk: 30% (103 on disk / 339 total)&lt;br /&gt;
[OK] Thread cache hit rate: 98% (4 created / 214 connections)&lt;br /&gt;
[OK] Table cache hit rate: 89% (50 open / 56 opened)&lt;br /&gt;
[OK] Open file limit used: 9% (98/1K)&lt;br /&gt;
[OK] Table locks acquired immediately: 100% (3K immediate / 3K locks)&lt;/p&gt;
&lt;p&gt;&amp;#8212;&amp;#8212;&amp;#8211; Recommendations &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8211;&lt;br /&gt;
General recommendations:&lt;br /&gt;
Run OPTIMIZE TABLE to defragment tables for better performance&lt;br /&gt;
MySQL started within last 24 hours &amp;#8211; recommendations may be inaccurate&lt;br /&gt;
Reduce your overall MySQL memory footprint for system stability&lt;br /&gt;
Enable the slow query log to troubleshoot bad queries&lt;br /&gt;
When making adjustments, make tmp_table_size/max_heap_table_size equal&lt;br /&gt;
Reduce your SELECT DISTINCT queries without LIMIT clauses&lt;br /&gt;
Variables to adjust:&lt;br /&gt;
*** MySQL&amp;#8217;s maximum memory usage is dangerously high ***&lt;br /&gt;
*** Add RAM before increasing MySQL buffer variables ***&lt;br /&gt;
tmp_table_size (&amp;gt; 32M)&lt;br /&gt;
max_heap_table_size (&amp;gt; 16M)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That&amp;#8217;s the kind of output i got in my first go so i start going though each of these recommendations: This link shows you each of the different variables you can change: &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html&quot;&gt;http://dev.mysql.com/doc/refman/5.1/en/innodb-configuration.html&lt;/a&gt;, I think you can change a lot of Apache  memory variables but i haven&amp;#8217;t looked into this yet!&lt;/p&gt;
&lt;p&gt;But i also decided to make a swap file, this is very easy in Linux if your system is all running directly off a rootfs you can:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;$ dd if=/dev/zero of=/myswapfile bs=1024 count=1048576&lt;/p&gt;
&lt;p&gt;#this should make you a 1G file which we can use for a Swap file!&lt;/p&gt;
&lt;p&gt;$ mkswap /myswapfile&lt;/p&gt;
&lt;p&gt;$ swapon /myswapfile&lt;/p&gt;
&lt;p&gt;#this should work but in my VPS i keep getting &amp;#8217;swapon: swapfile: Operation not permitted&amp;#8217;&lt;/p&gt;
&lt;p&gt;#you can also add this to your fstab like so:&lt;/p&gt;
&lt;p&gt;$ echo &amp;#8220;/myswapfile       none    swap    sw      0       0&amp;#8243; &amp;gt;&amp;gt; /etc/fstab&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So yeah that&amp;#8217;s quite useful to know! I have to say i have upgraded my wordpress to 2.8 and very unhappy to be honest, there are a lot of little bits and pieces annoying me 2.7.1 was a very good release! But this 2.8 is very memory hungry, but from what i read is that they have introduced a new API for widgets, plugins and themes. So i guess there will be problems for a while!&lt;/p&gt;
&lt;p&gt;Anyways what i am hosting on my VPS is 4 sites:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://redbrain.co.uk&quot;&gt;http://redbrain.co.uk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://brendanmullan.com&quot;&gt;http://brendanmullan.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://team-qcg.com&quot;&gt;http://team-qcg.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://animeequation.com&quot;&gt;http://animeequation.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They are the websites so i run: mySQL,   Exim mail server(because &lt;a href=&quot;http://www.earth.li/~noodles/&quot;&gt;noodles&lt;/a&gt; recommended it to me), Apache (might test light httpd), PHP plus various php plugins, git (using those python-tools): &lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;&gt;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have to say anyone who works with me will know i hate SVN and CVS. Mainly because they are just retarded and your locked in too much and if the server goes down, then what the hell are you meant to do. My main reason for sticking with Linux was the fact now your no longer locked into software. A lot of people i know in the windows world use windows but use &amp;#8216;cracked&amp;#8217; copies of it, as-well as photoshop, games, office etc&amp;#8230; all downloaded etc. Using free software alternatives means your no longer reliant on these kinds of software and you know whats available and you learn alot more about your computer and why!&lt;/p&gt;
&lt;p&gt;So anyways i thought i would post a screenshot of my current desktop i think it looks pretty nice tbh! I was using &lt;a href=&quot;http://en.wikipedia.org/wiki/Xmonad&quot;&gt;Xmonad&lt;/a&gt; for ages there, its a great window manager written in haskell its great because i run a server on my work desktop! And then i still need a way to run firefox, email and emacs. So this was very useful, and its very lightweight and usable. Other tiling window managers are light but very complicated!&lt;/p&gt;
&lt;div id=&quot;attachment_366&quot; class=&quot;wp-caption alignleft&quot;&gt;&lt;a rel=&quot;attachment wp-att-366&quot; href=&quot;http://redbrain.co.uk/?attachment_id=366&quot;&gt;&lt;img class=&quot;size-medium wp-image-366&quot; title=&quot;myDesktop&quot; src=&quot;http://redbrain.co.uk/wp-content/uploads/2009/06/desktop-300x187.png&quot; alt=&quot;my laptop&quot; width=&quot;300&quot; height=&quot;187&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;my laptop&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;So i am also giving &lt;a href=&quot;http://en.wikipedia.org/wiki/Haskell_(programming_language)&quot;&gt;Haskell&lt;/a&gt; another go, i got the book &amp;#8216;Real World Haskell&amp;#8217;, its actually pretty good there is a helluva lot of learn, but its going to take a while before i&amp;#8217;ll be seriously able to say i can write a mail client in haskell rofl! I would seriously like to make a GHS right now a gcc implementation of Haskell, because i have started the gcc-front-end documentation with a friend.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/wiki/FrontEnd/skeleton&quot;&gt;http://gcc.gnu.org/wiki/FrontEnd/skeleton&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Problem is were kind of stuck right now, i posted most of it all so far and put up the code, etc but there have been quite a few changes in the latest gcc-4.5-snapshots so trying to keep up with them. But the real problem is i posted the code etc, but posting source code on a wiki page&amp;#8230; its not that nice! So this is another point where the gcc-developers on oftc.net have said should really get my FSF-copyright assignment document stuff done, because i have my automake work and now gcc, and they would like to see official documentation in the GCC-manual in the next releases i think this would really help GCC.&lt;/p&gt;
&lt;p&gt;If you working in industry like me, you&amp;#8217;ll find the only real thing keeping compilers/interpreters and programming languages alive in large business driven companies is the idea of parallelism, this is quite old right now but its only really getting together now! I also have a book on &lt;a href=&quot;http://en.wikipedia.org/wiki/OpenMP&quot;&gt;OPEN/MP&lt;/a&gt; and know some of the basics of it in C/C++. Its very impressive the implementation in GCC and the Glibc. There is only a little theory to learn about OPENMP because actualy coding with it, is very simple! But you wont understand the code until you learn a little about shared memory systems and threading on this! Because OPENMP at the end of the day is starting threads for faster execution behind the scene. But it does all the work for accessing and manipulating memory without breaking your code for you! So in that sense its awesome &lt;img src=&quot;http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;So yeah i also joined &lt;a href=&quot;http://wakoopa.com/redbrain&quot;&gt;http://wakoopa.com/redbrain&lt;/a&gt; Its quite an interesting idea! And also pointing out that: &lt;a href=&quot;http://outlawpla.net/&quot;&gt;http://outlawpla.net/&lt;/a&gt; This is a Linux outlaws Planet, it should be cools i am hoping to get my blog on it as Dan and Fab pointed out in the show yesterday!&lt;/p&gt;
&lt;p&gt;Anyways spent most of my time reading tbh recently so i havent been coding much, re-writing my OS from-scratch again i am starting to understand the i386 kind of now, and i want to structure my kernel correctly and make sure its as similar to just coding with libc as much as possible so i dont implement a stupidly named API of mad functions that only i understand! But i have done bits and pieces of cleaning my simple-programming language. Need to finish that tbh, there isn&amp;#8217;t much more work for me to do to demonstrate the basics for it all. But been doing reading and writing takes alot of time when i work around my Job which takes up most of my time and i haven&amp;#8217;t had a chance to get a break to do serious work at work, been documenating and transferring knowledge of work systems on Unix to new guys which is taking some time as they dont have a background in Linux or UNIX so its kind of frustrating to say the least.&lt;/p&gt;
&lt;p&gt;Anyways i better head on looking forward to the &lt;a href=&quot;http://www.belfastlinux.org/wiki/Main_Page&quot;&gt;BLUG&lt;/a&gt; meet on Wednesday! See you there guys!&lt;/p&gt;
&lt;div class=&quot;wp-caption alignleft&quot;&gt;&lt;a href=&quot;http://icanhascheezburger.files.wordpress.com/2009/06/funny-pictures-kitten-has-a-strange-roommate.jpg&quot;&gt;&lt;img title=&quot;space-time&quot; src=&quot;http://icanhascheezburger.files.wordpress.com/2009/06/funny-pictures-kitten-has-a-strange-roommate.jpg&quot; alt=&quot;no-space&quot; width=&quot;500&quot; height=&quot;374&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;no-space&lt;/p&gt;&lt;/div&gt;</content>
		<author>
			<name>Philip Herron</name>
			<uri>http://redbrain.co.uk</uri>
		</author>
		<source>
			<title type="html">RedBrain @ $HOME : ~ $</title>
			<subtitle type="html">Frustrated Software Developer</subtitle>
			<link rel="self" href="http://redbrain.co.uk/?feed=rss2"/>
			<id>http://redbrain.co.uk/?feed=rss2</id>
			<updated>2010-02-12T22:00:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Going to DebConf 9</title>
		<link href="http://www.earth.li/~noodles/blog/2009/06/going-to-debconf-9.html"/>
		<id>tag:www.earth.li,2009:/~noodles/blog//1.224</id>
		<updated>2009-06-22T20:35:47+00:00</updated>
		<content type="html" xml:lang="en">&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;img alt=&quot;debconf9-going-to.png&quot; src=&quot;http://www.earth.li/%7Enoodles/blog/2009/06/22/debconf9-going-to.png&quot; class=&quot;mt-image-none&quot; height=&quot;89&quot; width=&quot;150&quot; /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've known I was going for a while, but only finally booked the holiday off work and had it approved last week (unfortunately they're not giving me the time for free like last year. :( ). I'll be there for DebConf proper (ie 23rd until 31st). In the unlikely event anyone else is flying DUB&amp;lt;&amp;gt;MAD my flights are:
&lt;br /&gt;&lt;br /&gt;
&lt;pre&gt;2009-07-23 06:00 (DUB) -&amp;gt; 09:30 (MAD) FR 7158
2009-07-31 20:15 (MAD) -&amp;gt; 21:50 (DUB) EI 595
&lt;/pre&gt;
&lt;br /&gt;
I'm on the 16:25 Talgo from Madrid and then the 09:25 back on the 31st. Looks like I'll have company from the &lt;a href=&quot;mailto:rooms@debconf.org&quot;&gt;train booking&lt;/a&gt; page.
&lt;br /&gt;&lt;br /&gt;
Also I've been doing the first draft of the &lt;a href=&quot;http://the.earth.li/%7Enoodles/dc9-rooms-draft-1&quot;&gt;room allocation&lt;/a&gt;. If you're expecting to stay at DebConf organised accommodation you should check your name is on this list with the expected dates, and email &lt;a href=&quot;mailto:rooms@debconf.org&quot;&gt;rooms@debconf.org&lt;/a&gt; if it's not.</content>
		<author>
			<name>Jonathan McDowell</name>
			<uri>http://www.earth.li/~noodles/blog/</uri>
		</author>
		<source>
			<title type="html">Noodles' Emptiness</title>
			<subtitle type="html">Dude! Sweet!</subtitle>
			<link rel="self" href="http://www.earth.li/~noodles/blog/atom.xml"/>
			<id>tag:www.earth.li,2008-03-29:/~noodles/blog//1</id>
			<updated>2010-03-08T23:00:06+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Roberts WM201 Internet Radio</title>
		<link href="http://www.piglets.org/serendipity/archives/88-Roberts-WM201-Internet-Radio.html"/>
		<id>http://www.piglets.org/serendipity/archives/88-guid.html</id>
		<updated>2009-06-13T23:23:39+00:00</updated>
		<content type="html">I recently bought a &lt;a href=&quot;http://www.robertsradio.co.uk/Products/Internet_radios/STREAM_201/index.htm&quot;&gt;Roberts WM201 Internet Radio&lt;/a&gt;. I've used it for a while now and thought I'd post my thoughts.&lt;br /&gt;&lt;br /&gt;

First of all, I was looking for a radio meeting certain criteria, it needed wifi, I wanted it to pack a reasonable punch since it would essentially be my main music source, it needed to support upnp media servers. I also wanted it to have an integrated transformer so that it would not have a bulky mains lead since I wanted it for my rather small kitchen. Finally I wanted it to be semi portable, so I could move it from room to room without too much fuss.&lt;br /&gt;&lt;br /&gt;

The WM201 meets all these criteria, and is based on the &lt;a href=&quot;http://www.reciva.com&quot;&gt;Reciva&lt;/a&gt; technology that has been well received by a few of my friends, notably Paddy and Noodles. The radio is a pretty good size, not too large and not too small, and feels really solid. It has a wired network port as well as wireless capability which is great. For complex reasons, when it first arrived I had no internet connection (no gasps, I was making do with 3G hookups). That being the case I knew I wouldn't be able to get the internet radio functionality itself working. But I figured I'd set up a local lan and get the mediatomb server on my development machine working. I was able to hook up to the LAN and enter the WPA password, but it just would not play with any functionality whatsoever if it doesn't see the servers it expects to. Now Noodles has suggested my geek privileges should be revoked for not working out how much of the internet I had to fake to get it to work. He may well have a point! In my defense I had plenty of other issues to deal with instead.&lt;br /&gt;&lt;br /&gt;

About a week later I got my net connection, albeit temporarily since some work was needed on the cable. So while the network was up I was finally able to get into all the functionality, and I was really impressed, the small display and control is really intuitive and the shipped remote control is excellent. When it came time for the external network connection to be severed again, I quickly switched the device over to streaming media from a playlist on mediatomb, but interestingly it still gave that up midway when the external connection went down. Dumb, but forgivable.&lt;br /&gt;&lt;br /&gt;

So again, what's good? It offers brilliant sound, and more volume than I could wish for. It's easy to browse through the huge array of stations, and for things like the BBC stations, it has a good interface to the &quot;listen again&quot; service. It works seamlessly with mediatomb on my PC. All excellent. A minor grumble is that it's not easy to switch briefly from a radio station to the playlist on mediatomb and back again, you have to go through all the menus every time. The number of stations is so huge, finding them can be a little slow, but you can as you would expect, save them to a preferred list. I hit a problem with that; my saved BBC stations have spontaneously stopped working, just showing endless retrying messages. When I go back through the menus it's all fine. Odd.&lt;br /&gt;&lt;br /&gt;
 
The radio becomes better yet when you use the Reciva portal to set up your &quot;stuff&quot;, a list of your preferred stations and podcasts. Obviously it's much easier to do this on a web page, and then you simply register your radio. Now (it seemed to require a hard power cycle for me) the radio has an extra &quot;My Stuff&quot; menu which gives really easy access to your favourite stations and allows you to quickly select podcasts, far faster than navigating on the radio. An odd note, if you for example navigate through &quot;listen again&quot; in the normal way, you can fast forward, pause and rewind the playing media. But if the same stream is selected from the podcast menu in &quot;My Stuff&quot;, you can't. A slight annoyance.&lt;br /&gt;&lt;br /&gt;

I'd really recommend the device overall, it's great. Incidentally the cheapest prices I could find were on Amazon by some distance, but time and time again, I would select a seller and only at the final hurdle be told they wouldn't ship to Northern Ireland. I've complained about this before, it would be useful to know rather sooner that I'm wasting my time. Anyway, I found a simple way to work out which sellers ship to Northern Ireland and find the cheapest of those. I selected one from each and every seller on Amazon. Then when I went to checkout I removed all those that caused complaints. It was then easy to find the cheapest remaining seller. Much faster than trying them one at a time.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Self Defence and Over Confidence</title>
		<link href="http://www.piglets.org/serendipity/archives/87-Self-Defence-and-Over-Confidence.html"/>
		<id>http://www.piglets.org/serendipity/archives/87-guid.html</id>
		<updated>2009-06-13T14:49:19+00:00</updated>
		<content type="html">Some years ago, I saw an article on the local news showing some girls being schooled in martial arts, Karate in this case, in order to defend themselves from disreputable men (no jokes about tautologies please). It was interesting to note that many felt after about an hour that they were suddenly capable of fending off any male attacker. In particular, and I've heard this view expressed by many female non martial artists, it  was put forward that a swift kick between the legs would solve all problems.&lt;br /&gt;&lt;br /&gt;

Now men have exercised undue dominance in world affairs for many thousands of years, and certainly this is true in the military arena. For all that time the basic design has been the same regarding external placement of genitals, and yet the &quot;swift kick between the legs&quot; did not bring about a fundamental change in gender balance. In other words, it's often not just as simple to obtain victory by that means. If you're a woman, you shouldn't count on that being your winning strategy. If it were really that simple there would be much less tragic history of men's ill treatment of women.&lt;br /&gt;&lt;br /&gt;

It was interesting then to &lt;a href=&quot;http://news.bbc.co.uk/1/hi/world/south_asia/8093946.stm&quot;&gt;read about a current scheme&lt;/a&gt; in India for training sex workers to defend themselves with Karate. I'm not against any of these schemes, and at least this seems to spend some substantial quantity of time in a training programme. Still, from the article we see:

&lt;blockquote&gt;
&quot;I think I can easily handle one man at any given time. I face physical abuse on a daily basis and have been abused and been beaten up by my clients many times.&quot;&lt;br /&gt;&lt;br /&gt;

&quot;A thug once stripped me of my clothes and told me to run naked. From now on, I think nobody can do that to me. I will kick him.&quot; 
&lt;/blockquote&gt;

Right. Where I have concerns is that, to quote the great &lt;a href=&quot;http://en.wikipedia.org/wiki/Harry_Callahan_(character)&quot;&gt;Harry Callahan&lt;/a&gt;: &quot;A man's got to know his limitations&quot;, and nowadays that should probably be amended to &quot;person&quot;. I have spent several thousand hours training in dojos with all sorts of folks of all backgrounds, shapes, sizes and available genders. Over this time I've trained with people who've studied many different martial arts. I would never make such a sweeping statement, and I'm a six foot tall male (ape descendant). You never know what the other guy/girl knows, has as a weapon, and so on. Complacency and overconfidence are dangerous. Self esteem is great, but believing that you just have to kick an assailant once to resolve the issue may well be wishful thinking.&lt;br /&gt;&lt;br /&gt;

In the &lt;a href=&quot;http://en.wikipedia.org/wiki/Book_of_five_rings&quot;&gt;Book of Five Rings (Go Rin No Sho)&lt;/a&gt; the legendary &lt;a href=&quot;http://en.wikipedia.org/wiki/Miyamoto_Musashi&quot;&gt;Miyamoto Musashi&lt;/a&gt; warns the reader that when a person has no training, they at least act naturally, without hesitation, for good or for ill. Once you set down the pathway of a fighting art, your goal is to learn new reflexes that become your automatic reactions, but initially, the result can be quite negative, since conscious thought is required, and can cause the novice to &quot;freeze&quot; under pressure. Dabbling in martial arts may be much less effective that people believe.</content>
		<author>
			<name>Colin Turner</name>
			<email>nospam@example.com</email>
			<uri>http://www.piglets.org/serendipity/</uri>
		</author>
		<source>
			<title type="html">Proving the Obviously Untrue</title>
			<subtitle type="html">Maths, Software, Hardware, Martial Arts and more</subtitle>
			<link rel="self" href="http://www.piglets.org/serendipity/index.php?/feeds/"/>
			<id>http://www.piglets.org/serendipity/index.php?/feeds/</id>
			<updated>2010-01-20T11:00:07+00:00</updated>
		</source>
	</entry>

</feed>
