<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
	<channel>
<title>Stay Hungry&#x2c; Stay Foolish</title><link>http://algorithm.com.au/index.html</link><description>Andr&#xe9; Pang&#x27;s Blog</description><dc:language>en</dc:language><dc:creator>ozone@algorithm.com.au</dc:creator><dc:rights>&#xa9; 2006-2007 Andr&#xe9; Pang</dc:rights><dc:date>2014-07-07T11:26:15-07:00</dc:date><admin:generatorAgent rdf:resource="http://www.realmacsoftware.com/" />
<admin:errorReportsTo rdf:resource="mailto:ozone@algorithm.com.au" /><sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<lastBuildDate>Tue, 26 Feb 2008 20:19:35 -0800</lastBuildDate><item><title>Markup Plugin for RapidWeaver 5</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2014-07-07T11:26:15-07:00</dc:date><link>http://algorithm.com.au/blog/files/rapidweaver-5-markup.html#unique-entry-id-618</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/rapidweaver-5-markup.html#unique-entry-id-618</guid><content:encoded><![CDATA[<p>For the <a href="http://realmacsoftware.com/rapidweaver/">RapidWeaver</a> users out there, I&rsquo;ve updated my antique Markup plugin to work with RapidWeaver 5 (slow clap). It also now lives on <a href="https://github.com/andrep/rw-markup">GitHub</a>, like all the other <em>cool</em> open-source projects published after about 1970. (BitBucket is so 1969.)</p>

<p>As an aside, ohmigosh, there <em>still</em> isn&rsquo;t anything out there that&rsquo;s as good as RapidWeaver for building websites. I wanted to redo my site, and looked into a bunch of RapidWeaver alternatives, especially Web apps. Tumblr, Wordpress, Blogger and all that are great for just blogs, but useless for building anything more than a blog. Online site-builders like Squarespace, Weebly, and Virb are either way too dumbed down, too complex, have the most boring themes, or more likely, are all of the above. Despite RapidWeaver still being compiled for <code>ppc</code> and <code>i386</code> only (it&rsquo;s not a 64-bit app yet), and using the Objective-C 1.0 runtime (my Markup plugin uses <code>+[NSObject poseAsClass:]</code>!), it is still the best thing going for building sites. Amazing.</p>

<p>Anyway, <a href="https://github.com/andrep/rw-markup">Markup plugin, go get it</a>.</p>]]></content:encoded></item><item><title>Two new mixes</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Music</category><dc:date>2011-11-23T08:10:24-08:00</dc:date><link>http://algorithm.com.au/blog/files/tes-lyric-stage-superior.html#unique-entry-id-614</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/tes-lyric-stage-superior.html#unique-entry-id-614</guid><content:encoded><![CDATA[<p>I&#8217;ve been pretty dormant in my music for the past few years, but I have been working on two two mixes in my sparse spare time: <a href="/music/tes_lyric">Tes Lyric</a>, a weird blend of electronica, classical and rock, and <a href="/music/ss">Stage Superior</a>, a progressive house mix.  They&#8217;re up on my <a href="/music">music</a> page now; enjoy!</p>]]></content:encoded></item><item><title>Immutability and Blocks&#x2c; Lambdas and Closures &#x5b;UPDATE x2&#x5d;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2011-04-04T22:55:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/immutability-blocks-lambdas-closures.html#unique-entry-id-613</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/immutability-blocks-lambdas-closures.html#unique-entry-id-613</guid><content:encoded><![CDATA[<p>I recently ran into some &#8220;interesting&#8221; behaviour when using <code>lambda</code> in Python.  Perhaps it&#8217;s only interesting because I learnt lambdas from a functional language background, where I expect that they work a particular way, and the rest of the world that learnt lambdas through Python, Ruby or JavaScript disagree.  (Shouts out to you Objective-C developers who are discovering the wonders of blocks, too.)  Nevertheless, I thought this would be blog-worthy.  Here&#8217;s some Python code that shows the behaviour that I found on <a href="http://stackoverflow.com/q/938429">Stack Overflow</a>:</p>

<script src="https://gist.github.com/899755.js?file=python_lambda_scope.py"></script>

<p>Since I succumb to reading source code in blog posts by interpreting them as &#8220;blah&#8221;<sup class="footnote"><a href="#fn1">1</a></sup>, a high-level overview of what that code does is:</p>


<ol>
<li>iterate over a list of strings,</li>
<li>create a new list of functions that prints out the strings, and then</li>
<li>call those functions, which prints the strings.</li>
</ol>



<p>Simple, eh?  Prints &#8220;do&#8221;, then &#8220;re&#8221;, then &#8220;mi&#8221;, eh?  Wrong.  It prints out &#8220;mi&#8221;, then &#8220;mi&#8221;, then &#8220;mi&#8221;.  Ka-what?</p>

<p>(I&#8217;d like to stress that this isn&#8217;t a theoretical example.  I hit this problem in production code, and boy, it was lots of fun to debug.  I hit the <a href="http://stackoverflow.com/questions/938429/scope-of-python-lambda-functions-and-their-parameters">solution</a> right away thanks to the wonders of Google and Stack Overflow, but it took me a long time to figure out that something was going wrong at that particular point in the code, and not somewhere else in my logic.)</p>

<p>The <a href="http://stackoverflow.com/questions/938429/scope-of-python-lambda-functions-and-their-parameters/938493#938493">second answer</a> to the Stack Overflow question is the clearest exposition of the problem, with a rather clever solution too.  I won&#8217;t repeat it here since you all know how to follow links.  However, while that answer explains the problem, there&#8217;s a deeper issue.  The <a href="http://www.imdb.com/title/tt0093779/quotes?qt=qt0482717">inconceivable</a> <a href="http://twitter.com/tacticalgrace">Manuel Chakravarty</a> provides a far more insightful answer when I emailed him to express my surprise at Python&#8217;s lambda semantics:</p>

<blockquote><p>This is a very awkward semantics for lambdas.  It is also probably almost impossible to have a reasonable semantics for lambdas in a language, such as Python.</p>

<p>The behaviour that the person on <span class="caps">SO, </span>and I guess you, found surprising is that the contents of the free variables of the lambdas body could change between the point in time where the closure for the lambda was created and when that closure was finally executed.  The obvious solution is to put a copy of the value of the variable (instead of a pointer to the original variable) into the closure.</p>

<p>But how about a lambda where a free variable refers to a 100MB object graph?  Do you want that to be deep copied by default?  If not, you can get the same problem again.</p>

<p>So, the real issue here is the interaction between mutable storage and closures.  Sometimes you want the free variables to be copied (so you get their value at closure creation time) and sometimes you don&#8217;t want them copied (so you get their value at closure execution time or simply because the value is big and you don&#8217;t want to copy it).  </p></blockquote>

<p>And, indeed, since I love being categorised as a massive Apple fanboy, I found the same surprising behaviour with Apple&#8217;s blocks semantics in C, too:</p>

<script src="https://gist.github.com/899755.js?file=blocks_scope_closure_unexpected.c"></script>

<p>You can see the <a href="https://gist.github.com/899755">Gist page for this sample code</a> to see how to work around the problem in Objective-C (basically: copy the block), and also to see what it&#8217;d look like in Haskell (with the correct behaviour).</p>

<p>In Python, the Stack Overflow solution that I linked to has an extremely concise way of giving the programmer the option to either copy the value or simply maintain a reference to it, and the syntax is  clear enough&#8212;once you understand what on Earth what the problem is, that is.  I don&#8217;t understand Ruby or JavaScript well enough to comment on how they&#8217;d capture the immediate value for lambdas or whether they considered this design problem.  C++0x will, unsurprisingly, give programmers full control over lambda behaviour that will no doubt confuse the hell out of people.  (See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf">C++0x language draft</a>, section 5.1.2 on page 91.)</p>

<p>In his usual incredibly didactic manner, Manuel then went on to explain something else insightful:</p>

<blockquote><p>I believe there is a deeper issue here.  Copying features of FP languages is the hip thing in language design these days.  That&#8217;s fine, but many of the high-powered FP language features derive their convenience from being unspecific, or at least unconventional, about the execution time of a piece of code.  Lambdas delay code execution, laziness provides demand-dependent code execution plus memoisation, continuations capture closures including their environment (ie, the stack), etc.  Another instance of that problem was highlighted by Joe Duffy in his <a href="http://www.bluebytesoftware.com/blog/2010/01/03/ABriefRetrospectiveOnTransactionalMemory.aspx"><span class="caps">STM </span>retrospective</a>.</p>

<p>I would say, mutability and flexible control flow are fundamentally at odds in language design.</p></blockquote>

<p>Indeed, I&#8217;ve been doing some language exploration again lately as the lack of static typing in Python is really beginning to bug me, and almost all the modern languages that attempt to pull functional programming concepts into object-oriented land seem like a complete Frankenstein, partially due to mutability.  Language designers, please, this is 2011: multicore computing is the norm now, whether we like it or not.  If you&#8217;re going to make an imperative language&#8212;and that includes all your OO languages&#8212;I&#8217;ll paraphrase <a href="http://lambda-the-ultimate.org/node/1277">Tim Sweeney</a>: in a concurrent world, mutable is the wrong default!  I&#8217;d love a C++ or Objective-C where all variables are <code>const</code> by default.</p>

<p>One take-away point from all this is to try to keep your language semantics simple.  I love Dan Ingall&#8217;s quote from <a href="http://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html">Design Principles Behind Smalltalk</a>: &#8220;if a system is to serve the creative spirit, it must be entirely comprehensible to a single individual&#8221;.  I love Objective-C partially because its message-passing semantics are straightforward, and its runtime has a amazingly compact <span class="caps">API </span>and implementation considering how powerful it is.  I&#8217;ve been using Python for a while now, and I still don&#8217;t really know the truly nitty-gritty details about subtle object behaviours (e.g. class variables, multiple inheritance).  And I mostly agree with Guido&#8217;s assertion that <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=98196">Python should not have included lambda nor reduce</a>, given what Python&#8217;s goals are.  After discovering this quirk about them, I&#8217;m still using the lambda in production code because the code savings does justify the complexity, but you bet your ass there&#8217;s a big comment there saying &#8220;warning, pretentous code trickery be here!&#8221;</p>

<p>1. See point 13 of Knuth et al.&#8217;s <a href="http://tex.loria.fr/typographie/mathwriting.pdf">Mathematical Writing</a> report.</p>

<p><strong><span class="caps">UPDATE</span></strong>: There&#8217;s a lot more subtlety at play here than I first realised, and a couple of statements I&#8217;ve made above are incorrect.  Please see the comments if you want to really figure out what&#8217;s going on: I&#8217;d summarise the issues, but the interaction between various language semantics are extremely subtle and I fear I&#8217;d simply get it wrong again.  Thank you to all the commenters for both correcting me and adding a lot of value to this post.  (I like this Internet thing!  Other people do my work for me!)</p>

<h2>Update #2</h2>

<p>I&#8217;ve been overwhelmed by the comments, in both the workload sense and in the pleasantly-surprised-that-this-provoked-some-discussion sense.  Boy, did I get skooled in a couple of areas.  I&#8217;ve had a couple of requests to try to summarise the issues here, so I&#8217;ll do my best to do so.</p>

<h3>Retrospective: Python</h3>

<p>It&#8217;s clear that my misunderstanding of Python&#8217;s scoping/namespace rules is the underlying cause of the problem: in Python, variables declared in <code>for</code>/<code>while</code>/<code>if</code> statements will be declared in the compound block&#8217;s existing scope, and not create a new scope.  So in my example above, using a <code>lambda</code> inside the for loop creates a closure that references the variable <code>m</code>, but <code>m</code>&#8217;s value has changed by the end of the for loop to &#8220;mi&#8221;, which is why it prints &#8220;mi, mi, mi&#8221;.  I&#8217;d prefer to link to the official Python documentation about this here rather than writing my own words that may be incorrect, but I can&#8217;t actually find anything in the official documentation that authoritatively defines this.  I can find a lot of blog posts warning about it&#8212;just Google for &#8220;<a href="http://www.google.com/search?q=python+for+while+if+scoping">Python for while if scoping</a>&#8221; to see a few&#8212;and I&#8217;ve perused the entire chapter on <a href="http://docs.python.org/reference/compound_stmts.html">Python&#8217;s compound statements</a>, but I just can&#8217;t find it.  Please let me know in the comments if you do find a link, in which case I&#8217;ll retract half this paragraph and stand corrected, and also a little shorter.</p>

<p>I stand by my assertion that Python&#8217;s <code>for</code>/<code>while</code>/<code>if</code> scoping is slightly surprising, and for some particular scenarios&#8212;like this&#8212;it can cause some problems that are very difficult to debug.  You may call me a dumbass for bringing assumptions about one language to another, and I will accept my dumbassery award.  I will happily admit that this semantics has advantages, such as being able to access the last value assigned in a <code>for</code> loop, or not requiring definitions of variables before executing an <code>if</code> statement that assigns to those variables and using it later in the same scope.  All language design decisions have advantages and disadvantages, and I respect Python&#8217;s choice here.  However, I&#8217;ve been using Python for a few years, consider myself to be at least a somewhat competent programmer, and only just found out about this behaviour.  I&#8217;m surprised 90% of my code actually works as intended given these semantics.  In my defence, this behaviour was not mentioned at all in the excellent Python tutorials, and, as mentioned above, I can&#8217;t a reference for it in the official Python documentation.  I&#8217;d expect that this behaviour is enough of a difference vs other languages to at least be mentioned.  You may disagree with me and regard this as a minor issue that only shows up when you do crazy foo like use <code>lambda</code> inside a <code>for</code> loop, in which case I&#8217;ll shrug my shoulders and go drink another beer.</p>

<p>I&#8217;d be interested to see if anyone can come up an equivalent for the &#8220;Closures and lexical closures&#8221; example at <a href="http://c2.com/cgi/wiki?ScopeAndClosures">http://c2.com/cgi/wiki?ScopeAndClosures</a>, given another Python scoping rule that assignment to a variable automatically makes it a local variable.  (Thus, the necessity for Python&#8217;s <code>global</code> keyword.)  I&#8217;m guessing that you can create the <code>createAdder</code> closure example there with Python&#8217;s lambdas, but my brain is pretty bugged out today so I can&#8217;t find an equivalent for it right now.  You can simply write a callable class to do that and instantiate an object, of course, which I do think is about 1000x clearer.  There&#8217;s no point using closures when the culture understands objects a ton better, and the resulting code is more maintainable.</p>

<p>Python summary: understand how scoping in <code>for</code>/<code>while</code>/<code>if</code> blocks work, otherwise you&#8217;ll run into problems that can cost you hours, and get skooled publicly on the Internet for all your comrades to laugh at.  Even with all the language design decisions that I consider weird, I still respect and like Python, and I feel that Guido&#8217;s answer to the stuff I was attempting would be &#8220;don&#8217;t do that&#8221;.  Writing a callable class in Python is far less tricky than using closures, because a billion times more people understand their semantics.  It&#8217;s always a design question of whether the extra trickiness is more maintainable or not.</p>

<h3>Retrospective: Blocks in C</h3>

<p>My C code with blocks failed for a completely different reason unrelated to the Python version, and this was a total beginner&#8217;s error with blocks, for which I&#8217;m slightly embarrassed.  The block was being stack-allocated, so upon exit of the <code>for</code> loop that assigns the function list, the pointers to the blocks are effectively invalid.  I was a little unlucky that the program didn&#8217;t crash.  The correct solution is to perform a <code>Block_copy</code>, in which case things work as expected.</p>

<h3>Retrospective: Closures</h3>

<p>Not all closures are the same; or, rather, closures are closures, but their semantics can differ from language to language due to many different language design decisions&#8212;such as how one chooses to define the lexical environment.  Wikipedia&#8217;s article on closures has an excellent section on <a href="http://en.wikipedia.org/wiki/Closure_(computer_science)#Differences_in_semantics">differences in closure semantics</a>.</p>

<h3>Retrospective: Mutability</h3>

<p>I stand by all my assertions about mutability.  This is where the Haskell tribe will nod their collective heads, and all the anti-Haskell tribes think I&#8217;m an idiot.  Look, I use a lot of languages, and I love and hate many things about each of them, Haskell included.  I fought against Haskell for years and hated it until I finally realised that one of its massive benefits is that <em>things bloody well work an unbelievable amount of the time once your code compiles</em>.  Don&#8217;t underestimate how much of a revelation this is, because that&#8217;s the point where the language&#8217;s beauty, elegance and crazy type system fade into the background and, for the first time, you see one gigantic <em>pragmatic</em> advantage of Haskell.</p>

<p>One of the things that Haskell does to achieve this is the severe restriction on making things immutable.  Apart from the lovely checkbox reason that you can write concurrent-safe algorithms with far less fear, I truly believe that this makes for generally more maintainable code.  You can read code and think once about what value a variable holds, rather than keep it in the back of your mind all the time.  The human mind is better at keeping track of multiple names, rather than a single name with different states.</p>

<p>The interaction of state and control flow is perhaps <em>the</em> most complex thing to reason about in programming&#8212;think concurrency, re-entrancy, disruptive control flow such as <code>longjmp</code>, exceptions, co-routines&#8212;and mutability complicates that by an order of magnitude.  The subtle difference in behaviour between all the languages discussed in the comments is exemplar that &#8220;well-understood&#8221; concepts such as lexical scoping, <code>for</code> loops and closures can produce a result that many people still don&#8217;t expect; at least for this simple example, these issues would have been avoided altogether if mutability was disallowed.  <em>Of course</em> mutability has its place.  I&#8217;m just advocating that we should restrict it where possible, and at least a smattering of other languages&#8212;and hopefully everyone who has to deal with thread-safe code&#8212;agrees with me.</p>

<h3>Closing</h3>

<p>I&#8217;d truly like to thank everyone who added their voice and spent the time to comment on this post.  It&#8217;s been highly enlightening, humbling, and has renewed my interest in discussing programming languages again after a long time away from it.  And hey, I&#8217;m blogging again.  (Though perhaps after this post, you may not think that two of those things are good things.)  It&#8217;s always nice when you learn something new, which I wouldn&#8217;t have if not for the excellent peer review.  <a href="http://xkcd.com/54/">Science: it works, bitches!</a></p>]]></content:encoded></item><item><title>The Projectionist</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2010-12-08T00:38:42-08:00</dc:date><link>http://algorithm.com.au/blog/files/9e11aa00c22b8d51b584f68e981ac71e-612.html#unique-entry-id-612</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9e11aa00c22b8d51b584f68e981ac71e-612.html#unique-entry-id-612</guid><content:encoded><![CDATA[<blockquote><p>There comes in the career of every motion picture that final occasion when all the artistry, all the earnest constructive endeavor of all the man-power and genius of the industry, and all the capital investment, too, must pour through the narrow gate of the projector on its way to the fulfilment of its purpose, the final delivery to the public.</p>

<p>The delivery is a constant miracle of men and mechanism in the projection rooms of the world&#8217;s fifty thousand theatres.  That narrow ribbon, thirty-five millimetres, flowing at twenty-four frames a second through the scintillating blaze of the spot at the picture aperture and coursing by at an exactingly-precise 90 feet a minute past the light slit of the sound system, demands a quality of skill and faithful, unfailing attention upon which the whole great industry depends.</p>

<p>The projector lens is the neck in the bottle through which all must pass.  The projectionist presiding over that mechanism is responsible for the ultimate performance upon which we must all depend.</p>

<p>The projector must not fail, and more importantly still, the man must not fail or permit it to waiver in its performance.  It is to the tremendous credit of the skill of the modern projectionist that perfect presentation of the motion picture upon the screen is today a commonplace, a perfection that is taken as a matter of course.</p></blockquote>

<p>Adolph Zukor, Chairman of Paramount Pictures, 1935.  It still applies as much today as it did back then.</p>]]></content:encoded></item><item><title>It Gets Better</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2010-11-23T14:00:01-08:00</dc:date><link>http://algorithm.com.au/blog/files/it-gets-better-pixar.html#unique-entry-id-611</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/it-gets-better-pixar.html#unique-entry-id-611</guid><content:encoded><![CDATA[<p>Pixar&#8217;s latest short film.  I&#8217;m so proud and honoured to be working with such an amazing group of people.</p>

<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/4a4MR8oI_B8?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/4a4MR8oI_B8?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>]]></content:encoded></item><item><title>Learning Photography with the Panasonic GF1</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><category>Photography</category><dc:date>2010-11-21T22:13:48-08:00</dc:date><link>http://algorithm.com.au/blog/files/gf1.html#unique-entry-id-610</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/gf1.html#unique-entry-id-610</guid><content:encoded><![CDATA[<p>Thanks to several evil friends of mine, I started to take an interest in photography at the end of last year.  I&#8217;ve always wanted to have a &#8220;real&#8221; camera instead of a point and shoot, so at the start of 2010, I bit the bullet and bought myself a <a href="http://www.amazon.com/Panasonic-DMC-GF1-Four-Thirds-Interchangeable-Aspherical/dp/B002MUAEX4/ref=sr_1_1?ie=UTF8&amp;qid=1290394343&amp;sr=8-1">Panasonic Lumix <span class="caps">DMC</span>-GF1</a>, usually just called The <span class="caps">GF1 </span>amongst the camera geeks.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/panasonic-gf1-la20-800.jpg" width="480" height="347" /><p>I tossed up between the <span class="caps">GF1 </span>and the then-just-released <a href="http://www.amazon.com/Canon-T2i-3-0-Inch-18-135mm-Standard/dp/B003MAKXMA/ref=sr_1_3?s=electronics&amp;ie=UTF8&amp;qid=1290394358&amp;sr=1-3">Canon <span class="caps">EOS</span> 550D</a> (a.k.a. the Rebel T2i in the <span class="caps">USA</span>) for a long time.  I figured that getting a compact camera would make me tote it around a lot more, and after ten months of using it, I think I was right.  I recently went to a wedding in Sydney, and I literally kept the camera in my suit pocket instead of having to lug it around strapped to my body or neck.  I definitely wouldn&#8217;t be able to do that with a Canon or Nikon <span class="caps">DSLR. </span> The camera&#8217;s so small with the kit 20mm <em>f</em>/1.7 lens that I stopped using the UV filter with it, because I didn&#8217;t like the 2-3mm that the filter added to the camera depth.  Here&#8217;s a size comparison of the Nikon <span class="caps">D3000 </span>vs the <span class="caps">GF1.</span></p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/gf1vsd3000v2-001.jpg" width="480" height="284" /><span style="font:10px Monaco; "><br /></span><span style="font:10px Monaco; "><br /></span><p>(Image stolen from dpreview.com&#8217;s review.)</p>

<p>I won&#8217;t write up a comprehensive review of the <span class="caps">GF1 </span>here; other sites have done that, in much more depth than I can be bothered to go into.  If you&#8217;re after a good review, the three articles that swayed me to the <span class="caps">GF1 </span>in the end were <a href="http://www.dpreview.com/reviews/panasonicgf1/">DPreview&#8217;s review</a>, and <a href="http://craigmod.com/journal/gf1-fieldtest/">Craig Mod&#8217;s <span class="caps">GF1 </span>photo field test article</a> and <a href="http://craigmod.com/journal/gf1-fieldtest-video/">video tests</a>.  What follows is my own impressions and experiences of using the camera.  The one-sentence summary: the <span class="caps">GF1 </span>perfect for a <span class="caps">DSLR </span>newbie like me, the micro four-thirds lens system it uses looks like it has enough legs that your lens investments will be good for the future, and learning photography with the <span class="caps">GF1 </span>is great and deserves a Unicode snowman: ☃.</p>

<p>The reason you want the camera is to use the 20mm <em>f</em>/1.7 lens.  For the non-photography geeks, that means that it&#8217;s not a zoom lens, i.e. you can&#8217;t zoom in and out with it, and the <em>f</em>/1.7 means that it can take pretty good shots in low light without a flash.  All the reviews of it are right: that lens is what makes the camera so fantastic.  Do not even bother with 14-45mm kit lens.  The 20mm lens is fast enough that you can shoot with it at night, and the focal length&#8217;s versatile enough to take both close-up/portrait shots (whee food porn), and swing out a bit wider for landscape photos or group photos.  It&#8217;s no wide-angle nor zoom and it&#8217;s not a super-fast <em>f</em>/1.4, but it&#8217;s versatile enough and so tiny that you will end up using it almost all the time.  It feels weird to get a <span class="caps">DSLR </span>and only have one lens for it, but the pancake 20mm lens is so damn good that it&#8217;s all you really need.  The only thing it really can&#8217;t do at all is go super-zoomalicious, for wildlife/distance shots.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/apanale205152951.jpg" width="300" height="300" /><p>The 20mm non-zoom (a.k.a. &#8220;prime&#8221;) lens has another advantage: it teaches you to compose.  Despite all the technology and all the geek speak, photography is ultimately about your composition skills.  Prime lenses force you to move around to find the perfect framing for the shot you&#8217;re trying to do; I think learning with a prime lens moves your composition skills along much faster than it would if you were using a standard zoom lens.  If you&#8217;re a photography beginner, like me, shoot with a prime.  It&#8217;s a totally different experience than shooting with a zoom, and you learn a lot more.  Plus, primes are cheap: the <a href="http://www.amazon.com/Canon-50mm-1-8-Camera-Lens/dp/B00007E7JU/ref=sr_1_1?ie=UTF8&amp;qid=1290392860&amp;sr=8-1">Canon 50mm <em>f</em>/1.8</a> is <span class="caps">USD</span>$100, and Canon&#8217;s near top-of-the-line <a href="http://www.amazon.com/Canon-Standard-Medium-Telephoto-Cameras/dp/B00009XVCZ/ref=sr_1_1?ie=UTF8&amp;qid=1290392857&amp;sr=8-1">50mm <em>f</em>/1.4</a> is <span class="caps">USD</span>$350.  The <a href="http://www.amazon.com/Canon-35mm-Wide-Angle-Cameras/dp/B00009XVCU/ref=sr_1_4?ie=UTF8&amp;qid=1290392867&amp;sr=8-4">Canon 35mm <em>f</em>/2</a>, for something that&#8217;s similar in focal length to the Panasonic 20mm prime, is <span class="caps">USD</span>$300.  (You need to multiply the 20mm by 2 to convert between micro four-thirds and 35mm framing, so the actual focal length of the 20mm in traditional camera speak is 20mm*2=40mm.)</p>

<p>After playing it for a few months, you realise that the <span class="caps">GF1 </span>is a <em>fun</em> camera to use.  The combination of the 20mm prime lens, the super-fast focus, the size, and the great UI design just <em>begs</em> you to take pictures with it.  You <em>feel</em> like you&#8217;re wielding a real camera rather than a toy: one that wants you to shoot with it.  It&#8217;s not imposing like a bigger <span class="caps">DSLR </span>so it doesn&#8217;t feel like the camera is with you all the time, but it&#8217;s not so small that you feel like you&#8217;re just snipping super-casually with something that&#8217;s cheap.  And did I mention the excellent UI?  It&#8217;s excellent.  The better controls are a good reason to get the <span class="caps">GF1 </span>over its rivals, the Olympus EP series.</p>

<p>One big bonus: I&#8217;ve found that the full-auto mode (&#8220;iAuto&#8221; as Panasonic brands it) <em>very</em> rarely gets stuff wrong.  This is useful if you hand the camera over to someone else who doesn&#8217;t know how to use <span class="caps">DSLR</span>s so that they can take a picture of you&hellip; or, like me, if you just don&#8217;t know quite what aperture/shutter speeds to use for the particular shot you&#8217;re taking.  The full-auto just adds to the joy of using it.  I usually shoot in full-auto or aperture priority mode, but honestly, I could probably shoot on full-auto mode all the time.  I can&#8217;t recall a single occasion where it didn&#8217;t guess <em>f</em>/1.7 or a landscape correctly.</p>

<p>Do follow DPreview and Craig Mod&#8217;s advice and shoot <span class="caps">RAW, </span>not <span class="caps">JPEG. </span> Honestly, I&#8217;d prefer to shoot <span class="caps">JPEG </span>if I could, but <span class="caps">RAW </span>lets you turn some bad shots into good shots.  I use it because gives you a second chance, not because I want to maximise picture quality.  Here&#8217;s one photo that was accidentally taken with the wrong settings: I had the camera on full-manual mode, and didn&#8217;t realise that the shutter speed and <span class="caps">ISO </span>settings were totally incorrect.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/screen-shot-2010-11-16-at-10.08.56-pm.png" width="398" height="640" /><p>However, since I shot it in <span class="caps">RAW,</span> I could lift up the exposure up two stops, pulled up the shadows and pulled down the highlights, and here&#8217;s the result:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/screen-shot-2010-11-16-at-10.08.44-pm.png" width="396" height="640" /><p>Seriously, that&#8217;s just frickin&#8217; amazing.  Sure, that photo might not be super-awesome: it&#8217;s a little grainy, and it looks a bit post-processed if you squint right, but it&#8217;s still a photo of a precious memory that I wouldn&#8217;t have otherwise had, and you know what?  That photo&#8217;s just <em>fine</em>.  If I shot <span class="caps">JPEG,</span> I would&#8217;ve had no choice but to throw it away.  <span class="caps">RAW&#8217;</span>s a small pain in the arse since the file sizes are far bigger and you need to wait a long time for your computer to do the <span class="caps">RAW </span>processing if you&#8217;ve taken hundreds of photos, but boy, it&#8217;s worth it.</p>

<p>I did finally buy a wide-angle lens for the <span class="caps">GF1</span>&#8212;the <a href="http://www.amazon.com/Olympus-ED-9-18mm-Panasonic-Interchangeable/dp/B0035LBRM6/ref=sr_1_2?s=electronics&amp;ie=UTF8&amp;qid=1290393299&amp;sr=1-2">Olympus 9-18mm <em>f</em>/4-5.6</a>&#8212;and have been using it a lot for landscape shots.  I bought the Olympus 9-18mm over the <a href="http://www.amazon.com/Panasonic-7-14mm-Micro-Four-Thirds/dp/B0028Y5GKK/ref=sr_1_1?s=electronics&amp;ie=UTF8&amp;qid=1290393368&amp;sr=1-1">Panasonic 7-14 <em>f</em>/4.0</a> because it was cheaper, and also smaller.  I figured that if I was getting a <span class="caps">GF1, </span>it was because I wanted something compact, so I wanted to keep the lenses as small as possible.  (Otherwise, if you don&#8217;t care about size, then a full-blown Canon or Nikon <span class="caps">DSLR </span>would probably serve you much better.)  I&#8217;ve always wanted a wide-angle lens from the first day that I asked &#8220;how do those real estate agents make those rooms look so bloody large?&#8221;, so now I have one, woohoo.  The next lens on my shopping will probably be the <a href="http://www.amazon.com/gp/product/B001ISKNKA/ref=ord_cart_shr?ie=UTF8&amp;m=ATVPDKIKX0DER">Panasonic 45-200mm</a>.  (Never mind the quality, feel the price!)  Here&#8217;s a shot taken with the Olympus 9-18mm; click through to see the original picture on Flickr.</p><a href="http://www.flickr.com/photos/andrepang/5184066974/sizes/l/in/set-72157625407002566/" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/5184066974_c47f169921_z.jpg" width="480" height="321" /></a><p>The main thing that I wish for in a future version of the camera would be image stabilisation.  Panasonic follow the Canon path and put image stabilisation in the lens, rather than in the body.  I think Olympus made the right decision by putting image stabilisation in the body for their compact <span class="caps">DSLR</span>s; you can keep the lenses smaller that way, and you then get image stabilisation with all your lenses instead of the ones that only support it explicitly, e.g. the 20mm <em>f</em>/1.7 prime doesn&#8217;t have image stabilision, boo.  In-body image stabilisation just seems more in-line with the size reduction goal for micro four-thirds cameras.  I&#8217;d love to get my hands on an Olympus EP for a week and shoot with the 20mm to see if image stabilisation makes a difference when it&#8217;s dark and the environment is starting to challenge the <em>f</em>/1.7 speeds.</p>

<p>The only other thing I wish for would be a better sensor.  The <span class="caps">GF1&#8217;</span>s great up to <span class="caps">ISO</span> 800: at <span class="caps">ISO</span> 1600+, it starts getting grainy.  1600 is acceptable, and you can do wondrous things with the modern noise reduction algorithms that are in Lightroom if you really need to save a shot.  Shoot at <span class="caps">ISO</span> 3200+ though, and it&#8217;s just too grainy.  This is the main advantage that more traditional <span class="caps">DSLR</span>s have: their larger sensors are simply better than the <span class="caps">GF1&#8217;</span>s.  I&#8217;ve seen shots taken with a Nikon <span class="caps">D50 </span>at <span class="caps">ISO</span> 6400 in the dark because a slower <em>f</em>/4 lens was being used, and bam, the shot comes out fine.  Don&#8217;t even try to compare this thing to a Canon 5D Mk <span class="caps">II. </span> The <span class="caps">GF1 </span>just can&#8217;t do high <span class="caps">ISO. </span> Here&#8217;s an <span class="caps">ISO</span> 3200 shot, which is just starting to get a little too grainy.  It&#8217;s fine for Facebook-sized images, but if you click through to the original, you&#8217;ll see it&#8217;s noisy.</p><a href="http://www.flickr.com/photos/andrepang/4272427230/sizes/l/in/set-72157623076226769/" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/4272427230_c249fcdf92_z.jpg" width="480" height="321" /></a><p>But y&#8217;know, despite the two nitpicks above, the <span class="caps">GF1 </span>is a fine camera, and the 20mm <em>f</em>/1.7 lens is an amazing do-it-all lens that&#8217;s absolutely perfect to learn with.  There&#8217;s really nothing else out there like it except for the Olympus EP range (the <a href="http://www.amazon.com/Olympus-Interchangeable-Lens-14-42mm-Silver/dp/B002CGSYKS/ref=sr_1_1?ie=UTF8&amp;qid=1290406838&amp;sr=8-1">EP-1</a>, <a href="http://www.amazon.com/Olympus-Interchangeable-Digital-14-42mm-Electronic/dp/B002UXRG8Y/ref=sr_1_1?ie=UTF8&amp;qid=1290406841&amp;sr=8-1">EP-2</a> and <a href="http://www.amazon.com/Olympus-Interchangeable-Digital-14-42mm-Black/dp/B0035LBRJO/ref=sr_1_1?ie=UTF8&amp;qid=1290406844&amp;sr=8-1"><span class="caps">EPL</span>-1</a>), which you should definitely consider, but get it with the 20mm <em>f</em>/1.7 lens if you do.  I&#8217;ve had a total blast learning photography with the <span class="caps">GF1, </span>and I&#8217;ve captured hundreds of memories in the past year that made the investment completely worthwhile.  I don&#8217;t think I&#8217;m at the point yet where I feel like I need another camera yet, but it feels good knowing that the micro four-thirds format will be around for a while so that I can use my existing lenses with future cameras I buy.  If you&#8217;re interested in learning photography, the <span class="caps">GF1 </span>is a fantastic starting point.</p>

<p><strong>Update</strong>: Thom Hogan did a <a href="http://www.bythom.com/compactmirrorless.htm">comparison</a> between the most popular mirrorless cameras: the Olympus E-PL1, the Panasonic <span class="caps">GF1,</span> Samsung <span class="caps">NX100, </span>and Sony <span class="caps">NEX</span>-5.  It&#8217;s written for people who know photography rather than for novices, but basically, the <span class="caps">GF1 </span>came out on top, with the E-PL1 being recommended if you can live with the worse screen and the far worse <span class="caps">UI. </span> That&#8217;s pretty much exactly my opinion, too.</p>]]></content:encoded></item><item><title>A Call For A Filesystem Abstraction Layer</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><category>Linux</category><category>Windows</category><category>&#x2026;on Software</category><dc:date>2010-10-24T15:53:11-07:00</dc:date><link>http://algorithm.com.au/blog/files/filesystem-abstraction.html#unique-entry-id-609</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/filesystem-abstraction.html#unique-entry-id-609</guid><content:encoded><![CDATA[<p>Filesystems are fundamental things for computer systems: after all, you need to store your data somewhere, somehow.  Modern operating systems largely use the same concepts for filesystems: a file&#8217;s just a bucket that holds some bytes, and files are organised into directories, which can be hierarchical.  Some fancier filesystems keep track of file versions and have record-based I/O, and many filesystems now have multiple streams and extended attributes.  However, filesystem organisation ideas have stayed largely the same over the past few decades.</p>

<p>I&#8217;d argue that the most important stuff on your machine is your data.  There are designated places to put this data.  On Windows, all the most important stuff on my computer should really live in <code>C:\Documents and Settings\Andre Pang\My Documents</code>.  In practice, because of lax permissions, almost everyone I know <em>doesn&#8217;t</em> store their documents there: they splatter it over a bunch of random directories hanging off <code>C:\</code>, resulting in a giant lovely mess of directories where some are owned by applications and the system, and some are owned by the user.</p>

<p>Mac OS X is better, but only because I have discipline: <code>/Users/andrep</code> is where I put my stuff.  However, I&#8217;ve seen plenty of Mac users have data and personal folders hanging off their root directory.  I&#8217;m pretty sure that my parents have no idea that <code>/Users/your-name-here</code> is where you are <em>meant</em> to put your stuff, and to this day, I&#8217;m not quite sure where my dad keeps all his important documents on his Mac.  I hope it&#8217;s in <code>~/Documents</code>, but if not, can I blame him?  (UNIX only gets this right because it enforces permissions on you.  Try saving to <code>/</code> and it won&#8217;t work.  If you argue that this is a good thing, you&#8217;re missing the point of this entire article.)</p>

<p>One OS that actually got this pretty much correct was classic Mac OS: <em>all</em> system stuff went into the System folder (which all the Cool Kids named &#8220;System &fnof;&#8221;, of course).  The entire system essentials were contained in just two files: System, and Finder, and you could even copy those files to any floppy disk and make a bootable disk (wow, imagine that).  The entire rest of the filesystem was yours: with the exception of the System folder, you organised the file system as you pleased, rather than the filesystem enforcing a hierarchy on you.  The stark difference in filesystem organisation between classic Mac OS and Mac OS X is largely due to a user-centric approach for Mac OS from the ground-up, whereas Mac OS X had to carry all its UNIX weight with it, so it had to compromise and use a more traditionally organised computer filesystem.</p>

<p>As an example, in Mac OS X, if you want to delete Photoshop&#8217;s preferences, you delete the <code>~/Library/Preferences/com.adobe.Photoshop.plist</code> file.  Or; maybe you should call it the Biblioth&egrave;que folder in France (because that&#8217;s what it&#8217;s displayed as in the Finder if you switch to French)&#8230; and why isn&#8217;t the Preferences folder name localised too, and what mere mortal is going to understand why it&#8217;s called com.adobe.Photoshop.plist?  On a technical level, I completely understand why the Photoshop preferences file is in the <code>~/Library/Preferences/</code> directory.  But at a user experience level, this is a giant step backwards from Mac OS, where you simply went to the System folder and you trashed the Adobe Photoshop Preferences file there.  How is this progress?</p>

<p>I think the fundamental problem is that Windows Explorer, Finder, Nautilus and all the other file managers in the world are designed, by definition, to browse the filesystem.  However, what we really want is an abstraction level for users that hides the filesystem from them, and only shows them relevant material, organised in a way that&#8217;s sensible for them.  The main &#8220;file managers&#8221; on desktop OSs (Finder and Windows Explorer) should be operating at an abstraction level above the filesystem.  The operating system should figure out where to put files on a technical (i.e. filesystem) level, but the filesystem hierarchy should be completely abstracted so that a user doesn&#8217;t even realise their stuff is going into <code>/Users/joebloggs</code>.</p>

<p>iTunes and iPhoto are an example of what I&#8217;m advocating, because they deal with all the file management for you.  You don&#8217;t need to worry where your music is or how your photos are organised on the filesystem: you just know about songs and photos.  There&#8217;s no reason why this can&#8217;t work for other types of documents too, and there&#8217;s no reason why such an abstracted view of the filesystem can&#8217;t work on a systemwide basis.  It&#8217;s time for the operating system to completely abstract out the filesystem from the user experience, and to turn our main interaction with our documents&#8212;i.e. the Finder, Windows Explorer et al&#8212;into something that abstracts away the geek details to a sensible view of the documents that are important to us.</p>

<p>One modern operating system has already done this: iOS.  iOS is remarkable for being an OS that I often forget is a full-fledged UNIX at its heart.  In the iOS user experience, the notion of files is completely gone: the only filenames you ever see are usually email attachments.  You think about things as photos, notes, voice memos, mail, and media; not files.  I&#8217;d argue that this is a huge reason that users find an iPhone and iPad much more <em>simple</em> than a &#8220;real&#8221; computer: the OS organises the files for them, so they don&#8217;t have to think that a computer deals with files.  A computer deal with photos and music instead.</p>

<p>There are problems with the iOS approach: the enforced sandboxing per app means that you can&#8217;t share files between apps, which is one of the most powerful (and useful) aspects of desktop operating systems.  This is a surmountable goal, though, and I don&#8217;t think it&#8217;d be a difficult task to store documents that can be shared between apps.  After all, it&#8217;s what desktop OSs do today: the main challenge is in presenting a view of the files that are sensible for the user.  I don&#8217;t think we can&#8212;nor should&#8212;banish files, since we still need to serialise all of a document&#8217;s data into a form that&#8217;s easily transportable.  However, a file manager should be metadata-centric and display document titles, keywords, and tags rather than filenames.  For many documents, you can derive a filename from its metadata that you can then use to transport the file around.</p>

<p>We&#8217;ve tried making the filesystem more amenable to a better user experience by adding features such as extended attributes (think Mac OS type/creator information), and querying and indexing features, ala BFS.  However, with the additional complexity of issues such as display names (i.e. localisation), requiring  directory hierarchies that should remain invisible to users, and the simple but massive baggage of supporting traditional filesystem structures (<code>/bin/</code> and <code>/lib/</code> aren&#8217;t going away anytime soon, and make good technical sense), I don&#8217;t think we can shoehorn a filesystem browser anymore into something that&#8217;s friendly for users.  We need a filesystem abstraction layer that&#8217;s system-wide.  iOS has proven that it can be done.  With Apple&#8217;s relentless progress march and willingness to change system APIs, Linux&#8217;s innovation in the filesystem arena and experimentation with the desktop computing metaphor, and Microsoft&#8217;s ambitious plans for Windows 8, maybe we can achieve this sometime in the next decade.</p>]]></content:encoded></item><item><title>DevWorld 2010 Keynote Aftermath</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2010-09-29T01:02:46-07:00</dc:date><link>http://algorithm.com.au/blog/files/3014b4866289a6b891525465154b547e-608.html#unique-entry-id-608</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3014b4866289a6b891525465154b547e-608.html#unique-entry-id-608</guid><content:encoded><![CDATA[<p>As GLaDOS would say, It&#8217;s been a long time.  How have you been?</p>

<p>I was invited a few weeks ago to keynote at <a href="http://www.auc.edu.au/DevWorld+2010">/dev/world 2010</a>, a conference for Mac developers in Australia.  It was my first-ever keynote, and you know, inspirational talks turn out to be kinda harder to give than technical talks.  For those who didn&#8217;t attend, the talk intended to address the two most frequent questions I get asked about Pixar (&#8220;how did you get there?&#8221; and &#8220;what do you, uhh, actually do?&#8221;), and provide some insight into Pixar&#8217;s culture.</p>

<p>Two videos that I referred to in the talk and I think are an absolute must-see&#8212;whether you&#8217;re an engineer, <span class="caps">CEO, </span>manager, designer, artist or otherwise&#8212;are</p>


<ul>
<li>Ed Catmull&#8217;s talk at Stanford Business School: <a href="http://www.youtube.com/watch?v=k2h2lvhzMDc">Keep Your Crises Small</a> (~40 minutes, minus question time)</li>
<li>Randy Nelson&#8217;s <a href="http://www.youtube.com/watch?v=QhXJe8ANws8">Learning and Working in the Collaborative Age</a> (~10 minutes)</li>
</ul>



<p>They complement Steve Jobs&#8217;s amazing <a href="http://www.youtube.com/watch?v=Hd_ptbiPoXM">commencement speech at Stanford in 2005</a>.  The number of insightful, genuine sound bites you can take away from those three talks are off the charts.</p>

<p>For all those who attended my keynote, I hope it was worthwhile.  Thank you to everyone in the audience for giving me such a warm reception and for making me feel back at home, and thank you to the <span class="caps">AUC </span>for putting on a great conference.</p>

<p>Also, new website look, oooooo.  It almost looks like it was made after 2000.  Hopefully this will mean more regular updates on my blog than once per decade.  I guess we&#8217;ll find out!</p>]]></content:encoded></item><item><title>Six Months in San Francisco</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2009-09-26T00:17:18-07:00</dc:date><link>http://algorithm.com.au/blog/files/six-months-in-sf.html#unique-entry-id-607</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/six-months-in-sf.html#unique-entry-id-607</guid><content:encoded><![CDATA[<p>I feel like there&#8217;s been four stages to my life.  The first stage was being a youngling at primary school: I don&#8217;t remember much from there except that I fantasised about handball being an olympic sport.  The second stage was the PC demoscene, where I grew interested in many things that I love today about computing: art, music, and my first experience with a community and culture that you could love and immerse yourself in.  The third stage was my twenties: an introduction to university, Linux, coding, the Mac, Haskell, research conferences, industry conferences, the working life, and balancing it all with healthy doses of relaxation, food and the beautiful world that Sydney had to offer.  The fourth stage was tearing myself away from that fairly sheltered life and my emotional base, and moving to San Francisco.</p>

<p>I&#8217;ve been here for six months.  It&#8217;s felt like two years.  It has been a truly wonderful experience: making new friends, learning a new culture that&#8217;s both significantly but subtly different, and doing it all without my family nearby, who&#8217;ve been my anchor and support for the past three decades.  Part of the motivation was proving to myself that I could make it on my own: prove myself worthy in the eyes of my peers, be social enough to make genuine friends here who I cared about and who cared about me, living on my own and simply paying the rent.  Part of the motivation was to shake things up from a cruisy life in Sydney and experience new things.  I&#8217;m glad to report that the experiment&#8217;s going pretty well so far.</p>

<p>San Francisco is a city of immense contrast.  For every stupid hipster who thinks that owning a Prius absolves them of their environmental debt to society, there are remarkable individuals who understand and challenge the daunting realism of politics, lobbying, energy, <a href="http://olivedrab.id.au/blog/files/1fec090842ae2dbaeb3a20a07fcd0c98-5.html">transformity</a> and limits to growth.  For every poser upstart get-rich-quick guy chasing after VC funding for Facebook apps, there are the quiet anonymous developers at Apple, Google, and startups you&#8217;ve never heard of who work on all the amazing technologies that the entire world takes for granted today.  The Tenderloin, so unpleasant to walk through, has some of the very best restaurants and bars that the city has to offer.  The nouveau shiny high-rises of South Beach contrast with the destitute run-down feel of western SoMa, only a few blocks away.</p>

<p>It&#8217;s a make-or-break city: rents are insanely high despite the rent control laws, and there&#8217;s no lower-middle class population here because either you&#8217;re flying high, or you&#8217;re not flying at all.  It&#8217;s natural selection in action: either you keep up with the pack and continue being successful, or you fall and become left behind.  And so, in contrast to the relaxed lifestyle of Sydney, San Francisco is full of ambition.  While it lacks the non-stop pace of New York or the late-night industry of Detroit and Chicago, the people here want to change the world, and they have the innovation, the smarts and the determination to do so.</p>

<p>The tech industry here is simply amazing.  Despite being here for half a year, I&#8217;m still floored when I go to a party and <em>every</em> person I meet there ends up being a Web designer, or a coder, or a sysadmin, or a <span class="caps">DBA, </span>or a network engineer, or a manager of a bunch of coders, or a VC funding a tech company, or a lawyer or accountant or marketing or PR person working for a tech company, or a level designer or artist working for a games company.  Even the girls.  It boggles me.  It&#8217;s like the entire Bay Area simply exists to build software and iPhones and tech solutions.  I was truly daunted in the first few months to find out that everyone around me was, well, just like me.  A few months ago, I was at my <a href="http://samovarlife.com/locations/">favourite little tea shop in San Francisco</a> decompressing and minding my own business, when three people sat down next to me and started talking about <span class="caps">VGA BIOS </span>exploits.  (Turns out that they work for VMware.)  I mean, seriously?</p>

<p>I wouldn&#8217;t say that I&#8217;m totally acclimated to the Bay Area yet, and perhaps I never will be.  Visiting Australia just a month ago reminded me just how different the two cities are in their lifestyles.  People are always <em>doing something</em> in San Francisco: there&#8217;s so many interesting people there that you feel like need to divide your time between groups, let alone having time to yourself.  Even the serious introverts there are out on most schoolnights.  The people here are always switched on; even at a party, there&#8217;s an air of networking going on and the feeling of opportunities to be seized.  You almost always end up talking shop at any event, because people here are defined by what they <em>do</em>: one of the very first questions you&#8217;re usually asked is &#8220;Where do you work?&#8221; or &#8220;What do you do for a living?&#8221;.  In Sydney, asking that question so soon would just be a little bit weird.  You usually save that for far later in the conversation, when you&#8217;re running out of things to say to the pretty girl to try to hook up with her.  (And don&#8217;t even get me started about the American <a href="http://loveengineer.com/?p=21">dating scene</a>.)</p>

<p>And so, for all the wonderful parks, bars, tacos, restaurants, pirate shops and museums of the city; the incredible beauty and varied terrain of the North Bay; the charm and chilled suburbia of North Berkeley in the East; and the innovation and serenity of Silicon Valley just south, I still miss Sydney and the culture I grew up with for twenty years.  I don&#8217;t mean that in a yearning way or mean to imply that San Francisco is somehow inadequate, because it rocks: I&#8217;m having a wonderful time experiencing new things, and it was the right decision to move here.  This is where I should be at this stage in my life.  Sydney will always be where my heart is, but right now, San Francisco is home, and it&#8217;s as fantastic as I hoped it would be.</p>]]></content:encoded></item><item><title>Objective-C Internals</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><category>Mac OS X</category><category>&#x2026;on Coding</category><dc:date>2009-02-18T21:31:49-08:00</dc:date><link>http://algorithm.com.au/blog/files/objective-c-internals.html#unique-entry-id-606</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/objective-c-internals.html#unique-entry-id-606</guid><content:encoded><![CDATA[<a href="http://algorithm.com.au/blog/downloads/talks/objective-c-internals/objective-c-internals.pdf" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/objective-c-internals-first-slide.jpg" width="480" height="359" /></a><br /><p>Just before I left Sydney, I gave one last talk at the revived <a href="http://groups.google.com/group/sydney-cocoaheads">Sydney Cocoaheads</a> user group about <a href="/downloads/talks/objective-c-internals/objective-c-internals.pdf">Objective-C Internals</a>.  It&#8217;s similar to the presentation that I gave at <a href="http://groups.google.com/group/fp-syd">fp-syd</a> a few months ago about <a href="/downloads/talks/mac-os-x-linguistics/mac-os-x-linguistics.pdf">Objective-C and Mac OS X programming</a>, but was tailored for a Mac audience rather than a functional programming audience.  As a result, the Cocoaheads talk has a lot more detail on the object model, memory layout, and how message-sending works, and less info on higher-order messaging and language features (e.g. I didn&#8217;t talk about categories at all.)</p>

<p>If you&#8217;re a Mac coder, hopefully you&#8217;ll find something new in there.  As always, drop me an email if you have any questions!</p>

<p>P.S. For all the voyeurs out there, the San Francisco move &amp; Pixar are both going great!  More news on that soon, too.</p>]]></content:encoded></item><item><title>Change</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2009-02-06T08:59:27-08:00</dc:date><link>http://algorithm.com.au/blog/files/change.html#unique-entry-id-605</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/change.html#unique-entry-id-605</guid><content:encoded><![CDATA[<p>I think my current plan of being <a href="http://sigil.com.au/">self-employed</a> is arguably working out pretty well. I get to work on <a href="http://www.realmacsoftware.com/">RapidWeaver and LittleSnapper</a>, two kick-ass products with a ton of users who love it. I&rsquo;m friends with the lovely baristas and staff at my local caf&eacute;, where I normally work during the day. However, nothing beats taking a weekday off to chill out at my <a href="http://www.triocafe.com.au/">favourite caf&eacute; in Sydney</a>, perhaps catching some waves at Bondi Beach and then playing some tennis afterwards, only to put my head down and code at night when the distractions are minimal. Life, as they say, is pretty peachy.</p>

<p>So, just before my 30th birthday, it was with both great apprehension and excitement that I made the decision to give up my current lifestyle and my current job. In five days, I move from the comfort of Sydney to magnificent San Francisco, to start work for a company that I&rsquo;ve loved so much ever since I was a kid: Pixar.</p>

<p>To say that this was not where I expected to be in my life is quite an understatement.  I was always the guy who thought that things would fall into place if he found the right girl, and that career would work itself out later.  I fell in love hard when I was 21, was about <em>this</em> close to deciding to get married when I was 26, and when things went south, it took countless numbers of D&amp;M talks with my close friends (thank you thank you thank you), another wonderful relationship with one of the most amazing people I know, and over three years to truly recover. I spent weeks in self-reflection pondering what life was about, what the day-to-day drudgery meant, and what I had accomplished during my second decade on Earth while so many of my friends were growing by leaps and bounds in their own relationships.</p>

<p>Meanwhile, my career was working out just fine. I worked on one project that will hopefully have the success it deserves with the release of <a href="http://mozillalinks.org/wp/2008/07/native-ogg-vorbis-and-theora-support-added-for-firefox-31/">Firefox 3.1</a> and perhaps take the lead in the important area of open-standards video on the Web. I&rsquo;ve worked on other projects that are all tremendous successes in their respective markets, and along the way, I made a ton of genuine friends in the <a href="http://en.wikipedia.org/wiki/Demoscene">demoscene</a>, Haskell, Linux and Mac OS X communities. Nonetheless, I still felt that I failed to meet my own expectations, since I&rsquo;d never considered my career to be a measure of success. Despite the fantastic lifestyle that working remotely for Realmac afforded me, I was still restless, and still felt incomplete in my personal life.</p>

<p>Last year, I travelled a lot, not as a means of escapism, but because I had a ton of conferences to hit, and also wanted to visit some of my best friends who were now overseas. As I hopped from the UK to the USA to Singapore, I spent a lot of time alone, as travel does to you, and reflected on life. One day, I spent eight hours by myself in my <a href="http://www.samovartea.com/">favourite tea lounge in San Francisco</a>, mixing feelings about the past decade and all its ups and downs: perhaps my expectations were too high, or perhaps I concentrated too much on things that would simply work themselves out. By the time I returned to Australia&rsquo;s beautiful shores in December, I was exhausted from too much reflection, too much living out of a duffel bag on the road for months, and too much melancholy from thinking about the past and too much searching without answers.</p>

<p>However, something else happened in those months of travel: all of those worries slowly felt more and more like <em>experience</em>. I figured that, hey, my third decade was looming; either I start my thirties by continuing to be subtly haunted by those worries of the past decade, or I could treat those worries as learning experiences and forge a new outlook that relished any challenges the future could bring. As Steve Jobs says, &ldquo;<a href="http://www.youtube.com/watch?v=D1R-jKKp3NA">sometimes life hits you in the head with a brick. Don&rsquo;t lose faith</a>.&rdquo; And so, just as I started to feel happy when I finally returned home, Pixar came knocking. I flew to San Francisco just a few days after arriving back in Sydney from months of travel; it would be my last trip for 2008. I did the interview thing, and a week later when I was back again in Sydney to wind down for Christmas, I got The Phone Call. When would I be able to move to San Francisco to start work there?</p>

<p>I thought hard about my current lifestyle of caf&eacute;s and working remotely, and how I loved working at a small company like Realmac where I was directly responsible for the welfare of a much-loved application. I anguished over all the friends I had made in Australia and how much I&rsquo;d miss them, and how much I&rsquo;d miss my family. I thought about how I made my life here: how I went to school here, University here, met all my lovers here, and how this was, well, home. In the end, though, how could I turn down the opportunity of a lifetime, working at a company that married art and science so perfectly, and inspires so much love &amp; passion in everyone? (Also, I hear there&rsquo;s a lot of hot Asian-American girls in San Francisco.)</p>

<p>There&rsquo;s no moral to this story: it just is, and I thought it needed telling while I still had the guts to tell it. So, as of next Wednesday, I leave my wonderful memories here to explore life in a new city. I&rsquo;ve traditionally used this blog to communicate my thoughts on computing and technology, but I&rsquo;ve always admired and enjoyed reading other people&rsquo;s blogs that were much more personal (without being totally emo). Hopefully I&rsquo;ll transform this blog a little to have a far more personal feel, so I can keep in touch with all the people I know &amp; love around the world; thank you all for being a part of my life and enriching and defining me. See you on the other side of the Pacific!
</p>]]></content:encoded></item><item><title>git &#x26; less</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2009-01-05T06:34:06-08:00</dc:date><link>http://algorithm.com.au/blog/files/git-less.html#unique-entry-id-604</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/git-less.html#unique-entry-id-604</guid><content:encoded><![CDATA[<p>For the UNIX users out there who use the <a href="http://git.or.cz/">git</a> revision control system with the oldskool <a href="http://www.greenwoodsoftware.com/less/">less</a> pager, try adding the following to your <code>~/.gitconfig</code> file:</p>

<pre><code>[core]
    # search for core.pager in
    # &lt;http://www.kernel.org/pub/software/scm/git/docs/git-config.html&gt;
    # to see why we use this convoluted syntax
    pager = less -$LESS -SFRX -SR +'/^---'
</code></pre>

<p>That&#8217;ll launch less with three options set:</p>

<ul>
<li><code>-S</code>: chops long lines rather than folding them (personal preference),</li>
<li><code>-R</code>: permits ANSI colour escape sequences so that <em>git</em>&#8217;s diff colouring still works, and</li>
<li><code>+'/^---'</code>: sets the default search regex to <code>^---</code> (find <code>---</code> at the beginning of the line), so that you can easily skip to the next file in your pager with the <code>n</code> key.</li>
</ul>

<p>The last one&#8217;s the handy tip.  I browse commits using <code>git diff</code> before committing them, and like being able to jump quickly back and forth between files.  Alas, since <em>less</em> is a dumb pager and doesn&#8217;t understand the semantics of diff patches, we simply set the find regex to <code>^---</code>, which does what we want.</p>

<p>Of course, feel free to change the options to your heart&#8217;s content.  See the <a href="x-man-page://1/less"><code>less(1)</code> manpage</a> for the gory details.</p>

<p>As the comment in the configuration file says, you&#8217;ll need to use the convoluted <code>less -$LESS -SFRX</code> prefix due to <a href="http://www.kernel.org/pub/software/scm/git/docs/git-config.html">interesting git behaviour</a> with the <code>LESS</code> environment variable:</p>

<blockquote>
  <p>Note that git sets the LESS environment variable to <code>FRSX</code> if it is unset when it runs the pager. One can change these settings by setting the <code>LESS</code> variable to some other value. Alternately, these settings can be overridden on a project or global basis by setting the <code>core.pager</code> option. Setting <code>core.pager</code> has no affect on the <code>LESS</code> environment variable behaviour above, so if you want to override git&#8217;s default settings this way, you need to be explicit. For example, to disable the <code>S</code> option in a backward compatible manner, set <code>core.pager</code> to <code>"less -+$LESS -FRX"</code>. This will be passed to the shell by git, which will translate the final command to <code>"LESS=FRSX less -+FRSX -FRX"</code>.</p>
</blockquote>

<p>(And sure, I could switch to using a different pager, but I&#8217;ve been using <em>less</em> for more than a decade.  Yep, I know all about Emacs &amp; Vim&#8217;s diff-mode and <a href="http://changesapp.com/">Changes.app</a>.  It&#8217;s hard to break old habits.)</p>]]></content:encoded></item><item><title>Objective-C 2.0 Accessors &#x26; Memory Management</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2009-01-05T14:33:17-08:00</dc:date><link>http://algorithm.com.au/blog/files/objective-c-2-accessors-memory-management.html#unique-entry-id-603</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/objective-c-2-accessors-memory-management.html#unique-entry-id-603</guid><content:encoded><![CDATA[<p>Quite often, you may have simple setter methods that need to do a just a tiny bit of work before or after setting an instance variable.  For example, maybe you need to redraw something after setting the property of an object.  So, instead of writing this:</p>    [self setBackgroundColor:[NSColor blueColor]];    [view setBackgroundColor:[NSColor blueColor]];<p>You&#8217;d probably want to move the relevant code to your <code>-setBackgroundColor:</code> accessor instead:</p>    - (void)setBackgroundColor:(NSColor*)color    {        // Assuming that _backgroundColor is the ivar you want to set        if(_backgroundColor != color)        {            [_backgroundColor release];            _backgroundColor = [color retain];                // Update the view's background color to reflect the change            [view setBackgroundColor:_backgroundColor];        }    }<p>Then you can simply call <code>-setBackgroundColor:</code> and expect it all to work nicely:</p>    // -setBackgroundColor: updates the view's background color    // automatically now    [self setBackgroundColor:[NSColor blueColor]];<p>(You could use <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/index.html">Key-Value Observing</a> to do this, but I generally avoid KVO for simple intra-class property dependencies like this.  I don&#8217;t think the overhead of maintaining all the KVC dependencies and KVO-related methods is worth the cost.)</p>

<p>Of course, the above method requires that you write all that stupid boilerplate memory management code in the accessor.  Instead of doing that, I tend to declare a private <code>_backgroundColor</code> property in the class, <code>@synthesize</code> a method for the private property, and then use the private property&#8217;s generated accessors instead:</p>    @interface MyClass ()        // Declare a _private_ _backgroundColor property (thus the underscore    // in front, and why it's declared in a class continuation rather than    // in the public header)    @property (copy, setter=_setBackgroundColor:) NSColor* _backgroundColor;        @end        //        @implementation MyClass        @synthesize _backgroundColor;        - (NSColor*)backgroundColor    {        return [self _backgroundColor];    }        - (void)setBackgroundColor:(NSColor*)color    {        // Use the private property to set the background colour, so it        // handles the memory management bollocks        [self _setBackgroundColor:color];            [view setBackgroundColor:[self _backgroundColor]];    }        ...        @end<p>With that technique, it&#8217;s possible to completely directly setting ivars, and thus avoid <code>-retain</code> and <code>-release</code> altogether.  (You&#8217;ll still need to use <code>-autorelease</code> at various times, of course, but that&#8217;s reasonably rare.)  We have some source code files that are well over 2000 lines of code without a single explicit <code>[_ivar retain];</code> or <code>[_ivar release];</code> call thanks to this technique.  (Yeah, 2000 lines is also large and the class needs refactoring, but that&#8217;s another story.)</p>

<p>Of course, you could just <a href="http://www.mac-developer-network.com/podcasts/lnc/lnc036/">use garbage collection</a> which avoids 99% of the need for this bollocks:</p>    - (void)setBackgroundColor:(NSColor*)color    {        // Yay GC!        self->_backgroundColor = color;            [view setBackgroundColor:self->_backgroundColor];    }<p>But plenty of us don&#8217;t have that luxury yet.  (iPhone, ahem.)</p>]]></content:encoded></item><item><title>LittleSnapper and Mac Development Talky Talk</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><category>&#x2026;on Coding</category><category>Talks</category><dc:date>2008-12-15T00:23:20-08:00</dc:date><link>http://algorithm.com.au/blog/files/littlesnapper-etc.html#unique-entry-id-602</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/littlesnapper-etc.html#unique-entry-id-602</guid><content:encoded><![CDATA[<p>Four little announcements, all of them Mac-related:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/littlesnappericon.jpg" width="480" height="479" /><br /><p>First, myself and my comrades at Realmac Software are very proud to announce the release of <a href="http://www.realmacsoftware.com/">LittleSnapper 1.0</a>, our swiss-army-knife picture, screenshot and website organisation utility thingamijiggo.  We&#8217;ve all worked hard on this for the past few months and sweated over a ton of details to try to make it a polished user experience and be a joy to use; we hope you agree.  (You would not believe how long we spent figuring out how the blur and highlighting tools should work before they became their final incarnations, or how much pain was involved when we decided to add <span class="caps">FTP </span>and <span class="caps">SFTP</span><sup class="footnote"><a href="#fn1">1</a></sup> support late in the development cycle.)  If you&#8217;re a Mac user, give it a whirl; it&#8217;s a hard program to describe because it has a lot of different workflows, but between the quick annotation tools, easy Web sharing with QuickSnapper/Flickr/SFTP<sup class="footnote"><a href="#fn1">1</a></sup>, website <span class="caps">DOM </span>snapping, and the iPhoto-like forget-about-what-folder-you-need-to-put-your-picture-in snapshot management, I&#8217;m sure you&#8217;ll find something useful for you in there.  Hopefully our hard work can make life just a little easier for you!</p>

<p class="footnote" id="fn1"><sup>1</sup> <span class="caps">FTP </span>must die.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/blocks_image_1_1.png" width="480" height="152" /><br /><p>I <a href="/blog/files/speaking-at-macdev-2009.php">blogged earlier</a> that I was speaking at <a href="http://www.mac-developer-network.com/conference/">MacDev 2009</a> in April, but didn&#8217;t mention exactly <em>what</em> I was talking about.  Well, the <a href="http://www.mac-developer-network.com/conference/sessions/">talk abstract</a>&#8217;s up now:</p>

<blockquote><p>One reason for Mac OS X&#8217;s success is Objective-C, combining the dynamism of a scripting language with the performance of a compiled language.  However, how does Objective-C work its magic and what principles is it based upon?  In this session, we explore the inner workings of the Objective-C runtime, and see how a little knowledge about programming language foundations&#8212;such as lambda calculus and type theory&#8212;can go a long way to tackling difficult topics in Cocoa such as error handling and concurrency.  We&#8217;ll cover a broad range of areas such as garbage collection, blocks, and data structure design, with a focus on practical tips and techniques that can immediately improve your own code&#8217;s quality and maintainability. </p></blockquote>

<p>So, two sections: first, low-level hackery of the Objective-C runtime.  Second, a <em>different</em> kind of low-level hackery, and one that&#8217;s arguably far more important: understanding the <em>essence</em> of computation and programming languages, and why I fell in love with both Haskell &amp; Objective-C, two languages at completely opposite ends of the planet.</p>

<p>I&#8217;d like to point out that while the MacDev registration fee seems fairly expensive at &pound;399, keep in mind that covers your accommodation and also meals, which easily covers &pound;100-&pound;150.  Scotty&#8217;s done a lot of organising so that you don&#8217;t have to.  There&#8217;s also a Christmas special on at the moment where a few applications are included in the registration price; check the <a href="http://www.mac-developer-network.com/conference/">MacDev 2009</a> website for details.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/blocks_image_0_1.png" width="300" height="300" /><br /><p>If you&#8217;re an imsoniac and are having trouble sleeping, you&#8217;ll hopefully enjoy a recent <a href="http://www.mac-developer-network.com/podcasts/latenightcocoa/">Late Night Cocoa</a> episode where I talk to Scotty about <a href="http://www.mac-developer-network.com/podcasts/latenightcocoa/episode36/index.html">Garbage Collection</a>.  (Actually, you probably won&#8217;t enjoy it so much after you find out exactly how <code>-retain</code> &amp; <code>-release</code> are implemented under-the-hood.  The words <code>CFBag</code> and &#8220;lock&#8221; should hopefully scare you enough.)  It&#8217;s a bit of a long episode at over an hour and a quarter long, but next time I&#8217;ll say &#8220;um&#8221; a bit less which should shorten it to about half an hour.  Have fun.  And use GC!  (LittleSnapper and RapidWeaver both aren&#8217;t GC yet, but you bet your ass they will be for the next major versions.)</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/hoc-logo.png" width="299" height="194" /><br /><p>I&#8217;ve had a pretty long exodus away from the <a href="http://groups.google.com/group/fp-syd">fp-syd</a> user group since I was off getting drunk overseas for about four months.  That, of course, meant that somehow my brain was rather misplaced when I arrived back in Sydney, so I decided to give a talk at fp-syd upon my return&#8230; on the same day that LittleSnapper 1.0 was due to be released, leaving pretty much no margin for error.  Oops.  I&#8217;ll glad to say that the gusto prevailed, and that both the talk seemed to go OK (well, I wasn&#8217;t booed off the stage anyway), and LittleSnapper was released on time.  (Just; thanks Alan and Danny!)  My talk there was similar to the one I gave at Galois in Portland <a href="/blog/files/2008-talk-slides.php">earlier this year</a>: a whirlwind tour of the Objective-C programming language and Mac OS X technologies for a functional programming audience.  In particular:</p>


<ul>
<li>basics of the runtime system,</li>
<li>higher-order messaging and its analogy to higher-order functions in functional languages,</li>
<li>some details on the engineering marvel that is the Objective-C garbage collector, and</li>
<li>(<strong>updated!</strong>) information on <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-August/002670.html">Blocks</a>, <a href="http://llvm.org/"><span class="caps">LLVM</span></a> and <a href="http://clang.llvm.org/">Clang</a>, and a wee tiny bit of info on <a href="http://www.macrumors.com/2008/06/15/snow-leopards-grand-central-and-opencl-details/">Grand Central Dispatch</a> and <a href="http://en.wikipedia.org/wiki/OpenCL">OpenCL</a>.</li>
</ul>



<p>I&#8217;ve updated the talk with a few extra <a href="/downloads/talks/mac-os-x-linguistics/"">slides</a>, since Apple have made a little more information to the public now.  (In particular, brief information on Blocks, Grand Central Dispatch and OpenCL.)  Enjoy all!</p>]]></content:encoded></item><item><title>Interview with Marshall Kirk McKusick</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2008-12-15T00:00:08-08:00</dc:date><link>http://algorithm.com.au/blog/files/interview-with-marshall-kirk-mckusick.html#unique-entry-id-601</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/interview-with-marshall-kirk-mckusick.html#unique-entry-id-601</guid><content:encoded><![CDATA[<p>A website named <a href="http://www.neatlittlemacapps.com/">Neat Little Mac Apps</a> is not the kind of place you&#8217;d expect to find an interview with a operating systems and filesystems hacker.  Nevertheless, one of their podcasts was just that: an interview with <span class="caps">UNIX </span>and <span class="caps">BSD </span>legend <a href="http://www.neatlittlemacapps.com/show/nlma-episode-048-interview-marshall-kirk-mckusick">Marshall Kirk McKusick</a>.  (He has his own Wikipedia page; he <em>must</em> be famous!)</p>

<p>There&#8217;s some great stuff in there, including the origin of the <span class="caps">BSD </span>daemon (Pixar, would you believe?  Or, well, Lucasarts at the time&#8230;), and a great story about how a bug was introduced into the 4.2 <span class="caps">BSD </span>version of the pervasive <span class="caps">UNIX </span><em>diff</em> utility.  Marshall&#8217;s full of energy, and it&#8217;s a great interview; it&#8217;s a little amusing to see the stark contrast between the interviewer and McKusick, both of whom have rather different definitions of what constitutes an operating system.</p>]]></content:encoded></item><item><title>git-svn &#x26; svn:externals</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2008-11-17T10:58:40-08:00</dc:date><link>http://algorithm.com.au/blog/files/git-svn-svn-externals.html#unique-entry-id-599</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/git-svn-svn-externals.html#unique-entry-id-599</guid><content:encoded><![CDATA[<p>I&#8217;ve written before about <a href="/blog/files/git-svn-and-subversion.php">git-svn</a> and why I use it, but a major stumbling block with git-svn has been been a lack of support for <a href="http://svnbook.red-bean.com/en/1.0/ch07s03.html"><em>svn:externals</em></a>.  If your project&#8217;s small and you have full control over the repository, you may be fortunate enough to not have any svn:externals definitions, or perhaps you can restructure your repository so you don&#8217;t need them anymore and live in git and Subversion interoperability bliss.</p>

<p>However, many projects absolutely require svn:externals, and once you start having common libraries and frameworks that are shared amongst multiple projects, it becomes very difficult to avoid svn:externals.  What to do for the git-svn user?</p>

<p>If you Google around, it&#8217;s easy enough to find solutions out there, such as <a href="http://effectif.com/2008/4/24/easy-git-svn-for-rails">git-me-up</a>, <a href="http://blog.alieniloquent.com/2008/03/08/git-svn-with-svnexternals/">step-by-step tutorials</a>, explanations about using <a href="http://kerneltrap.org/mailarchive/git/2007/5/1/245002">git submodules</a>, and an <a href="http://panthersoftware.com/articles/view/3/svn-s-svn-externals-to-git-s-submodule-for-rails-plugins">overview</a> of all the different ways you can integrate the two things nicely.  However, I didn&#8217;t like any of those solutions: either they required too much effort, were too fragile and could break easily if you did something wrong with your git configuration, or were simply too complex for such a seemingly simple problem.  (Ah, I do like dismissing entire classes of solutions by wand-having them as over-engineering.)</p>

<p>So, in the great spirit of scratching your own itch, here&#8217;s my own damn solution:</p>

<blockquote><p><a href="http://github.com/andrep/git-svn-clone-externals/tree/master"><strong>git-svn-clone-externals</strong></a></p>

<p>This is a very simple shell script to make git-svn clone your svn:externals definitions.  Place the script in a directory where you have one or more svn:externals definitions, run it, and it will:</p>


<ul>
<li>git svn clone each external into a .git_externals/ directory.</li>
<li>symlink the cloned repository in .git_externals/ to the proper directory name.</li>
<li>add the symlink and .git_externals/ to the .git/info/excludes/ file, so that you&#8217;re not pestered about it when performing a git status.</li>
</ul>



<p>That&#8217;s pretty much about it.  Low-tech and cheap and cheery, but I couldn&#8217;t find anything else like it after extensive Googling, so hopefully some other people out there with low-tech minds like mine will find this useful.</p>

<p>You could certainly make the script a lot more complex and do things such as share svn:externals repositories between different git repositories, traverse through the entire git repository to detect svn:externals definitions instead of having to place the script in the correct directory, etc&#8230; but this works, it&#8217;s simple, and it does just the one thing, unlike a lot of other git/svn integration scripts that I&#8217;ve found.  I absolutely do welcome those features, but I figured I&#8217;d push this out since it works for me and is probably useful for others.</p></blockquote>

<p>The source is on github.com at <a href="http://github.com/andrep/git-svn-clone-externals/tree/master">http://github.com/andrep/git-svn-clone-externals/tree/master</a>.  Have fun subverting your Subversion overlords!</p>]]></content:encoded></item><item><title>MacDev 2009</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Talks</category><dc:date>2008-10-15T14:31:53-07:00</dc:date><link>http://algorithm.com.au/blog/files/speaking-at-macdev-2009.html#unique-entry-id-598</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/speaking-at-macdev-2009.html#unique-entry-id-598</guid><content:encoded><![CDATA[<img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/blocks_image_2_1.png" width="480" height="152" /><br /><br /><p>I have the small honour of being a speaker at the maiden conference of <a href="http://www.mac-developer-network.com/conference/">MacDev 2009</a>, a grass-roots, independently run, Mac developer conference in the UK that&#8217;s being held in April next year.  MacDev looks like it&#8217;ll be the European equivalent of <a href="http://rentzsch.com/c4/">C4</a>, which was absolutely the best Mac developer conference I&#8217;ve ever been to; I&#8217;d say it&#8217;s the Mac equivalent of <a href="http://linux.conf.au/">Linux.conf.au</a>.  If you&#8217;re a Mac developer at all, come along, it should be great fun, and give your liver a nice workout.  Plus, how can you ignore such a sexy list of <a href="http://www.mac-developer-network.com/conference/speakers/">speakers</a>?</p>

<p><strong>Update</strong>: My talk abstract is now available&#8230;</p>

<blockquote><p>One reason for Mac OS X&#8217;s success is Objective-C, combining the dynamism of a scripting language with the performance of a compiled language.  However, how does Objective-C work its magic and what principles is it based upon?  In this session, we explore the inner workings of the Objective-C runtime, and see how a little knowledge about programming language foundations&#8212;such as lambda calculus and type theory&#8212;can go a long way to tackling difficult topics in Cocoa such as error handling and concurrency.  We&#8217;ll cover a broad range of areas such as garbage collection, blocks, and data structure design, with a focus on practical tips and techniques that can immediately improve your own code&#8217;s quality and maintainability. </p></blockquote>

<p>I am a great believer in getting the foundations right.  Similarly to how bad code design or architecture often leads to a ton of bugs that simply wouldn&#8217;t exist in well-designed code, building a complex system on unsteady foundations can produce a lot of unnecessary pain.  What are the foundations of your favourite programming language?  </p>

<p>It&#8217;s 2008 and we&#8217;re <em>still</em> seeing buffer overflows in C.  </p>]]></content:encoded></item><item><title>The Business of Development</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2008-09-30T05:03:05-07:00</dc:date><link>http://algorithm.com.au/blog/files/business-of-development.html#unique-entry-id-597</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/business-of-development.html#unique-entry-id-597</guid><content:encoded><![CDATA[<p>After one of the longest road-trips of my life, I gave a presentation at <a href="http://www.auc.edu.au/DevWorld+2008">DevWorld 08</a> in Melbourne, Australia, titled &#8220;The Business of Development&#8221;:</p>

<blockquote><p>Coding is just one part of what makes a great product, but there&#8217;s always so much else to do and learn.  So, what can you do to help ship a great product&#8212;besides coding&#8212;if you&#8217;re primarily a developer?  In this talk, learn about important commercial and business issues that you, as a coder, can help to define and shape in your company, such as licensing and registration keys, adopting new technologies, software updates, handling support, your website, and crash reports.</p></blockquote>

<p>The talk has a definite Mac focus and is geared towards people who are writing commercial software, but it arguably applies to all software on any platform, whether you&#8217;re a professional programmer or a hobbyist, working on open-source or not.  The slides are now online; you can find it on my <a href="/talks">talks page</a> or <a href="/downloads/talks/the-business-of-development.pdf">download them directly</a> (40MB <span class="caps">PDF</span>).</p>]]></content:encoded></item><item><title>Self-Reflection</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2008-09-22T18:57:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/self-reflection.html#unique-entry-id-596</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/self-reflection.html#unique-entry-id-596</guid><content:encoded><![CDATA[<p>R. A. Salvatore, <a href="http://www.amazon.com/Road-Patriarch-Forgotten-Realms-Sellswords/dp/0786940751"><em>Road of the Patriarch</em></a>, p. 280:</p>

<blockquote>
  <p>The point of self-reflection is, foremost, to clarify and to find honesty.  Self-reflection is the way to throw self-lies out and face the truth&#8212;however painful it might be to admit that you were wrong.  We seek consistency in ourselves, and so when we are faced with inconsistency, we struggle to deny.</p>

<p>Denial has no place in self-reflection, and so it is incumbent upon a person to admit his errors, to embrace them and to move along in a more positive direction.</p>

<p>We can fool ourselves for all sorts of reasons.  Mostly for the sake of our ego, of course, but sometimes, I now understand, because we are afraid.</p>

<p>For sometimes we are afraid to hope, because hope breeds expectation, and expectation can lead to disappointment.</p>

<p>&#8230; Reality is a curious thing.  Truth is not as solid and universal as any of us would like it to be; selfishness guides perception, and perception invites justification.  The physical image in the mirror, if not pleasing, can be altered by the mere brush of fingers through hair.</p>

<p>And so it is true that we can manipulate our own reality.  We can persuade, even deceive.  We can make others view us in dishonest ways.  We can hide selfishness with charity, make a craving for acceptance into magnanimity, and amplify our smile to coerce a hesitant lover. </p>

<p>&#8230; a more difficult alteration than the physical is the image that appears in the glass of introspection, the pureness or rot of the heart and the soul.</p>

<p>For many, sadly, this is not an issue, for the illusion of their lives becomes self-delusion, a masquerade that revels in the applause and sees in a pittance to charity a stain remover for the soul.</p>

<p>&#8230; There are those who cannot see the stains on their souls.  Some lack the capacity to look in the glass of introspection, perhaps, and others alter reality without and within.</p>

<p>It is, then, the outward misery of <a href="http://en.wikipedia.org/wiki/Artemis_Entreri">Artemis Entreri</a> that has long offered me hope.  He doesn&#8217;t lack passion; he hides from it.  He becomes an instrument, a weapon, because otherwise he must be human.  He knows the glass all too well, I see clearly now, and he cannot talk himself around the obvious stain.  His justifications for his actions ring hollow&#8212;to him most of all.</p>

<p>Only there, in that place, is the road of redemption, for any of us.  Only in facing honestly that image in the glass can we change the reality of who we are.  Only in seeing the scars and the stains and the rot can we begin to heal.</p>
</blockquote>

<p>For Rebecca, who holds that glass of introspection higher than anyone else I&#8217;ve ever known.  Thank you for everything.</p>]]></content:encoded></item><item><title>git-svn&#x2c; and thoughts on Subversion</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2008-09-05T14:42:47-07:00</dc:date><link>http://algorithm.com.au/blog/files/git-svn-and-subversion.html#unique-entry-id-595</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/git-svn-and-subversion.html#unique-entry-id-595</guid><content:encoded><![CDATA[<p>We use Subversion for our revision control system, and it&#8217;s great.  It&#8217;s certainly not the most advanced thing out there, but it has perhaps the best client support on every platform out there, and when you need to work with non-coders on Windows, Linux and Mac OS X, there&#8217;s a lot of better things to do than explain how to use the command-line to people who&#8217;ve never heard of it before.</p>

<p>However, I also really need to work offline.  My usual modus operandi is working at a caf&eacute; without Internet access (thanks for still being in the stone-age when it comes to data access, Australia), which pretty rules out using Subversion, because I can&#8217;t do commits when I do the majority of my work.  So, I used <a href="http://svk.bestpractical.com/view/HomePage">svk</a> for quite a long time, and everything was good.</p>

<p>Then, about a month ago, I got annoyed with svk screwing up relatively simple pushes and pulls for the last time.  svk seems to work fine if you only track one branch and all you ever do is use its capabilities to commit offline, but the moment you start doing anything vaguely complicated like merges, or track both the trunk and a branch or two, it&#8217;ll explode.  Workmates generally don&#8217;t like it when they see 20 commits arrive the next morning that totally FUBAR your repository.</p>

<p>So, I started using <em>git-svn</em> instead.  People who know me will understand
that I have a hatred of crap user interfaces, and I have a special hatred
of UIs that are different &#8220;just because&#8221;, which applies to git rather
well.  I absolutely refused to use
<a href="http://www.gnuarch.org/arch/index.html">tla</a> for that reason&#8212;which
thankfully never seems to be mentioned in distributed revision control
circles anymore&#8212;and I stayed away from git for a long time because of
its refusal to use conventional revision control terminology.  git-svn in particular suffered more much from (ab)using different
terminology than git, because you were intermixing Subversion jargon with
git jargon.  Sorry, you use <code>checkout</code> to revert a commit?  And <code>checkout</code>
also switches between branches?  <code>revert</code> is like a merge?  WTF?  The
<a href="http://www.google.com/search?q=git-svn+tutorial">five or ten tutorials</a> that I found on the &#8216;net helped quite a lot, but since a lot of them told me to do things in different ways and I didn&#8217;t know what the subtle differences between the commands were, I went back to tolerating svk until it screwed up a commit for the very last time.  I also tried really hard to use <a href="http://bazaar-vcs.org/BzrForeignBranches/Subversion">bzr-svn</a> since I really like Bazaar (and the guys behind Bazaar), but it was clear that git-svn was stable and ready to use right now, whereas bzr-svn still had some very rough edges around it and isn&#8217;t quite ready for production yet.</p>

<p>However, now that I&#8217;ve got my head wrapped around git&#8217;s jargon, I&#8217;m very happy to say that it was well worth the time for my brain to learn it.  Linus elevated himself from &#8220;bloody good&#8221; to &#8220;true genius&#8221; in my eyes for writing that thing in a week, and I now have a very happy workflow using git to integrate with svn.</p>

<p>So, just to pollute the Intertubes more, here&#8217;s my own git-svn cheatsheet.  I don&#8217;t know if this is the most correct way to do things (is there any &#8220;correct&#8221; way to do things in git?), but it certainly works for me:</p>

<pre><code>* initial repository import (svk sync):
git-svn init https://foo.com/svn -T trunk -b branches -t tags
git checkout -b work trunk

* pulling from upstream (svk pull):
git-svn rebase

* pulling from upstream when there's new branches/tags/etc added:
git-svn fetch

* switching between branches:
git checkout branchname

* svk/svn diff -c NNNN:
git diff NNNN^!

* commiting a change:
git add
git commit

* reverting a change:
git checkout path

* pushing changes upstream (svk push):
git-svn dcommit

* importing svn:ignore:
(echo; git-svn show-ignore) &gt;&gt; .git/info/exclude

* uncommit:
git reset &lt;SHA1 to reset to&gt;
</code></pre>

<p>Drop me an email if you have suggestions to improve those.  About the only thing that I miss from svk was the great feature of being able to delete a filename from the commit message, which would unstage it from the commit.  That was tremendously useful; it meant that you could <code>git commit -a</code> all your changes except one little file, which was simply deleting one line.  It&#8217;s much easier than tediously trying to <code>git add</code> thirteen files in different directories just you can omit one file.</p>

<p>One tip for git: if your repository has top-level <code>trunk</code>/<code>branches</code>/<code>tags</code> directories, like this:</p>

<pre><code>trunk/
  foo/
  bar/
branches/
  foo-experimental/
  bar-experimental/
tags/
  foo-1.0/
  bar-0.5/
</code></pre>

<p>That layout makes switching between the trunk and a branch of a project quite annoying, because while you can &#8220;switch&#8221; to (checkout) <code>branches/foo-experimental/</code>, git won&#8217;t let you checkout <code>trunk/foo</code>; it&#8217;ll only let you checkout <code>trunk</code>.  This isn&#8217;t a big problem, but it does mean that your overall directory structure keeps changing because switching to <code>trunk</code> means that you have <code>foo/</code> and <code>bar/</code> directories, while switching to a <code>foo-experimental</code> or <code>bar-experimental</code> omits those directories.  This ruins your git excludes and tends to cause general confusion with old files being left behind when switching branches.</p>

<p>Since many of us will only want to track one particular project in a Subversion repository rather than an entire tree (i.e. switch between <code>trunk/foo</code> and <code>branches/foo-experimental</code>), change your <code>.git/config</code> file from this:</p>

<pre><code>[svn-remote "svn"]
    url = https://mysillyserver.com/svn
    fetch = trunk:refs/remotes/trunk
    branches = branches/*:refs/remotes/*
    tags = tags/*:refs/remotes/tags/*
</code></pre>

<p>to this:</p>

<pre><code>[svn-remote "svn"]
    url = https://mysillyserver.com/svn
    fetch = trunk/foo:refs/remotes/trunk
     ; ^ change "trunk" to "trunk/foo" as the first part of the fetch
    branches = branches/*:refs/remotes/*
    tags = tags/*:refs/remotes/tags/*
</code></pre>

<p>Doing that will make git&#8217;s &#8220;trunk&#8221; branch track <code>trunk/foo/</code> on your server rather than just <code>trunk/</code>, which is probably what you want.  If you want to track other projects in the tree, it&#8217;s probably better to <code>git-svn init</code> another directory.  <strong>Update</strong>: Oops, I forgot to thank <a href="http://bdash.net.nz/">Mark Rowe</a> for help with this.  Thanks Mark!</p>

<p>As an aside, while I believe that distributed version control systems look like a great future for open-source projects, it&#8217;s interesting that DVCS clients are now starting to support Subversion, which now forms some form of lowest common denominator.  (I&#8217;d call it the FAT32 of revision control systems, but that&#8217;d be a bit unkind&#8230; worse-is-better, perhaps?)  Apart from the more &#8220;official&#8221; clients such as command-line svn and TortoiseSVN, it&#8217;s also supported by svk, Git, Bazaar, <a href="http://www.selenic.com/mercurial/wiki/index.cgi/WorkingWithSubversion">Mercurial</a>, and some great other GUI clients on Mac OS X and Windows.  Perhaps Subversion will become a de-facto repository format that everyone else can push and pull between, since it has the widest range of client choice.</p>]]></content:encoded></item><item><title>Speaking at DevWorld 2008</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><category>&#x2026;on Coding</category><dc:date>2008-09-01T16:20:31-07:00</dc:date><link>http://algorithm.com.au/blog/files/speaking-at-devworld-2008.html#unique-entry-id-594</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/speaking-at-devworld-2008.html#unique-entry-id-594</guid><content:encoded><![CDATA[<p>For Mac developers in Australia, I&#8217;ll be speaking at the inaugural conference of <a href="http://auc.edu.au/DevWorld+2008">DevWorld 2008</a>, which will be held from September 29-30 this year in Melbourne.  You can check out the <a href="http://auc.edu.au/DevWorld+Sessions">full list of sessions</a>; I&#8217;ll be giving the very last talk on that page: <em>The Business of Development</em>.</p>

<blockquote><p>Coding is just one part of what makes a great product, but there&#8217;s always so much else to do and learn.  So, what can you do to help ship a great product&#8212;besides coding&#8212;if you&#8217;re primarily a developer?  In this talk, learn about important commercial and business issues that you, as a coder, can help to define and shape in your company, such as licensing and registration keys, adopting new technologies, software updates, handling support, your website, and crash reports.</p></blockquote>

<p>Note that DevWorld 2008 is unfortunately only open to staff and students at an Australian university (&#8220;<a href="http://auc.edu.au/Members"><span class="caps">AUC </span>member university</a>&#8221;, to be exact), so unless you&#8217;re a student right now at one of those Unis, you&#8217;ll have to miss out on this incredibly exciting opportunity to hear me talk at you for an hour (<em>snort</em>).  I hear the story behind this is that if this year&#8217;s DevWorld is successful, next year&#8217;s will be a more standard open conference.  Anyway, hopefully catch some of you there in September!</p>]]></content:encoded></item><item><title>Solid State Society</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2008-08-05T08:09:25-07:00</dc:date><link>http://algorithm.com.au/blog/files/solid-state-society.html#unique-entry-id-593</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/solid-state-society.html#unique-entry-id-593</guid><content:encoded><![CDATA[The traditional hard disk that&rsquo;s likely to be in your computer right now is made out of a few magnetic circular platters, with a head attached to an actuator arm above the platter that reads and writes the data to it.  The head&rsquo;s such a microscopic distance away from the platter that it&rsquo;s equivalent to a <a href="http://www.atarimagazines.com/v5n6/InsideHardDisk.html" rel="self">Boeing 747 flying at 600 miles per hour about six inches off the ground</a>.  So, when you next have a hard disk crash (and that&rsquo;s <em>when</em>, not <em>if</em>), be amazed that the pilot in the 747 flying six inches off the ground didn&rsquo;t crash earlier.<br /><br />Enter solid-state drives (SSDs).  Unlike hard disks, SSDs contain no moving parts, and are made out of solid-state memory instead.  This has two big advantages: first, SSDs don&rsquo;t crash (although this is a small lie&mdash;more on that later).  Second, since SSDs are made out of memory, it&rsquo;s much faster than a hard disk to get to a particular piece of data on the disk.  In other words, they have a random access time that are orders of magnitude faster than their magnetic cousins.  Hard disks need to wait for the platter to rotate around before the head can read the data off the drive; SSDs simply fetch the data directly from a memory column & row.  In modern desktop computers, random access I/O is often the main performance bottleneck, so if you can speed that up an order of magnitude, you could potentially make things a lot faster.<br /><br />Unfortunately, while SSDs are orders of magnitude faster than a hard disk for random access, they&rsquo;re also an order of magnitude more expensive.  That was until May this year, when this thing appeared on the scene:<br /><br /><a href="http://www.supertalent.com/datasheets/6_132.pdf" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/super-talent-masterdrive-mx-ssd.jpg" width="387" height="255" /></a><br /><br />(Image courtesy of <a href="http://www.itechnews.net/2008/05/12/super-talent-mlc-sata-ii-ssds-for-laptops/" rel="self">itechnews.net</a>.)<br /><br />That boring-looking black box is a <a href="http://www.supertalent.com/datasheets/6_132.pdf" rel="self">120GB Super Talent Masterdrive MX</a>.   As far as SSD drives go, the Masterdrive MX is not particularly remarkable for its performance: it has a sustained write speed of just 40MB per second, which is a lot lower than many other SSDs and typical hard disks.  <br /><br />However, it&rsquo;s a lot cheaper than most other SSDs: the 120GB drive is USD$699.  That&rsquo;s not exactly cheap (you could easily get a whopping two terabytes of data if you spent that money on hard disks), but it&rsquo;s cheap enough that people with more dollars than sense might just go buy it&hellip; people like me, for instance.  I&rsquo;ve had that SSD sitting in my lovely 17&rdquo; MacBook Pro for the past two months, as an experiment with solid-state drives.  So, how&rsquo;d it go?<br /><br />I&rsquo;ll spare you the benchmarks: if you&rsquo;re interested in the raw numbers, there are a number of <a href="http://www.google.com/search?q=Super+Talent+Masterdrive+MX+review" rel="self">decent Masterdrive MX reviews</a> floating around the Web now.  I was more interested in the subjective performance of the drive.  Does it feel faster for everyday tasks?  Is it simply a better experience?<br /><br />The overall answer is: yes, it&rsquo;s better, but it&rsquo;s not so much better that I&rsquo;d buy the SSD again if I could go back in time.  With a hard disk, things occasionally get slow.  I&rsquo;m sure I&rsquo;m not the only one to witness the Spinning Beachball of Death while I wait 5-10 seconds for the hard disk to finally deliver the I/O operations to the programs that want them completed.  With a hard disk, launching a program from the dock would sometimes take 20-30 seconds under very heavy I/O load, such as when Spotlight&rsquo;s indexing the disk and Xcode&rsquo;s compiling something.  With the SSD, those delays just went away: I can&rsquo;t even remember a time where I saw the evil Beachball due to system I/O load.<br /><br />The most notable difference was in boot time.  A lot of people love how Mac OS X is pretty fast to boot (and I agree with them), but when you go to log in, it&rsquo;s a very different story.  If, like me, you&rsquo;ve got about ten applications and helper programs that launch when you log in, it can take literally minutes before Mac OS X becomes responsive.  I clocked my MacBook Pro at taking just over a minute to log in with my current setup on a hard disk (which launches a mere half a dozen programs); the SSD took literally about <em>5 seconds</em>.  5&hellip; 4&hellip; 3&hellip; 2&hellip; 1<em>done.  </em><em><a href="http://equotes.wetpaint.com/page/Darth+Vader+Quotes" rel="self">What is thy bidding, my master</a></em><em>?</em>  I wish I&rsquo;d made a video to demonstrate the difference, because it&rsquo;s insanely faster when you see it.  10x faster login speed is nothing to sneeze at.<br /><br />However, aside from boot up time, normal day-to-day operation really was about the same.  Sure, it was nice that applications launched faster and it booted so fast that you don&rsquo;t need to make a coffee anymore when logging in, but those were the only major performance differences that I saw.  Mac OS X and other modern operating systems cache data so aggressively that I guess most of the data you&rsquo;ll read and write will usually hit the cache first anyway.  The lower sustained write performance didn&rsquo;t end up being a problem at all: the only time I noticed it was when I was copying large <del>torrented downloads</del>files around on the same drive, but that wasn&rsquo;t slow enough for me to get annoyed.  The one benchmark that I really cared about&mdash;compiling&mdash;turned out to take exactly as long on the SSD as the hard disk.  I thought that maybe it was possible that random I/O write speed was a possible bottleneck with gcc; it turns out that&rsquo;s not true at all.  (I&rsquo;ll also point out that I was using Xcode to drive most of the compilation benchmarks, which is one of the fastest build systems I&rsquo;ve seen that uses gcc; no spastic libtool/automake/autoconf/<a href="http://www.algorithm.com.au/gallery/screenshots/recursive_make_and_autotools_silly" rel="self">autogoat insanity</a> here.)  Sorry to disappoint the other coders out there.<br /><br />Aside from performance, the total silence of the SSD was a nice bonus, but it&rsquo;s not something that you can&rsquo;t live without once you&rsquo;ve experienced it.  In most environments, there&rsquo;s enough background noise that you usually don&rsquo;t hear the quiet hard disk hum anyway, so the lack of noise from the SSD doesn&rsquo;t really matter.  It was, however, very cool knowing that you could shake your laptop while it was on without fear of causing damage to your data.  I&rsquo;m usually pretty careful about moving my laptop around while it&rsquo;s on, but with an SSD in there, I was quite happy to pick up the machine with one hand and wave it around in the air (as much as you can with a 17&rdquo; MacBook Pro, anyway).<br /><br />So, with all the nice small advantages of the SSD, you may be wondering why it&rsquo;s no longer in my MacBook Pro.  Here&rsquo;s some <a href="http://www.newegg.com/Product/ProductReview.aspx?Item=N82E16820609304" rel="self">reviews of the disk on newegg.com</a> that may give you a hint:<br /><br /><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/Picture 3.png" width="654" height="463" /><br /><br />It turns out those reviewers were right.  Two months after I bought it, the Masterdrive MX completely died, which seemed like a pretty super talent for an SSD.  The Mac didn&rsquo;t even recognise the disk; couldn&rsquo;t partition it; couldn&rsquo;t format it.  So much for SSDs not crashing, eh?<br /><br />While SSDs don&rsquo;t crash in the traditional manner that a hard disk may, there&rsquo;s a whole number of other reasons why it might crash.  RAM&rsquo;s known to go wonky; there&rsquo;s no reason why that can&rsquo;t happen to solid-state memory too.  Maybe the SATA controller on the disk died.  No matter what the cause, you have the same problem as a traditional hard disk crash: unless you have backups, you&rsquo;re f*cked.  Plus, since I was on holiday down at Mount Hotham, my last backup was two weeks ago, just before I left for holiday.  All my Mass Effect saved games went kaboom, and I just finished the damn game.  Andr&eacute; not very happy, grrr.<br /><br /><p>So, what&#8217;s the PowerPoint summary?</p>


<ul>
<li>The Super Talent Masterdrive MX would be great buy if it didn&#8217;t friggin&#8217; crash and burn your data with scary reliability.  Even if you&#8217;re a super storage geek, avoid this drive until they have the reliability problems sorted out.</li>
<li><a href="http://www.powerbookguy.com/">The Powerbook Guy</a> on Market St in San Francisco is awesome.  They were the guys to install the <span class="caps">SSD </span>in my MacBook Pro, and were extremely fast (two-hour turnaround time), professional, and had reasonable prices.  (I would&#8217;ve done it myself, but I&#8217;d rather keep the warranty on my A$5000 computer, thanks.)  Plus, they sold me the <a href="http://www.wihatools.com/200seri/261serie.htm">coolest German screwdriver ever</a> for $6.  (&#8220;This one screwdriver handles every single screw in a MacBook Pro&#8221;.  Sold!)</li>
<li>The <a href="http://www.maccentric.com.au/mac072/contact.php">MacCentric service centre in Chatswood</a> in Sydney is equally awesome.  When the <span class="caps">SSD </span>died, they quoted me the most reasonable price I had ever seen for a hard disk swap in a MacBook Pro (have you seen how many screws that thing has?), and also had a two-hour turnaround time.  Yeah, I know, decent Mac service in Australia!  Woooooah.</li>
<li>Back up.</li>
<li><span class="caps">SSD</span>s are great.  I think they&#8217;ll complement rather than replace hard disks in the near future, and possibly replace them entirely if the price tumbles down enough.  <a href="http://www.google.com/search?q=Intel+SSD">Next-generation <span class="caps">SSD</span>s</a> are going to completely change the storage and filesystem games as they do away with the traditional stupid block-based I/O crap, and become directly addressable like <span class="caps">RAM </span>is today.  Just don&#8217;t believe the hype about <span class="caps">SSD</span>s not crashing.</li>
</ul>



<p>I, for one, welcome the <a href="http://www.amazon.com/Ghost-Shell-Solid-State-Society/dp/B000PWQPAC">solid state society</a>.  Bring on the future!</p>]]></content:encoded></item><item><title>Mac Developer Roundtable #11</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2008-08-03T21:31:23-07:00</dc:date><link>http://algorithm.com.au/blog/files/mac-developer-roundtable-11.html#unique-entry-id-592</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/mac-developer-roundtable-11.html#unique-entry-id-592</guid><content:encoded><![CDATA[<p>The <a href="http://www.mac-developer-network.com/">Mac Developer Network</a> features an excellent series of <a href="http://www.mac-developer-network.com/podcasts/">podcasts</a> aimed at both veteran Mac developers and those new to the platform who are interested in developing for the Mac.  If you&#8217;re a current Mac coder and haven&#8217;t seen them yet, be sure to check them out.  I&#8217;ve been listening to the podcasts for a long time, and they&#8217;re always both informative and entertaining.  (Infotainment, baby.)</p>

<p>Well, in yet another case of &#8220;Wow, do I really sound like that?&#8221;, I became a guest on <a href="http://www.mac-developer-network.com/podcasts/macdeveloperroundtable/episode11/index.html">The Mac Developer Roundtable episode #11</a>, along with Marcus Zarra, Jonathan Dann, Bill Dudney, and our always-eloquent and delightfully British host, Scotty.  The primary topic was Xcode 3.1, but we also chatted about the iPhone <span class="caps">NDA </span>(c&#8217;mon Apple, lift it already!) and&#8230; Fortran.  I think I even managed to sneak in the words &#8220;Haskell&#8221; and &#8220;Visual Studio&#8221; in there, which no doubt left the other show guests questioning my sanity.  I do look forward to Fortran support in Xcode 4.0.</p>

<p>It was actually a small miracle that I managed to be on the show at all.  Not only was the podcast recording scheduled at the ungodly time of 4am on a Saturday morning in Australian east-coast time, but I was also in transit from Sydney to the amazing alpine village of <a href="http://www.dinner-plain.com/">Dinner Plain</a> the day before the recording took place.  While Dinner Plain is a truly extraordinary village that boasts <a href="http://images.google.com/images?q=dinner+plain+photos">magnificent ski lodges</a> and some of the <a href="http://www.cilantro.com.au/menu_new.html">best</a> <a href="http://www.yourrestaurants.com.au/guide/?action=venue&amp;venue_url=tsubo">restaurants</a> I&#8217;ve ever had the pleasure of eating at, it&#8217;s also rather&#8230; rural.  The resident population is somewhere around 100, the supermarket doesn&#8217;t even sell a wine bottle opener that doesn&#8217;t suck, and Vodafone has zero phone reception there.  So, it was to my great surprise that I could get <span class="caps">ADSL </span>hooked up to the lodge there, which was done an entire two days before the recording.  Of course, since no <span class="caps">ADSL </span>installation ever goes smoothly, I was on the phone to iPrimus tech support<sup class="footnote"><a href="#fn1">1</a></sup> at 10pm on Friday night, 6 hours before the recording was due to start.  All that effort for the privilege of being able to drag my sleepy ass out of bed a few hours later, for the joy of talking to other Mac geeks about our beloved profession.  But, I gotta say, being able to hold an international conference call over the Intertubes from a tiny little village at 4am in the morning, when snow is falling all around you&#8230; I do love technology.</p>

<p>Of course, since I haven&#8217;t actually listened to the episode yet, maybe it&#8217;s all a load of bollocks and I sound like a retarded hobbit on speed.  Hopefully not, though.  Enjoy!</p>

<p class="footnote" id="fn1"><sup>1</sup> Hey, I like Internode and Westnet as much as every other Australian tech geeks, but they didn&#8217;t service that area, unfortunately.</p>]]></content:encoded></item><item><title>Talks for 2008</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><category>&#x2026;on Coding</category><dc:date>2008-06-30T02:49:29-07:00</dc:date><link>http://algorithm.com.au/blog/files/2008-talk-slides.html#unique-entry-id-591</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2008-talk-slides.html#unique-entry-id-591</guid><content:encoded><![CDATA[<p>I&#8217;ve given a few talks so far this year, which I&#8217;ve been kinda slack about and haven&#8217;t put up any slides for yet.  So, if you&#8217;re one of the zero people who&#8217;ve been eagerly awaiting my incredibly astute and sexy opinions, I guess today&#8217;s your lucky day, punk!</p>

<p>Earlier this year, on January 2, 2008, Earth Time, I gave a talk at <a href="http://en.wikipedia.org/wiki/Kiwi_Foo_Camp">Kiwi Foo Camp</a> in New Zealand, also known as Baa Camp.  (Harhar, foo, baa, get it?)  The talk was titled &#8220;Towards the Massive Media Matrix&#8221;, with the <span class="caps">MMM </span>in the title being a pun on the whole <span class="caps">WWW </span>three-letter acronym thing.  (Credit for the <span class="caps">MMM </span>acronym should go to <a href="http://blog.gingertech.net/">Silvia Pfeiffer</a> and <a href="http://www.vergenet.net/~conrad/">Conrad Parker</a>, who phrased the term about eight years ago :).  The talk was about the importance of free and open standards on the Web, what&#8217;s wrong with the current status quo about Web video basically being Flash video, and the complications involved in trying to find a solution that satisfies everyone.  I&#8217;m happy to announce that the slides for the talk are <a href="/downloads/talks/towards-the-massive-media-matrix/towards-the-massive-media-matrix.pdf">now available for download</a>; you can also grab the details off my <a href="/talks">talks</a> page.</p>

<p>A bit later this year in March, <a href="http://www.cse.unsw.edu.au/~chak/">Manuel Chakravarty</a> and I were invited to the <a href="http://groups.google.com/group/fp-syd">fp-syd</a> functional programming user group in Sydney, to give a talk about&#8230; monads!  As in, that scary Haskell thing.  We understand that writing a monad tutorial seems to be a rite of passage for all Haskell programmers and was thus stereotypical of the &#8220;Haskell guys&#8221; in the group to give a talk about, but the talk seemed to be well-received.</p>

<p>Manuel gave a general introduction to monads: what they are, how to use them, and why they&#8217;re actually a good thing rather than simply another hoop you have to jump through if you just want to do some simple I/O in Haskell.  I focused on a practical use case of monads that <em>didn&#8217;t</em> involve I/O (OMG!), giving a walkthrough on how to use Haskell&#8217;s excellent Parsec library to perform parsing tasks, and why you&#8217;d want to use it instead of writing a recursive descent parser yourself, or resort to the insanity of using <a href="http://dinosaur.compilertools.net/"><em>lex</em> and <em>yacc</em></a>.  I was flattered to find out that after my talk, Ben Leppmeier rewrote the parser for <span class="caps">DDC </span>(the <a href="http://www.haskell.org/haskellwiki/DDC">Disciplined Disciple Compiler</a>) to use Parsec, rather than his old system of Alex and Happy (Haskell&#8217;s equivalents of lex and yacc).  So, I guess I managed to make a good impression with at least one of our audience members, which gave me a nice warm fuzzy feeling.</p>

<p>You can find both Manuel&#8217;s and my slides online at the <a href="http://groups.google.com/group/fp-syd/files">Google Groups files page for fp-syd</a>, or you can <a href="/downloads/talks/monads-are-not-scary/">download the slides directly</a> from my own site.  Enjoy.</p>

<p>Finally, during my three-week journey to the <span class="caps">USA </span>last month in June, I somehow got roped into giving a talk at <a href="http://galois.com/">Galois Inc.</a> in Portland, about pretty much whatever I wanted.  Since the audience was, once again, a Haskell and functional programming crowd, I of course chose to give a talk about an object-oriented language instead: <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a>, the lingua franca of Mac OS X development.</p>

<p>If you&#8217;re a programming language geek and don&#8217;t know much about Objective-C, the talk should hopefully interest you.  Objective-C is a very practical programming language that has a number of interesting features from a language point of view, such as <a href="http://chanson.livejournal.com/176390.html">opt-in garbage collection</a>, and a hybrid of a dynamically typed runtime system with static type checking.  If you&#8217;re a Mac OS X developer, there&#8217;s some stuff there about the internals of the Objective-C object and runtime system, and a few slides about <a href="http://www.macdevcenter.com/pub/a/mac/2004/07/16/hom.html">higher-order messaging</a>, which brings much of the expressive power of higher-order functions in other programming languages to Objective-C.  Of course, if you&#8217;re a Mac OS X developer <em>and</em> a programming language geek, well, this should be right up your alley :).  Once again, you can <a href="/downloads/talks/mac-os-x-linguistics/mac-osx-linguistics.pdf">download the slides directly</a>, or off my <a href="/talks">talks</a> page.</p>]]></content:encoded></item><item><title>The Long Road to RapidWeaver 4</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>&#x2026;on Coding</category><dc:date>2008-06-02T11:03:23-07:00</dc:date><link>http://algorithm.com.au/blog/files/the-long-road-to-rapidweaver-4.html#unique-entry-id-590</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/the-long-road-to-rapidweaver-4.html#unique-entry-id-590</guid><content:encoded><![CDATA[<p>Two years ago, I had a wonderful job working on a truly excellent piece of software named <a href="http://cinesync.com/">cineSync</a>.  It had the somewhat simple but cheery job of playing back movies in sync across different computers, letting people write notes about particular movie frames and scribbling drawings on them.  (As you can imagine, many of the drawings that we produced when testing cineSync weren&#8217;t really fit for public consumption.)  While it sounds like a simple idea, oh <em>boy</em> did it make some people&#8217;s lives a lot easier and a lot less stressful.  People used to do crazy things like fly from city to city just to be the same room with another guy for 30 minutes to talk about a video that they were producing; sometimes they&#8217;d be flying two or three times per week just to do this.  Now, they just fire up cineSync instead and get stuff done in 30 minutes, instead of 30 minutes and an extra eight hours of travelling.  cineSync made the time, cost and stress savings probably an <em>order of magnitude or two</em> better.  As a result, I have immense pride and joy in saying that it&#8217;s being used on virtually every single Hollywood movie out there today (yep, <a href="http://www.cinesync.com/tales">even Iron Man</a>).  So, hell of a cool project to work on?  Tick ✓.</p>

<p>Plus, it was practically a dream coding job when it came to programming languages and technologies.  My day job consisted of programming with Mac OS X&#8217;s <a href="http://en.wikipedia.org/wiki/Cocoa_(API)">Cocoa</a>, the most elegant framework I&#8217;ve ever had the pleasure of using, and working with one of the best C++ cross-platform code bases I&#8217;ve seen.  I also did extensive hacking in Erlang for the server code, so I got paid to play with one of my favourite functional programming languages, which some people spend their entire life wishing for.  And I got schooled in just so much stuff: wielding C++ right, designing network protocols, learning about software process, business practices&#8230; so, geek nirvana?  Tick ✓.</p>

<p>The ticks go on: great workplace ✓; fantastic people to work with ✓; being privy to the latest movie gossip because we were co-located with one of Australia&#8217;s premiere visual effects company ✓; sane working hours ✓; being located in Surry Hills and sampling Crown St for lunch nearly every day ✓; having the luxury of working at home and at caf&eacute;s far too often ✓.  So, since it was all going so well, I had decided that it was obviously time to make a life a lot harder, so I resigned, set up my own <a href="http://sigil.com.au/">little software consulting company</a>, and start working on Mac shareware full-time.</p>

<p>Outside of the day job on cineSync, I was doing some coding on a cute little program to build websites named <a href="http://www.realmacsoftware.com/">RapidWeaver</a>.  RapidWeaver&#8217;s kinda like Dreamweaver, but a <em>lot</em> more simple (and hopefully just as powerful), and it&#8217;s not stupidly priced.  Or, it&#8217;s kinda like iWeb, but a lot more powerful, with hopefully most of the simplicity.  I first encountered RapidWeaver as a normal customer and paid my $40 for it since I thought it was a great little program, but after writing a little <a href="http://www.realmacforge.com/trac/wiki/RWPluginMarkup">plugin</a> for it, I took on some coding tasks.</p>

<p>And you know what?  The code base sucked.  The process sucked.  Every task I had to do was a chore.  When I started, there wasn&#8217;t even a revision control system in place: developers would commit their changes by emailing entire source code files or zip archives to each other.  There was no formal bug tracker.  Not a day went by when I shook my fist, lo, with great anger, and  thunder and lightning appeared.  RapidWeaver&#8217;s code base had evolved since version 1.0 from nearly a decade before, written by multiple contractors with nobody being an overall custodian of the code, and it showed.  I saw methods that were over thousand lines long, multithreaded bugs that would make <a href="http://www.youtube.com/watch?v=zKDC2iBQTYg">Baby Jesus</a> cry, method names that were prefixed with with Java-style global package namespacing (yes, we have method names called <code>com_rwrp_currentlySelectedPage</code>), block nesting that got so bad that I once counted <em>thirteen</em> tabs before the actual line of code started, dozens of lines of commented-out code, classes that had more than a <em>hundred and twenty</em> instance variables, etc, etc.  Definitely no tick ✗.</p>

<p>But the code&#8212;<a href="http://www.codinghorror.com/blog/archives/001119.html">just like <span class="caps">PHP</span></a>&#8212;didn&#8217;t matter, because the product just plain <em>rocked</em>.  (Hey, I did pay $40 for it, which surprised <em>me</em> quite a lot because I moved to the Mac from the Linux world, and sneered off most things at the time that cost more than $0.)  Despite being a tangled maze of twisty paths, the code <em>worked</em>.  I was determined to make the product rock more.  After meeting the <a href="http://www.flickr.com/photos/realmacsoftware/564578596/in/set-72157600331794015/">RapidWeaver folks at <span class="caps">WWDC</span> 2007</a>, I decided to take the plunge and see how it&#8217;d go full-time.  So, we worked, and we worked hard.  RapidWeaver 3.5 was released two years ago, in June 2006, followed by 3.5.1.  3.6 followed in May 2007, followed by a slew of upgrades: 3.6.1, 3.6.2, 3.6.3&#8230; all the way up to 3.6.7.  <a href="http://www.flickr.com/photos/realmacsoftware/sets/72157601582918050/detail/">Slowly but surely</a>, the product improved.  On the 3rd of August 2007, we created the branch for RapidWeaver 3.7, which we didn&#8217;t realise yet was going to be such a major release that it eventually became 4.0.</p>

<p>And over time, it slowly dawned on me just how many users we had.  A product that I initially thought had a few thousand users was much closer to about 100,000 users.  I realised I was working on something that was going to affect a lot of people, so when we decided to call it version 4.0, I was a little nervous.  I stared at the code base and it stared back at me; was it really possible ship a major new revision of a product and add features to it, and maintain my sanity?</p>

<p>I decided in my na&iuml;vety to refactor a huge bunch of things.  I held conference calls with other developers to talk about what needed to change in our plugin <span class="caps">API, </span>and how I was going to redo half of the internals so it wouldn&#8217;t suck anymore.  Heads nodded; I was happy.  After about two weeks of being pleased with myself and ripping up many of our central classes, reality set in as I realised that I was very far behind on implementing all the new features, because those two weeks were spent on nothing else but refactoring.  After doing time estimation on all the tasks we had planned out for 4.0 and realising that we were about within one day of the target date, I realised we were completely screwed, because nobody sane does time estimation for software without multiplying the total estimate by about 1.5-2x longer.  4.0 was going to take twice as long as we thought it would, and since the feature list was not fixed, it was going to take even longer than that.</p>

<p>So, the refactoring work was dropped, and we concentrated on adding the new required features, and porting the bugfixes from the 3.6 versions to 4.0.  So, now we ended up with <em>half</em>-refactored code, which is arguably just as bad as no refactored code.  All the best-laid plans that I had to clean up the code base went south, as we soldiered on towards feature completion for 4.0, because we simply didn&#8217;t have the time.  I ended up working literally up until the last hour to get 4.0 to code completion state, and made some executive decisions to pull some features that were just too unstable in their current state.  Quick Look support was pulled an hour and a half before the release as we kept finding and fixing bugs with it that crashed RapidWeaver while saving a document, which was a sure-fire way to lose customers.  Ultimately, pulling Quick Look was the correct decision.  (Don&#8217;t worry guys, it&#8217;ll be back in 4.0.1, without any of that crashing-on-save shenanigans.)</p><p style="text-align:center;"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry590_1.jpg" width="240" height="180" /><p>So, last Thursday, it became reality: <a href="http://www.realmacsoftware.com/">RapidWeaver 4.0</a> shipped out the door.  While I was fighting against the code, <a href="http://www.realmacsoftware.com/company/">Dan, Aron, Nik and Ben</a> were revamping the website, which now <em>absolutely bloody gorgeous</em>, all the while handling the litany of support requests and being their usual easygoing sociable selves on the Realmac forums.  I was rather nervous about the release: did we, and our brave beta testers, catch all the show-stopper bugs?  The good news is that it seems to be mostly OK so far, although no software is ever perfect, so there&#8217;s no doubt we&#8217;ll be releasing 4.0.1 soon (if only to re-add Quick Look support).</p></p><p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry590_2.jpg" width="500" height="313" /><br /><p>A day after the release, it slowly dawned on me that the code for 4.0 was basically my baby.  Sure, I&#8217;d worked on RapidWeaver 3.5 and 3.6 and was the lead coder for that, but the 3.5 and 3.6 goals were much more modest than 4.0.  We certainly had other developers work on 4.0 (kudos to Kevin and Josh), but if I had a bad coding day, the code basically didn&#8217;t move.  So all the blood, sweat and tears that went into making 4.0 was more-or-less my pride and my responsibility.  (Code-wise, at least.)</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry590_3.jpg" width="500" height="375" /><br /><p>If there&#8217;s a point to this story, I guess that&#8217;d be it: take pride and responsibility in what you do, and love your work.  The 4.0 code base still sucks, sitting there sniggering at me in its half-refactored state, but we&#8217;ve finally suffered the consequences of its legacy design for long enough that we have no choice but to give it a makeover with a vengeance for the next major release.  Sooner or later, everyone pays the <a href="http://c2.com/cgi/wiki?TechnicalDebt">bad code debt</a>.</p>

<p>So, it&#8217;s going to be a lot more hard work to 4.1, as 4.1 becomes the release that we all really wanted 4.0 to be.  But I wouldn&#8217;t trade this job for pretty much anything else in this world right now, because it&#8217;s a great product loved by a lot of customers, and making RapidWeaver better isn&#8217;t just a job anymore, it&#8217;s a <em>need</em>.  We love this program, and we wanna make it so good that you&#8217;ll just <em>have</em> to buy the thing if you own a Mac.  One day, I&#8217;m sure I&#8217;ll move on from RapidWeaver to other hopefully great things, but right now, I can&#8217;t imagine doing anything else.  We&#8217;ve come a long way from RapidWeaver 3.5 in the past two years, and I look forward to the long road ahead for RapidWeaver 5.  Tick ✓.</p></p>]]></content:encoded></item><item><title>iPhone: Currency Converter</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2008-05-04T07:43:26-07:00</dc:date><link>http://algorithm.com.au/blog/files/iphone-currency-converter.html#unique-entry-id-588</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/iphone-currency-converter.html#unique-entry-id-588</guid><content:encoded><![CDATA[<p>A small tip for <em>l&#8217;iPhone <a href="http://en.wikipedia.org/wiki/Digerati">digerati</a></em> (aw haw haw haw!): if you, like me, like to look up currency rates, forget about all this Web browser and Web application malarkey.  Use the Stocks application instead:</p>

<ol>
<li>go to the Stocks application,</li>
<li>add a new stock,</li>
<li>use a stock name of <code>AUDUSD=X</code> for the Australian to US dollar, <code>USDGBP=X</code> for USD to the British Pound, etc.  (Use the <a href="http://finance.yahoo.com/currency/convert?amt=1&amp;from=AUD&amp;to=USD&amp;submit=Convert">Yahoo! finance</a> page if you don&#8217;t know the three-letter currency codes.)</li>
</ol>

<p>Since a <a href="http://macgroup.infopop.cc/eve/forums/a/tpc/f/148101437/m/4921090572">picture</a> is worth a thousand words, here you go:</p><p style="text-align:center;"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry588_1.jpg" width="224" height="336" /><p>Pretty!</p></p>]]></content:encoded></item><item><title>Jesus on E&#x27;s MP4s</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Music</category><dc:date>2008-03-09T08:39:31-07:00</dc:date><link>http://algorithm.com.au/blog/files/jesus-on-es-mp4.html#unique-entry-id-585</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/jesus-on-es-mp4.html#unique-entry-id-585</guid><content:encoded><![CDATA[<p>For all the oldskool Amiga demoscene folks out there, I&#8217;ve weirdly had a bit of nostalgia for the classic <a href="http://www.pouet.net/prod.php?which=5265">Jesus on E&#8217;s</a> demo from 1992.  It was was understandably not featured on <a href="http://www.mindcandydvd.com/">Mindcandy Volume 2</a>, although there are <a href="http://www.videosift.com/video/Jesus-On-Es-Full-Video-1992-Amiga-Demo-Classic">videos of it on the Web floating around</a>.  It&#8217;s somewhat amusing that the <span class="caps">MPEG</span>-4 video is around 120MB when the original version fit on two 880k disks.</p>

<p>So, I chopped up the <span class="caps">MPEG</span>-4 videos I found floating around on the Web, and exported the soundtrack to <span class="caps">MPEG</span>-4 audio files so I could throw them onto my iPod.  The tracks are available at:</p>


<ul>
<li><a href="http://www.algorithm.com.au/downloads/music/Jesus_on_Es-MP4.zip">http://www.algorithm.com.au/downloads/music/Jesus_on_Es-MP4.zip</a></li>
</ul>



<p>If you&#8217;re into oldskool techno and rave tracks from the ~1992 era, you can&#8217;t beat this stuff.  (And if you <em>don&#8217;t</em> like oldskool techno and rave tracks, the soundtrack will probably send you completely insane).  Have the appropriate amount of fun!</p>]]></content:encoded></item><item><title>Xcode Distributed Builds Performance</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2008-02-26T20:10:49-08:00</dc:date><link>http://algorithm.com.au/blog/files/xcode-distributed-builds-performance.html#unique-entry-id-584</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/xcode-distributed-builds-performance.html#unique-entry-id-584</guid><content:encoded><![CDATA[<p>[Sorry if you get this post twice&#8212;let&#8217;s say that our internal builds of RapidWeaver 4.0 are still a little buggy, and I needed to re-post this ;)]</p>

<p><a href="http://developer.apple.com/tools/xcode/">Xcode</a>, Apple&#8217;s <span class="caps">IDE </span>for Mac OS X, has this neat ability to perform <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/Resources/en.lproj/05_09_bs_speed_up_build/chapter_37_section_4.html">distributed compilations</a> across multiple computers. The goal, of course, is to cut down on the build time. If you&#8217;re sitting at a desktop on a local network and have a Mac or two to spare, distributed builds obviously make a lot of sense: there&#8217;s a lot of untapped power that could be harnessed to speed up your build. However, there&#8217;s another scenario where distributed builds can help, and that&#8217;s if you work mainly off a laptop and occasionally join a network that has a few other Macs around. When your laptop&#8217;s offline, you can perform a distributed build with just your laptop; when your laptop&#8217;s connected to a few other Macs, they can join in the build and speed it up.</p>

<p>There&#8217;s one problem with idea, though, which is that distributed builds add overhead. I had a strong suspicion that a distributed build with only the local machine was a significant amount slower than a simple individual build. Since it&#8217;s all talk unless you have benchmarks, lo and behold, a few benchmarks later, I proved my suspicion right.</p>


<ul>
<li>Individual build: 4:50.6 (first run), 4:51.7 (second run)</li>
<li>Shared network build with local machine only: 6:16.3 (first run), 6:16.3 (second run)</li>
</ul>



<p>This was a realistic benchmark: it was a full build of <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> including all its sub-project dependencies and core plugins. The host machine is a 2GHz MacBook with 2GB of <span class="caps">RAM.</span> The build process includes a typical number of non-compilation phases, such running a shell script or two (which takes a few seconds), copying files to the final application bundle, etc. So, for a typical Mac desktop application project like RapidWeaver, turning on shared network builds without any extra hosts evokes a pretty hefty speed penalty: ~30% in my case. Ouch. You don&#8217;t want to leave shared network builds on when your laptop disconnects from the network. To add to the punishment, Xcode will recompile everything from scratch if you switch from individual builds to distributed builds (and vice versa), so flipping the switch when you disconnect from a network or reconnect to it is going to require a full rebuild.</p>

<p>Of course, there&#8217;s no point to using distributed builds if there&#8217;s only one machine participating. So, what happens when we add a 2.4GHz 20&rdquo; Aluminium Intel iMac with 2GB of <span class="caps">RAM, </span>via Gigabit Ethernet? Unfortunately, not much:</p>


<ul>
<li>Individual build: 4:50.6 (first run), 4:51.7 (second run)</li>
<li>Shared network build with local machine + 2.4GHz iMac: 4:46.6 (first run), 4:46.6 (second run)</li>
</ul>



<p>You shave an entire four seconds off the build time by getting a 2.4GHz iMac to help out a 2GHz MacBook. A 1% speed increase isn&#8217;t very close to the 40% build time reduction that you&#8217;re probably hoping for. Sure, a 2.4GHz iMac is not exactly a build farm, but you&#8217;d hope for something a little better than a 1% speed improvement by doubling the horsepower, no? <a href="http://en.wikipedia.org/wiki/Gustafson's_law">Gustafson&#8217;s Law</a> strikes again: parallelism is hard, news at 11.</p>

<p>I also timed Xcode&#8217;s dedicated network builds (which are a little different from its shared network builds), but buggered if I know where I put the results for that. I vaguely remember that dedicated network builds was very similar to shared network builds with my two hosts, but my memory&#8217;s hazy.</p>

<p>So, lesson #1: there&#8217;s no point using distributed builds unless there&#8217;s usually at least one machine available to help out, otherwise your builds are just going to slow down. Lesson #2: you need to add a <em>significant</em> amount more <span class="caps">CPU</span>s to save a significant amount of time with distributed builds. A single 2.4GHz iMac doesn&#8217;t appear to help much. I&#8217;m guessing that adding a quad-core or eight-core Mac Pro to the build <em>will</em> help. Maybe 10 &times; 2GHz Intel Mac minis will help, but I&#8217;d run some benchmarks on that setup before buying a cute Mac mini build farm &mdash; perhaps the overhead of distributing the build to ten other machines is going to nullify any timing advantage you&#8217;d get from throwing another 20GHz of processors into the mix.</p>]]></content:encoded></item><item><title>Dick Gabriel on A Lot More Than Lisp</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2008-02-24T16:35:16-08:00</dc:date><link>http://algorithm.com.au/blog/files/dick-gabriel-seradio-lisp.html#unique-entry-id-583</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dick-gabriel-seradio-lisp.html#unique-entry-id-583</guid><content:encoded><![CDATA[<p>If you love programming, and especially if you love programming languages, there&#8217;s an episode of the <a href="http://www.se-radio.net/">Software Engineering Radio</a> podcast that has a fantastic interview with <a href="http://dreamsongs.com/">Dick Gabriel</a>, titled &#8220;<a href="http://+http://www.se-radio.net/podcast/2008-01/episode-84-dick-gabriel-lisp">Dick Gabriel on Lisp</a>&#8221;.  If you don&#8217;t know who Gabriel is, he&#8217;s arguably one of the more important programming language people around, is one of the <a href="http://www.jwz.org/doc/lemacs.html">founding fathers of XEmacs</a> (ne&eacute; Lucid Emacs), wrote the famous <a href="http://www.jwz.org/doc/worse-is-better.html">Worse is Better</a> essay (along with a pretty cool <a href="http://www.amazon.com/Patterns-Software-Tales-Community/dp/0195121236">book</a> that I&#8217;ll personally recommend), and also gave one of the most surreal and brilliant <a href="http://www.podbean.com/podcast-detail-episode/342059/episode-19-keynote----50-in-50">keynotes</a> that I&#8217;ve ever heard that received a standing ovation at HoPL <span class="caps">III </span>and <span class="caps">OOPSLA.</span></p>

<p>The episode&#8217;s about fifty minutes long, and Gabriel talks about a lot more than just Lisp in the interview: among other things, he gives some major insight into the essence of object-oriented message-passing, how functions are objects and objects are functions, what continuations are, <a href="http://weblog.raganwald.com/2006/11/significance-of-meta-circular_22.html">metacircularity</a>, and the relationship between <a href="http://www.agentsheets.com/lisp/XMLisp/"><span class="caps">XML </span>and S-expressions</a> (and why <span class="caps">XML </span>is just a glorified half-assed version of Lisp).  There&#8217;s also some great stories in the interview for computing historians: how the Common Lisp Object System was initially inspired by <a href="http://reddit.com/info/68sm6/comments/c036r71">Scheme and the original Actor language</a> (yep, &#8220;actors&#8221; as in &#8220;Erlang processes&#8221;), what AI research was like in the 1960s and &#8217;70s, and the story of how John McCarthy and his students implemented the first Lisp interpreter in one night.</p>

<p>A wonderful interview, and well worth listening to if programming languages is your <a href="http://www.fireflywiki.org/Firefly/Shindig">shindig</a>.</p>]]></content:encoded></item><item><title>Justice Kirby on Code as Law</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2008-02-24T06:35:47-08:00</dc:date><link>http://algorithm.com.au/blog/files/justice-kirby-code-as-law.html#unique-entry-id-582</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/justice-kirby-code-as-law.html#unique-entry-id-582</guid><content:encoded><![CDATA[<p>I found this <a href="http://www.builderau.com.au/news/soa/Google-Yahoo-make-lawmakers-impotent-says-Judge/0,339028227,339286214,00.htm">short article about law and code on builderAU</a> rather interesting.  The money quotes are the first and last paragraphs:</p>

<blockquote><p>Technology has outpaced the legal system&#8217;s ability to regulate its use in matters of privacy and fair use rights, said Kirby&#8230; &#8220;We are moving to a point in the world where more and more law will be expressed in its effective way, not in terms of statutes solidly enacted by the parliament&#8230; but in the technology itself&#8212;code,&#8221; said Kirby.</p></blockquote>

<p>I think that&#8217;s a great quote, and it shows that Justice Kirby has a pretty solid understanding of what code is, how it interacts with law, and that the <span class="caps">USA&#8217;</span>s Digital Millennium Copyright Act (DMCA)&#8212;and Australia&#8217;s Digital Agenda Act&#8212;are dangerous things.  (I do think that the builderAU article emphasis on Google and Yahoo being the two culprits seem odd, although it&#8217;s hard to say this without listening to Kirby&#8217;s original speech.)  I&#8217;ve always been a fan of Justice Kirby, and it&#8217;s nice to know that somebody-on-high understands that code-as-law is a problem, and it&#8217;s a complex one.</p>]]></content:encoded></item><item><title>FOMS 2008</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2008-02-21T19:40:34-08:00</dc:date><link>http://algorithm.com.au/blog/files/foms-2008.html#unique-entry-id-581</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/foms-2008.html#unique-entry-id-581</guid><content:encoded><![CDATA[<p>The <a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/HomePage">Foundations of Open Media Software</a> (FOMS) workshop took place last month, from the 24th to 25th of January.  <span class="caps">FOMS </span>is a rare opportunity for open-source multimedia developers and industry folks to get together all in one place, and the result is two days of intense discussion about issues such as encapsulation formats, codecs, video and audio output <span class="caps">API</span>s, media commons, and metadata&#8212;not to mention sharing a common hatred of Flash.  The first <span class="caps">FOMS </span>was held last year in 2007, and was a great melting pot for people from very different open-source multimedia projects, such as xine, xiph.org, GStreamer and Nokia, to get together.  This year&#8217;s <span class="caps">FOMS </span>proved to be just as successful; this time with folks from Sun, Opera and the <span class="caps">BBC </span>joining the fray.  </p>

<p>One wonderful thing about this <span class="caps">FOMS </span>was that a large number of the xiph.org folks (Monty, Derf, Rillian, Jean-Marc and MikeS) were all there.  xiph.org are one of the main providers of freely available multimedia standards, and it&#8217;s rare that their members have an opportunity to meet in person.  It&#8217;s a little strange that they met in Melbourne rather than in the <span class="caps">USA </span>where the majority of their members are, but hey, I&#8217;m sure they won&#8217;t complaining about that!</p>

<p>For me, there was a bit of an ominous atmosphere leading up to <span class="caps">FOMS </span>due to the recent outbreaks of &#8220;discussion&#8221; in December 2007 about the <a href="http://blog.gingertech.net/?p=22"><span class="caps">HTML5 </span>recommended video codec</a>.  (I use the one &#8220;discussion&#8221; lightly here, since it was a lot more like hearing one&#8217;s angry neighbour trying to break down a brick wall with their head, for about a week.)  It seemed obvious that the <span class="caps">HTML5 </span>video codec problem would be discussed at length at <span class="caps">FOMS, </span>but I hoped that it wouldn&#8217;t dominate discussion, since there were a lot better things to do with the combined intellectual might of all the attendees than talk about issues that were mostly political and arguably largely out of their hands to solve.</p>

<p>I&#8217;m glad to say that the <span class="caps">HTML5 </span>video codec problem was definitely discussed, but with a great focus on finding a solution rather than wailing on about the problem.  <a href="http://www.theora.org/benefits/">Ogg Theora</a> and <a href="http://en.wikipedia.org/wiki/Dirac_(codec)">Dirac</a>, represented by xiph.org and the <span class="caps">BBC </span>at <span class="caps">FOMS, </span>are two of the contenders for the <span class="caps">HTML5 </span>baseline video codec recommendation, and it was excellent to see that people were discussing technical aspects that may be hindering their adoption by the <span class="caps">W3C, </span>always keeping the bigger picture in mind.</p>

<p>There were also breakout groups that threw down some short-term and long-term <a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/CommunityGoals">goals</a> for the <span class="caps">FOMS </span>attendees: I personally took part in a discussion about metadata, text markup of video (subtitling, closed captions, and transcriptions), and video composition and aggregation (&#8220;video mashups&#8221;).  Shane Stephens would present a great talk at Linux.conf.au a few days later about <a href="http://linux.conf.au/programme/detail?TalkID=182">Web 2.0-style community-based video remixing</a>; if you&#8217;re interested at all in video mashups and video mixups, be sure to <a href="http://linux.conf.au/programme/wednesday">check out his talk</a>!</p>

<p>If you&#8217;re interested at all in the open-standards multimedia space, the <a href="http://www.annodex.org/events/foms2008/pmwiki.php/Main/Proceedings">proceedings of <span class="caps">FOMS</span></a> are available online thanks to the <span class="caps">FOMS</span> A/V team, with a big thanks to Michael Dale for bringing his incredible <a href="http://metavid.ucsc.edu/">metavid</a> video content management system to the humble <span class="caps">FOMS </span>site.  (You may also be interested in the <a href="http://www.w3.org/2007/08/video/report.html"><span class="caps">W3C</span> Video on the Web Workshop Report</a> that was very recently released.)  In an area that&#8217;s as complicated as multimedia, <span class="caps">FOMS </span>is tremendously valuable as a place for open-source developers to meet.  It was a great complement to Linux.conf.au, and here&#8217;s hoping it&#8217;ll be on again next year!</p>]]></content:encoded></item><item><title>Mac OS X Software List Updated</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2008-02-20T05:01:29-08:00</dc:date><link>http://algorithm.com.au/blog/files/mac-os-x-software-list-updated-for-leopard.html#unique-entry-id-580</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/mac-os-x-software-list-updated-for-leopard.html#unique-entry-id-580</guid><content:encoded><![CDATA[I've finally updated my <a href="../code/macosx/software/" rel="self" title="Software">Mac OS X software list</a> to be Leopard-aware, for those of you new to Apple's shiny little operating system.  Spotting the changes between the older version and newer one is left as an exercise for the reader :-).  (Boy I'm glad to have <a href="http://www.lorax.com/FreeStuff/TextExtras.html" rel="self">TextExtras</a> working with garbage-collected applications on Leopard!)<br />]]></content:encoded></item><item><title>The Australian Open 2008</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2008-02-09T18:53:52-08:00</dc:date><link>http://algorithm.com.au/blog/files/australian-open-2008.html#unique-entry-id-577</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/australian-open-2008.html#unique-entry-id-577</guid><content:encoded><![CDATA[<p>On the 19th of January, I left Sydney&#8217;s beautiful shores for a holiday in four parts: the <a href="http://www.australianopen.com/">Australian Open</a>, the <a href="http://www.annodex.org/events/foms2008/">Foundations of Open Media Software</a> (FOMS) conference, <a href="http://linux.conf.au/">Linux.conf.au</a>, and <a href="http://baacamp.org/">Kiwi Foo Camp</a>.  I&#8217;m in the middle of writing up about the conferences, so this is the first small blog entry in a series of four.</p>

<p>The Australian Open had upset-after-upset this year, being the first one in a very long time where neither the first nor second seeds made it through to the final.  We had a five-day ground pass that we didn&#8217;t quite use all five days of, but still managed to catch a couple of fantastic matches on it:</p>


<ul>
<li>James Blake vs Marin Cilic: all brawns and no brain.  There&#8217;s so much to like about two big guys always serving stuff at over 200km/h, and the only tactic is to just hit stronger and harder than the other guy.  (&#8220;If violence doesn&#8217;t solve your problem, you&#8217;re not using enough of it.&#8221;)</li>
</ul>




<ul>
<li>Hanley &amp; Paes vs Bopanna and Ram: It&#8217;s amazing watching the top double seeds&#8217; reaction speed at the net: you realise just how much innate talent these guys have, because no amount of training is going to make you that quick.</li>
</ul>




<ul>
<li><a href="http://en.wikipedia.org/wiki/The_Woodies">The Woodies</a> vs Pat Cash and John Fitzgerald: I&#8217;m glad I got to see Woodbridge and Woodforde play at least once in my life.  Now I&#8217;d just like to see a mixed legends pair of Agassi and Graf&#8230;</li>
</ul>




<ul>
<li>Rafael Nadal vs Jo-Wilfried Tsonga: Ah, our precious semi-finals ticket.  I expected this to be a three-set match; I just didn&#8217;t think it&#8217;d be a three-set match where Nadal lost.  (When was the last time Nadal lost in three sets to anybody?)  Tsonga was playing quite possibly the best tennis I&#8217;ve ever seen in my life.  Even <a href="http://en.wikipedia.org/wiki/Mark_Philippoussis">The Scud</a> playing in his best form couldn&#8217;t have matched Tsonga that night.</li>
</ul><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry577_1.jpg" width="400" height="297" /><p>It&#8217;ll be interesting to see whether Lleyton Hewitt regains a better reputation amongst Australians after this year&#8217;s Open, thanks to his marathon five-set win against Marcos Baghdatis that finished at 4:33am.  It&#8217;s amazing how much the media can distort reality: most people forget that Hewitt was #1 in the world for two years running, before Roger Federer came onto the scene, and is probably Australia&#8217;s best player in the past thirty to forty years.  Pat Rafter never made it to #1; Pat Cash never made it to #1.  Arguably Hewitt created some of the controversies himself, but I&#8217;m still amazed that so many Australians hold serious animosity toward him.</p>

<p>Tennis is one of those sports where watching it on TV doesn&#8217;t give you any indication of just how fast the balls are flying around, how fast a 200km/h serve really is, how fast the players are moving on the court, and how fast they&#8217;re reacting.  I&#8217;m very glad to say that two friends I went with to the Australian Open had never seen a live tennis match before, and both of them loved it.</p>

<p>As well as plain ol&#8217; tennis, we did of course take in a lot of the Melbourne culture, visiting many of the fine caf&eacute;s and rustic alleyways in the city, heading north to the Yarra Valley for a day, going to the markets at Southbank, and eating pancakes at <a href="http://melbournedesserts.com.au/winter-warmers/stokers.html">Stokers</a>.  One highlight was seeing James Morrison and Deni Hines at the Palms in the Crown Casino.  I think our little group of four at the Palms were the youngest people in the entire audience&#8230; by about a decade.  Morrison&#8217;s amusing obsession with his new vocoder keyboard and Deni Hines&#8217;s majestic voice made for a fantastic night of jazz.</p>

<p>All in all, my little Melbourne holiday proved to be a ton of fun and be incredibly relaxing at the same time.  This was all good days indeed, since I needed a ton of energy to survive through the next week&#8230;<br /><br /><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry577_2.jpg" width="320" height="240" />]]></content:encoded></item><item><title>Hacking Your iPhone Headphones</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2008-02-10T02:56:51-08:00</dc:date><link>http://algorithm.com.au/blog/files/iphone-headphones-hack.html#unique-entry-id-576</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/iphone-headphones-hack.html#unique-entry-id-576</guid><content:encoded><![CDATA[<p>Perhaps the most annoying feature of the iPhone is its recessed headphones jack:</p><a href="http://www.tinotopia.com/wordpress/archive/2007/07/06/another-iphone-deficiency/" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry576_1.jpg" width="200" height="150" /></a><p>This miserable little design decision has spawned an entire bloody <a href="http://theappleblog.com/2007/08/30/iphone-headphone-adapter-roundup/">industry</a> of headphones adapters just so that you can use your own preferred set of headphones with the thing (though admittedly some headphones adapters are <a href="http://crave.cnet.com/8301-1_105-9739497-1.html">way cooler</a> than others).  Me, I preferred a slightly cheaper hack.  And by <em>hack</em>, I mean <em>hack</em>saw.</p>

<p>Process:</p>


<ol>
<li><a href="http://www.youtube.com/watch?v=9nsP4QsMiFA"><del>G&#8217;day, where&#8217;s the cheese?</del></a>Get a kitchen knife.</li>
<li>Use kitchen knife obtained from step 1 to cut off the end of the rubber sheath at the end of your headphones plug.</li>
</ol>



<p>Et voil&agrave;!  Headphones that fit in rather nicely to that stupid jack.  It also seems that a <a href="http://iphone.macworld.com/2007/07/minor_surgery_enables_bose_hea.php">few</a> <a href="http://www.hackaday.com/2007/09/19/simple-iphone-headphone-mod/">other</a> <a href="http://people.vanderbilt.edu/~j.sullivan/Etymotic/">people</a> have done this as well, but they applied slightly more rigourous methods than me (i.e. they used one of those &#8220;proper knives&#8221; rather than, say, a kitchen knife).</p><a href="http://iphone.macworld.com/2007/07/minor_surgery_enables_bose_hea.php" rel="self"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry576_2.jpg" width="300" height="106" /></a><br /><br />It's entirely stupid that we have to do this in the first place, but on the bright side, it does solve one of the only major annoyances I've had with the thing, which elevates the iPhone from being "pretty damn good" to "near perfect" in my eyes.  One hopes that Apple won't be repeating this particular design decision for their next iPhone revision.<br />]]></content:encoded></item><item><title>Yay&#x2c; New Computing Books</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><category>&#x2026;on Coding</category><dc:date>2008-02-07T03:25:11-08:00</dc:date><link>http://algorithm.com.au/blog/files/new-books-feb-2008.html#unique-entry-id-575</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/new-books-feb-2008.html#unique-entry-id-575</guid><content:encoded><![CDATA[So now that I'm back from my f*ck-off-awesome trips to Melbourne and New Zealand (more on that later when I get a chance to blaerg about it), I am greeted with the following lovely selection of books from amazon.com:<br /><br /><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry575_1.jpg" width="512" height="384" /><br /><br />I guess I'll be doing some bedtime reading for the next few weeks.  (Note that I'm not actually a games programmer by trade&mdash;nor really a C++ programmer these days&mdash;but games coding tends to have interesting constraints such as high performance and memory management, which encourages a much better understanding of lower-level problems.)  I'm a little of the way through <em>Refactoring to Patterns</em>, and it's great so far.<br /><br />In other news, I think these three books in a row fit the definition of <a href="http://www.urbandictionary.com/define.php?term=alanic" rel="self">Alanic</a> rather well:<br /><br /><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry575_2.jpg" width="360" height="480" /><br /><br />Seriously, I didn't move 'em next to each other or anything.  I especially love it how <em>Java in a Nutshell</em> looks like it's about 1,000 pages.  Nutshell my arse.<br />]]></content:encoded></item><item><title>Conferencing&#x2c; January 2008</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2008-01-15T01:10:25-08:00</dc:date><link>http://algorithm.com.au/blog/files/conferencing-jan2008.html#unique-entry-id-574</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/conferencing-jan2008.html#unique-entry-id-574</guid><content:encoded><![CDATA[<p>I&#8217;m going to be doing a small bit of cityhopping in the next few weeks:</p>


<ul>
<li>19th to 23rd of January: in Melbourne for the <a href="http://www.australianopen.com/">Australian Open</a>,</li>
<li>24th to 25th of January: in Melbourne for <a href="http://www.annodex.org/events/foms2008/"><span class="caps">FOMS</span></a> (Foundations of Open Media Software),</li>
<li>26th to 28th of January: more Australian Open in Melbourne,</li>
<li>29th to 31st of January: in Melbourne for <a href="http://linux.conf.au/">Linux.conf.au</a>,</li>
<li>1st to 3rd of February: in Warkworth, New Zealand for <a href="http://en.wikipedia.org/wiki/Kiwi_Foo_Camp">Kiwi Foo Camp</a>.</li>
</ul>



<p>If you&#8217;re reading this and will be in Melbourne or Warkworth on those dates, drop me an email and let&#8217;s go <del>drinking</del> be civilised!</p>]]></content:encoded></item><item><title>The Year in Movies&#x2c; 2007</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2008-05-04T07:49:12-07:00</dc:date><link>http://algorithm.com.au/blog/files/2007-movies.html#unique-entry-id-573</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2007-movies.html#unique-entry-id-573</guid><content:encoded><![CDATA[<p>It seems that my exercise to keep track of every single movie I watched last year actually worked.  Here&#8217;s how 2007 turned out for me:</p>


<ul>
<li>5th of January: <em>Blood Diamond</em> (Hoyts Broadway, <strong>8</strong>/10)</li>
<li>1st of February: <em>Perfume</em> (Hoyts Cinema Paris, 7/10)</li>
<li>4th of February: <em>The Fountain</em> (Hoyts George St City, <strong>8</strong>/10)</li>
<li>10th of February: <em>Fight Club</em> (DVD, repeat viewing, <strong>8</strong>/10)</li>
<li>11th of February: <em>Pan&#8217;s Labyrinth</em> (Hoyts George St City, 7/10)</li>
<li>10th of March: <em>Quand j&#8217;&eacute;tais chanteur</em>, a.k.a <em>The Singer</em> (Palace Academy Paddington, 6.5/10)</li>
<li>18th of March: <em>Hors de Prix</em>, a.k.a. <em>Priceless</em> (Palace Academy Leichardt, 7/10)</li>
<li>24th of March: <em>The Illusionist</em> (Greater Union Tuggerah, 7/10)</li>
<li>3rd of April: <em>Hot Fuzz</em> (Hoyts Fox Studios, <strong>8.5</strong>/10).</li>
<li>10th of April: <em>300</em> (Hoyts Westfield Chatswood, 7.5/10).</li>
<li>7th of May: La Science des r&ecirc;ves, a.k.a. <em>The Science of Sleep</em> (Hayden Orpheum, 7/10).</li>
<li>12th of May: <em>Spider-man 3</em> (Hoyts Westfield Chatswood, 7.5/10)</li>
<li>22nd of May: <em>Shooter</em> (Greater Union Macquarie, 7/10).</li>
<li>27th of May: <em>Tales from Earthsea</em> (Dendy Newtown, 6.5/10).</li>
<li>30th of May: <em>Pirates of the Caribbean: At World&#8217;s End</em> (Hayden Orpheum, 7/10).</li>
<li>27th of June: <em>Knocked Up</em> (AMC Pacific Theatres, The Grove, Los Angeles, <strong>8</strong>/10).</li>
<li>29th of June: <em>Blades of Glory</em> (Air New Zealand <span class="caps">LAX </span>to <span class="caps">SYD, </span><strong>8</strong>/10).</li>
<li>1st of July: <em>Transformers</em> (Hoyts Broadway, <strong>8</strong>/10)</li>
<li>8th of July: <em>Ocean&#8217;s Thirteen</em> (Greater Union Bondi Junction, 7/10).</li>
<li>17th of July: <em>Harry Potter and the Order Of the Phoenix</em> (special groovy <span class="caps">RSP </span>screening at Hoyts, Fox Studios, 7/10).</li>
<li>2nd of August: <em>Notes on a Scandal</em> (DVD, 7/10).</li>
<li>5th of August: <em>Fabuleux destin d&#8217;Am&eacute;lie Poulain, Le</em>, a.k.a. Am&eacute;lie (DVD, <strong>8.5</strong>/10)</li>
<li>7th of August: <em>The Simpsons Movie</em> (Hoyts Fox Studios, 7.5/10).</li>
<li>17th of August: <em>Die Hard 4.0</em> (Hoyts Broadway, 7.5/10).</li>
<li>14th of September: <em>The Bourne Ultimatum</em> (Greater Union Bondi Junction, 6.5/10)</li>
<li>22nd of September: <em>Ratatouille</em> (Hoyts Broadway, <strong>8.5</strong>/10)</li>
<li>23rd of September: <em>An Inconvenient Truth</em> (DVD, <strong>8.5</strong>/10).</li>
<li>30th of September: <em>The Holiday</em> (DVD, 7/10)</li>
<li>5th of October: <em>Shaun of the Dead</em> (DVD, 7.5/10).</li>
<li>6th of October: <em>Rush Hour 3</em> (Hoyts Chatswood Westfield, 6.5/10).</li>
<li>13th of October: <em>Resident Evil: Extinction</em> (Shaw Cinemas, Isetan Singapore, 6.5/10).</li>
<li>4th of November: <em>A Chinese Odyssey</em> (DVD, 6.5/10).</li>
<li>18th of November: <em>Elizabeth: The Golden Age</em> (Reading Cinemas at Rhodes, 7/10).</li>
<li>2nd of December: <em>Stranger Than Fiction</em> (DVD, <strong>8</strong>/10).</li>
<li>9th of December: <em>Ghost in the Shell <span class="caps">S.A.C.</span>: Solid State Society</em> (DVD, <strong>9</strong>/10)</li>
<li>16th of December: <em>The Prestige</em> (DVD, <strong>8.5</strong>/10).</li>
<li>24th of December: <em>National Treasure: Book of Secrets</em> (Hoyts Chatswood Westfield, 7.5/10)</li>
<li>28th of December: <em>Aliens vs. Predator: Requiem</em> (Hoyts Chatswood Mandarin, 7.5/10)</li>
</ul>



<p>All in all, a pretty good movie year, with Solid State Society topping the list, and The Prestige, Stranger than Fiction, An Inconvenient Truth, Ratatouille, Am&eacute;lie, Transformers, Blades of Glory, Knocked Up, Hot Fuzz, The Fountain, and Blood Diamond as my personal A-graders.  Reflecting back, about the only two ratings I disagree with are <em>Pan&#8217;s Labyrinth</em> (should&#8217;ve been way higher, probably 8 or 8.5) and <em>An Inconvenient Truth</em> (which I don&#8217;t think <em>quite</em> deserved an 8.5).</p>

<p>I await the arrival of Wall&bull;E this year.  The <a href="http://www.apple.com/trailers/disney/walle/">trailer</a> looks like, well, it was done by Pixar.  Great humour, fantastic graphics (thank you 1080p), kid-friendly, and with the director and writer of Finding Nemo, Monsters Inc, and Toy Story 2.  I&#8217;m actually beginning to believe that Pixar have actually built a self-reinforcing system of <em>awesome</em> that is going to be impossible to knock down for at least the next fifty years.  It&#8217;s pretty incredible that most of their blockbuster movies have been directed and produced by completely different people.</p>

<p>To all my friends working at Pixar, I love you.  Please continue doing what you do best.</p>]]></content:encoded></item><item><title>Australians: 5GB mobile broadband for &#x24;39/month</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2007-12-18T20:19:05-08:00</dc:date><link>http://algorithm.com.au/blog/files/vodafone-3g-5gb-bundle.html#unique-entry-id-572</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/vodafone-3g-5gb-bundle.html#unique-entry-id-572</guid><content:encoded><![CDATA[<p>This is a Public Service Announcement for Australians: if you&#8217;re looking for mobile broadband access for your laptop (and what geek isn&#8217;t?), Vodafone are doing a <a href="http://vodafone.com.au/Business/BusinessSolutions/VodafoneMobileBroadband/Howmuchdoesitcost/HotOffer5GBMobileBroadband/index.htm">pretty spectacular deal</a> at the moment for &#8216;net access via their 3G/HSDPA network.</p>

<p>For $39/month, you get <strong>5GB</strong> of data; no time limits; no speed caps; and fallback from 3G to <span class="caps">GPRS </span>in regional areas where <span class="caps">HSDPA </span>isn&#8217;t available yet.  It&#8217;s a fantastic deal for people who live in metropolitan areas and work on the road a lot.</p>

<p>The main catch is that it&#8217;s a 24-month contract, so is a somewhat long time to be locked in to a plan.  However, I have a feeling that no other mobile Internet offering is going to be competitive with 5GB for $40/month within the next two years.  (Hell, $39/month for decent mobile Internet access is competitive with even some fixed-line <span class="caps">ADSL2 </span>providers.)  One other small catch is that you also can&#8217;t use multiple devices on the plan: it&#8217;s tied to the single <span class="caps">SIM </span>card that you purchase with the plan.  So, all you cool kids with 3G/GPRS-capable mobile phones, you can&#8217;t include that device on part of the bundle (<em><small><strong>looks sadly at iPhone</strong></small></em>).  Other than that, it&#8217;s really a pretty bloody good deal.</p>

<p>To compare this with other plans:</p>


<ul>
<li><a href="http://vodafone.com.au/Business/BusinessSolutions/VodafoneMobileBroadband/Howmuchdoesitcost/index.htm">Vodafone themselves</a> offer a craptacular 100MB for $29/month, which is barely enough to just check email these days.  (And that doesn&#8217;t include the modem, which is another $200).  A mere 1GB of data is $59/month, or $99 per month with no contract!</li>
</ul>




<ul>
<li><a href="http://www.telstra.com.au/business/products/internetanddata/mobilebroadbanddataplans/datapacks.htm">Telstra</a> are even worse (this is my surprised face): $59 for 200MB.  I&#8217;ll say that again: <em>$59 per month for 200MB</em>.  1GB is $89.</li>
</ul>




<ul>
<li><a href="http://my.bigpond.com/internetplans/broadband/wireless/plansandoffers/default.jsp">Bigpond</a> (who are <em>different</em> from Telstra<sup class="footnote"><a href="#fn1">1</a></sup>) offer vaguely competitive plans if you&#8217;re OK with a 10-hour-per-month time limit: that goes for $35/month.  (This translates to around 30 minutes per business day, which may be OK if you just hop online occasionally to check email.)  The $35 plan is the only timed plan, though: other than that, it&#8217;s $55 for 200MB (puke), or $85 for 1GB.</li>
</ul>




<ul>
<li>I can&#8217;t even find out whether Optus have mobile broadband plans available.  Comments?</li>
</ul>




<ul>
<li><a href="http://www.virginbroadband.com.au/wirelessbroadband/prices.aspx">Virgin Mobile Broadband</a> used to be pretty spectacular at $10/month for 1GB, and is still somewhat OK at $80/month for the same 1GB if it&#8217;s bundled with a phone plan.  Considering that Vodafone&#8217;s $39/month for 5GB, you can still pair their deal with a phone plan of your choice and have 5GB instead of 1GB, though.</li>
</ul>




<ul>
<li>Three (or 3, or whatever) just launched the next best alternative with their new <a href="http://xseries.three.com.au/xseries/pricing.shtml">X-Series plans</a>.  Their Gold plan is $30/month for 1GB, and their Platinum plan is $40/month for 2GB.  Interestingly, the X-Series plans give you a ton of free Skype minutes (2000 minutes on the 1GB plan and 4000 minutes on the 2GB plan), so if you&#8217;re a really heavy Skype person and chat about 130 hours per month, the Three deal may be better than Vodafone&#8217;s.</li>
</ul>



<p>The 3G modem they use is a Huawei <span class="caps">E220, </span>which looks like it&#8217;s the same modem used by Virgin and Three.  There appears to be <a href="http://the.taoofmac.com/space/Huawei/E220">Linux support</a> for it, and I can confirm that Mac supports works fine on Mac OS X 10.5 (Leopard) thanks to an <a href="http://discussions.apple.com/thread.jspa?threadID=1205443&amp;tstart=30">alternative driver</a>.</p>

<p>So, if you&#8217;re interested, visit the <a href="http://vodafone.com.au/Business/BusinessSolutions/VodafoneMobileBroadband/Howmuchdoesitcost/HotOffer5GBMobileBroadband/index.htm">Vodafone 5GB webpage</a>.  You can sign up through the Internet on the spot.  However, you can also sign up over the phone, and if you do, you have a 30-day &#8220;cooling off&#8221; period where you can opt out of your contract if you&#8217;re not happy with the service.  (Stupidly enough, you can&#8217;t get the 30-day cooling off period if you pop into a Vodafone store, because phone service has different conditions to face-to-face service.  Ja, whatever man.)  Hurry though: the deal expires on December 31, 2007.  Get it as a late Christmas present for yourself, I guess!</p>

<p class="footnote" id="fn1"><sup>1</sup> Telstra Mobility Broadband is a completely separate service from Bigpond Broadband, and Telstra and Bigpond are separate entities.  I found this out the hard way, when I was on a 10-hour-per-month <span class="caps">CDMA</span>/EVDO plan with Telstra, and couldn&#8217;t upgrade to the 10-hour-per-month 3G plan with Bigpond, because Telstra and Bigpond are separate things.  Ahuh.  (I couldn&#8217;t upgrade to a 10h plan on Telstra, because Telstra doesn&#8217;t even offer hourly plans anymore.)  Way to go for rewarding all your mobile Internet early adopters that braved <span class="caps">EVDO, </span>you frigtards.</p>]]></content:encoded></item><item><title>Coherence &#x26; Groupthink</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2008-11-17T12:01:20-08:00</dc:date><link>http://algorithm.com.au/blog/files/coherence-groupthink.html#unique-entry-id-571</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/coherence-groupthink.html#unique-entry-id-571</guid><content:encoded><![CDATA[<p>Charles Petzold, one of the most famous authors of Windows programming books out there, wrote a <a href="http://www.charlespetzold.com/blog/2007/10/081247.html">great entry on his blog over a year ago</a> that I&#8217;ve been meaning to comment on:</p>

<blockquote><p>Once you&#8217;ve restricted yourself to information that turns up in Google searches, you begin having a very distorted view of the world.</p>

<p>On the Internet, everything is in tiny pieces. The typical online article or blog entry is 500, 1000, maybe 1500 words long. Sometimes somebody will write an extended &#8220;tutorial&#8221; on a topic, possibly 3,000 words in length, maybe even 5,000.</p>

<p>It&#8217;s easy to convince oneself that these bite-sized chunks of prose represent the optimum level of information granularity. It is part of the utopian vision of the web that this plethora of loosely-linked pages synergistically becomes all the information we need.</p>

<p>This illusion is affecting the way we learn, and I fear that we&#8217;re not getting the broader, more comprehensive overview that only a book can provide. A good author will encounter an unwieldy jungle of information and cut a coherent path through it, primarily by imposing a kind of narrative over the material. This is certainly true of works of history, biography, science, mathematics, philosophy, and so forth, and it is true of programming tutorials as well.</p>

<p>Sometimes you see somebody attempting to construct a tutorial narrative by providing a series a successive links to different web pages, but it never really works well because it lacks an author who has spent many months (or a year or more) primarily structuring the material into a narrative form.</p>

<p>For example, suppose you wanted to learn about the American Civil War. You certainly have plenty of online access to Wikipedia articles, blog entries, even scholarly articles. But I suggest that assembling all the pieces into a coherent whole is something best handled by a trained professional, and that&#8217;s why reading a book such as James McPherson&#8217;s Battle Cry of Freedom will give you a much better grasp of the American Civil War than hundreds of disparate articles.</p>

<p>If I sound elitist, it&#8217;s only because the time and difficulty required for wrapping a complex topic into a coherent narrative is often underestimated by those who have never done it. A book is not 150 successive blog entries, just like a novel isn&#8217;t 150 character sketches, descriptions, and scraps of dialog.</p></blockquote>

<p>A related point I&#8217;d like to make is that people tend to read things that reinforce their viewpoints, and avoid things that go against their beliefs.  If you&#8217;re a <a href="http://www.imdb.com/title/tt0057012/">left-wing commie pinko</a> in Sydney, you&#8217;re probably more likely to read the Sydney Morning Herald as your newspaper; if you&#8217;re a right-wing peacenik, you&#8217;ll probably prefer The Australian instead.  If you&#8217;re a functional programming maven who sneers at C, you probably hang around Haskell or <span class="caps">O&#8217;C</span>aml or Erlang or Scheme geeks.  If you&#8217;re a Mac programmer, you talk all day about how beautiful and glorious the Cocoa frameworks are, and probably have a firm hatred of C++ (even though there&#8217;s a decent chance you&#8217;ve never even used the language).</p>

<p>Hang around with other cultures sometimes.  Like travelling, it&#8217;s good for you; it broadens your perspective, and gives you a better understanding of your own culture.  The human nature of seeking confirmation of your own viewpoints, combined with Petzold&#8217;s astute observations about learning in bite-sized chunks, means that it&#8217;s incredibly easy to find information on the Internet that only explains one side of the story.  How many people on your frequented mailing lists, <span class="caps">IRC </span>channels, Web forums or Twitter friends have similar opinions to you, and how many people in those communities truly understand other systems and have been shot down whenever they&#8217;ve tried to justify something valid that&#8217;s contrary to the community&#8217;s popular opinion?  I&#8217;m not saying that hanging around like-minded communities is a bad idea; I&#8217;m simply saying to be aware of <a href="http://en.wikipedia.org/wiki/Groupthink">groupthink</a> and self-reinforcing systems, and break out of your comfort zone sometimes to learn something totally different and contrary to what you&#8217;re used to.  Make the effort to find out the whole picture; don&#8217;t settle for some random snippets of short tidbits that you read somewhere on the Web.  Probably the best article I&#8217;ve ever read on advocacy is Mark-Jason Dominus&#8217;s <a href="http://www.perl.com/pub/a/2000/12/advocacy.html">Why I Hate Advocacy</a> piece, written eight years ago in 2000.  It still holds true today.</p>]]></content:encoded></item><item><title>Raganwald on Geek Attitude</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-10-22T10:19:16-07:00</dc:date><link>http://algorithm.com.au/blog/files/raganwald-on-geek-attitude.html#unique-entry-id-570</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/raganwald-on-geek-attitude.html#unique-entry-id-570</guid><content:encoded><![CDATA[<p><a href="http://weblog.raganwald.com/2007/10/how-to-use-blunt-instrument-to-sharpen.html">Reg Braithwaite has said very eloquently</a> something I&#8217;ve been meaning to express for a long time:</p>

<blockquote><p>When someone says something outrageous, like &#8220;f*ck compilers and their false sense of security&#8221;, it is not important whether I happen to think that programming languages with strong, expressive type systems are valuable (hint: I do). What is important is to look at this statement and ask yourself: Is there just one thing in there, one kernel of wisdom that I can extract and use to be a better programmer?</p></blockquote>

<p>I <a href="http://www.algorithm.com.au/blog/files/geek-culture-and-criticism.php">wrote about geek culture and criticism earlier</a>, but Braithwaite knocks it up a notch and hammers the point home in a single paragraph.  To use an analogy, being a good geek is like being a good partner in a relationship&#8230; step one: <em>listen</em>.  Step two: <em>empathise</em>.  (Step three: profit!)</p>]]></content:encoded></item><item><title>Lines of Code</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-10-22T10:49:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/dons-lines-of-code.html#unique-entry-id-569</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dons-lines-of-code.html#unique-entry-id-569</guid><content:encoded><![CDATA[<p>Haskell magician <a href="http://www.cse.unsw.edu.au/~dons/">Don Stewart</a> echoes my own opinion on lines of code in his <a href="http://www.ludd.ltu.se/~pj/hw2007/HaskellWorkshop.html">Haskell Workshop demo on xmonad</a>:</p>

<blockquote><p>A couple of nice refactorings happened when we found data structures that fit better, and you dramatically drop down in the number of lines of code.  So we use lines of code as a bit of a heuristic for working out when code sucks.  If something gets really big, it probably needs to be rewritten.</p></blockquote>

<p>I&#8217;m staring at a 60,000 line code base right now that I&#8217;m positive could be under 30,000 lines of code if it had a good rewri&#8230; erm, <a href="http://www.refactoring.com/">refactoring</a>.  Sometimes when you can&#8217;t figure out what&#8217;s going on in a function that&#8217;s a thousand lines long, the best solution is to rewrite the thing in a hundred lines instead.  (And that time, I really did mean rewrite, not refactor.)</p>

<p><strong>Update</strong>: Steve Yegge writes a <a href="http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html">good essay about code size</a>, and believes that &#8220;the worst thing that can happen to a code base is size&#8221;.  (If only he applied that principle to his blog posts as well&#8230;)</p>]]></content:encoded></item><item><title>All&#x27;s Well That Eats Well</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-10-05T08:59:40-07:00</dc:date><link>http://algorithm.com.au/blog/files/alls-well-that-eats-all.html#unique-entry-id-567</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/alls-well-that-eats-all.html#unique-entry-id-567</guid><content:encoded><![CDATA[<p>In the past two weeks, I&#8217;ve been wining and dining it up indeed&#8230;</p>


<ul>
<li>30th of September: Dinner at <a href="http://www.capitantorres.com.au/">Capitan Torres</a> in the <span class="caps">CBD, </span>one of the finer Spanish restaurants in Sydney.  Their paella and grilled octopus tapas are godly, and their chorizo is ohhhh mmmmm yumm.</li>
<li>1st of October: High Tea at the <a href="http://www.smh.com.au/articles/2006/06/19/1150701476996.html">Gunner&#8217;s Barracks</a> in Mosman, with stunning views of Sydney harbour, lovely tea, and a perfect 30&#x00b0; day.</li>
<li>5th of October: Lunch at <a href="http://www.smh.com.au/news/restaurant-reviews/forty-one/2007/09/04/1188783208780.html">Forty One</a> at Chifley Plaza; $35 for melt-in-your-mouth salmon, and stunning views from 40 levels above Sydney (even from the bathroom!)</li>
<li>6th of October: Breakfast at <a href="http://www.tablesonline.com.au/restaurant/NSW/Roseville/Echo-on-the-Marina/index.html">Echo on the Marina</a> in Roseville (near Echo Point park).  An excellent place on the North side to go to for brekky; for the Eastern suburbs yuppies, I also love <a href="http://www.triobondi.com.au/">Trio</a> at Bondi Beach.</li>
</ul>



<p>All this after recovering from a ski trip where I had the best cabernet savignon and raspberry strudel in my entire life (thanks <a href="http://www.imprecise.org/">Matt</a>)!  Of course, I&#8217;d also interspersed fine restaurant samplings with visits to <a href="http://maps.google.com/maps?client=safari&amp;ie=UTF8&amp;oe=UTF-8&amp;q=gelatiamo&amp;near=Lindfield%2C+NSW%2C+Australia&amp;fb=1&amp;cid=-33774521%2C151167894%2C16846725065388854398&amp;li=lmd&amp;z=14&amp;iwloc=A&amp;om=1">the best gelato place in the entire freaking world</a>.  So life ain&#8217;t too bad right now.</p>

<p>For the Sydneysiders, remember that October is <a href="http://gfm.smh.com.au/">Good Food Month</a>!  Make sure you check out the <a href="http://gfm.smh.com.au/eventcategory_list.asp?intcategoryid=13">Let&#8217;s Do Lunch</a> deals, where the best restaurants in town do $35 lunches.  (Well, except for <a href="http://grabyourfork.blogspot.com/2005/04/tetsuyas-sydney.html">Tetsuya&#8217;s</a>&#8230;)   There&#8217;s also night noodle markets markets at Hyde Park&#8230; sigh, what a shame I&#8217;ll be off to Singapore this month and will miss out on the festivities.  Oh well, I suppose heavenly dumplings, $2 chicken rice and chilli crab will have to do instead; boo hoo, O woe is me, etc etc.</p>]]></content:encoded></item><item><title>Starcraft: The Zerg Campaign</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2007-09-23T18:02:17-07:00</dc:date><link>http://algorithm.com.au/blog/files/starcraft-zerg-summary.html#unique-entry-id-564</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/starcraft-zerg-summary.html#unique-entry-id-564</guid><content:encoded><![CDATA[<p>It appears that <a href="http://andrewlee008.spaces.live.com/">Andrew Lee</a> has finished the Zerg Campaign in Starcraft.  Amusement follows.</p>

<blockquote><p>Overmind: Greetings underlings. I&#8217;m so cool I shit ice-cream.  And I&#8217;ve got a new toy - this super important mega-death weapon thing that&#8217;s currently breeding in a Chrysalis. It&#8217;s a big big secret what&#8217;s inside but when she pops out, she&#8217;ll lay the smackdown on <em>everything</em>! I&#8217;m not telling anyone what&#8217;s inside the chrysalis so it&#8217;ll be a <em>total</em> surprise when she awakens. Also, since hot babe Kerrigan just died in Chapter 1, it can&#8217;t possibly be her. And if it <em>is</em> her (which it&#8217;s not), it&#8217;ll be such a cunning plot twist that you&#8217;ll wet yourself. <br />
 <br />
It&#8217;s like <em>totally</em> important that this Chrysalis thing is protected. So, amongst all my legions of creatures, I am going to choose&#8230; my most young and inexperienced Cerebrate to protect it.<br />
 <br />
All the other Cerebrates: Erm&#8230; boss&#8230; you sure about that? <br />
 <br />
Overmind: Of course I&#8217;m sure! I&#8217;m the Overmind! Okay&#8230; so little young cutie teacher&#8217;s pet newbie Cerebrate, there&#8217;s a few things you need to know before you begin your life as <em>protector of the chrysalis</em>&#8230; are you ready? <br />
 <br />
Newbie Cerebrate: Yes boss.<br />
 <br />
Overmind: Ok. This&#8230; is a drone.<br />
 <br />
All the other Cerebrates: Oh for fuck&#8217;s sake.<br />
 <br />
Overmind: And when you have enough minerals, you can build a Pwning Spool.<br />
 <br />
Newbie Cerebrate: Minerals&#8230; Pwning Spool&#8230; Got it.<br />
 <br />
Cerebrate Daggoth: Things sure are dull now that Overmind is cuddling Newbie over there. Hey Zasz, can I ask you something?<br />
 <br />
Cerebrate Zasz: Sure Daggoth. <br />
 <br />
Daggoth: So, we&#8217;re like masters of evolution right? <br />
 <br />
Zasz: Yeah.<br />
 <br />
Daggoth: So we can evolve from little larvae things to become anything at all right?<br />
 <br />
Zasz: Yeah.<br />
 <br />
Daggoth: So, we could look like&#8230; I dunno&#8230; Jessica Alba&#8230; or the Asian chick from Battlestar Gallactica&#8230; but instead we look like pulsating grey pieces of shit. <br />
 <br />
Zasz: Sucks dunnit. Anyway, that&#8217;s why Overmind nabbed Kerrigan. He&#8217;s been totally getting into Japanese tentantacle porn&#8230;<br />
 <br />
Daggoth: &#8230;<br />
 <br />
Overmind: And then you right click and build a Hydralisk Den. That let&#8217;s you build Hydralisks. That&#8217;s why it&#8217;s called a <em>Hydralisk</em> Den. <br />
 <br />
Newbie: Hey boss. I&#8217;m grateful that you&#8217;re taking the time to explain all this to me. But it&#8217;s been like 15 levels now and I think I&#8217;m ready to do a bit more. How about we push the storyline a bit. <br />
 <br />
Overmind: Ok. Go kill Terrans.<br />
 <br />
Newbie: <small>(Kills Terrans)</small><br />
 <br />
Overmind: Go kill Protoss.<br />
 <br />
Newbie: <small>(Kills Protoss)</small><br />
 <br />
Overmind: Go kill renegade Zerg.<br />
 <br />
Newbie: <small>(Kills renegade Zerg)</small> Script writers took a break on this chapter huh? <br />
 <br />
Overmind: yeah. Go kill more stuff till the Chrysalis thing hatches.<br />
 <br />
Newbie: Okay. <br />
 <br />
Raynor: Hey, I&#8217;ve been having these wacky dreams&#8230; as if Kerrigan were calling out to me. But I know that&#8217;s impossible because she died in Chapter 1. <br />
 <br />
Zerg Kerrigan: Hi everyone! I&#8217;m back. It was me in the Chrysalis. How cool and unexpected was that! <br />
 <br />
Everyone with IQ over 7: Shit me a brick! We all just wet ourselves!</p>

<p>Raynor: Oh my God. Sarah! What have they done to you? <br />
 <br />
Zerg Kerrigan: I&#8217;m a Zerg now. <small>(wins Most Obvious Statement award)</small><br />
 <br />
Raynor: Well, I&#8217;ve still got a hard-on for you. So&#8230;are we going to bonk or are you going to kill me?<br />
 <br />
Zerg Kerrigan: Well, I want to kill you. But some strange lingering emotion inside me compels me to let you go. Some emotion stronger than any Zerg power over me. <span class="caps">I&#8230;</span> I don&#8217;t know what it could be. Leave Jimmy. Leave now.. before it&#8217;s too late. Must&#8230; control&#8230; (but how about we get together in the expansion set) </p>

<p>Raynor: Ok. Bye.</p>

<p>Zeratul: I&#8217;m an invisible Dark Templar Protoss. No one can see me and I&#8217;ve got this cool Jedi Lightsabre! I&#8217;m hunting Cerebrates&#8230; <em>Charrge</em>! <small>(kills Zasz)</small><br />
 <br />
Zasz: Arrrggh <small>(dies)</small> </p>

<p>Overmind: Shame about Zasz. But when Zertaul shoved his light sabre up Zasz&#8217;s ass, I connected with Zertaul&#8217;s mind and now I know where the Protoss Homeworld is! Suck <em>that</em> Zeratul. <br />
 <br />
Zertaul: Bugger. <small>(runs away)</small></p>

<p>Overmind: Cool, let&#8217;s go invade the Protoss Homeworld. The most important thing there is the Khaldarin Crystals, the <em>source of all power</em>!!! Since this is the most important thing ever after protecting the Chrysalis, I&#8217;m going to pick the Newbie Cerebrate again to take control of all my forces. Newbie, go to the Protoss Homeworld, steal the crystals and then kill all the Protoss there. <br />
 <br />
Newbie: Hey big boss, can I ask you a few questions?<br />
 <br />
Overmind: Of course my little cupcake:<br />
 <br />
Newbie: Well firstly, in Chapter 1, Mensk and Kerrigan turned on that one Psi-emitter rubics cube and &#8220;Zerg from across the galaxy&#8221; were lured to it. So how is it that the Protoss Homeworld, filled with 10 billion Psychic Protoss, is completely invisible to us? <br />
 <br />
Overmind: Err&#8230;<br />
 <br />
Newbie: And then there&#8217;s this thing about the Khaldarin Crystals. We only just found out about the Protoss Homeworld five minutes ago when Zeratul shoved his sabre up Zasz&#8217;s ass and you looked into his mind&#8230;so how is it that we know all about the Crystals and exactly where they are, so much so that we&#8217;ve set up a big friggin&#8217; Neon Lit beacon over the beacon saying &#8220;BRING <span class="caps">DRONE HERE</span>&#8221;. But the Protoss, who have lived on the planet since forever <span class="caps">AND </span>who have a special upgrade called &#8220;Khaldarin Amulet&#8221;, don&#8217;t have a clue about the Crystals? <br />
 <br />
Overmind: Shut the fuck up. Now, go steal the crystals. Just look for the beacon.<br />
 <br />
Newbie: Yes boss. <small>(steals the Crystals)</small><br />
 <br />
Overmind: Now do the Crystal Thing&#8230; and I can plant my fat ass down on the Protoss Homeworld. <span class="caps">YEAH</span>!</p></blockquote>]]></content:encoded></item><item><title>Erlang Interview in BuilderAU</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-09-17T18:22:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/builderau-erlang-interview.html#unique-entry-id-563</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/builderau-erlang-interview.html#unique-entry-id-563</guid><content:encoded><![CDATA[<p>It seems that I&#8217;ve been interviewed by BuilderAU about <a href="http://www.builderau.com.au/program/soa/Interview-The-importance-of-being-Erlang/0,339024614,339282123,00.htm">The Importance of Being Erlang</a>.  (And I quite like the pun, even if it wasn&#8217;t my idea.)  Feedback on it is always welcome, of course&#8212;shoot me an email if you have any questions.</p>

<p>And yeah, I know I haven&#8217;t been blogging in nearly three months; I&#8217;ve been secretly working on an image editor in my spare time.  (Sorry, that was a <a href="http://twitter.com/siracusa/statuses/261604652">small Mac developer in-joke</a>.)  I&#8217;ve got nearly two dozen articles that are half-written here that I&#8217;ve been meaning to finish.  However, there&#8217;s nothing like being sick to make you catch up on reading books and updating your blog.  (&#8230; and play more <a href="http://en.wikipedia.org/wiki/BioShock#Reviews">Bioshock</a>, even if it basically just <a href="http://www.escapistmagazine.com/articles/view/editorials/zeropunctuation/1394-Zero-Punctuation-BioShock">a normal-mapped phong-shaded bastard child of System Shock 2</a>.  All hail <span class="caps">SHODAN</span>!)</p>]]></content:encoded></item><item><title>Apple Advertising</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2007-09-23T18:17:12-07:00</dc:date><link>http://algorithm.com.au/blog/files/apple-advertising.html#unique-entry-id-560</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/apple-advertising.html#unique-entry-id-560</guid><content:encoded><![CDATA[<a href="http://www.apple.com/imac/design.html"><img src="http://images.apple.com/au/imac/images/gallery/imackeyboard_4_20070807.jpg"/ width="100%"></a>
]]></content:encoded></item><item><title>On D&#x26;D and C++</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><category>&#x2026;on Coding</category><dc:date>2007-09-18T04:53:56-07:00</dc:date><link>http://algorithm.com.au/blog/files/on-dnd-and-cxx.html#unique-entry-id-557</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/on-dnd-and-cxx.html#unique-entry-id-557</guid><content:encoded><![CDATA[<p>Quoteth <a href="http://www.cse.unsw.edu.au/~chak/">Manuel Chakravarty</a>:</p>

<blockquote><p>Dungeons and Dragons is the C++ of role-playing games.</p></blockquote>]]></content:encoded></item><item><title>Starcraft: The Terran Campaign</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2007-09-17T18:16:53-07:00</dc:date><link>http://algorithm.com.au/blog/files/starcraft-terran-summary.html#unique-entry-id-556</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/starcraft-terran-summary.html#unique-entry-id-556</guid><content:encoded><![CDATA[<p><a href="http://andrewlee008.spaces.msn.com/">One o&#8217; me good mates</a>, sent me an email recently with a rather chortle-worthy summary of the <del>Human</del>Terran plot of Starcraft I.  Without further ado:</p>

<blockquote><p>Raynor: Oh shit, nasty alien things with big teeth. Let&#8217;s put our faith in the supremely experienced commander who will save us (after I teach him how to build a command center, barracks and use the &#8216;repair&#8217; button).<br />
&nbsp;<br />
Zergling: Grrrrowl! Yummm!</p>

<p>Raynor: <small>(shoots gun from his cool looking vulture bike)</small></p>

<p>Zergling: Gah! <small>(dies)</small></p>

<p>Duke: Raynor. You&#8217;re a bad bad man. Why did you kill that cute little Zergling?</p>

<p>Raynor: It tried to eat me.</p>

<p>Duke: Well, tough. You should&#8217;ve asked me permission first because I&#8217;m the big boss of the Confedration and on one can take a shit unless I say so. Off to prison with you!</p>

<p>Raynor: Help! Get me outa here!</p>

<p>Mengsk: I&#8217;ll help! <small>(opens the door)</small> Hi. I&#8217;ve got this terrorist label but actually I&#8217;m a nice guy. The Confederation are the <span class="caps">REAL </span>baddies. Just to prove it, let me introduce you to my hot babe assistant. Remember, only good guys have hot babe assistants. </p>

<p>Kerrigan: Hi!</p>

<p>Raynor: &#8230;</p>

<p>Kerrigan: Wha! you perv!<br />
&nbsp;<br />
Raynor: Huh what? How did you you know that I was thinking about having hot monkey sex with you up against the side of my bike whilst wearing a ballerina&#8217;s tutu?<br />
&nbsp;<br />
Mengsk: She&#8217;s a telepath.</p>

<p>Kerrigan: Well, yes. And you&#8217;re staring at my tits.</p>

<p>Duke: Erm&#8230; fellas? Sorry to bother you&#8230; my ship sorta crashed in the middle of all these Zerg and they want to eat me.&nbsp;<br />
&nbsp;<br />
Raynor: Suck ass!<br />
&nbsp;<br />
Mengsk: I&#8217;ll save you.<br />
&nbsp;<br />
Raynor: <span class="caps">WHAT</span>!?!?<br />
&nbsp;<br />
Mengsk: Well&#8230; Raynor will save you.<br />
&nbsp;<br />
Raynow: <span class="caps">WHAT</span>!?!?! Oh&#8230; ok. <small>(saves Duke)</small><br />
&nbsp;<br />
Duke: Mengsk? <span class="caps">YOU</span>! I hate you with the white hot intensity of a thousand suns. I teach children to eat the liver of your dogs. You are a blight on all humanity and the scourge of the universe.&nbsp;The Confederation will never rest until we destroy you entirely!<br />
&nbsp;<br />
Mengsk: Join me!</p>

<p>Duke: Ok.</p>

<p>Mengsk: Cool&#8230; Duke, what&#8217;s say you and I go kill all your former buddies in the Confederation.<br />
&nbsp;<br />
Duke: Ok.<br />
&nbsp;<br />
Raynor: uh&#8230; what about the Zerg?</p>

<p>Mengsk: No no. Much more important to kill Confederates.<br />
&nbsp;<br />
Raynor / Kerrigan: uh&#8230; why?<br />
&nbsp;<br />
Mengsk: Just do as you&#8217;re told.<br />
&nbsp;<br />
Tassadar: Hey guys.&nbsp;We Protoss honour, respect and revere all sentient life. Therefore, we&#8217;re going to incinerate your planet.&nbsp;<br />
&nbsp;<br />
Mengsk:&nbsp;Oh shit. That means we don&#8217;t get to kill Confederates. Kerrigan, go kill the Protoss so that&nbsp;I can use this Psi-transmitter gadget to lure Zerg&nbsp;to&nbsp;kill Confederates.&nbsp;<br />
&nbsp;<br />
Kerrigan / Raynor: Erm&#8230; is this making any sense?</p>

<p>Kerrigan: I must do as I&#8217;m told because I&#8217;m a hot babe assistant. Ok, off I go to kill Protoss and lure Zerg and plant this Psi thingy.</p>

<p>Zerg Overmind: Who&#8217;s the hot chick in the catsuit. She&#8217;d look even cooler with green blood. <span class="caps">I&#8221;</span>m going to infest her&#8230; this will be fun. <small>(infests Kerrigan)</small> <small>(Then Zerg go on to kill all Confederates)</small></p>

<p>Mengsk: <span class="caps">YAY</span>! All the Confederates died!</p>

<p>Raynor: You suck Mengsk. You too Duke. I&#8217;m leaving and coming back in a later chapter filled with vengenace to whomp your sorry asses. I&#8217;ll probably fall in love with Kerrigan since I&#8217;m the obvious hero and she&#8217;s the obvious heroine, but she&#8217;s infested with Zerg blood now&#8230; but I&#8217;ll use love to reach into the depths of her heart and rescue her and turn her back to the light side. </p></blockquote>

<p>Andrew, please finish the Zerg and Protoss campaigns soon; we&#8217;d love to hear more.</p>]]></content:encoded></item><item><title>Gmail Losing Emails?</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2007-09-24T06:27:38-07:00</dc:date><link>http://algorithm.com.au/blog/files/gmail-losing-emails.html#unique-entry-id-554</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/gmail-losing-emails.html#unique-entry-id-554</guid><content:encoded><![CDATA[<p>Like a lot of other folks, I&#8217;d switched over to Gmail my primary email account.  Their Web interface is great, and Gmail&#8217;s spam filtering is possibly the best I&#8217;d ever seen.  However, there was one rather small problem, where by &#8220;rather small problem&#8221; I mean &#8220;kinda huge problem&#8221;: I was losing emails.  As in, I <em>know</em> the person had sent me emails, and I never received them.  Yep, I checked the spam folder.  The emails never showed up<sup class="footnote"><a href="#fn1">1</a></sup>.</p>

<p>I was willing to forgive this once or twice, seeing as how complicated and fragile all these <span class="caps">SMTP </span>shenanigans is.  (Seriously, <span class="caps">SMTP </span>has to contend with <span class="caps">FTP </span>for the <a href="http://www.googlefight.com/index.php?lang=en_GB&amp;word1=SMTP+sucks&amp;word2=FTP+sucks">Most Stupid Protocol Ever Award</a>.)  However, after Gmail lost emails three or four times and I received the emails successfully at my other, non-Gmail accounts, I couldn&#8217;t ignore the problem any longer.  The last straw was when one of my friends forwarded me an email three times <em>from another Gmail account</em> and none of the mails came through.</p>

<p>I&#8217;ve since switched to <a href="http://www.pobox.com/">Pobox.com</a> and have been a happy chappy since.  Pobox&#8217;s spam filtering isn&#8217;t quite as good as Gmail&#8217;s, but it&#8217;s good enough, and their once-per-day spam report where you can simply click on a false positive spam to whitelist and retrieve it is just brilliant.  That feature alone is worth the $20/year.  If they had an email forwarding address where I could send them the rest of my spams to improve their overall spam training, Pobox would be perfect.  If you&#8217;re looking for a powerful, reliable email forwarding service, I can recommend Pobox without hesitation.</p>

<p>So, here&#8217;s a question: has anybody else out there lost emails with Gmail?  Surely it must&#8217;ve happened to <em>somebody</em> besides me.  (Oh, and if you read this, work for Google and would like to figure out what&#8217;s going on, drop me a mail: I have the Message-IDs of at least a couple of the emails that were lost.  Maybe we can all work this out.)</p>

<p class="footnote" id="fn1"><sup>1</sup> The first time I experienced any email lossage with Gmail was, very unfortunately, a business-related mail: one of our <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> customers had a Gmail address, and despite me sending two or three emails to him, he claimed never to have never received them.  Of course, said customer thought that our customer support was rather lacking when he never received an email within a month, despite me sending one off within 14 hours of seeing the problem.  A small drama ensued, threats were being made to post about our lack of customer care to the front page of Digg, etc etc.  Thankfully everything was sorted out at the very last minute and unhappy people were made happy again, but geez, it&#8217;s a nice reminder of how things can go wrong very fast when communication channels break down.</p>]]></content:encoded></item><item><title>WWDC Craziness</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><category>Life &#x26; Travels</category><dc:date>2007-06-13T06:41:28-07:00</dc:date><link>http://algorithm.com.au/blog/files/wwdc-2007-ouch.html#unique-entry-id-545</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/wwdc-2007-ouch.html#unique-entry-id-545</guid><content:encoded><![CDATA[<p style="text-align:center;"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry545_1.jpg" width="360" height="480" /><ul>
<li>Meet new people (✓),</li>
<li>Catch up with fellow Aussies I haven&#8217;t seen in years (✓),</li>
<li>Go to parties (✓),</li>
<li>Behave appropriately at said parties (✓),</li>
<li>Use the phrase &#8220;<a href="http://www.imdb.com/title/tt0093779/quotes">Inconceivable!</a>&#8221; inappropriately (✓),</li>
<li>Work on inspiring new code (✓),</li>
<li>Keep up with Interblag news (✗),</li>
<li>Keep up with <span class="caps">RSS </span>feeds (✗),</li>
<li>Keep up with personal email (✗),</li>
<li>Keep up with work email (✗),</li>
<li>Installed Leopard beta (✓),</li>
<li>Port code to work on Leopard (✗),</li>
<li>Successfully avoid Apple Store, Virgin, Banana Republic et al in downtown San Francisco (✓),</li>
<li>Keep family and friends at home updated (✓),</li>
<li>Mention the words &#8220;Erlang&#8221;, &#8220;Haskell&#8221; and &#8220;<a href="http://www.metaobject.com/papers/Higher_Order_Messaging_OOPSLA_2005.pdf">higher-order messaging</a>&#8221; to <del>puny humans</del>fellow Objective-C programmers (✓),</li>
<li>Write up <a href="http://research.ihost.com/hopl/">HoPL <span class="caps">III</span></a> report (✗),</li>
<li>Find and beat whoever wrote <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTokenField_Class/Reference/Reference.html"><span class="caps">NST</span>okenField</a> with a large dildo (✗),</li>
<li>Get food poisoning <em>again</em> (✗),</li>
<li>Sleep (✗),</li>
<li>Actually attend sessions at the conference (<del>✓</del> ✗).</li>
</ul></p>]]></content:encoded></item><item><title>Linux Audio and the Paradox of Choice</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Linux</category><category>&#x2026;on Coding</category><dc:date>2007-06-08T07:36:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/linux-audio-apis.html#unique-entry-id-544</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/linux-audio-apis.html#unique-entry-id-544</guid><content:encoded><![CDATA[<p>Mike Melanson&#8212;a primary author of the Linux Flash plugin, xine, ffmpeg, and a general crazy-good multimedia hacker&#8212;on the state of <a href="http://blogs.adobe.com/penguin.swf/2007/05/welcome_to_the_jungle.html">Linux Audio <span class="caps">API</span>s</a>:</p>

<blockquote><p>There are 2 primary methods of sending audio data to a <span class="caps">DAC </span>under Linux: <span class="caps">OSS </span>and <span class="caps">ALSA. OSS </span>came first; <span class="caps">ALSA </span>supplanted <span class="caps">OSS.</span> Despite this, and as stated above, there are numerous different ways to do the <span class="caps">DAC </span>send. There are libraries and frameworks that live at a higher level than <span class="caps">OSS </span>and <span class="caps">ALSA.</span> In the end, they all just send the data out through <span class="caps">OSS </span>or <span class="caps">ALSA.</span></p>

<p>The zaniest part is that some of these higher level libraries can call each other, sometimes in a circular manner. Library A supports sending audio through both <span class="caps">OSS </span>and <span class="caps">ALSA, </span>and library B does the same. But then library A also has a wrapper to send audio through library B and vice versa. For that matter, <span class="caps">OSS </span>and <span class="caps">ALSA </span>both have emulation layers for each other. I took the time to map out all of the various libraries that I know of that operate on Linux and are capable of nudging that <span class="caps">PCM </span>data out to a <span class="caps">DAC</span>:</p></blockquote>

<p><a href="http://www.ted.com/index.php/talks/view/id/93">Barry Schwartz</a> would be shaking his head, methinks.  And yes, I&#8217;m well aware of efforts to unify this mess.  That doesn&#8217;t excuse that this jungle has been the state of Linux audio for the past <em>ten years</em>.  I love the comments too: instead of admitting how dumbass this is, they give suggestions for using even <em>more</em> <span class="caps">API</span>s (&#8220;try <span class="caps">KDE4&#8217;</span>s Phonon!  That&#8217;ll fix everything!&#8221;)&#8230; totally missing the amusing irony, and also missing the point that Mike needs something that works on as many Linux distributions as possible.</p>]]></content:encoded></item><item><title>Today is a Good Day</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-06-06T15:06:34-07:00</dc:date><link>http://algorithm.com.au/blog/files/today-is-a-good-day.html#unique-entry-id-543</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/today-is-a-good-day.html#unique-entry-id-543</guid><content:encoded><![CDATA[<p>First, fuel costs are down:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry543_1.jpg" width="640" height="480" /><br /><p>Second, I actually finished an <em>entire tube of Blistex</em> before I lost the stupid thing.  I believe this is the second time in my life that this has happened:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry543_2.jpg" width="300" height="226" /><p>Third:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry543_3.jpg" width="188" height="250" /><br /><p>Fourth, my personal inbox looks like this right now:</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry543_4.jpg" width="640" height="346" /><br /><p><em>Zero messages</em>, baby.  Yeah!  (Well, <span class="caps">OK, </span>my work inboxes still have a ton of messages&#8230; but zero personal mails left is really pretty nice.)</p>

<p>Plus, this is being published from Auckland airport, on the way to San Francisco.  Not a bad day at all.</p>]]></content:encoded></item><item><title>One-Minute Email Delay FTW</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2007-06-06T05:05:11-07:00</dc:date><link>http://algorithm.com.au/blog/files/email-one-minute-delay.html#unique-entry-id-541</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/email-one-minute-delay.html#unique-entry-id-541</guid><content:encoded><![CDATA[<p>I reckon that after composing and sending an email, email programs should have a one-minute delay before it actually sends off your email to its recipients.  I find that a lot of the time, I want to make one tiny edit to a message or forgot to say something&#8212;two seconds after I actually hit the Send button, of course.</p>

<p>A one-minute delay on all sent email isn&#8217;t going to kill anyone, and gives you a nice time frame to make that one last edit to your email before it goes out.  (One of the nice things about working offline is that I after I compose an email, I can keep editing it until I rejoin the <a href="http://xkcd.com/c181.html">Intertubes</a>, since my Outbox only gets processed when I go back online.)</p>]]></content:encoded></item><item><title>Doctor Doom&#x2c; eh?</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-05-31T05:17:21-07:00</dc:date><link>http://algorithm.com.au/blog/files/dr-doom.html#unique-entry-id-540</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dr-doom.html#unique-entry-id-540</guid><content:encoded><![CDATA[Your results:<BR><B>You are <FONT SIZE=6>Dr. Doom</FONT></B>
<TABLE><TR><TD><TABLE><TR><TD>Dr. Doom</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=50></TD><TD> 50%</TD>
</TR><TR><TD>The Joker</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=50></TD><TD> 50%</TD>
</TR><TR><TD>Riddler</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=50></TD><TD> 50%</TD>
</TR><TR><TD>Magneto</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=47></TD><TD> 47%</TD>
</TR><TR><TD>Lex Luthor</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=45></TD><TD> 45%</TD>
</TR><TR><TD>Mr. Freeze</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=40></TD><TD> 40%</TD>
</TR><TR><TD>Green Goblin</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=40></TD><TD> 40%</TD>
</TR><TR><TD>Catwoman</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=36></TD><TD> 36%</TD>
</TR><TR><TD>Apocalypse</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=33></TD><TD> 33%</TD>
</TR><TR><TD>Poison Ivy</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=29></TD><TD> 29%</TD>
</TR><TR><TD>Mystique</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=28></TD><TD> 28%</TD>
</TR><TR><TD>Kingpin</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=21></TD><TD> 21%</TD>
</TR><TR><TD>Juggernaut</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=20></TD><TD> 20%</TD>
</TR><TR><TD>Two-Face</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=20></TD><TD> 20%</TD>
</TR><TR><TD>Venom</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=18></TD><TD> 18%</TD>
</TR><TR><TD>Dark Phoenix</TD>
<TD><HR ALIGN=LEFT NOSHADE SIZE=4 WIDTH=12></TD><TD> 12%</TD>
</TR></TABLE></TD>
<TD WIDTH="250">Blessed with smarts and power but burdened by vanity.<BR>
<IMG SRC="http://www.thesuperheroquiz.com/villain/pics/dr_doom.jpg"></TD>
</TR></TABLE><A HREF="http://www.thesuperheroquiz.com/villain">
Click here to take the Super Villain Personality Test</A><BR>]]></content:encoded></item><item><title>California USA 2007 Tour</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2007-05-30T09:16:41-07:00</dc:date><link>http://algorithm.com.au/blog/files/usa-2007.html#unique-entry-id-539</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/usa-2007.html#unique-entry-id-539</guid><content:encoded><![CDATA[<p>Where&#8217;s Andr&eacute; in June?</p>


<ul>
<li>June 7-10: San Diego (for the <a href="http://research.ihost.com/hopl/">History of Programming Languages <span class="caps">III</span></a> conference.)</li>
<li>June 11-20: San Francisco (for Apple&#8217;s <a href="http://developer.apple.com/wwdc/"><span class="caps">WWDC</span> 2007</a> bash)</li>
<li>June 20-28: Las Vegas</li>
<li>June 24-28: Los Angeles</li>
</ul>



<p>If you&#8217;ll be in town on any of those dates or going to HoPL or <span class="caps">WWDC, </span>drop me an email!</p>

<p>As an aside, HoPL <span class="caps">III </span>looks incredible: Waldemar Celes (Lua), Joe Armstrong (Erlang), Bjarne (C++), David Ungar (Self), and the awesome foursome from Haskell: Paul Hudak, John Hughes, Simon Peyton Jones and Phil Wadler.  (Not to mention William Cook&#8217;s great paper on AppleScript, which I&#8217;ve <a href="http://www.algorithm.com.au/blog/files/on_applescript.html">blogged about before</a>.)  Soooo looking forward to it.</p>]]></content:encoded></item><item><title>Lest We Forget</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-04-24T20:08:18-07:00</dc:date><link>http://algorithm.com.au/blog/files/anzac-day-2007.html#unique-entry-id-536</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/anzac-day-2007.html#unique-entry-id-536</guid><content:encoded><![CDATA[<p>&#8220;<em>The price of freedom is eternal vigilance.</em>&#8221; &#8212; Thomas Jefferson</p>

<p>I never did modern history at school, so I was spellbound by Wikipedia&#8217;s entries about <a href="http://en.wikipedia.org/wiki/World_War_I">World War I</a> and <a href="http://en.wikipedia.org/wiki/World_War_II">World War II</a>.  I hope that <a href="http://en.wikipedia.org/wiki/Company_of_Heroes">Company of Heroes</a> will be the closest thing that I ever get to experience to a real war.</p>]]></content:encoded></item><item><title>On Civil Debate</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Linux</category><dc:date>2007-04-18T16:58:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/on-civil-debate.html#unique-entry-id-535</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/on-civil-debate.html#unique-entry-id-535</guid><content:encoded><![CDATA[<p>Compare the response given by David Heinemeier Hansson to Alex Payne in the recent <a href="http://glu.ttono.us/articles/2007/04/15/on-twitter-rails-and-community">Rails and scaling controversy</a>, to <a href="http://kerneltrap.org/node/8059">Ingo Molnar&#8217;s response to Con Kolivas</a> regarding the new Modular Schedule Core in Linux.  Which community would you rather be part of based on this little sample?</p>

<p>(Somewhat ironic since it was Hansson himself that said &#8220;<a href="http://www.loudthinking.com/arc/000577.html">It&#8217;s no[t] the event that matters, but the reaction to it</a>&#8221;, as well as being an evangelist for the <a href="http://www.loudthinking.com/arc/000587.html">It Just Doesn&#8217;t Matter</a> principle.)</p>]]></content:encoded></item><item><title>Irony</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Windows</category><category>&#x2026;on Software</category><dc:date>2007-04-18T16:52:28-07:00</dc:date><link>http://algorithm.com.au/blog/files/windows-vista-compatibility.html#unique-entry-id-533</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/windows-vista-compatibility.html#unique-entry-id-533</guid><content:encoded><![CDATA[<p><a href="http://winqual.microsoft.com/hcl/Default.aspx">Go Microsoft</a>:<img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry533_1.png" width="831" height="145" />]]></content:encoded></item><item><title>VMware Fusion Beta 3 vs Parallels</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><category>&#x2026;on Software</category><dc:date>2007-04-09T18:19:56-07:00</dc:date><link>http://algorithm.com.au/blog/files/vmware-fusion-beta-3-vs-parallels.html#unique-entry-id-531</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/vmware-fusion-beta-3-vs-parallels.html#unique-entry-id-531</guid><content:encoded><![CDATA[<p><a href="http://www.parallels.com/en/products/desktop/">Parallels Desktop for Mac</a> was the first kid on the block to support virtualisation of other PC operating systems on Mac OS X.  However, in the past fortnight, I&#8217;ve found out that:</p>


<ol>
<li>Parallels allocates just a <a href="http://www.algorithm.com.au/gallery/screenshots/Picture_2_002?full=1"><em>tad</em> too many unnecessary Quartz windows</a><sup class="footnote"><a href="#fn1">1</a></sup>, which causes the Mac OS X WindowServer to start going bonkers on larger monitors.  I&#8217;ve personally seen the right half of a TextEdit window disappear, and Safari not being able to create a new window while Parallels is running, even with no VM running.  (I&#8217;ve started a <a href="http://forum.parallels.com/showthread.php?p=54021%23post54021">discussion</a> about this on the Parallels forums.)</li>
<li>Parallels does <em>evil</em> things with your Windows XP Boot Camp partition, such as replace your <code>ntoskrnl.exe</code> and <code>hal.dll</code> file and rewriting the crucial <code>boot.ini</code> file.  This causes some rather hard-to-diagnose problems with some low-level software, such as <a href="http://www.mediafour.com/products/macdrive6/">MacDrive</a>, a fine product that&#8217;s pretty much essential for my Boot Camp use.  Personally, I&#8217;d rather not use a virtualisation program that decides to screw around with my operating system kernel, hardware abstraction layer, and boot settings, <em>thank you very much</em>.</li>
</ol>



<p>VMware Fusion does none of these dumbass things, and provides the same, simple drag&#8217;n&#8217;drop support and shared folders to share files between Windows XP and Mac OS X.  I concur with <a href="http://www.stuffonfire.com/2007/04/08/fun-times-with-vmware-beta-3/">stuffonfire about VMware Fusion Beta 3</a>: even in beta, it&#8217;s a lot better than Parallels so far.  Far better host operating system performance, better network support, hard disk snapshots (albeit not with Boot Camp), and DirectX 8.1 support to boot.  (A good <a href="http://www.lim.com.au/">friend o&#8217; mine</a> reckons that 3D Studio runs <em>faster</em> in VMware Fusion on his Core 2 Duo MacBook Pro than it does natively on his dedicated Athlon 64 Windows machine.  Nice.)  The only major feature missing from VMware Fusion is <a href="http://www.parallels.com/products/coherence/">Coherence</a>, and I can live without that.  It&#8217;s very cool, but hardly necessary.</p>

<p>Oh yeah, and since <span class="caps">VMW</span>are Fusion in beta right now, it&#8217;s free as well.  <a href="http://register.vmware.com/content/beta/fusion/registration.html">Go get it</a>.</p>

<p class="footnote" id="fn1"><sup>1</sup> Strictly speaking, allocating a ton of Quartz windows is Qt&#8217;s fault, not Parallels&#8217;s fault.  Google Earth has the same problem.  However, I don&#8217;t really care if it&#8217;s Qt&#8217;s fault, considering that it simply means running Parallels at all (even with no VM open) renders my machine unstable.</p>]]></content:encoded></item><item><title>Geek Culture and Criticism</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Life &#x26; Travels</category><dc:date>2007-04-02T20:27:03-07:00</dc:date><link>http://algorithm.com.au/blog/files/geek-culture-and-criticism.html#unique-entry-id-530</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/geek-culture-and-criticism.html#unique-entry-id-530</guid><content:encoded><![CDATA[<p>What&#8217;s happened to <a href="http://www.algorithm.com.au/blog/files/godspeed-kathy-sierra.html">Kathy Sierra</a>, and what she wrote about <a href="http://headrush.typepad.com/creating_passionate_users/2006/04/angrynegative_p.html">angry and negative people</a>, inspired me to write a bit, so let me indulge myself a little.  I live in the computing community, with other like-minded geeks.  Computing geeks have a (deserved) reputation for being a little negative.  This is not without cause: there&#8217;s a lot of things wrong in our world.  A lot of the technology we use and rely on every day is brittle and breaks often, and as <a href="http://channel9.msdn.com/Showpost.aspx?postid=231495">Simon Peyton-Jones says</a>, we&#8217;re quite often trying to build buildings out of bananas.  Sure, you can do it, but it&#8217;s painful, and it&#8217;s downright depressing when the bricks are just over <em>there</em>, just out of reach.  Our efforts for releasing software is often met with never-ending bug reports and crash reports, and it&#8217;s quite sobering looking at our task trackers.</p>

<p>It&#8217;s impossible to resist ragging on something or abusing something.  This is part of geek computing culture.  We have to work with a lot of crap, so it&#8217;s easy to be critical and complain about everything around you.  However, from this day forward, I&#8217;m going to try to at least make any criticism not totally destructive.  (I don&#8217;t think I&#8217;m vitriolic, mind you, but I&#8217;ll make a conscious effort to be more constructive now.)  Wrap it up in some humour; offer some suggestions or alternatives.  Resist using inflammatory language as much as you can when you&#8217;re personally attacked, or simply walk away from it.  Re-read everything you write and think &#8220;Is what I&#8217;m writing simply making people more bitter?  Is it actually worth somebody&#8217;s time to read this?&#8221;</p>

<p>Be more gentle with your language and kinder to your fellow netizens.  Don&#8217;t participate in flamewars.  Don&#8217;t join the mob mentality and rail on Microsoft or C++ or Ruby or Apple or Linux when everyone else does.  (You&#8217;re meant to be a <a href="http://www.xkcd.com/c242.html">scientist</a> after all, aren&#8217;t you?)  Break away from that self-reinforcing sub-culture that often comes with being a geek.</p>

<p>Now that I&#8217;ve got that off my chest, back to work!</p>]]></content:encoded></item><item><title>Thoughts to Kathy Sierra</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-04-02T17:40:32-07:00</dc:date><link>http://algorithm.com.au/blog/files/godspeed-kathy-sierra.html#unique-entry-id-529</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/godspeed-kathy-sierra.html#unique-entry-id-529</guid><content:encoded><![CDATA[<p>For those of you who were fortunate enough to see the magnificent Kathy Sierra keynote at Linux.conf.au this year but don&#8217;t read her blog, she&#8217;s received <a href="http://headrush.typepad.com/creating_passionate_users/2007/03/as_i_type_this_.html">death threats</a> and sex threats from some anonymous bloggers and comments.  It was serious enough that she cancelled a presentation at an upcoming conference, and the police have been informed.</p>

<p>Wikipedia has some updated information on her <a href="http://en.wikipedia.org/wiki/Kathy_Sierra#Harassment">harassment</a>.  Dave Winer, in a remarkably objective post, reckons it&#8217;s <a href="http://www.scripting.com/stories/2007/03/29/notLookingForSympathyOrAny.html">just a bunch of trolls</a> and that those kind of death threats are nothing new.  I think it&#8217;s a little too early to tell yet exactly what the hell is going on, but even if it is &#8220;just some trolls&#8221;, it&#8217;s still outrageous behaviour.  Be sure to also read her <a href="http://headrush.typepad.com/creating_passionate_users/2007/04/updatejoint_sta.html">update on the situation</a> if you&#8217;re checking out the other links.</p>

<p>Lesson learned: don&#8217;t start a Web site that encourages abusive behaviour unless you&#8217;re prepared to deal with the consequences.  In fact, just don&#8217;t start a Web site that encourages abusive behaviour <em>at all</em>.  As Kathy herself says, <a href="http://headrush.typepad.com/creating_passionate_users/2006/04/angrynegative_p.html">angry and negative people can be bad for you</a>.  I wonder whether it was that article that triggered off some power-hungry kid&#8217;s frontal lobe.</p>

<p>Godspeed, Kathy.  The world needs more people like you.  Hopefully whoever made those comments will be punished&#8212;and redeem themselves.</p>]]></content:encoded></item><item><title>Movable Type&#x27;s Export File Format</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-03-20T23:53:01-07:00</dc:date><link>http://algorithm.com.au/blog/files/movable-type-export-file-format.html#unique-entry-id-527</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/movable-type-export-file-format.html#unique-entry-id-527</guid><content:encoded><![CDATA[<p>Here are a short list of things that possess more elegance than Movable Type&#8217;s export file format:</p>


<ul>
<li><span class="caps">XML,</span></li>
<li><span class="caps">SMTP,</span></li>
<li>the C string <span class="caps">API,</span></li>
<li>the C multibyte string <span class="caps">API </span>(mbsinit, wcrtomb, mbsnrtowcs, etc),</li>
<li>the C++ grammar specification,</li>
<li>C++ template error messages,</li>
<li>the <span class="caps">BIND </span>zone file format,</li>
<li>Bourne shell parameter expansion involving spaces,</li>
<li><span class="caps">PHP,</span></li>
<li><span class="caps">CSV,</span></li>
<li><span class="caps">GNU </span>libtool,</li>
<li><a href="http://www.codinghorror.com/blog/archives/000734.html">wGetGUI</a>,</li>
<li><span class="caps">POSIX </span>regular expressions,</li>
<li><span class="caps">MPEG</span>-7,</li>
<li>the <code>mplayer</code> code base,</li>
<li>the Cisco <span class="caps">VPN </span>client,</li>
<li>the <code>ld(1)</code> manpage on the <span class="caps">UNIX </span>system of your choice,</li>
<li>the <code>sudoers(5)</code> manpage,</li>
<li>Makefiles generated by <span class="caps">GNU </span>autogoats,</li>
<li>Eric S. Raymond,</li>
<li><del><a href="http://lists.slug.org.au/archives/slug-chat/2001/July/msg00054.html"><span class="caps">ICCCM</span></a>,</del></li>
<li>pretty much everything.</li>
</ul>



<p>Feel free to extend this list in the comments.</p>]]></content:encoded></item><item><title>UCS-2 vs UTF-16</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-03-20T19:06:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/ucs-2-vs-utf-16.html#unique-entry-id-526</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ucs-2-vs-utf-16.html#unique-entry-id-526</guid><content:encoded><![CDATA[<p>I always used to get confused between <a href="http://en.wikipedia.org/wiki/UCS-2"><span class="caps">UCS</span>-2 and <span class="caps">UTF</span>-16</a>.  Which one&#8217;s the fixed-width encoding and which one&#8217;s the variable-length encoding that supports surrogate pairs?</p>

<p>Then, I learnt this simple little mnemonic: you know that <strong><span class="caps">UTF</span></strong>-8 is variable-length encoded<sup class="footnote"><a href="#fn1">1</a></sup>.  <span class="caps">UTF </span>= variable-length.  Therefore <strong><span class="caps">UTF</span></strong>-16 is variable-length encoded, and therefore <strong><span class="caps">UCS</span></strong>-2 is fixed-length encoded.  (Just don&#8217;t extend this mnemonic to <span class="caps">UTF</span>-32.)</p>

<p>Just thought I&#8217;d pass that trick on.</p>

<p class="footnote" id="fn1"><sup>1</sup> I&#8217;m assuming you know what <span class="caps">UTF</span>-8 is, anyway.  If you don&#8217;t, and you&#8217;re a programmer, you should probably <a href="http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html">learn</a> sometime&#8230;</p>]]></content:encoded></item><item><title>Computing Heroes</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Life &#x26; Travels</category><dc:date>2007-03-20T17:17:15-07:00</dc:date><link>http://algorithm.com.au/blog/files/computing-heroes.html#unique-entry-id-525</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/computing-heroes.html#unique-entry-id-525</guid><content:encoded><![CDATA[<p>I was chatting to a <a href="http://www.cse.unsw.edu.au/~sseefried/">mate of mine</a> about a remarkable book that I found the other day:</p><p style="text-align:center;"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry525_1.jpg" width="308" height="475" /><p>One of the greatest intellectuals of our century writes about computing systems and fundamental aspects of the brain.  What&#8217;s there not to like here?  I&#8217;m only halfway through the book, and it&#8217;s already got so much worthy material in it that I will recommend it to any other computing folks.  It&#8217;s worth it for the Foreword alone.</p>

<p>Alas, von Neumann passed on a while ago.  Right after our discussion, I find out that <a href="http://developers.slashdot.org/developers/07/03/20/0223234.shtml">John Backus passed away last Saturday</a>.  <a href="http://developers.slashdot.org/developers/07/03/20/0223234.shtml">Phil Windley comments</a> that &#8220;Computer Science has always been a discipline where the founders were still around. That&#8217;s changing.&#8221;</p>

<p>Arguably computing&#8217;s most famous face-person right now is Bill Gates.  I don&#8217;t see Gates being famous as bad: after all, the guy <em>is</em> a multi-billionaire, which naturally gives him a little bit of a reputation, and his philanthropic acts are to be admired even if one despises his business tactics.  However, what does the greater public know about our <em>real</em> heroes?  Alan Turing?  John von Neumann?  Grace Hopper?  Alan Kay?  John Backus?  Donald Knuth?  Edsgar Dijkstra?  Doug Engelbart?</p>

<p>I remember when <a href="http://www.cse.unsw.edu.au/~jas/">John Shepherd</a> taught me <span class="caps">CS2041 </span>at university, he spent 5 minutes at the start of each lecture talking about &#8220;famous geeks&#8221; and what they did for our industry.  We <em>need</em> to educate ourselves as an industry and learn and respect what these folks did; go back to our roots; respect our elders.  I&#8217;d wager that a lot more mathematicians know about Bertrand Russell and Leonhard Euler than self-described programmers and computing geeks know about Alan Turing and Edsgar Dijkstra.</p>

<p>If you&#8217;re a programmer (or even if you&#8217;re not), go to Wikipedia&#8217;s list of <a href="http://en.wikipedia.org/wiki/Turing_Award">Turing Award winners</a> sometime and just start reading about people you don&#8217;t know, starting with <a href="http://en.wikipedia.org/wiki/Alan_Mathison_Turing">the man who the Turing award&#8217;s named after</a>.  (I&#8217;m ashamed to say that I only recognise a mere 22 out of 51 names of the Turing Award winners, and I&#8217;m scared to think that I&#8217;m probably doing a lot better than a lot of other folks.)</p>

<p>I understand that people such as Knuth and Dijkstra made specialised contributions to our field, and that the greater public won&#8217;t particularly care for them (in the same way that a lot of the general public won&#8217;t know about Bertrand Russell or even Euler, but they&#8217;re known by pretty much every single mathematician).  However, there are lots of computing legends who we can talk about at dinner with all our non-geek friends and family.  Go get Doug Engelbart&#8217;s <a href="http://algorithm.com.au/blog/files/6db23abd87536ac15fdfba8cf084b8d8-391.html">Mother of All Demos</a> or Ivan Sutherland&#8217;s <a href="http://en.wikipedia.org/wiki/Sketchpad">Sketchpad</a> demo and show it to your friends.  Tell your family about the role that Turing played in World War <span class="caps">II, </span>and the amusing story of Grace Hopper finding an <em>actual</em> bug inside her computer.</p>

<p>As Dijkstra said, &#8220;in their capacity as a tool, computers will be but a ripple on the surface of our culture. In their capacity as intellectual challenge, they are without precedent in the cultural history of mankind.&#8221;  Computing is one of the most important things to emerge from this entire century.  I hope that in twenty years&#8217; time, at least Alan Turing will be a household name alongside Bill Gates.  Let&#8217;s do our part to contribute to that.</p></p>]]></content:encoded></item><item><title>Cocoa Users Group in Sydney</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2007-03-19T00:44:26-07:00</dc:date><link>http://algorithm.com.au/blog/files/call-for-cocoa-user-group-in-sydney.html#unique-entry-id-524</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/call-for-cocoa-user-group-in-sydney.html#unique-entry-id-524</guid><content:encoded><![CDATA[<p>To all the Mac users out there: would you be interested in a Cocoa Users&#8217; Group in Sydney?  If so, please drop me an email&#8212;my address is at the bottom of the page&#8212;and if there&#8217;s enough numbers, perhaps we can organise something.  The idea&#8217;s to have a local forum for <del>geekups</del>meetups, random presentations, mailing lists, and all that sort of fun stuff.</p>

<p>Oh yeah, and please also let me know your self-described level of expertise: none, novice, intermediate, expert.</p>

<p>(For those who closely track the Cocoa scene in Australia: yep, this is the same <a href="http://www.objective-d.com/?p=20">call for interest that Duncan Campbell has initiated</a>.)</p>]]></content:encoded></item><item><title>Objective-C Accessors</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2007-03-19T00:48:08-07:00</dc:date><link>http://algorithm.com.au/blog/files/objc-accessors.html#unique-entry-id-523</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/objc-accessors.html#unique-entry-id-523</guid><content:encoded><![CDATA[<p>I like Objective-C.  It&#8217;s a nice language.  However, having to write accessor methods all day is boring, error-prone, and a pain in the ass:</p>- (NSFoo*) foo{	return foo;}- (void) setFoo:(NSFoo* newFoo){	[foo autorelease];	foo = [newFoo retain];}<p>I mean, c&#8217;mon.  This is <em>Objective-C</em> we&#8217;re talking about, not Java or C++.  However, until Objective-C 2.0&#8217;s property support hits the streets (which, unfortunately, will only be supported on Mac OS X 10.5 and later as far as I know), you really have to write these dumb-ass accessors to, well, access properties in your objects correctly.  You don&#8217;t <em>need</em> to write accessors thanks to the magic of <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/Overview.html#//apple_ref/doc/uid/20001838">Cocoa&#8217;s Key-Value Coding</a>, but it just feels wrong to access instance variables using <em>strings</em> as keys.  I mean, ugh&#8212;one typo in the string and you&#8217;ve got yourself a problem.  Death to dynamic typing when it&#8217;s totally unnecessary.</p>

<p>As such, I got totally fed up with this and wrote a little script to generate accessor methods.  I&#8217;m normally not a fan of code generation, but in this case, the code generation&#8217;s actually designed to be one-shot, and it doesn&#8217;t alter the ever-picky build process.  It&#8217;s meant to be used in Xcode, although you can run it via the commandline too if you like.</p>

<p>Given the following input:</p>int integerThing;NSString* _stringThing;IBOutlet NSWindow* window;<p>It will spit out the following:</p>#pragma mark Accessors- (int) integerThing;- (void) setIntegerThing:(int)anIntegerThing;- (NSString*) stringThing;- (void) setStringThing:(NSString*)aStringThing;- (NSWindow*) window;- (void) setWindow:(NSWindow*)aWindow;%%%{PBXSelection}%%%#pragma mark Accessors- (int) integerThing{	return integerThing;}- (void) setIntegerThing:(int)anIntegerThing{	integerThing = anIntegerThing;}- (NSString*) stringThing{	return _stringThing;}- (void) setStringThing:(NSString*)aStringThing{	[_stringThing autorelease];	_stringThing = [aStringThing copy];}- (NSWindow*) window{	return window;}- (void) setWindow:(NSWindow*)aWindow{	[window autorelease];	window = [aWindow retain];}<p>There&#8217;s a couple of dandy features in the script that I find useful, all of which are demonstrated in the above output:</p>


<ol>
<li>It will detect whether your instance variables start with a vowel, and write out <code>anInteger</code> instead of <code>aInteger</code> as the parameter names for the methods.</li>
<li>It will <code>copy</code> rather than <code>retain</code> value classes such as <span class="caps">NSS</span>trings and <span class="caps">NSN</span>umbers, as God intended.</li>
<li>For all you gumbies who prefix your instance variables with a leading underscore, it will correctly recognise that and not prefix your accessor methods with an underscore.<sup class="footnote"><a href="#fn1">1</a></sup></li>
<li><span class="caps">IBO</span>utlet and a few other type qualifiers (<code>__weak</code>, <code>__strong</code>, <code>volatile</code> etc) are ignored correctly.</li>
<li>It will emit Xcode-specific <code>#pragma mark</code> places to make the method navigator control a little more useful.</li>
<li>It will emit Xcode-specific <code>%%%{PBXSelection}%%%</code> markers so that the accessor methods meant to go into your <code>.m</code> implementation file are automatically selected, ready for a cut-and-paste.</li>
</ol>



<p><a href="http://www.algorithm.com.au/downloads/objc-make-accessors.pl">Download the <code>objc-make-accessors</code> script</a> and throw it into your &#8220;<em>~/Library/Application Support/Apple/Developer Tools/Scripts</em>&#8221; folder.  If you don&#8217;t have one yet:</p>mkdir -p ~/Library/"Application Support"/Apple/Developer Tools/Scripts/10-Scriptsln -sf "/Library/Application Support/Apple/Developer Tools/Scripts/10-User Scripts/99-resetMenu.sh" ~/Library/"Application Support"/Apple/Developer Tools/Scripts/10-Scripts/cp ~/Desktop/objc-make-accessors ~/Library/"Application Support"/Apple/Developer Tools/Scripts/10-Scripts/<p>Done.  You should now have a Scripts menu in Xcode with a new menu item named &#8220;IVars to Accessor Methods&#8221;.  Have fun.</p>

<p class="footnote" id="fn1"><sup>1</sup> Note that older versions of the Cocoa Coding Guidelines specified that prefixing instance variables with underscores is an Apple-only convention and you should <em>not</em> do this in your own classes.  Now the guidelines just don&#8217;t mention anything about this issue, but I still dislike it because putting underscores every time you access an instance variable really lowers code readability.</p>]]></content:encoded></item><item><title>Oldskool&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2007-03-08T00:37:32-08:00</dc:date><link>http://algorithm.com.au/blog/files/frontdoor-oldskool.html#unique-entry-id-522</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/frontdoor-oldskool.html#unique-entry-id-522</guid><content:encoded><![CDATA[I was cleaning up my room the other day, and lo and behold, look what I found...<br /><br /><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry522_1.jpg" width="512" height="384" /><br /><br /><p>That, sir, would be the entire 147-page printed manual for FrontDoor 1.99b, an endearing piece of software for all of us who used to run <a href="http://en.wikipedia.org/wiki/Bulletin_board_system"><span class="caps">BBS</span>s</a><sup class="footnote"><a href="#fn1">1</a></sup>.  FidoNet, <span class="caps">SIGN</span>et and AlterNet indeed.  (For all you BinkleyTerm chumps, yeah, I ran that as well, with the holy trinity of BinkleyTerm, <code>X00</code> and Maximus all under OS/2.  Don&#8217;t even get me started on ViSiON-X, Oblivion/2, Echo forums and all that stuff&#8230; oh, I dread to think the number of hours I must&#8217;ve spent looking at every single <span class="caps">BBS </span>package under the sun.)</p>

<p>Ah, but the <span class="caps">BBS </span>as we know it is dead, Jim.  Long live the Internet!</p>

<p class="footnote" id="fn1"><sup>1</sup>  And hey Mister Ryan Verner: yes, I ran it with the <span class="caps">BNU </span><a href="http://en.wikipedia.org/wiki/FOSSIL"><span class="caps">FOSSIL</span></a> driver for a while ;-).</p>]]></content:encoded></item><item><title>Blister Packs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2007-03-04T00:17:01-08:00</dc:date><link>http://algorithm.com.au/blog/files/blister-packs.html#unique-entry-id-521</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/blister-packs.html#unique-entry-id-521</guid><content:encoded><![CDATA[<p>Now I know why <a href="http://blogs.msdn.com/oldnewthing/archive/2004/12/24/331751.aspx">blister packs</a> are called blister packs.  It&#8217;s because you get <a href="http://www.penny-arcade.com/comic/2002/09/30"><em>fucking blisters</em></a> whenever you try to open them.</p>]]></content:encoded></item><item><title>All Hail the DeathStation 9000</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-02-12T03:03:08-08:00</dc:date><link>http://algorithm.com.au/blog/files/deathstation-9000.html#unique-entry-id-518</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/deathstation-9000.html#unique-entry-id-518</guid><content:encoded><![CDATA[<p>While learning about the immaculate <a href="http://en.wikipedia.org/wiki/DeathStation_9000">DeathStation 9000</a>, I came across the homepage of <a href="http://dspace.dial.pipex.com/town/green/gfd34/art/">Armed Response Technologies</a>.  That page nearly had me snort coffee out of my nose on my beautiful new 30&#8221; LCD monitor.  Make very sure you see their <a href="http://dspace.dial.pipex.com/town/green/gfd34/art/bloopers.html">bloopers</a> page.</p>

<p>(This is quite possibly the best thing to ever come out of having so much stupidit&#8230; uhh, I mean, <em>undefined behaviour</em>, in C.)</p>]]></content:encoded></item><item><title>The Problem with Threads</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-02-08T18:10:23-08:00</dc:date><link>http://algorithm.com.au/blog/files/the-problem-with-threads.html#unique-entry-id-517</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/the-problem-with-threads.html#unique-entry-id-517</guid><content:encoded><![CDATA[<p>If you haven&#8217;t had much experience with the wonderful world of multithreading and don&#8217;t yet believe that threads are evil<sup class="footnote"><a href="#fn1">1</a></sup>, Edward A. Lee has an excellent essay named &#8220;<a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.html">The Problem with Threads</a>&#8221;, which challenges you to solve a simple problem: write a thread-safe Observer design pattern in Java.  Good luck.  (Non-Java users who scoff at Java will often fare even worse, since Java is one of the few languages with <em>some</em> measure of in-built concurrency control primitives&#8212;even if those primitives still suck.)</p>

<p>His paper&#8217;s one of the best introductory essays I&#8217;ve read about the problems with shared state concurrency.  (I call it an essay since it really reads a lot more like an essay than a research paper.  If you&#8217;re afraid of academia and its usual jargon and formal style, don&#8217;t be: this paper&#8217;s an easy read.)  For those who aren&#8217;t afraid of a bit of formal theory and maths, he presents a simple, convincing explanation of why multithreading is an <em>inherently</em> complex problem, using the good ol&#8217;  explanation of computational interleavings of sets of states.</p>

<p>His essay covers far more than just the problem of inherent complexity, however: Lee then discusses how bad threading actually is in practice, along with some software engineering improvements such as <a href="http://msdn.microsoft.com/msdnmag/issues/05/10/OpenMP/">OpenMP</a>, Tony Hoare&#8217;s idea of <a href="http://en.wikipedia.org/wiki/Communicating_sequential_processes">Communicating Sequential Processes</a><sup class="footnote"><a href="#fn2">2</a></sup>, Software Transactional Memory, and Actor-style languages such as Erlang.  Most interestingly, he discusses why programming languages aimed at concurrency, such as Erlang, <em>won&#8217;t</em> succeed in the main marketplace.</p>

<p>Of course, how can you refuse to read a paper that has quotes such as these?</p>


<ul>
<li>&#8220;&#8230; a folk definition of insanity is to do the same thing over and over again and to expect the results to be different.  By this definition, we in fact require that programmers of multithreaded systems be insane.  Were they sane, they could not understand their programs.&#8221;</li>
<li>&#8220;I conjecture that most multi-threaded general-purpose applications are, in fact, so full of concurrency bugs that as multi-core architectures become commonplace, these bugs will begin to show up as system failures.  This scenario is bleak for computer vendors: their next generation of machines will become widely known as the ones on which many programs crash.&#8221;</li>
<li>&#8220;Syntactically, threads are either a minor extension to these languages (as in Java) or just an external library.  Semantically, of course, they rhoroughly disrupt the essential determinism of the languages.  Regrettably, programmers seem to be more guided by syntax than semantics.&#8221;</li>
<li>&#8220;&#8230; non-trivial multi-threaded programs are <em>incomprehensible to humans</em>.  It is true that the programming model can be improved through the use of design patterns, better granularity of atomicity (e.g. transactions), improved languages, and formal methods.  However, these techniques merely chip away at the unnecessarily enormous non-determinism of the threading model.  The model remains intrinsically intractable.&#8221;  (Does that &#8220;intractable&#8221; word <a href="http://lambda-the-ultimate.org/node/1277">remind you of anyone else</a>?)</li>
<li>&#8220;&#8230; adherents to&#8230; [a programming] language are viewed as traitors if they succumb to the use of another language.  Language wars are religious wars, and few of these religions are polytheistic.&#8221;</li>
</ul>



<p>If you&#8217;re a programmer and aren&#8217;t convinced yet that shared-state concurrency is evil, please, read the paper.  Please?  Think of the future.  <em>Think of your children</em>.</p>

<p class="footnote" id="fn1"><sup>1</sup>  Of course, any non-trivial exposure to multithreading <em>automatically implies</em> that you understand they are evil, so the latter part of that expression is somewhat superfluous.</p>

<p class="footnote" id="fn2"><sup>2</sup>  Yep, <em>that</em> Tony Hoare&#8212;you know, the guy who invented <a href="http://en.wikipedia.org/wiki/Quicksort">Quicksort</a>?</p>]]></content:encoded></item><item><title>svk and the Psychological Effect of Fast Commits</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-02-04T16:19:37-08:00</dc:date><link>http://algorithm.com.au/blog/files/svk-and-fast-commits.html#unique-entry-id-516</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/svk-and-fast-commits.html#unique-entry-id-516</guid><content:encoded><![CDATA[<p><a href="http://svk.elixus.org/view/HomePage"><em>svk</em></a>&#8212;a distributed Subversion client by Chia Liang Kao and company&#8212;is now an essential part of my daily workflow.  I&#8217;ve been using it almost exclusively for the past year on the main projects that I work with, and it&#8217;s fantastic being able to code when you&#8217;re on the road and do offline commits, syncing back to the main tree when you&#8217;re back online.  Users of other distributed revision control systems do, of course, get these benefits, but svk&#8217;s ability to work with existing Subversion repositories is the killer reason to use it.  (I&#8217;m aware that Bazaar has some <a href="http://bazaar-vcs.org/BzrForeignBranches/Subversion">Subversion integration</a> now, but it&#8217;s still considered alpha, whereas svk has been very solid for a long time now.)</p>

<p>The ability to do local checkins with a distributed revision control client has a nice side-effect: commits are <em>fast</em>.  They typically take around two seconds with svk.  A checkin from a non-distributed revision control client such as Subversion requires a round-trip to the server.  This isn&#8217;t too bad on a <span class="caps">LAN, </span>but even for a small commit, it can take more than 10 or 15 seconds to a server on the Internet.  The key point is that these fast commits have a psychological effect: <em>having short commit times encourages you to commit very regularly</em>.  I&#8217;ve found that since I&#8217;ve switched to svk, not only can I commit offline, but I commit much more often: sometimes half a dozen times inside of 10 minutes.  (svk&#8217;s other cool feature of dropping files from the commit by deleting them from the commit message also helps a lot here.)  Regular commits are <em>always</em> better than irregular commits, because either (1) you&#8217;re committing small patches that are easily reversible, and/or (2) you&#8217;re working very prolifically.  Both of these are a win!</p>

<p>So, if you&#8217;re still using Subversion, try svk out just to get the benefits of this and its other nifty features.  The svk documentation is quite sparse, but there are some <a href="http://scottstuff.net/blog/articles/2005/07/07/distributed-development-with-svk">excellent tutorials</a> that are <a href="http://www.bieberlabs.com/wordpress/archives/2004/11/30/using-svk">floating around the &#8216;net</a>.</p>]]></content:encoded></item><item><title>Design and Taste in Open-Source Software</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2007-01-22T18:46:28-08:00</dc:date><link>http://algorithm.com.au/blog/files/design-and-taste-in-oss.html#unique-entry-id-514</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/design-and-taste-in-oss.html#unique-entry-id-514</guid><content:encoded><![CDATA[<p>I had a email conversation with <a href="http://www.perkypants.org/">Jeff Waugh</a> a long time ago about design and taste in open-source software, which Jeff encouraged me to blog about.  However, every time I tried to put the email into a blog article, it lost the original feel of what I was trying to say.  Kathy Sierra&#8217;s superb keynote at Linux.conf.au 2007 on Creating Passionate Users inspired me to publish it more-or-less verbatim here so it wouldn&#8217;t be delayed for any longer.  (Perfection being the enemy of Good and all that.)  As such, here &#8216;tis:</p>

<blockquote><p>&#8230; something else that I&#8217;ve been musing about in the past week is that there&#8217;s a really interesting culture difference between the Mac OS X community and the Linux community.</p>

<p>The Mac community <strong>thrives</strong> on shareware applications: things that cost anywhere between $5-$50.  <a href="http://www.realmacsoftware.com/">RapidWeaver</a>, a $40 Web application creation program, is apparently used for over <strong>3000</strong> Web pages&#8230;  There are plenty of Mac shareware developers who make enough money from their software that they can do it for a living, professionally.  Wil Shipley, the author of <a href="http://www.delicious-monster.com/">Delicious Library</a>&#8230; claimed he had $50,000 in sales of his first day of Delicious Library.</p>

<p>The interesting culture difference is that the Linux community tends to put out small, useful little programs, but with little polish.  This is not a criticism: there&#8217;s a lot more programs in the Linux world to do what you want to do, and even though they&#8217;re not polished, they do work, and they&#8217;re open source whereas Mac software generally isn&#8217;t.  However, it&#8217;s a completely different <strong>class</strong> of programs to Mac shareware: now that I&#8217;ve done a lot of work on a program where the UI is the really important thing, I truly admire the amount of polish and sheer effort that goes into the majority of Mac shareware programs.  The icons are beautiful, every part of the workflow is accounted for, and the integration with the rest of the system is superb.  <strong>That&#8217;s</strong> what you pay your $5 to $50 for, and the authors charge this because they&#8217;ve put a hell of a lot of time and effort into all these things.</p>

<p>The attitude difference is quite a contrast: probably the best way to sum it up is that the Linux community tends to produce cheap&#8217;n&#8217;cheery tools that they&#8217;re very happy to give away and share, whereas the Mac community has a much slower rate of production, but their production values are superb: they are completely unwilling to release stuff that isn&#8217;t up to the developer&#8217;s highest standards.</p></blockquote>

<p> What approach do you prefer?  If you&#8217;re a Linux developer, are you willing to put into practice what <a href="http://headrush.typepad.com/creating_passionate_users/">Kathy Sierra</a> has to say?</p>]]></content:encoded></item><item><title>The Designers of Lua on Concurrency</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-01-22T14:36:33-08:00</dc:date><link>http://algorithm.com.au/blog/files/lua-designers-on-concurrency.html#unique-entry-id-513</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/lua-designers-on-concurrency.html#unique-entry-id-513</guid><content:encoded><![CDATA[<p>I came across the following quote about threads while reading <a href="http://lambda-the-ultimate.org/node/1993">The Evolution of Lua</a>:</p>

<blockquote><p>&#8230; we did not (and still do not) believe in the standard multithreading model, which is preemptive concurrency with shared memory: we still think that no one can write correct programs in a language where &#8216;<code>a=a+1</code>&#8217; is not deterministic.</p></blockquote>

<p>That is quite possibly the best one-line summary I have read about why shared-state concurrency is <em>evil</em>.  <a href="http://www.algorithm.com.au/talks/concurrency-erlang">Just say no</a>!</p>]]></content:encoded></item><item><title>Erlang and Concurrency slides are online</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2007-01-20T21:27:07-08:00</dc:date><link>http://algorithm.com.au/blog/files/concurrency-erlang-slides.html#unique-entry-id-512</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/concurrency-erlang-slides.html#unique-entry-id-512</guid><content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Dogcow">Moof</a>!  I&#8217;ve found some time this weekend in the 40-odd degrees heat<sup class="footnote"><a href="#fn1">1</a></sup> to finally get the slides and Web page up for my <a href="/talks/concurrency-erlang">Concurrency and Erlang talk</a>, and have also updated the <a href="http://lca2007.linux.org.au/talk/252">official Linux.conf.au webpage about it</a> to point to my page.  Remember kids: <em>just say no</em> to shared state concurrency!</p>

<p class="footnote" id="fn1"><sup>1</sup> Stupid things to do in 43-degree weather on a Sunday morning instead of sleeping in so I can recover from Linux.conf.au this week: Play two hours of tennis.</p>]]></content:encoded></item><item><title>FOMS and Linux.conf.au 2007</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2007-01-19T18:31:41-08:00</dc:date><link>http://algorithm.com.au/blog/files/foms-lca2007.html#unique-entry-id-511</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/foms-lca2007.html#unique-entry-id-511</guid><content:encoded><![CDATA[<p>Wow.</p>

<p><a href="http://www.annodex.org/events/foms2007/Main/HomePage"><span class="caps">FOMS</span></a> and <a href="http://lca2007.linux.org.au/">Linux.conf.au 2007</a> absolutely <em>rocked the house</em>.  I go to my fair share of conferences each year, and even though I&#8217;m mostly a Mac OS X user these days, I can heartily say that there really is <em>nothing</em> that matches the flair, co-operation and vibrance of the Linux community.</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry511_1.jpg" width="250" height="188" /><p>The <a href="http://www.annodex.org/events/foms2007/Main/HomePage">Foundations of Open Media Software</a> mini-conference and workshop took place the week before Linux.conf.au to discuss problem areas in open-source media software and how to tackle them, and a number of worthy goals came out of it.  One really important project is the advancement of totally free multimedia codecs that sites such as Wikipedia can use for their video: we&#8217;re gunning for Theora (video) and Vorbis (audio) support <em>out-of-the-box</em> for Firefox 3, which means that everyone will finally be able to watch video in a Web browser in a non-patented, totally open format without installing plugins or any other nonsense.  Putting all the faces to names and seeing all the different projects co-operating to improve open-source multimedia and hit common goals is fantastic.</p>

<p>Linux.conf.au was just as stellar: the atmosphere was vibrant, talks were casual and informative, the organisation was the best I&#8217;ve ever seen for <em>any</em> conference, the parties were great, and the community just wonderful.  <a href="http://headrush.typepad.com/creating_passionate_users/">Kathy Sierra</a>&#8217;s keynote about Creating Passionate Users was <em>the best</em> keynote I&#8217;d ever seen at a conference, even rivalling Steve Jobs&#8217;s famous reality distortion field (and Kathy&#8217;s was arguably better, since she was actually delivering a ton of information rather than just unveiling &#8220;ooo shiny iPhone!&#8221;).  As <a href="http://www.perkypants.org/">jdub</a> would say, <em>awesome</em>.  Thanks so much to the amazing Seven Team for organising the best conference I&#8217;ve ever been to, all the volunteers and helpers that made it go so smoothly, the A/V team that preserved the talks for all eternity (plug: including <a href="http://lca2007.linux.org.au/talk/252">mine</a>, of course :-).</p><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry511_2.jpg" width="250" height="188" /><p>Now to catch up on these 700+ <span class="caps">RSS </span>articles that I&#8217;ve abandoned reading for the week and await the return of life to normality.  See you all at <span class="caps">FOMS </span>and Linux.conf.au next year!</p>]]></content:encoded></item><item><title>Quicksilver for Developers</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-01-31T00:09:18-08:00</dc:date><link>http://algorithm.com.au/blog/files/quicksilver-for-developers.html#unique-entry-id-510</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/quicksilver-for-developers.html#unique-entry-id-510</guid><content:encoded><![CDATA[<p>If you are:</p>


<ol>
<li>a Mac OS X user,</li>
<li>a coder, web developer, or hacker of some sort (C/C++, Cocoa, Python, Ruby, Web dude(tte),</li>
</ol>



<p>I just found a mighty good use of <a href="http://quicksilver.blacktree.com/">Quicksilver</a> that I wanted to share&#8212;getting at reference documentation when you&#8217;re coding.   Now, I hit Cmd-Space to invoke Quicksilver, and then type in, say:</p>


<ul>
<li><code>NSString</code> to bring up the Cocoa Foundation documentation about the <em><span class="caps">NSS</span>tring</em> class,</li>
<li><code>sscanf</code> to bring up the <em>sscanf(3)</em> manpage, or</li>
<li><code>dict</code> to bring up the Erlang <em>dict</em> module.</li>
</ul>



<p>Nice, no?</p><p style="text-align:center;"><img class="imageStyle" alt="" src="http://algorithm.com.au/blog/files/page0_blog_entry510_1.jpg" width="379" height="435" /><br /><p>Quicksilver uses a number of <em>catalogs</em> to create its big list of items that you can search.  For example, there&#8217;s a Quicksilver plugin that catalogs applications on your hard disk, so that when you start typing <code>iTun</code>, Quicksilver searches the applications catalog to find iTunes.  If you start typing in a person&#8217;s name, the Address Book plugin has catalogued your Address Book and will search on that.</p>

<p>The neat thing is, you can add your own custom catalogs pretty easily, by indexing text files and <span class="caps">HTML </span>files.  Quicksilver comes with a <em>File and Folder scanner</em> plugin that you can use to index reference documentation.  Adding a custom catalog is easy:</p>


<ol>
<li>go to Quicksilver&#8217;s Preferences,</li>
<li>select the Catalog tab,</li>
<li>select the Custom catalog type on the left-hand pane,</li>
<li>click the <code>+</code> button and pick &#8220;File &amp; Folder Scanner&#8221;,</li>
<li>add the text/HTML file to be used as a catalog, and</li>
<li>set the &#8220;Include Contents&#8221; pop-up button in the Inspector pane (the <em>i</em> button in the bottom-right hand corner) to <span class="caps">HTML</span> Links or Text Lines, as appropriate.</li>
</ol>



<p>You probably want to also set Quicksilver to rescan your catalog once in a while: I&#8217;ve set mine to rescan every hour.</p>

<p>Here&#8217;s some example usage scenarios:</p>


<ul>
<li>Cocoa developers: Add <code>/Developer/ADC Reference Library/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html</code> as a catalog to index the Foundation kit classes, and <code>/Developer/ADC Reference Library/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/index.html</code> to index the AppKit classes.  Now, you can type any class name (such as <em><span class="caps">NSS</span>tring</em> or <em><span class="caps">NSW</span>indow</em>) at the Quicksilver prompt to immediately bring up the Cocoa documentation in your preferred Web browser.</li>
<li><span class="caps">UNIX </span>developers: Install <a href="http://www.bruji.com/bwana/index.html">Bwana</a>, which provides a kickass <span class="caps">HTML </span>version of your system&#8217;s manpages.  (It dynamically generates them on demand, so don&#8217;t worry, it won&#8217;t take up another 100MB of space.)  An an aside, Bwana&#8217;s the very first manpage viewer I&#8217;ve liked besides running <em>man(1)</em> itself in a shell.  Run Bwana once and hit the Index button so it can index all the manpages.  Add <code>~/Library/Caches/Bwana/manindex-.html</code> to your Quicksilver catalog, and all of your manpages will now be indexed.  <em>Bam</em>, type in <code>printf</code> at a Quicksilver prompt, and behold as all those formatting specifiers you forgot magically appear in your Web browser.</li>
<li>Erlang developers: Download the <a href="http://www.erlang.org/download.html">Erlang documentation</a> and keep it somewhere on your local hard disk.  Add the <code>doc/index.html</code> file as a catalog, and <em>bam</em>, type in <code>dict</code> to bring up the Erlang <em>dict</em> module functions in your Web browser.</li>
</ul>



<p>Of course, this works for any <span class="caps">HTML </span>documentation, so whether you&#8217;re a Java, Python, Ruby, C++ weenie or whatever, just grab some <span class="caps">HTML </span>documentation and let Quicksilver index it for you.  <em>Bam</em>!  (With kudos to <a href="http://www.google.com/search?q=%22Zapp+Brannigan%22+BAM%21">Zapp Brannigan</a>, my hero.)</p></p>]]></content:encoded></item><item><title>Mutable State as Manual Memory Management</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-01-08T21:09:26-08:00</dc:date><link>http://algorithm.com.au/blog/files/mutable-state-as-manual-memory-management.html#unique-entry-id-509</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/mutable-state-as-manual-memory-management.html#unique-entry-id-509</guid><content:encoded><![CDATA[<p>An engaging quote from Paul Johnson, from the <a href="http://sequence.complete.org/hwn/20070109">January 9, 2007 issue of Haskell Weekly News</a>:</p>

<blockquote><p>Mutable state is actually another form of manual memory management: every time you over-write a value you are making a decision that the old value is now garbage, regardless of what other part of the program might have been using it.</p></blockquote>

<p>My little theory: there is no reason to ever change the value of a variable except for efficiency.  Instead, make a new immutable variable based on the old value, which gives you freedom to name your new variable to better describe what it does.  My C and C++ code is littered with <code>const</code> almost everywhere, and it helps enormously when you look back at the code a month later to figure out what it&#8217;s doing.</p>

<p>And, just to throw in <a href="http://blogs.nubgames.com/code/?p=15">a little more Haskell evangelism</a> from someone else who&#8217;s merrily had their brain reconfigured to to see the awe of the lambda calculus:</p>

<blockquote><p>So far I&#8217;ve written about 300 <span class="caps">LOC </span>replacing about 1500 <span class="caps">LOC </span>of a system written in Perl&#8230; The thing that totally, utterly blows my mind is that I&#8217;ve done all this without any loops and using only 3 conditional statements.  (One if and two case, if it matters.  And I don&#8217;t mean this in the cheap sense that Haskell doesn&#8217;t have any looping constructs and so I&#8217;m writing recursive functions instead, which everyone knows is the same thing.  There is no explicit recursion in my code.  I&#8217;m just flabbergasted.</p></blockquote>]]></content:encoded></item><item><title>Mac OS X Software for the Uninitiated</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2007-01-07T00:01:29-08:00</dc:date><link>http://algorithm.com.au/blog/files/mac-os-x-for-the-uninitiated.html#unique-entry-id-506</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/mac-os-x-for-the-uninitiated.html#unique-entry-id-506</guid><content:encoded><![CDATA[<p>I have a <em>lot</em> of friends who&#8217;ve switched to Mac OS X from both Windows and Linux in the past few years.  I think it&#8217;s a good computing platform (duh, otherwise I wouldn&#8217;t be using it), but of course it can take a while to find all those handy little bits of software that make life just a bit easier.</p>

<p>So, since I&#8217;m a lazy bastard and got sick of regurgitating my list of Mac OS X software to switcher friends in the past few years, I finally made a <a href="http://www.algorithm.com.au/code/macosx/">Mac OS X Resources</a> page with a list of software that <em>I</em> personally use and think kicks ass.  There&#8217;s also a (small) collection of hints and tips, including some coding tips for those moving across from Linux.  (I&#8217;m aware that the coding tips really are quite sparse &#8212; I&#8217;ll hopefully find some time to expand that in the future.)  I hope the resources page is useful for someone else out there: if you do find it useful, a very simple one-line email saying thanks is always appreciated!  <a href="http://www.perl.com/doc/manual/html/READMEs/Announce.html">As Larry Wall would say</a>, have the appropriate amount of fun.</p>]]></content:encoded></item><item><title>Email Disclaimers</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-12-27T16:56:22-08:00</dc:date><link>http://algorithm.com.au/blog/files/email-disclaimers.html#unique-entry-id-505</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/email-disclaimers.html#unique-entry-id-505</guid><content:encoded><![CDATA[<p>You know those frigging stupid 20-line disclaimers that lots of corporates and <a href="http://en.wikipedia.org/wiki/Lionel_Hutz#_note-0">law-talking guys</a><sup class="footnote"><a href="#fn1">1</a></sup> type insist on putting at the end of their emails?  I wonder how much bandwidth would be saved if there was a simple link to a disclaimer policy on a Web server instead of attaching it to the end of every single stupid email.  Not that I advocate such disclaimer monstrosities&#8212;quite the opposite&#8212;but if you&#8217;re going to do it, at least be as considerate as possible.  I had 7 messages total &gt;200k the other day because it was (1) <span class="caps">HTML </span>email, (2) top-posted and quoted the entire previous email, and (3) consisted of 98% email disclaimer and 2% content.</p>

<p>I understand the argument that bandwidth and storage is a technological constraint and that we shouldn&#8217;t bitch about archiving 200k because we have 500GB desktop hard disk drives these days, but there&#8217;s waste, and then there&#8217;s <em>waste</em>.</p>

<p>End rant.  Back to happy coding land and preparing slides for <a href="http://lca2007.linux.org.au/">Linux.conf.au</a>!  (You <em>are</em> going, right!  If not, why not?)</p>

<p class="footnote" id="fn1"><sup>1</sup> Note to law-talking guys: <a href="http://tv.cyberbottle.com/sensitivity_training.html">I don&#8217;t have a beef with you, I have a beef with your people</a>.</p>

<p><code>This blog article is confidential. If you are not the intended recipient you must not disclose or use the information contained in it. You may or may not be offended. If you have received this article in error please notify ANDRE PANG immediately by email and delete the document from your cache, proxies, and all your base. ANDRE PANG is not responsible for any changes made to a document other than those made by ANDRE PANG or for the effect of the changes on the document's meaning. ANDRE PANG accepts no liability for any damage caused by this article or its attachments (if any) due to viruses interference interception corruption, your own sexual inadequacies or unauthorised access.  By the way, ANDRE PANG ANDRE PANG ANDRE PANG ANDRE PANG Google juice all caps 1111one-one-one-one.  FFS zomgwtf roflcopter.</code></p>]]></content:encoded></item><item><title>Merry Christmas&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-12-24T22:07:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/merry-xmas-2006.html#unique-entry-id-504</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/merry-xmas-2006.html#unique-entry-id-504</guid><content:encoded><![CDATA[<p>It&#8217;s been an introspective journey this year.  But at least I have a new web site!  Woo baby!</p>

<p>Here&#8217;s a public thank you to all my family and friends for always being so supportive, and all my workmates at <a href="http://www.risingsunresearch.com">Rising Sun Research</a> and <a href="http://www.rsp.com.au/">Rising Sun Pictures</a> for a wonderful working environment and teaching me a ton about software development (as well as contributing so much to some <a href="http://www.rsp.com.au/portfolio.htm">awesome movies</a>).</p>

<p>2007 is looking good already.  See some of you kids at <a href="http://lca2007.linux.org.au/">Linux.conf.au</a> in January!  (You <em>are</em> going, right?  If not, why not?)</p>

<p>Merry Christmas everyone, and have a safe, relaxing and <a href="http://xkcd.com/c201.html">happy</a> end-of-year holidays to bring in 2007!</p>]]></content:encoded></item><item><title>John Romero on Apple and NeXT</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-12-23T04:09:53-08:00</dc:date><link>http://algorithm.com.au/blog/files/john-romero-apple-and-next.html#unique-entry-id-503</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/john-romero-apple-and-next.html#unique-entry-id-503</guid><content:encoded><![CDATA[<p>John Romero celebrates the <a href="http://rome.ro/2006/12/apple-next-merger-birthday.html">ten-year anniversary of when Apple bought over NeXT</a>:</p>

<blockquote><p>We were building fat binaries of the tools for all 3 processors in the office - one .app file that had code for all 3 processors in it and executed the right code depending on which machine you ran it on. All our data was stored on a Novell 3.11 server and we constantly used the NeXTSTEP Novell gateway object to transparently copy our files to and from the server as if it was a local <span class="caps">NTFS </span>drive. This was back in 1993!</p></blockquote>

<p>Indeed: even the most modern Windows and Linux development environments today still feel <em>far</em> inferior to the NeXT platforms in many ways.  I&#8217;m thankful that the superb technology from NeXT lives on to this day: when anyone argues that the object-oriented paradigm has failed, <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/chapter_2_section_6.html#//apple_ref/doc/uid/TP40002974-CH3-SW12">Cocoa is living proof</a> that it can work, and deliver an order-of-magnitude improvement in development productivity.  It&#8217;s humbling to think that most of the libraries and frameworks that Mac OS X developers take for grated today existed a dozen years ago, before even Windows 95 was around.  If you&#8217;re not convinced, watch <a href="http://www.youtube.com/watch?v=j02b8Fuz73A">Steve Jobs&#8217;s demo of NeXTSTEP version 3</a> running on a 50MHz cube &#8212; in <em>1991</em>.  Windows Presentation Foundation, Glade/GTK+ and Qt Designer look like stone-age tools compared to what NeXT had fifteen years ago.</p>]]></content:encoded></item><item><title>Bigger Fontsies&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-12-21T07:07:25-08:00</dc:date><link>http://algorithm.com.au/blog/files/bigger-fonts.html#unique-entry-id-501</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/bigger-fonts.html#unique-entry-id-501</guid><content:encoded><![CDATA[<p>I&#8217;ve updated the blog part of my Web site to use standard-size fonts now rather than small ones; <a href="http://www.informationarchitects.jp/100e2r">you should too</a> (if you&#8217;re not doing it already, of course).  I&#8217;d been meaning to do this for a while, but someone emailed me and specifically requested it.  The rest of the site will be updated soon.</p>]]></content:encoded></item><item><title>Goodbye&#x2c; World</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2006-12-20T10:24:13-08:00</dc:date><link>http://algorithm.com.au/blog/files/wow-has-arrived.html#unique-entry-id-500</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/wow-has-arrived.html#unique-entry-id-500</guid><content:encoded><![CDATA[<p>Yeah.  So the other day, I walk into my <a href="http://www.maccentric.com.au/">local AppleCentre</a> to buy myself a nice new <a href="http://www.stmbags.com.au/mediumevolution"><span class="caps">STM </span>bag</a>.  Of course, since I&#8217;m there pretty much every third hour of the day&#8230;</p>


<ul>
<li>Me: &#8220;Can I have myself an Andr&eacute; discount at all?&#8221;</li>
<li>Manager: &#8220;Hmmm&#8230; well, normally I would, but I can&#8217;t do that today.  How about I throw in a free copy of <em>World of Warcraft</em>?  Yes, that sounds like an excellent idea&#8230;&#8221;</li>
</ul>



<p><em>Nooooooooooooooooooooo</em>!  Tom, I officially hate you.  Do you know how long I&#8217;ve been trying to avoid playing this <a href="http://fakesteve.blogspot.com/">frigtard</a> game?  Goodbye sunshine, it&#8217;s been nice knowing you.  If I don&#8217;t reply to any emails from now on, I&#8217;m either dead, or I&#8217;m playing this bloody <span class="caps">MMORPG </span>that I&#8217;ve been avoiding so successfully up until now.  Bye all!</p>]]></content:encoded></item><item><title>Steven Seagal</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2006-12-17T23:59:09-08:00</dc:date><link>http://algorithm.com.au/blog/files/steven-seagal.html#unique-entry-id-498</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/steven-seagal.html#unique-entry-id-498</guid><content:encoded><![CDATA[<p>My dad&#8217;s been on a Steven Seagal action movie rampage, recently.  How many friggin&#8217; movies has this guy made, you think?  A half-dozen?  A dozen?  Nope, <a href="http://www.imdb.com/name/nm0000219/"><em>thirty-two</em></a>.  And they&#8217;re all <em>exactly the damn same</em>, although some of them have hilarious titles (such as <a href="http://www.imdb.com/title/tt0431114/">Today You Die</a>, <a href="http://www.imdb.com/title/tt0297162/">Half Past Dead</a> and <a href="http://www.imdb.com/title/tt0323531/">Out for a Kill</a>) with equally hilarious taglines (&#8220;Whoever set him up is definitely going down&#8221;).</p>

<p>Please add Steven Seagal to the list of heroes who I want to be when I grow up.  Life just can&#8217;t be <em>that</em> bad when you keep starring in action movies with hot Asian chicks in half of them.</p>]]></content:encoded></item><item><title>Next-Generation PC Games for 2007</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2006-12-17T21:46:52-08:00</dc:date><link>http://algorithm.com.au/blog/files/2007-gaming.html#unique-entry-id-497</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2007-gaming.html#unique-entry-id-497</guid><content:encoded><![CDATA[<p>I know that the Wii is all the rage right now (rightly so, too!), but some of the more &#8220;traditional&#8221; games that are coming out next year still look nothing short of <em>stunning</em>.</p>

<p>Sample the HD trailers of:</p>

<ul>
<li><p><a href="http://masseffect.bioware.com/gallery/#dl-movies">Mass Effect</a> (developed by BioWare).  The immersion resulting from the new dialog system just looks <em>incredible</em>.  Having just finished Neverwinter Nights 2, I reinstalled Neverwinter Nights 1 again to see how it stacks up.  It is amazing just how much more immersion the full-screen style cutscenes provides vs the NWN1-style textbox-in-upper-left-corner.  (The fullscreen cutscenes being the same deal as those in Knights of the Old Republic I and II).  Mass Effect raises the bar again with its immersive dialog system: it looks like it&#8217;s going to absolutely blow everything out of the water when it comes to character interaction in games.</p>

<p>The tactical squad-based combat looks pretty cool, too: it looks like BioWare are taking some of the tactical aspects of D&amp;D-style combats over to an FPS game.  (No, really, D&amp;D does have some tactical combat.  Putting Mages In the Back and Fighters At The Front takes lots of brains, I tell you.)</p></li>
<li><p><a href="http://www.gametrailers.com/gamepage.php?fs=1&amp;id=2610">BioShock</a> (developed by Irrational: the X06 and Developer Walkthrough HD trailers are both great, although be warned that both of them really are mature content).  Man oh man, Irrational were spot-on when they claimed that BioShock will be the spiritual successor to System Shock 2.  It&#8217;s clearly Shock 2-influenced to the <em>n</em>th degree: the splicers in BioShock highly resemble the deadly Cyborg Assassins in Shock 2, for example.  However, BioShock looks even more disturbing than its predecessor, more moralistic, and scary as all hell.  Having mere monkeys and protocol droids scaring the crap out of you in Shock 2 was bad enough, but with Big Daddies running around in BioShock, I wonder if I&#8217;ll actually be able to play this game at night at all.  The water effects, 1950s influence and mature target audience make for an atmosphere that will leave even Shock 2 for dead.</p></li>
</ul>

<p>With <a href="http://jade.bioware.com/pc/">Jade Empire PC</a>, <a href="http://www.ea.com/commandandconquer/">Command &amp; Conquer 3</a>, and <a href="http://www.beyondunreal.com/main/ut2007/about.php">Unreal Tournament 2007</a> coming out next year, 2007 is looking like a pretty tasty gaming year indeed for those of us who are stubbornly staying off console games.</p>]]></content:encoded></item><item><title>Partitions&#x2c; Logical Volumes&#x2c; Filesystems...</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-12-09T06:10:11-08:00</dc:date><link>http://algorithm.com.au/blog/files/11ea0164993d49afeb26c442c4cc749b-495.html#unique-entry-id-495</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/11ea0164993d49afeb26c442c4cc749b-495.html#unique-entry-id-495</guid><content:encoded><![CDATA[<p>In the last month, I&#8217;ve had to dick around with (Linux) <code>fdisk</code>, <code>gparted</code>, <code>lvm</code>, <code>mke2fs</code>, <code>tune2fs</code>, the menagerie of <span class="caps">RAID </span>tools, and (Mac OS X) <code>gpt</code>, <code>fdisk</code>, <code>pdisk</code>, <code>asr</code>, <code>diskutil</code> and <code>hdiutil</code>.</p>

<p>I, for one, <em>truly</em> welcome our new <a href="http://www.sun.com/2004-0914/feature/"><span class="caps">ZFS</span></a> overlords.</p>]]></content:encoded></item><item><title>Transitions</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-12-07T17:29:35-08:00</dc:date><link>http://algorithm.com.au/blog/files/transitions.html#unique-entry-id-494</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/transitions.html#unique-entry-id-494</guid><content:encoded><![CDATA[<p><em>I&#8217;m not too sure that I can go much farther</em><br />
<em>I&#8217;m really not sure things are even getting better</em><br />
<em>I&#8217;m so tired of the me that has to disagree</em><br />
<em>I&#8217;m so tired of the me that&#8217;s in control</em><br />
<em>I woke up to see the&#8230;</em></p>

<p>Sun shining all around me<br />
How could it shine down on me?<br />
You think that it would notice that I can&#8217;t take any more<br />
Had to ask myself,<br />
&#8230; what&#8217;s it really for?</p>

<p><em>Everything I tried to do, it didn&#8217;t matter</em><br />
<em>Now I might be better off just rolling over</em><br />
<em>&#8216;cos you know I try so hard but couldn&#8217;t change a thing</em><br />
<em>And it hurts so much I might as well let go</em><br />
<em>I can&#8217;t really take the&#8230;</em></p>

<p>Sun shining all around me<br />
Why would it shine down on me?<br />
You think that it would notice that I no longer believe<br />
Can&#8217;t help telling myself<br />
&#8230; it don&#8217;t mean a thing.</p>

<p><em>I woke up to see the&#8230;</em></p>

<p>Sun shining all around me<br />
How could it shine down on me?<br />
Sun shining all its beauty<br />
Why would it shine down on me?<br />
You think that it would notice that I can&#8217;t take any more<br />
Just had to ask myself,<br />
&#8230; what&#8217;s it really for?</p>

<p>&#8212;Yoko Kanno and Emily Curtis, <em>What&#8217;s It For</em></p>

<p>Trust in love to save, baby.  Bring on 2007!</p>]]></content:encoded></item><item><title>Parallels Desktop adds Boot Camp&#x2c; native window support</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-12-03T03:39:20-08:00</dc:date><link>http://algorithm.com.au/blog/files/parallels-3036.html#unique-entry-id-493</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/parallels-3036.html#unique-entry-id-493</guid><content:encoded><![CDATA[<p><a href="http://forum.parallels.com/thread5997.html">Build 3036 of Parallels Desktop has been announced</a> for all you Linux-on-Mac and Windows-on-Mac fans, and it comes with two <em>very</em> cool new features:</p>


<ul>
<li>You can use your Windows XP Boot Camp partition directly in Parallels.  No more disk-space-killing installs of Windows XP as a Parallels disk image alongside Boot Camp!  This will save me a good 8GB or so of disk space, which is badly needed on a laptop.  A side-effect of this is that it <em>should</em> speed up Parallels&#8217;s I/O performance, since it now uses a raw block device for its virtual disk access rather than simply using a large file on a partition.</li>
</ul>




<ul>
<li><em>Coherency</em>: Shows Windows applications as if they were Mac ones.  I&#8217;m guessing that Parallels can overtake Windows&#8217;s window manager and somehow displays the window as a native Aqua one.  There are some pretty cool <a href="http://flickr.com/photos/gruber/311690002/">screenshots</a> <a href="http://flickr.com/photos/yesno/311726811/">of this feature</a> around.</li>
</ul>



<p>There&#8217;s a ton of other cool new features as well.  Delicious!</p>]]></content:encoded></item><item><title>CNN Trashes the Zune</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-11-14T14:27:30-08:00</dc:date><link>http://algorithm.com.au/blog/files/cnn-reviews-the-zune.html#unique-entry-id-489</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/cnn-reviews-the-zune.html#unique-entry-id-489</guid><content:encoded><![CDATA[<p><span class="caps">CNN </span>do a quick <a href="http://www.cnn.com/video/player/player.html?url=%2Fvideo%2Fbusiness%2F2006%2F11%2F14%2Fsorkin.minding.your.business.cnn&amp;wm=native_mac">3-minute review</a> of Microsoft&#8217;s Zune, and they didn&#8217;t like it at all.  I love the bit where the female presenter says &#8220;May I show you my new Shuffle?&#8221; toward the end, and pulls one of the gorgeous new iPod shuffles.  The design contrast between the two devices is night and day.  I think that review will probably sell more Shuffles than Zunes.</p>

<p>You know, I really do wish the iPod had a kick-ass competitor.  While there are plenty of geeks who&#8217;ll say &#8220;Well I have an iRiver and it&#8217;s <em>much</em> better than an iPod!&#8221;; I mean I&#8217;d like to see another device that has 30-40% of the <span class="caps">MP3 </span>music player market instead of Apple owning such a massive chunk of it.  A single company holding such a large percentage of a market just isn&#8217;t good for consumers in the long run.  Creative, Samsung, Microsoft, and every single other large electronics company have had <em>how long</em> now and how much resources to put out their so-called iPod killers?  Get with the program!</p>]]></content:encoded></item><item><title>A Flurry of Updates</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-11-12T08:41:03-08:00</dc:date><link>http://algorithm.com.au/blog/files/7ffe365d996c457d7c2797dcb7ec3e4a-488.html#unique-entry-id-488</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7ffe365d996c457d7c2797dcb7ec3e4a-488.html#unique-entry-id-488</guid><content:encoded><![CDATA[<p>Zing, can you tell I&#8217;ve been procrastinating lately?  The last three blog entries are all about boring site news.  Woah, like, totally meta dude.</p>


<ul>
<li>Comments have been turned back on, so now you can have your say on my views and boring-ass blog entries if you&#8217;re really keen!</li>
<li>I&#8217;ve ripped out a couple of old blog entries and made a formal <a href="/aboutme/">About Me</a> section on this site, that talks about me in all my massive glory and stuff.  There&#8217;s also a whole new shebang on <a href="/aboutme/thingsilike/">stuff that I like</a>.  It&#8217;s always so <em>weird</em> writing about yourself.</li>
<li>Lots of little tidy-ups and small things.</li>
</ul>]]></content:encoded></item><item><title>Neverwinter Nights 2 Hints and Tips</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-11-10T23:05:12-08:00</dc:date><link>http://algorithm.com.au/blog/files/introducing-games.html#unique-entry-id-486</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/introducing-games.html#unique-entry-id-486</guid><content:encoded><![CDATA[<p>I&#8217;ve added a <a href="/games/">games</a> section to the site.  There&#8217;s some small cheat&#8230; uhh, tricks, that you may find handy, some information on crafting items, and also a small patch to remove the XP penalty for multiclassing if you think it&#8217;s stupid (which I do).  Have fun!</p>]]></content:encoded></item><item><title>Oooo&#x2c; Shiny</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-11-09T22:26:23-08:00</dc:date><link>http://algorithm.com.au/blog/files/cd880bd3f0d72a44c43a0fb96cd6c97d-485.html#unique-entry-id-485</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/cd880bd3f0d72a44c43a0fb96cd6c97d-485.html#unique-entry-id-485</guid><content:encoded><![CDATA[<p>Ooo, my main website just got a bit <a href="/">shinier</a>.  Yeah for <a href="http://www.multithemes.com/themes/free32/free32.html">awesome free RapidWeaver themes</a>!</p>]]></content:encoded></item><item><title>Vimacs Downloads are Back</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-11-09T02:29:27-08:00</dc:date><link>http://algorithm.com.au/blog/files/vimacs-download-fixed.html#unique-entry-id-484</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/vimacs-download-fixed.html#unique-entry-id-484</guid><content:encoded><![CDATA[<p>Whoops, those of you who had problems downloading <a href="/code/vimacs/">Vimacs</a> will find that the download links work properly now.  (What the hell, people besides me actually <em>use</em> Vimacs?)</p>]]></content:encoded></item><item><title>The Gallery is Back Online</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-11-07T01:02:21-08:00</dc:date><link>http://algorithm.com.au/blog/files/19890c7bf6040e0e3cc429e13ea38b8e-482.html#unique-entry-id-482</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/19890c7bf6040e0e3cc429e13ea38b8e-482.html#unique-entry-id-482</guid><content:encoded><![CDATA[<p>Those of you who like stalking me will be glad to know that the <a href="/gallery">gallery</a> is back online.</p>]]></content:encoded></item><item><title>Neverwinter Nights 2 Is Here</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2006-11-06T21:44:30-08:00</dc:date><link>http://algorithm.com.au/blog/files/nwn2_first_impressions.html#unique-entry-id-481</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/nwn2_first_impressions.html#unique-entry-id-481</guid><content:encoded><![CDATA[<p>Well, it seems that <a href="http://en.wikipedia.org/wiki/Neverwinter_Nights_2">Neverwinter Nights 2</a>, Obsidian<sup class="footnote"><a href="#fn1">1</a></sup>&#8217;s next kick-ass roll-playing game, is out in the <span class="caps">USA. </span> Unfortunately, it&#8217;s been delayed in Australia until November the 16th.  Whaaaa?  That&#8217;s&#8230; like&#8230; next year!  Muaahaha, thankfully I&#8217;ve managed to wrangle some contacts and download the thing from <a href="http://www.direct2drive.com/">Direct2Drive</a>, so I&#8217;ve been gleefully playing it for the past few nights.  Well, <span class="caps">OK, </span>make that the past few days, nights, and early mornings&#8230;</p>

<p>First impressions are good, although the game engine isn&#8217;t particularly medal-worthy: Obsidian could use some better game engines programmers, that&#8217;s for sure.  It&#8217;s not in the same league as <a href="http://en.wikipedia.org/wiki/The_Elder_Scrolls_IV:_Oblivion">Oblivion</a>, for instance.  The user interface also isn&#8217;t quite up to <span class="caps">NWN1 </span>standards.  However, the spell effects do look very pretty, and more importantly, the story looks quite promising, and possesses the same moral and ethical ambiguity that is the hallmark of Obsidian games.  None of this bozo so-obvious black-and-white good-vs-evil crap.  (Mind you, I&#8217;m playing a slightly evil character at the moment &#8212; slaughtering the Neverwinter City Watch might be somewhat evil&#8230; but it is so much <em>fun</em>.  Besides, the Watch is weak and not doing its job, so I don&#8217;t see anything wrong with the Thieves&#8217; Guild controlling the city streets since they actually have the resources to maintain peace and order better than the Watch.  Just ensure the local shop keepers pay their taxes to the Guild and everyone&#8217;s happy&#8230; )</p>

<p>It also looks like an even more hackable game than the original <span class="caps">NWN, </span>although I&#8217;m unhappy with the toolset using the same dock-o-rama type of user interface that Visual Studio is famous for.  Dockable windows are <span class="caps">OK, </span>but I still think it&#8217;s far inferior to using multiple windows and a decent window management tool such as <a href="http://www.apple.com/macosx/features/expose/">Expos&eacute;</a>.  Still, it took me about 30 minutes to write some small chea&#8230; uhh, scripts, to help with some in-game things.</p>

<p>So far I&#8217;ve probably pumped about 20 to 30 hours into the game, and I think I&#8217;m about 3/4 of the way through Chapter One, with there being three chapters in total.  If I don&#8217;t reply to any emails for the week or two, uhhh, I guess you know what I&#8217;ll be doing!</p>

<p class="footnote" id="fn1"><sup>1</sup> Obsidian are makers of the <em>best</em> computer role-playing games in existence, end of story.  (None of this World of Warcraft or Final Fantasy <span class="caps">VII </span>crap, thank you very much.)  If you disagree with me on this, that&#8217;s <span class="caps">OK, </span><a href="http://xkcd.com/c178.html">I&#8217;m not really into Pokemon</a> anyway.</p>]]></content:encoded></item><item><title>Failure-Oblivious Computing</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-10-31T21:33:56-08:00</dc:date><link>http://algorithm.com.au/blog/files/failure_oblivious_computing.html#unique-entry-id-480</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/failure_oblivious_computing.html#unique-entry-id-480</guid><content:encoded><![CDATA[<p>I found a pretty interesting paper the other day about <a href="http://lambda-the-ultimate.org/node/1608">Failure-Oblivious Computing</a>.  The idea is simple: when a program encounters an error, simply have your runtime return some garbage value instead of crashing, throwing an exception, or go into error-handling mode.</p>

<p>If you&#8217;re a programmer, this suggestion will likely cause you to recoil in horror because the very idea that your functions will be getting back undefined values seems contradictory to everything we&#8217;ve been taught.  However, it&#8217;s hard argue with the results: the authors tested eight fairly well known programs, from mail user agents to Apache and Samba, and in every case the failure-oblivious version arguably did the right thing &#8212; and did a <em>better job</em> &#8212; than the &#8216;safe&#8217; versions that would throw an exception or shutdown in a controlled manner when they hit unexpected territory.  Read the paper if you&#8217;re doubtful about this.</p>

<p>This idea is somewhat in opposition to the Erlang philosophy of <a href="http://lambda-the-ultimate.org/classic/message6037.html">Let it crash</a>.  However, in both these scenarios, the underlying motivation is the same: large complex systems will inevitably have bugs, and both philosophies not only plan for it, but code to ensure that the system as a whole keeps running in the face of serious errors.</p>

<p>It&#8217;s quite easy to react emotionally to these ideas and say that it&#8217;s all just too dangerous and unpredictable &#8212; coders have always had it hammered into them to check for error values and exceptional conditions.  However, there&#8217;s also something to be said about the brittleness of software vs more organic systems: the latter will often recover successfully in the face of unexpected conditions, whereas software will simply break.  Failure-oblivious computing may not be the answer, but it&#8217;s a pretty good first research step.  It would be an interesting follow-up experiment to modify the runtimes of the dynamic languages such as Python and Ruby and make them return sentry values instead of throwing exceptions.  How many dynamic programs would continue to run successfully rather than die with some weird programmer-centric error?</p>]]></content:encoded></item><item><title>Die evil Cisco VPN client&#x2c; die</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-10-30T03:32:15-08:00</dc:date><link>http://algorithm.com.au/blog/files/vpnc.html#unique-entry-id-479</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/vpnc.html#unique-entry-id-479</guid><content:encoded><![CDATA[<p>If you have a <span class="caps">VPN </span>at your workplace, chances are good that it&#8217;s one of those Cisco 3000 <span class="caps">VPN</span> Concentrator things, which seem to be an industry standard for <span class="caps">VPN </span>equipment.  Chances are also good that you&#8217;ve likely been forced to use the evil, evil proprietary Cisco <span class="caps">VPN </span>client, which has been known to be a source of <em>angsta majora</em> for Mac OS X and Linux users.  (And if you think Windows users have it good, think again: the Cisco <span class="caps">VPN </span>client completely hosed a friend&#8217;s 64-bit Windows XP system to the point where it wouldn&#8217;t even boot.)</p>

<p>Enter <a href="http://www.unix-ag.uni-kl.de/~massar/vpnc/">vpnc</a>, an open-source <span class="caps">VPN </span>client that works just fine on both Mac OS X and Linux.  Linux people, I assume that you know what you&#8217;re doing &#8212; all you should need is a <span class="caps">TUN</span>/TAP kernel driver and you&#8217;re good to go.  Mac OS X folks, you&#8217;ll need to be comfortable with the <span class="caps">UNIX </span>terminal to use it; unfortunately no <span class="caps">GUI </span>has been written for it yet.  If you&#8217;re a Terminal geek, here&#8217;s a small guide for you:</p>


<ul>
<li>Download and install <a href="http://www-user.rhrk.uni-kl.de/~nissler/tuntap/">a tun/tap driver for Mac OS X</a>.</li>
<li>Download and install <a href="http://directory.fsf.org/security/libgcrypt.html">libgcrypt</a>.  If you have DarwinPorts (ne&eacute; MacPorts) installed, simply do &#8220;<code>port install libgcrypt</code>&#8221;.  Otherwise, grab it from <a href="ftp://ftp.gnupg.org/gcrypt/libgcrypt/">the libgcrypt <span class="caps">FTP </span>site</a> and install it manually.</li>
<li>You&#8217;ll need to check out the latest version of the vpnc code from <a href="http://svn.unix-ag.uni-kl.de/vpnc/">its Subversion repository</a>: &#8220;<code>svn checkout http://svn.unix-ag.uni-kl.de/vpnc/</code>&#8221;.  The latest official release (0.3.3, as of this writing) will not compile properly on Mac OS X, which is why you need the code from the Subversion trunk.</li>
<li>After doing the standard &#8220;<code>make &amp;&amp; make install</code>&#8221; mantra, run your Cisco <span class="caps">VPN </span><code>.pcf</code> profile through the <code>pcf2vpnc</code> tool and save the resulting <code>.vpnc</code> file in <code>/etc/vpnc</code>.</li>
<li><code>./vpnc YourProfile.vpnc</code>, and that should be it.  While you&#8217;re debugging it, the <code>--nodetach</code> and <code>--debug 1</code> options may be useful.</li>
</ul>



<p>Muchas gracias to Mario Maceratini at Rising Sun Pictures for hunting down vpnc for me.</p>]]></content:encoded></item><item><title>Welcome&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Site News</category><dc:date>2006-10-29T22:39:38-08:00</dc:date><link>http://algorithm.com.au/blog/files/new_site.html#unique-entry-id-478</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/new_site.html#unique-entry-id-478</guid><content:encoded><![CDATA[<p>Welcome to the new-look <a href="http://www.algorithm.com.au/">Algorithm.com.au</a>, redone from scratch.  I&#8217;m now using <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> to do the web site rather than my 5-year-old installation of Movable Type; thank you <span class="caps">MT, </span>you served me well for that time!  All my old blog entries have been imported across, although the <span class="caps">URL</span>s for the entries have all changed, sorry.</p>

<p>Apart from the obvious look&#8217;n&#8217;feel changes to the blog, I&#8217;ve finally put all my mixes online in the <a href="/music/">Music</a> section, and added a small section on the <a href="/code/">code</a> that I&#8217;ve released.  (It&#8217;s not much code, so don&#8217;t be too disappointed when you visit there &#8212; but there&#8217;s lots more coming in the future!)  So, have a look around if you&#8217;re bored, kill some time, and have the appropriate amount of fun.</p>]]></content:encoded></item><item><title>Quirks</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-03-24T23:21:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/e6dfad53c799fe86bc379f723ef02014-262.html#unique-entry-id-262</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e6dfad53c799fe86bc379f723ef02014-262.html#unique-entry-id-262</guid><content:encoded><![CDATA[<p>The following is a short list of quirks that I&#8217;ve found with <span class="caps">NWN, </span>as of version 1.19/1.20.  Keep in mind that future patches may fix some of these quirks.</p>

<h2>Double weapons are Good</h2>

<p>Double weapons (two-bladed sword, dire mace, etc) don&#8217;t seem to induce a two-weapon fighting penalty at all.</p>

<p>i.e.  If you have two-weapon fighting and ambidexterity, and your normal <span class="caps">BAB </span>is +5, you would expect that using a two-bladed sword induces the -2/-2 penalty for the two attacks, so you would attack at +3.  However, it seems that you <em>still attack at +5</em>!</p>

<p>This obviously makes double weapons far, far more powerful &#8230; can you say &#8220;Uthgardt Ceremonial Blade&#8221;?  It also means that munchkins (like me) who pick one level of Ranger for the dual-wield feat don&#8217;t have to, if they only want to use double weapons (also like me).</p>

<h2>Druids don&#8217;t have weapon restrictions</h2>

<p>The Druid&#8217;s weapon restriction isn&#8217;t.</p>

<p>If you are a Druid, you are proficient with druidic weapons, but you are not <em>restricted</em> to them.  While the Druid class cannot learn any non-druidic weapon proficiencies, other classes that your PC has can.</p>

<p>i.e. If you multiclass, the Druid&#8217;s weapon restriction disappears.</p>

<p>Put this together with the quirks above and below, and you can have a L1 Fighter/L19 Druid specialising in a two-bladed sword, with no attack penalty.  Nasty!</p>

<h2>Weapon Specialisation with a Level 1 Fighter</h2>

<p>(This may or may not be a deviation from the standard 3E rules, but it&#8217;s obscure enough to be a quirk.)</p>

<p>Any PC can take the Weapon Specialisation feat as long as she has one level in the Fighter class.  The feat is only available if:</p>


<ol>
<li>You have Weapon Focus on a particular weapon</li>
<li>Your <span class="caps">BAB </span>is &gt;= +4</li>
<li>You are <em>levelling up</em> in the Fighter class</li>
</ol>



<p>The last one&#8217;s the doobie: even if you have Weapon Focus and your <span class="caps">BAB </span>is &gt;= 4, the feat is only available to Fighters, and thus only shows up if you are levelling up as a Fighter.</p>

<p>The quirky thing is that it doesn&#8217;t matter what particular level of Fighter you are to obtain the feat.  You can be a level 4 Ranger (and thus have a <span class="caps">BAB </span>of +4), with weapon focus on, say, Bastard Sword.  If you then level up to a L4 Ranger/L1 Fighter, you can then pick the Weapon Specialisation feat.</p>

<h2>Hold down mouse button 1 to move the character</h2>

<p>So call me a gumby, but I had no idea this handy feature existed.  (And I&#8217;ve read the manual, what, fifteen times?  Nehh.)</p>

<p>Instead of cli-cli-clicking on the map all the time to move your character around, you can hold down the mouse button and drag it around the screen, which allows you to control your character&#8217;s movement and direction.  Much easier.</p>

<h2>Using <em>Lore</em> potions to their fullest</h2>


<ol>
<li>Drink lore potion to increase your <strong>Identify</strong> skill.</li>
<li>Pause game.</li>
<li>Identify everything you want (all 3000 armours from &#8220;The Dark Ranger&#8217;s Treasure&#8221;, heh heh).  The <strong>Lore</strong> potion won&#8217;t expire since the game is paused.</li>
<li>Unpause game.</li>
<li>Profit.</li>
</ol>]]></content:encoded></item><item><title>Implementing Subraces and ECLs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-03-28T01:55:07-08:00</dc:date><link>http://algorithm.com.au/blog/files/7df52538f0221b5a39ea8f85469c7bf6-263.html#unique-entry-id-263</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7df52538f0221b5a39ea8f85469c7bf6-263.html#unique-entry-id-263</guid><content:encoded><![CDATA[<p>There are two big problems with putting new PC races into <span class="caps">NWN</span>: implementing the racial traits, and implementing Effective Character Levels (ECLs).  At first glance, it seems that implementing racial traits can&#8217;t be too hard (hey, BioWare even provided a custom &#8220;subrace&#8221; option for your PC!), and <span class="caps">ECL</span>s are much harder.  Experience has shown, however, that it&#8217;s the other way around.</p>

<h2>Racial Traits</h2>

<p>Each race has a bunch of unique traits; for example, Aasimars have a +2 ability modifier to both Wisdom and Charisma.  They can also cast the Light spell once per day, and have a few energy resistances (e.g. 5/- for electrical).  How do you implement these?</p>

<p>The method done by all the modules I&#8217;ve seen give the character a <strong>skin</strong>.  Skins are normally only given to monsters, but there&#8217;s no reason you can give them to a player.  Think of a skin as an invisible, intangible item which the player possesses, but can&#8217;t access in her inventory (so she can&#8217;t drop it or trade it to other players).  The skin can then have the properties usually associated with magical items, to simulate the racial traits: e.g. an Aasimar Skin would grant them +2 to Wisdom and Charisma.</p>

<p>However, there is one large problem with this: ability modifications are not part of the character herself.  Some things in <span class="caps">NWN, </span>such as feat prerequisites, are based solely on the character&#8217;s real, permanent ability score, and do not take into account the ability modifier given by the skin.  The full list of things which use the character&#8217;s unmodified ability scores are:</p>


<ul>
<li><strong>Feat prerequisites</strong>.  e.g. if you have a Str of 12 and a skin which gives you a +2 Str adjustment, you should be able to access the Cleave feat, which requires a minimum of 12 Str.  You can&#8217;t.</li>
<li><strong>Spellcaster levels</strong>.  A Druid or Cleric with 17 Wis and a skin which grants a +2 Wis adjustment will still only be able to access level 7 spells.  The same applies for Sorcerers and Bards with the Charisma ability, and for Wizards with Intelligence.</li>
<li><strong>Intelligence modifier for bonus skills</strong>.  A character with an Int score of 10 and a skin which grants a +2 Int adjustment should receive 1 bonus skill point per level, but instead receives no bonus.</li>
</ul>



<p>You can sorta overcome this restriction by giving the character a specially tailored-skin and picking an ability to adjust which doesn&#8217;t affect your character, but that solution&#8217;s not very satisfactory.</p>

<p>So far, there doesn&#8217;t seem to be a way to modify the permanent statistics of a character via <span class="caps">NWS</span>cript, which means that even if you find another way to give ability adjustments instead of skins, it won&#8217;t make a difference.</p>

<p><span class="caps">NWN </span>also seems to have some protection against character editing: changing the ability scores of the various .BIC files in the localvault directory will make your character invalid if the total ability points don&#8217;t add up to 30.  So you can&#8217;t use a character editor to adjust your character&#8217;s ability scores (yet).  This makes sense, otherwise it would be very easy to use a super-character to cheat on multiplayer servers.</p>

<p>So, unless there&#8217;s a way to permanently adjust ability scores, using skins is a hack which works, but doesn&#8217;t really work well enough.  The other solution would be for Bioware to patch <span class="caps">NWN </span>so that it uses the adjusted ability scores, rather than the permanent ability scores.  Unfortunately, doing it either way has its share of implementation issues.</p>

<h2><span class="caps">ECL</span>s</h2>

<p>Effective Character Levels, or <span class="caps">ECL</span>s, are a way to compensate for the traits of the more powerful races.  The average drow, for example, has a whole bunch of fun abilities that make them far more powerful than the average human.  To compensate for this, some dude came up with the concept of an <span class="caps">ECL.</span></p>

<p>Drows have an <span class="caps">ECL </span>of +2, which basically means that they&#8217;re two levels lower than other races at the same amount of <span class="caps">XP. </span> For example, a human with 11000 XP would normally be level 5; a drow with 11000 XP is level 3.  <span class="caps">ECL</span>s &#8220;lag&#8221; your character behind by a certain number of levels, to compensate for your more powerful racial capabilities.</p>

<p>I&#8217;ve managed to implement <span class="caps">ECL</span>s in <span class="caps">NWN. </span> The solution is quite elegant in some ways and pretty ugly in other ways, but as far as I know, it&#8217;s the first complete <span class="caps">ECL </span>implementation done to date.</p>

<p>You can always have a look at the <span class="caps">NWS</span>cript code to figure out what&#8217;s going on, but since all programmers are lazy, here&#8217;s a rough idea of how it works, and why it&#8217;s been written that way.</p>

<h3>A first attempt at an <span class="caps">ECL </span>implementation</h3>

<p>(Warning: deep knowledge of <span class="caps">NWS</span>cript and 3E/ECL rules (or serious crack) will be required to understand what the hell I&#8217;m talking about here.)</p>

<p>Conceptually, an <span class="caps">ECL </span>changes the XP progression table.  The PC is treated as if she&#8217;s some number of levels higher than she actually is, only for the purpose of determining the XP required to level up.  If you try to translate that concept directly into code, though, you&#8217;re doomed.</p>

<p>Initially, the most obvious way to implement <span class="caps">ECL</span>s is to use a module&#8217;s <strong>OnPlayerLevelUp</strong> event.  Every time the player gets enough XP to level up, take some amount of XP away, so that she has to earn more XP to go up that level.  Yeah, that will work, but it presents two nasty problems:</p>


<ul>
<li>The <strong>OnPlayerLevelUp</strong> event is triggered <em>after</em> the player actually levels up.  It&#8217;s not triggered when you hit the amount of XP required to level up.  That means that if you decide to take away some <span class="caps">XP, </span>it will be done after the player has picked all their classes, skills, etc., only to have that level immediately taken away.  Raaather annoying.  This first problem isn&#8217;t solvable, but if you&#8217;re really intent on having <span class="caps">ECL</span>s, but you can live with it if you <em>really</em> want to.</li>
<li>If you take away XP when the player levels up, how do you know whether you&#8217;ve done this before?  This is easily solvable by storing local variables on the PC object.</li>
<li>Since you cannot store any persistent information on a PC object, you don&#8217;t know whether you&#8217;ve taken away the XP before.  What if the character has had her XP taken away before, then exports her character for use on another server, only to find that when she levels up, her XP has been taken away again?  Unfortunately, this problem is unsolvable, and it&#8217;s a showstopper: users will not accept XP being taken away from them unnecessarily.</li>
</ul>



<h3>Statefulness and persistence</h3>

<p>The core issue with the third problem is that it relies on <em>state</em>.  (Functional programmers, don&#8217;t you all feel good now?)  It relies on being able to store information with the character that can be used at a <em>much later</em> time; if the character is exported before that event occurs, things go completely screwy.  So, any <span class="caps">ECL </span>solution that is done must be <em>stateless</em>, or at least executed quickly enough that there is no practical chance for such a race condition to occur in practice.</p>

<h3>Another view on <span class="caps">ECL</span>s</h3>

<p>There&#8217;s no chance of implementing <span class="caps">ECL</span>s if we don&#8217;t alter our concept of how to implement them.  i.e. we have to think outside the box.</p>

<p>We know that an <span class="caps">ECL</span>ed character requires more XP to go up one level than a non-ECLed character.  One way to think of this is that the PC requires, say, 25% more XP than usual to go up a level.  As an example:</p>


<ul>
<li>a non-ECL character requires 2000 XP to advance from level 2 to level 3: you need 1000 XP to get to level 2, and 3000 XP to get to level 3.  However,</li>
<li>a <span class="caps">ECL </span>+1 character requires 3000 XP to advance from level 2 to level 3: you need 3000 XP to get to level 2, and 6000 XP to level 3.</li>
</ul>



<p>So a <span class="caps">ECL </span>+1 character requires 50% more XP than a non-ECL character to advance from level 2 to level 3.  While we can&#8217;t change <span class="caps">NWN&#8217;</span>s XP progression table to support this (at least not without evil hacking of 2DA files), what we can do is <em>penalise</em> the XP that the PC earns to make it <em>equivalent</em> to the progression table used by the <span class="caps">ECL </span>character.  This is similar to the XP penalty that is introduced when you multiclass and you don&#8217;t keep your non-favoured classes within one level of each other.</p>

<p>So, if we require 3000 XP to advance a level instead of 2000 <span class="caps">XP, </span>our <span class="caps">ECL </span>implementation will work if we penalise all the XP earnt by the character by a factor of 1/3.  Instead of earning 90 XP for killing a monster, the character earns 60 <span class="caps">XP. </span> Where she&#8217;d normally get 300 <span class="caps">XP, </span>she gets 200 XP instead.</p>

<p>While <span class="caps">NWS</span>cript doesn&#8217;t allow you to say &#8220;give a PC <em>n</em>% of the XP that she&#8217;d normally get&#8221;, what you can do is subtract an amount from the XP that the character has earnt.  So, when the PC gets 900 <span class="caps">XP, </span>subtract 300 <span class="caps">XP. </span> When she gets 60 <span class="caps">XP, </span>subtract 20 <span class="caps">XP. </span> If you do this at a frequent enough interval (e.g. every second), then you have an algorithm which executes fast enough that it&#8217;s effectively stateless.</p>

<p>This is the way that the <span class="caps">ECL </span>script works.  We replace the nw_c2_default1 script, which is called whenever an animation update occurs, so that the XP check is done very often (on average, probably once every three seconds).  Previous attempts tried to trigger the script so that it ran once every second, but that can&#8217;t be done unless there&#8217;s a way to set a variable which only lasts for the duration of the current play session.  (See the <span>Scripting</span> page for more information.)  As long as players aren&#8217;t cheating dramatically and exporting their character within time between animations are updated, it&#8217;s all good.</p>

<p>There are a few downsides to the current approach:</p>


<ul>
<li>Do all players need to put the new nw_c2_default1 file in their override directory, or does it only need to reside on the server?</li>
<li>The nw_c2_default1 file may need to be updated whenever a new patch is released.</li>
<li>There should be a stronger link between the thingy that grants the character the racial abilities, and <span class="caps">ECL</span>s, so that if you don&#8217;t have <span class="caps">ECL</span>s active, you should not receive the racial abilities.  (That&#8217;s only fair!)</li>
<li>It would be better to have a consistent, short time interval between XP checks.  It&#8217;s good enough right now, but it&#8217;s always better to be perfect &#8230;</li>
</ul>



<p>I&#8217;ll treat these problems as a <span class="caps">TODO </span>list: they may go away as I find workarounds.  The <span class="caps">ECL </span>scripts, however, work, and work well.</p>]]></content:encoded></item><item><title>GHC Runtime Loading</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2003-04-01T06:18:26-08:00</dc:date><link>http://algorithm.com.au/blog/files/ae6254bde37288d576f9b9238eccbe91-264.html#unique-entry-id-264</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ae6254bde37288d576f9b9238eccbe91-264.html#unique-entry-id-264</guid><content:encoded><![CDATA[<p><em>Note</em>: Since I wrote this dynamic loader for Haskell a long time ago, quite a few advancements have been made, so I&#8217;m no longer supporting this package.  See the <a href="#redux">end of the page</a> for discussion on the state-of-the-art in Haskell dynamic loading.</p>

<h2>Introduction to Dynamic Loading &amp; Plugins</h2>

<p><strong>Dynamic Loading</strong> is an important feature for building extensible programs and larger applications.  It allows the program to load in code contained in a file, at runtime, and execute it.  It&#8217;s a simple concept, but it leads to applications which can be very easily extended, sometimes in ways the original author never imagined.</p>

<p>If you&#8217;re still not convinced of the power of dynamic loading, think of WinAmp (a.k.a. <span class="caps">XMMS </span>:), which uses plugins to read files and perform device-specific output (not to mention all of its fantastic visualisation plugins).  Each file type (MP3, <span class="caps">WAV, OGG, XM, </span>etc) is handled by a separate plugin, which means that it&#8217;s incredibly easy to extend WinAmp to play different types of media files.</p>

<p>Other notable projects which extensively use plugins are the Linux kernel (think kernel modules), Emacs, the Windows device driver model, the entire DirectX/gstreamer media framework, and the Apache web server.  These projects would not be what they are today without their modular, extensible design.</p>

<h2>Plugins in Haskell</h2>

<p>The good news is: <span class="caps">GHC </span>has had, for quite a while now, the capability to load in Haskell modules at runtime.  (If you use <span class="caps">GHCI, </span>that&#8217;s exactly what it does!)  The bad news is: you can&#8217;t normally get at the functions which will do this for you.  The better news is: thanks to some handiwork, you now <em>can</em> get at the functions which perform runtime (un)loading of modules; you&#8217;ll need to download a special <strong>RuntimeLoader</strong> module which allows you to do this.</p>

<p>To use it,</p>



<pre>
  import RuntimeLoader

  ...

  -- Load the plugin file
  plugin &lt;- loadObject &quot;MyPlugin.so&quot;

  -- Load the function inside the plugin
  adder &lt;- loadFunction plugin &quot;addFunction&quot; :: IO (Int -&gt; Int -&gt; Int)

  -- Execute the function
  let i = adder 2 3
</pre>



<p>That&#8217;s all you need to do to load a plugin.  (Okay, not quite, you have to add a few flags to the ghc commandline too ;-).</p>

<p>If you&#8217;re interested, I&#8217;ve packaged up a small, example program called &#8220;TextFilter&#8221; which includes the <strong>RuntimeLoader</strong> module and demonstrates how to use it.  Download it and get hacking!</p>


<ul>
<li><a href="/files/haskell/ghc-runtime-loading/TextFilter-1.3.tar.gz">TextFilter-1.3.tar.gz</a></li>
</ul>



<p>Sorry, there&#8217;s no separate package for just the RuntimeLoader by itself: I think the TextFilter example is small enough that packaging it separately from the RuntimeLoader isn&#8217;t worth the hassle for you or me.</p>

<p><a name="redux"></p>

<h2>RuntimeLoader Redux</h2>

<p></a></p>

<p>Since the release of RuntimeLoader in 2002, a few other people have taken up the challenge to make Haskell a more dynamic language.  If you&#8217;re interested in this, have a look at:</p>


<ul>
<li><a href="http://www.mdstud.chalmers.se/~md9ms/hws-wp/"><span class="caps">HWS</span>-WP</a>, a.k.a &#8220;Haskell Web Server With Plugins&#8221;.  <a href="http://www.mdstud.chalmers.se/~md9ms/">Martin Sj&oumlaut;ren</a> took the original Haskell Web Server written by Simon Marlow many moons ago, and extended it to have Apache-style modules.</li>
</ul>




<ul>
<li>Hampus Ram&#8217;s <a href="http://www.dtek.chalmers.se/~d00ram/dynamic/">DynamicLoader</a>, which provides a higher-level <span class="caps">API </span>than my RuntimeLoader module.</li>
</ul>




<ul>
<li>I worked with <a href="http://www.cse.unsw.edu.au/~dons/">Don Stewart</a>, <a href="http://www.cse.unsw.edu.au/~sseefried/">Sean Seefried</a> and <a href="http://www.cse.unsw.edu.au/~chak/">Manuel Chakravarty</a> on a paper named <a href="http://www.algorithm.com.au/mt/archives/publications/plugging_haskell_in.html">Plugging Haskell In</a>, which is complemented by an implementation of a far more complete dynamic framework for Haskell named <a href="http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/">hs-plugins</a>.  Thanks to the incredible work of <a href="http://www.cse.unsw.edu.au/~dons/pretty.html">Crazy Don</a>, <em>hs-plugins</em> has become mature enough to write an <a href="http://www.cse.unsw.edu.au/~dons/hs-plugins/hs-plugins-Z-H-10.html">interactive Haskell shell</a> in less than 100 lines of code, and even lets you <a href="http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/examples/foreign_eval/main.c">call Haskell functions from C</a> far too easily.  Check it out, dude.</li>
</ul>]]></content:encoded></item><item><title>Vimacs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2003-04-01T06:21:45-08:00</dc:date><link>http://algorithm.com.au/blog/files/05a02802a2fbd8fac48ee7acdfd34e92-265.html#unique-entry-id-265</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/05a02802a2fbd8fac48ee7acdfd34e92-265.html#unique-entry-id-265</guid><content:encoded><![CDATA[<h2>What is Vimacs?</h2>


<ul>
<li><a href="http://www.vergenet.net/~conrad/">Conrad Parker</a>: <em>&#8220;Dude, I gotta get you doing some serious hacking projects&#8221;</em></li>
<li><a href="http://www.zip.com.au/~erikd/">Erik de Castro Lopo</a>: <em>&#8220;Oh, so you&#8217;re the insane guy that K was talking about&#8221;</em></li>
<li><a href="http://www.wiggy.net/">Wichert Akkerman</a>: <em>&#8220;Gross. Horror. Vim abuse. Mind if I include this as an example in the Debian vim packages? :)&#8221;</em></li>
</ul>



<p>Yep, it&#8217;s Emacs in Vim:</p>

<h2><a href="http://www.algorithm.com.au/vimacs/">http://www.algorithm.com.au/vimacs/</a></h2>]]></content:encoded></item><item><title>Download CV</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2003-04-01T06:24:18-08:00</dc:date><link>http://algorithm.com.au/blog/files/f1605c76a9608e77f7b9431c11b9040f-266.html#unique-entry-id-266</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/f1605c76a9608e77f7b9431c11b9040f-266.html#unique-entry-id-266</guid><content:encoded><![CDATA[<p>You can find the online version of my cirriculum vitae here, if you&#8217;re curious: it&#8217;s accurate and updated as of February, 2006.</p>

<p>It&#8217;s currently available in Adobe Acrobat (PDF) and PostScript (ps) formats; the Acrobat version contains hyperlinks.</p>


<ul>
<li>Acrobat version: <a href="/files/resume/andrep.pdf">andrep.pdf</a></li>
<li>Postscript version: <a href="/files/resume/andrep.ps">andrep.ps</a></li>
</ul>]]></content:encoded></item><item><title>zsh</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2003-04-01T06:40:02-08:00</dc:date><link>http://algorithm.com.au/blog/files/168b8c7e1eeee03c52c0e607923adfd7-267.html#unique-entry-id-267</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/168b8c7e1eeee03c52c0e607923adfd7-267.html#unique-entry-id-267</guid><content:encoded><![CDATA[<h2>What&#8217;s zsh?</h2>

<p>This is a talk I gave on <strong>zsh</strong> (the Z shell) at <span class="caps">SLUG, </span>the Sydney Linux Users&#8217; Group.  You can find more information on this great shell on the zsh homepage, which is at (drumroll) <a href="http://www.zsh.org/">www.zsh.org</a> .  Briefly, zsh combines all of the (in)famous interactive power of tcsh and bash&#8217;s standard Bourne shell syntax, with its own most utterly crazy and useful word completion, globbing, redirection, and editing features.  Once you start using it, everything else seems annoyingly &#8230; useless.</p>

<p>You can find a copy of my current zsh configuration files at</p>


<ul>
<li><a href="http://www.algorithm.com.au/wiki-files/talks/zsh/config/">http://www.algorithm.com.au/wiki-files/talks/zsh/config/</a></li>
</ul>



<h2>My zsh presentation</h2>

<p>Feel free to take a peek at the slides that I used for my presentation, in <a href="/files/talks/zsh/slides/html/">html</a> or <a href="/files/talks/zsh/slides/mgp">MagicPoint</a> format.</p>

<p>Other zsh tutorials and advocacy documents I used for my talk include:</p>


<ul>
<li>Paul Falstad and Bas de Bakker&#8217;s &#8220;An Introduction to the Z shell&#8221; (<a href="/files/talks/zsh/intro.ps">intro.ps</a>).  This is also on the zsh homepage.</li>
</ul>




<ul>
<li>The <a href="/files/talks/zsh/FEATURES"><span class="caps">FEATURES</span></a> document that comes with zsh (taken from 4.0.1prerelease).  This is actually a superb quick reference to all of the useful features in the Z shell.</li>
</ul>



<p>However, you really want to drop by <a href="http://www.zsh.org/">www.zsh.org</a> and see the documentation, <span class="caps">FAQ</span>s and scripts there.</p>]]></content:encoded></item><item><title>Hicki</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2003-04-01T06:46:12-08:00</dc:date><link>http://algorithm.com.au/blog/files/65e932191e63179b5731ae2e69695c47-268.html#unique-entry-id-268</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/65e932191e63179b5731ae2e69695c47-268.html#unique-entry-id-268</guid><content:encoded><![CDATA[<p>Hicki was the working name for my thesis project, which is a case study of writing a <a href="http://c2.com/cgi/wiki?WikiEngines">WikiEngine</a> in Haskell, before I decided to change thesis topics.</p>

<p>Here are the slides and handouts which I used in my Thesis Part A presentation (22/10/02), if you&#8217;re interested:</p>


<ul>
<li>Slides: <a href="/files/talks/presentation-part_a/hicki.ps">hicki.ps</a></li>
</ul>




<ul>
<li>One-page summary in <a href="/files/talks/presentation-part_a/one-page.pdf">Acrobat</a> or <a href="/files/talks/presentation-part_a/one-page.ps">PostScript</a> format.</li>
</ul>




<ul>
<li>A <a href="/files/talks/presentation-part_a.tar.bz2">tarball</a> with all the files.  You can also <a href="http://www.algorithm.com.au/wiki-files/talks/presentation-part_a/">browse the directory</a> with all the files; all the original LaTeX files are there too.</li>
</ul>]]></content:encoded></item><item><title>Chiba</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2003-04-01T06:47:41-08:00</dc:date><link>http://algorithm.com.au/blog/files/3a07a78f83d057ce17825c3470913297-269.html#unique-entry-id-269</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3a07a78f83d057ce17825c3470913297-269.html#unique-entry-id-269</guid><content:encoded><![CDATA[<p>Chiba is a markup language I&#8217;m currently working on, which is inspired by many other markup languages, including the syntax used by <span class="caps">HTML, SDF, POD, </span>lout, <span class="caps">AFT, APT,</span> Wiki, DocBook, and of course, LaTeX.  It&#8217;s written in Haskell.</p>

<p>It&#8217;s nowhere near finished (and don&#8217;t hold your breath), but the framework is currently there.  Some very simple functions have been written, so it&#8217;s currently possible to convert a Chiba <span class="caps">DOM </span>to <span class="caps">HTML </span>markup.</p>

<p>Here, you can find all the source code for my presentation in the <a href="/files/talks/chiba-20020603.tar.gz">chiba-20020603.tar.gz</a> file, or you can browse the <a href="/files/talks/chiba-20020603/">contents of the tarball</a> .  The actual presentation can be downloaded in two formats:</p>


<ul>
<li><a href="/files/talks/chiba-20020603/topic-14.ps">on-line presentation, with overlays</a></li>
<li><a href="/files/talks/chiba-20020603/topic-14-print.ps" title="4 slides per page">printable format</a></li>
</ul>]]></content:encoded></item><item><title>Neverwinter Nights First Impressions</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-01T06:57:18-08:00</dc:date><link>http://algorithm.com.au/blog/files/b37165bdc7ff8efed071d3c6b290bfc2-270.html#unique-entry-id-270</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b37165bdc7ff8efed071d3c6b290bfc2-270.html#unique-entry-id-270</guid><content:encoded><![CDATA[<p>The one-word summary?  <em>Wow</em>.</p>

<p>I&#8217;ve read many reviews on this game, and I was in slight disbelief as review after review refused to rate this game at any less than 90%.  Now that I&#8217;ve got my hands on it though, I know why.</p>

<p>Keep in mind that this is a <em>first impression</em>.  It&#8217;s not an extensive review, and no doubt my opinion of the game will go down as I encounter bugs, or realise that the single-player plot is about as boring as Baldur&#8217;s Gate.  However, BioWare looks like they really have done what no other company has ever done before: taken the <span class="caps">D&amp;D </span><em>concepts</em> (not just the rules), and faithfully implemented them as a computer <span class="caps">RPG.</span></p>

<h2>They got 3E right</h2>

<p>For hardcore <span class="caps">D&amp;D </span>players, <span class="caps">NWN </span>is everything that you&#8217;ve been waiting for in a computerised version of <span class="caps">D&amp;D. </span> It&#8217;s not perfect, but it&#8217;s so good that you just <em>won&#8217;t care</em> about the insignificant shortcomings.</p>

<p>Part of the reason that it&#8217;s so good is simply because it&#8217;s the very first game to use the 3E mechanics: it&#8217;s the same <span class="caps">D&amp;D </span>that we know and love (or hate), and it&#8217;s a huge improvement over the 2nd edition rules that previous <span class="caps">D&amp;D </span>games used.  Yes, you can multi-class in this.  Yes, <strong>every feat</strong> that&#8217;s in the Player&#8217;s Handbook is in the game, and they&#8217;re all implemented perfectly.</p>

<p>Sure, some bits were changed around to suit the nature of <span class="caps">CRPG</span>s better; for instance, the Rogue&#8217;s &#8220;Disable Device&#8221; skill has been split up into &#8220;Disable Trap&#8221; and &#8220;Set Trap&#8221;.  But those changes are small, and they&#8217;re Done Right.</p>

<p>But really, for all intents and purposes, this game <strong>is</strong> 3rd edition Dungeons &amp; Dragons.  Perhaps this won&#8217;t dawn on you until you see all the skills and feats that you can choose at your character generation, but this in itself makes the game worthy of buying.  The amount of attention paid by Bioware to implementing every single last detail in 3E is truly staggering; if they got nothing else right about this game, I wouldn&#8217;t care.  The 3E implementation is just so good that any hardcore <span class="caps">D&amp;D </span>fan would be impressed with it.  (Hey, if Ryan Dancey&#8217;s happy with it, it <em>has</em> to be That Good).</p>

<p>So what didn&#8217;t they quite get right with the 3E rules?  It&#8217;s not extensible enough.  You can&#8217;t add new feats, for instance.  If you want to create a new weapon model, you&#8217;re going to need 3DSmax.  But before you sneer, the Aurora engine which Neverwinter Nights uses is extensible enough that you can simulate everything that you&#8217;d ever want in a <strong>computer</strong> <span class="caps">RPG </span>just by using various types of items.</p>

<p>And on that note, let&#8217;s talk a bit about the Aurora toolkit.</p>

<h2>The Aurora Toolkit</h2>

<p>Forget everything you know about level editors, map editors, and anything else related to modding games.  The Aurora thing is so usable and so friendly that it makes creating basic modules fun, and not a chore.</p>

<p>There&#8217;s a little bit to learn, but considering the worlds that you can craft with this thing, there&#8217;s <em>very</em> little to learn.  Put it this way: the section on the toolkit in the manual is less than 20 pages long.  The toolkit&#8217;s interface is so good that it just makes creating modules trivial.</p>

<p>For instance, take the conversation editor.  You can add new dialogues for <span class="caps">NPC</span>s by using this tool.  You click the &#8216;Add&#8217; button and type in &#8220;Greetings!  What&#8217;s two plus two?&#8221;; the toolkit automatically tags that message as being spoken by the <span class="caps">NPC. </span> You click &#8216;Add&#8217; again and type in &#8220;1&#8221; as a possible response, and the toolkit immediately tags that as being spoken by the player&#8217;s character.</p>

<p>If you want to add more things that the player character can say, just click on the &#8220;Greetings&#8221; message, click &#8216;Add&#8217; again, and type in &#8220;2&#8221;.  This can send the player down a completely new conversation path, which implies that it might be complex to handle.  Not at all; the conversation&#8217;s represented as a simple tree, which makes it trivial to insert new conversation items.</p>

<p>As I said before, the core engine doesn&#8217;t let you expand feats or races.  Is that a big oversight?  No.  You can simulate almost of these things by using items which grant the characters whatever abilities you wish.</p>

<p>For example, I was disappointed that I couldn&#8217;t play an Aasimar, one of the standard Forgotten Realms races.  So, using the half-elf template, you can give the character an invisible, intangible item called a &#8220;skin&#8221; which grants her those Aasimar qualities.  Change your subrace name to &#8220;Aasimar&#8221;, and bingo, you&#8217;re an Aasimar.  You just added a new race.</p>

<p>So while the game engine doesn&#8217;t allow the extension of some core 3E ideas such as classes and feats, you can do a <em>lot</em> with the toolkit.  I imagine that implementing prestige classes and new feat-like things won&#8217;t be out of the question at all.  Of course, you can create new items, weapons, armour, magical staves, rods and spoons with ease.</p>

<p>So, the toolkit makes doing all the standard things easy.  Of course, if you want to do wacky stuff, the Aurora engine is driven by a programming language called <span class="caps">NWS</span>cript which you can write stuff in.  Don&#8217;t be mistaken &#8212;- this isn&#8217;t a play-language.  From what I understand, it&#8217;s fully <span class="caps">OO, </span>and gives you full access to the internals of the game engine.</p>

<p>What&#8217;s even better than that is that Bioware realised how powerful <span class="caps">NWS</span>cript is, and provide you with a script editor right in the toolkit.  No more whipping out that sorry-ass excuse for a text editor (notepad.exe) to change things around; all your development tools are in the toolkit.  Effectively, it&#8217;s a small <span class="caps">IDE </span>(integrated development environment): the toolkit can edit scripts, debug them and compile them.  This makes things so much more accessible than fooling around with two dozen text files.  (Civilisation, anyone?)</p>

<p>If you&#8217;re a DM and have never done programming before, well, now&#8217;s a good time to learn.  The toolkit is so good that you could use it as a basis to build a module that you wanted to play in table-top <span class="caps">RPG</span>s.  That&#8217;s really cool.</p>

<h2>The network effect</h2>

<p>Now we get into romantic territory.  Fasten your seatbelts!</p>

<p>By itself, the flawless implementation of the rules doesn&#8217;t mean all that much.  By itself, an easy-to-use toolkit doesn&#8217;t imply that much.  By itself, the DM client, which allows you to dungeon master a module that you&#8217;ve created, isn&#8217;t a big deal.</p>

<p>However, combine these three things, and the effect is exponential: I kid you not, this thing is a truly viable <em>alternative</em> to tabletop <span class="caps">RPG</span>ing.</p>

<p>Read that again, just in case it hasn&#8217;t hit you yet.  <span class="caps">NWN </span>could drain away as much of your time as regular <span class="caps">D&amp;D </span>does, or perhaps even more.  (Although in the case of our current gaming group, draining more time than our <span class="caps">D&amp;D </span>sessions isn&#8217;t all that hard :).</p>

<p>I&#8217;m not saying that it should <em>replace</em> tabletop <span class="caps">RPG</span>ing, or dethrone it as the <span class="caps">RPG </span>method of choice.  I&#8217;m saying that&#8217;s <span class="caps">NWN </span>is an <em>alternative</em> to tabletop <span class="caps">RPG</span>s; it&#8217;s an alternative because it offers a completely <em>different experience</em> to tabletop <span class="caps">RPG</span>ing.</p>

<h2>Computer <span class="caps">RPG</span>s vs tabletop <span class="caps">RPG</span>s</h2>

<p>Let&#8217;s get something straight, first: computer <span class="caps">RPG</span>s will never be able to compete with tabletop <span class="caps">RPG</span>s.  They never have, they never will.</p>

<p>However, now that <span class="caps">NWN </span>has been released, something has emerged which I thought never happen: computer <span class="caps">RPG</span>s now offer something which table-top <span class="caps">RPG</span>s don&#8217;t, and never will be able to: the feeling of being immersed in a computer game created by <em>friends</em>.  The graphics detail in <span class="caps">NWN </span>is good enough that just <em>seeing</em> the environment makes for a completely different experience from conventional <span class="caps">RPG</span>s; the fact that you will play your <span class="caps">DM&#8217;</span>s module just like <strong>any other computer game</strong> also makes for something different.</p>

<p>If you&#8217;re a <span class="caps">DM, </span>you can prep the entire module before the session starts, watch your players walk through the world, talk to them as you would over a table, and then watch with glee as that pretty <span class="caps">NPC </span>they picked up is actually a succubus and teleports them to hell.  You get to <em>see</em> all that in vivid graphical detail, in a campaign <em>you</em> wrote, on a <em>computer game</em> that your players are playing, and you&#8217;re <em>watching</em> them do this as they&#8217;re playing*.</p>

<p>Think about that for a second.  Come back and read the rest of this when you&#8217;re done.</p>

<p>Thought about it?  Good.  Now imagine that you can have <em>multiple</em> DMs controlling a session.  This is unfeasible in real-life <span class="caps">RPG</span>s, but it&#8217;s actually <em>recommended</em> for <span class="caps">NWN. </span> You can have a DM/PC ratio of 1:1; for every <span class="caps">PC, </span>there&#8217;s a <span class="caps">DM. </span> DMs can control <span class="caps">NPC</span>s to say exactly what they want, and the human players on the other end will just think it&#8217;s all part of a computer game.</p>

<p>That staggers me.</p>

<p>So, first impressions of <span class="caps">NWN</span>?  Awesome.  If you&#8217;re a <span class="caps">D&amp;D </span>player, <em>buy</em> this thing.  <em>Right freaking now</em>!  (And I mean <em>buy</em>, not <em>pirate</em>.)  If you&#8217;ve got the computer to run it, it will provide you with as much joy as any <span class="caps">D&amp;D </span>book does, and at least from my point of view, that&#8217;s possibly the highest accolade that I could ever award to a computer game.</p>]]></content:encoded></item><item><title>Subraces and ECLs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-01T07:00:13-08:00</dc:date><link>http://algorithm.com.au/blog/files/6baf2633e761aec9f86f3d4dadb15b53-271.html#unique-entry-id-271</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6baf2633e761aec9f86f3d4dadb15b53-271.html#unique-entry-id-271</guid><content:encoded><![CDATA[<p>Neverwinter Nights has all the standard 3E races: Humans, Dwarves, Elves, Half-Elves, Gnomes, Halflings, and Half-Orcs.  (I do wonder who at WoTC decided that half-orcs should be a core race; whether this is a good or bad thing is left as an exercise to the reader.)</p>

<p>However, <span class="caps">NWN </span>doesn&#8217;t implement any of the additional races found in the Forgotten Realms sourcebook, which you might&#8217;ve expected, since Icewind Dale (II) does.  In case you have no idea what I&#8217;m talking about, the Forgotten Realms sourcebook adds quite a number of player character (PC) races, including Sun Elves, Gold Dwarves, Tieflings, Genasi, and the infamous Drow.</p>

<p>So, here&#8217;s to extending <span class="caps">NWN </span>to support those new races.</p>

<h2>Download</h2>

<p>(n.b. These files aren&#8217;t really meant for public consumption yet.  Do.  Not.  Expect.  Them.  To.  Work!)</p>


<ul>
<li><a href="/files/nwn/ecl/Character%20Customisation%2014.zip">Character Customisation 14.zip</a></li>
</ul>



<p>Grab the above file and unzip it to your modules directory.  This module allows you to pick a non-standard race.</p>


<ul>
<li><a href="/files/nwn/ecl/ECLs.zip"><span class="caps">ECL</span>s.zip</a></li>
</ul>



<p>Unzip all the files in the <span class="caps">ECL</span>s.zip archive to your override directory.  This will implement proper <span class="caps">ECL </span>support.</p>]]></content:encoded></item><item><title>Barkskin VFX Removal</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-01T07:01:19-08:00</dc:date><link>http://algorithm.com.au/blog/files/3c66cada99f0f0fce0e234d89fcec4cd-272.html#unique-entry-id-272</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3c66cada99f0f0fce0e234d89fcec4cd-272.html#unique-entry-id-272</guid><content:encoded><![CDATA[<p>The Barkskin, Stoneskin and Greater Stoneskin spells are all great, except that they make your character look like a brown or stone-like object.  I dunno about you, but I prefer staring at a character which doesn&#8217;t look like a tree.</p>

<p>So, I modified the &#8220;skin&#8221; spells to use the visual effect used by the &#8220;Premonition&#8221; spell.  The actual spell effects don&#8217;t change, of course, just the visual effect that appears on your character.</p>

<p>Download:</p>


<ul>
<li><a href="/files/nwn/skin_spells_uses_premonition_vfx.zip">skin_spells_uses_premonition_vfx.zip</a></li>
</ul>



<p>Extract this file to the directory where you installed Neverwinter Nights, and you should end up with a few new files in your <code>override</code> directory.  Have fun oogling at your character.</p>

<p>Note: This is for <span class="caps">NWN</span> HoTU 1.61.  Untested on other versions.</p>]]></content:encoded></item><item><title>Fixing Corrupted Modules</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-01T07:06:00-08:00</dc:date><link>http://algorithm.com.au/blog/files/c119c9668c09c98749a8a4d9b41019a3-273.html#unique-entry-id-273</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c119c9668c09c98749a8a4d9b41019a3-273.html#unique-entry-id-273</guid><content:encoded><![CDATA[<h2>Introduction</h2>

<p>One of the very irritating downsides to the Aurora Toolkit is that it has a nasty habit of corrupting modules:</p>

<p><center> <img src="/images/nwn/toolkit_showing_corrupted_module.png" alt="" /></p>

<p>Uh oh.</p>

<p></center></p>

<p>Virtually none of us have the discipline to keep backups of the last 10 saves of the module in case the latest one becomes corrupted, which means that we can lose hours of work.  (Some unfortunates have probably lost hundreds of hours of work thanks to these corruption bugs.)</p>

<p>There was a &#8220;sticky&#8221; thread on the BioWare boards about how to recover these corrupted modules, which involved messing around with the temporary directories that the Toolset creates, but that was a bit too hacky for my liking.  So here&#8217;s another method to recover them.</p>

<h2>Recovering Corrupted Modules with <span class="caps">NWNV</span>iewer and <span class="caps">NWNP</span>acker</h2>

<p>You&#8217;ll need <a href="http://www.dladventures.com/pafiledb/pafiledb.php?action=file&amp;id=4">Zoligato&#8217;s <span class="caps">NWNV</span>iewer</a>, an invaluable program for <span class="caps">NWN </span>hackers.  The <span class="caps">NWNV</span>iewer application actually has the <span class="caps">NWNP</span>acker program inside it, so there&#8217;s no separate download for <span class="caps">NWNP</span>acker.</p>

<p>Here&#8217;s the procedure:</p>


<ul>
<li>Use the &#8220;File menu -&gt; <span class="caps">MOD HAK ERF</span> Open&#8221; command to open your corrupted module</li>
</ul>




<ul>
<li>Right-click on any name inside the &#8220;File List&#8221; pane (the left-hand-side of the <span class="caps">NWNV</span>iewer application) and pick &#8220;Extract <span class="caps">ALL</span>&#8221; from the context menu</li>
</ul>




<ul>
<li>Extract all files to a Directory Of Your Choice</li>
</ul>




<ul>
<li>Start <span class="caps">NWNP</span>acker by going to the &#8220;File menu -&gt; <span class="caps">NWN</span> Packer&#8221;</li>
</ul>



<p>Here&#8217;s the fun bit: the &#8220;File&#8221; menu is completely irrelevant to the <span class="caps">NWNP</span>acker application.  Everything in <span class="caps">NWNP</span>acker is controlled by the icons in the <span class="caps">NWNP</span>acker window.  So &#8230;</p>


<ul>
<li>Click on the &#8220;New Document&#8221; icon (the piece of  paper with the folded corner) inside the <span class="caps">NWNP</span>acker window, and select the &#8220;New <span class="caps">MOD</span>&#8221; menu entry.  (You can&#8217;t go to &#8220;File menu -&gt; New -&gt; New <span class="caps">MOD</span>&#8221; to create a new <span class="caps">MOD </span>file, because there <em>is</em> no &#8220;File menu -&gt; New&#8221; menu entry!)  The directory browser inside the <span class="caps">NWNP</span>acker window should now allow you to navigate directories and add files to the left pane.</li>
</ul>




<ul>
<li>Add all the files which you previously extracted to your new module, by dragging them from the file selection window in the bottom-right to the list of files in the module in the bottom-left.</li>
</ul>




<ul>
<li>Use the disk icon in the <span class="caps">NWNP</span>acker window to save your new module.</li>
</ul>



<p>At this point, your module should be openable (is that a word?) in the toolset.  </p>


<ul>
<li>Open your new module up in the toolset, and delete any invalid resources in it.  If you&#8217;re lucky, the Toolset won&#8217;t give you those fun &#8220;invalid pointer&#8221; error messages as you&#8217;re doing this.  Save this new module as your final module, and you should be able to continue work from there.</li>
</ul>



<p>Optionally:</p>


<ul>
<li>If you&#8217;re paranoid (like moi), you may want to then open up your final module and repeat the process with <span class="caps">NWNV</span>iewer/NWNPacker, to make 100% sure that the module file is packed properly.</li>
</ul>



<p>I&#8217;d add screenshots to this to make it more understandable, but hey, I&#8217;m lazy.  If you care enough about recovering your corrupted module to email me about it but can&#8217;t understand this procedure, email me so I can put up some screenshots for you.</p>

<h2>Possible Explanations for Corruption</h2>

<p>If you try to open up your corrupted module in <span class="caps">NWNP</span>acker (instead of <span class="caps">NWNV</span>iewer), it will complain about insufficient memory.  My intuitive guess is that one of the length fields for the resources inside the module is wrong, which would also explain the invalid pointer operations performed by the toolkit.</p>

<p><span class="caps">NWNV</span>iewer appears to be more robust than <span class="caps">NWNP</span>acker and the toolkit, and seems to deal with such corruption better.</p>

<p>Have the appropriate amount of fun.</p>]]></content:encoded></item><item><title>Character Sheets</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-01T07:07:49-08:00</dc:date><link>http://algorithm.com.au/blog/files/c9ea7ff67e5efc4cf7ace1aed9d6ce10-274.html#unique-entry-id-274</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c9ea7ff67e5efc4cf7ace1aed9d6ce10-274.html#unique-entry-id-274</guid><content:encoded><![CDATA[<p>Here are some character record sheets for use with the Babylon campaign:</p>


<ul>
<li>Andr&Egrave;&#8217;s character sheet in <a href="/files/rpg/andrep-crs.xls">Excel</a> or <a href="/files/rpg/andrep-crs.pdf">Acrobat/PDF</a> format.</li>
</ul>]]></content:encoded></item><item><title>Session 2 Summary</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2003-04-03T07:46:25-08:00</dc:date><link>http://algorithm.com.au/blog/files/378fd9820ca82dd40d33a2a13b4013b8-275.html#unique-entry-id-275</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/378fd9820ca82dd40d33a2a13b4013b8-275.html#unique-entry-id-275</guid><content:encoded><![CDATA[<h2>Babylon Campaign Summary for Session 2 (18/3/2003)</h2>

<p><em>by Andr&eacute; Pang</em></p>

<p>The last session ended with our five <del>valiant heroes</del> mercenaries fighting to earn a place in the Thel&#8217;s Warriors, and they greatly impressed Thel and <span class="caps">XXX </span>by ripping their opponents to shreds whilst also smelling like minty freshness.</p>

<p>Thel Achila congratulated Amber and the party after the fight, and told them more about the Thel&#8217;s Warriors.  She informed them that wounds suffered by any of the stable&#8217;s fighters are tended to by their healer named Papparasmus, a man not particularly known for his social skills, but was nevertheless good at what he does.  Thel also mentioned that she was now in retirement because of the &#8220;Ankheg incident&#8221; &#8212;- several of her fighters were gored to death in an unpleasant manner in an ankheg pit during one of the fights.  In fact, apart from the Ankheg incident, many of her warriors were dying during the middle of a fight in the veins; they would mysteriously keel over with no signs of warning.  In particular, her greatest gladiator, a shambling mound who went by the name &#8220;The Golden Shambler&#8221;, died in this fashion.  Thel wants the party to find out who or what is responsible for killing all her gladiators, and is offering a 1000 gp bounty to solve this puzzle.  Thel suspects that a rival stable, the Sandnets, may have something to do with the deaths.  Led by Vulpone Sandnet, a hulking minotaur who savagely cuts down almost all opposition, the Sandnets have never been on the best of terms with Thel&#8217;s Warriors.  However, our heroes&#8217; first intuition was to follow up on the strange minty smell that Torr picked up in the battle to prove themselves to Thel.  Thel mentioned that Flug, the arena janitor, uses some cleaning fluid which may have been a bit minty.</p>

<p>After their conversation with Thel, the crew of five descended beneath the gladiatorial arena: the Underveins.  The Underveins, featured on a very cool Dragon&#174; map, was home to Papparasmus the healer.  Papparasmus was about as pleasant to deal with as everybody suggested: that is, not very.  He did do his job though, and healed everybody back up to their optimal health.  One thing that our heroes managed to get out of Papparasmus was a name: Tiberius, apparently a master healer and cleric who was responsible for raising the dead.</p>

<p>The heroes then went to visit Thel again; upon asking Thel about Tiberius, Thel became defensive and refused to talk to the heroes about &#8220;her father&#8221;.  Instead, she laid down the rules of gladiatorial combat in the Veins:</p>


<ol>
<li>No magical &#8220;buffs&#8221; before a match; e.g. no <em>Mage Armour</em>, no <em>Protection From Normal Missiles and Other Pointy Things</em>.  It&#8217;s perfectly okay to cast those spells once you&#8217;ve started combat, though.</li>
<li>There&#8217;s a 50gp entrance fee for each fight, and the 1<sup>st</sup> such fee is paid for by Thel.  This fee can also be waived if you&#8217;re particularly (in)famous.</li>
<li>One can take &#8220;raise dead insurance&#8221;, which costs (50gp + 10 * your fame score).  Once you&#8217;ve taken the insurance, if you fall in combat, you will be raised for the mere price paid for the insurance.</li>
<li>If you have no &#8220;raise dead insurance&#8221;, it costs 200gp to raise you lest you be decapitated, arrowed, sworded, or otherwise burninated (to the countryside).</li>
<li>Winning a gladiatorial battle nets (50gp + 2 * your fame score).  <span class="caps">XXX</span>: This doesn&#8217;t seem like much, given that the entrance fee takes 50gp out of that.  Andrew?</li>
<li>Good performance in battle and/or good crowd entertainment nets a gladiator more fame.</li>
<li>A gladiator may appeal to the crowd with either a Charisma check or a skill check (DM determines difficulty), at their choice.</li>
<li>Inflicting massive damage, such as one would expect from a critical hit from a scythe, increases a gladiator&#8217;s fame.</li>
<li>Performing a Fatality to kill your foe(s) increases your fame.</li>
<li>Having &#8220;spice&#8221; in a battle (and presumably winning that battle) increases your fame.  &#8220;Spice&#8221; can be a number of things, such as having an ankheg pit present, a random basilisk peacefully wandering around the arena, or random landmines.</li>
<li>Doing &#8220;cool things&#8221; in combat increases your fame, where &#8220;cool things&#8221; is subject to interpretation by Mr. Dungeon Master.</li>
<li>To perform a Fatality, a gladiator must kill an opponent with a critical hit, <em>or</em> must kill an opponent with a -6 penalty to their attack roll.</li>
<li>Once you hit 0 hitpoints in the arena, you&#8217;re gone.  Dead.  Burninated.</li>
</ol>



<p>Armed with this valuable information, our astute heroes then took a one week break, with 45gp spending money courtesy of Thel, to prepare themselves before their first battle.  The group separated for the week, and each mercenary had their own story to tell.</p>

<p>Kane and Arjanne were visited by the PsiCore: darkly-dressed people with scary-looking hoods.  Fascinatingly, neither of the two could tell whether the PsiCore members were actually male or female.  In fact, the PsiCore look quite &#8230;  inhuman.  They were taken to some sort of temple where they met the PsiCore leader, another average-looking PsiCore members who told the two psions to &#8220;side with them when the time comes&#8221;.  After agreeing because they didn&#8217;t see much choice (being surrounded by about 50 PsiCore  members at the time), they were escorted out of the temple and were immediately met in by other mysterious men, dressed in white, claiming to be part of a group called the &#8220;Freeminders&#8221;.  The Freeminders, like the PsiCore tempted the two champions to join their side when the time came, and also said that the PsiCore were &#8220;corrupters&#8221;.  Of course, since they were wearing white, Arjanne and Kane dismissed them as being pansies.  <del>Mind flayers</del> The PsiCore are obviously much more fun to be allies with.</p>

<p>Amber couldn&#8217;t sleep for the week.  Her sleep was being haunted with nightmares of ghosts, who kept telling her to &#8220;open the door&#8221;.  When confused little Amber asked what-the-hell-door they were talking about, the &#8220;Earthbound&#8221; ghosts simply stated &#8220;There is only one door.  Don&#8217;t you understand?&#8221;  Obviously, Amber didn&#8217;t &#8212;- at least, not for now &#8230;</p>

<p>Our favourite drunken monk, Grasshopper, decided to talk to Rifius, the little boy with the large golden belt.  Rifius ran an errand for Grasshopper and managed to get a jar of the cleaning fluid that Flug used to clean the arena; unfortunately, Grasshopper&#8217;s keen sense of vapours didn&#8217;t detect any minty freshness in the fluid.  Grasshopper also met another girl in Thel&#8217;s Warriors named Stiletto, who at the moment seemed to be <del>what meta-gamers call a &#8220;standard <span class="caps">NPC</span>&#8221;, but will no doubt turn out to be significant later on in the campaign</del> a nice young lass.  Grasshopper gained a fame point from saying Hi to the ladies, and also learnt that the commons hold a &#8220;Blood Bowl League&#8221; &#8212;- this week&#8217;s game was between Super Nashwan (of Xenon II fame) and Brutal Deluxe (of Speedball II fame), and it was looking like a good one.  Bets are welcome!</p>

<p>Torr met a fellow named Mountain Musso who had some kind of &#8220;angry potion&#8221;, fought him in a wrestling match for it, and promptly lost.  Stupid Torr.</p>

<p>After the one-week break taken by the heroes, they were approached by none other than Tiberius Achila.  He looked like a very streetwise old man, and claimed that Thel was a criminal, and &#8220;stolen from Nathaniel&#8221; (whatever that means).  Tiberius also warned the heroes that he&#8217;d be coming to take half of their arena winnings, and if the heroes refused, they&#8217;d be in for all sorts of trouble.</p>

<p>The leaderless heroes now needed a leader for their combat group, named &#8220;The Jackson Bitches&#8221; (with a 3-2 majority vote, thank you, drive through).  In order to determine who would be their fearless leader, they diplomatically beat each other senseless until one was left standing.  Of course, the Cleric won that fight (thanks in no small part to a small glowing celestial doggy); Amber now leads Torr, Grasshopper, Kane and Arjanne in their search for monsters to kill and stuff to take.  Each of the heroes earned 200 XP in the gladiatorial challenge.</p>

<p>At this stage, the heroes relaxed for one more day before their first fight.  In the day, they could visit the markets to buy some new equipment, or speak to Thel, Papparasmus or Flug about their investigation.  At the end of the day, the heroes could then go to the Bloodbowl match to watch lots of humies beat the living crap out of each other.  Hooray!</p>

<p>Most of the heroes decided to go to the markets, except for The Monk (XXX: is this correct?)  Grasshopper talked to Thel and told her that the cleaning fluid wasn&#8217;t minty.  Thel basically said &#8220;ahuh&#8221; in response to this.  Upon asking Thel about her father Tiberius, Thel claimed that Tiberius and her were no longer blood relatives.</p>

<p>At the Bloodbowl stadium, our heroes learnt that the Orcland Raiders won last year, and in this match, the odds were 3 to 1 for Super Nashwan vs Brutal Deluxe.  Brutal Deluxe ended up winning (XXX: is this right?); as a result, Kane lost 7gp, Arjanne lost 10gp, Amber won 12gp, Torr lost 10gp (stupid Torr), and Grasshopper lost 66.6666 silver pieces.</p>

<p>At this stage, life was suspended in the Babylon universe, and mundane daily life returned.</p>]]></content:encoded></item><item><title>Geek Code</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2003-05-06T23:05:31-07:00</dc:date><link>http://algorithm.com.au/blog/files/3f230c9e594ca409939e28fb4154e591-276.html#unique-entry-id-276</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3f230c9e594ca409939e28fb4154e591-276.html#unique-entry-id-276</guid><content:encoded><![CDATA[<pre>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/SS d?&gt;! s+: a--&gt;---@ C++(++++) UB++++ UL++++ P+++ L++++ E(-) W++(--) N o--
K w(---) O+++ M++ V PS PE(+) Y+&gt;++ PGP&gt;++ t+ 5 X+ R++(*) tv-- b+&gt;++++
DI++ D+++&gt;$ G(-) e*&gt;++++ h r++ y**&gt;+++++
------END GEEK CODE BLOCK------
</pre>



<p>If you&#8217;re not e-1337 e-nuff to know <a href="http://www.geekcode.com">what this means</a>, run it through the <a href="http://www.ebb.org/cgi-bin/ungeek.cgi?geekCode=-----BEGIN+GEEK+CODE+BLOCK-----%0D%0AVersion%3A+3.12%0D%0AGCS%2FSS+d%3F%3E%21+s%2B%3A+a--%3E---%40+C%2B%2B%28%2B%2B%2B%2B%29+UB%2B%2B%2B%2B+UL%2B%2B%2B%2B+P%2B%2B%2B+L%2B%2B%2B%2B+E%28-%29+W%2B%2B%28--%29+N+o--%0D%0AK+w%28---%29+O%2B%2B%2B+M%2B%2B+V+PS+PE%28%2B%29+Y%2B%3E%2B%2B+PGP%3E%2B%2B+t%2B+5+X%2B+R%2B%2B%28%2A%29+tv--+b%2B%3E%2B%2B%2B%2B%0D%0ADI%2B%2B+D%2B%2B%2B%3E%24+G%28-%29+e%2A%3E%2B%2B%2B%2B+h+r%2B%2B+y%2A%2A%3E%2B%2B%2B%2B%2B%0D%0A------END+GEEK+CODE+BLOCK------">Geek Code Decoder</a> by Bradley Kuhn.  Enjoy!</p>]]></content:encoded></item><item><title>Look out mutants&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2003-05-19T10:24:05-07:00</dc:date><link>http://algorithm.com.au/blog/files/101c408245cc7d85527eb6e5e2a5e32c-277.html#unique-entry-id-277</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/101c408245cc7d85527eb6e5e2a5e32c-277.html#unique-entry-id-277</guid><content:encoded><![CDATA[<table><tr><td><img src="http://images.quizilla.com/T/tedelton/1039941706_uresxavier.jpg" border="0" alt="professor x" /><br /></td>
<td><p>You are Professor X!</p><p>You are a very effective teacher, and you are very<br />committed to those who learn from you.  You put your all into everything you do, to some extent because you fear failure more than anything else.  You are always seeking self-improvement, even in areas where there is nothing you can do to improve.</p>
<p><a href="http://quizilla.com/users/tedelton/quizzes/Which%20X-Men%20character%20are%20you%20most%20like%3F/"> <font size="-1">Which X-Men character are you most like?</font></a><BR> <font size="-3">brought to you by <a href="http://quizilla.com">Quizilla</a></font></p></td></tr></table>]]></content:encoded></item><item><title>Moch&#x26;Lambda;: A Haskell to Objective-C Binding</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2003-06-13T12:19:59-07:00</dc:date><link>http://algorithm.com.au/blog/files/5561629ca897d2e4e2c5aeb510d9c618-278.html#unique-entry-id-278</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5561629ca897d2e4e2c5aeb510d9c618-278.html#unique-entry-id-278</guid><content:encoded><![CDATA[<p>Moch&#923; is a Haskell to Objective-C language binding for Mac OS X.  Using Mocha, Haskell code can send messages to Objective-C objects, and Objective-C class declarations can be written in Haskell.  Haskell <span class="caps">API </span>definitions are provided for the entire Mac OS X Cocoa framework, and automated interface generation can be performed for any user-supplied frameworks.</p>

<p><em>Update</em>: Mocha has been officially discontinued&#8212;but never fear, Wolfgang Thaller and I have been working on <a href="http://hoc.sourceforge.net/"><span class="caps">HOC</span></a>, which fulfils much of the same goals that Mocha strived for, and furthermore, it&#8217;s actually released and working! See the <a href="http://www.mail-archive.com/haskell@haskell.org/msg14846.html"><span class="caps">HOC </span>release announcement</a> for more details.</p>]]></content:encoded></item><item><title>Emacs for Mac OS X</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2003-06-13T19:49:52-07:00</dc:date><link>http://algorithm.com.au/blog/files/54a269e385916faedf9560b7fd97a50c-279.html#unique-entry-id-279</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/54a269e385916faedf9560b7fd97a50c-279.html#unique-entry-id-279</guid><content:encoded><![CDATA[<h2>Emacsen</h2>

<p>There are a few &#8216;native&#8217; versions of Emacs for Mac OS X: by &#8216;native&#8217;, I mean they have an Aqua interface, and don&#8217;t require an <span class="caps">X11 </span>server.  Here are the full names of the ones that I know of, so you know what to google for if you&#8217;re ever that interested :).</p>


<ul>
<li><a href="http://emacs-on-aqua.sourceforge.net/">Emacs on Aqua</a>.  Works with Panther, but seems quite unstable.</li>
<li><a href="http://www.porkrind.org/emacs/">Carbon Emacs</a>.  Sources and binaries are available on that page, although I don&#8217;t know if the binaries available there work with Panther.  However, recent binaries (built from the <span class="caps">CVS </span>repository) which do work with Panther can also be obtained from <a href="http://mindlube.com/products/emacs/">Mindlube&#8217;s Emacs page</a>.  This is the Emacs version I currently use with Panther.</li>
<li><a href="http://www.cs.man.ac.uk/~franconi/mac-emacs/">Enhanced Carbon Emacs</a>.  Same as the above, but has a couple more packages, in particular ones which support LaTeX/AucTeX/etc.  Binaries only, and the author has now updated Enhanced Carbon Emacs to work with Panther.  Recommended.</li>
<li><a href="http://members.shaw.ca/akochoi-emacs/">Emacs 21 for Mac OS X</a> &#8212; Source only.  Ovidiu Predescu has put together a <a href="http://www.webweavertech.com/ovidiu/emacs.html">binary package</a> of it.  Ovidiu&#8217;s page also has some nice key bindings you can add to your <code>~/.emacs</code> file to get <em>Cmd-X/C/V</em>, <em>Cmd-S</em>, <em>Cmd-L</em> etc. working, if you&#8217;re a veteran classic MacOS user.</li>
<li><a href="http://homepage.mac.com/pjarvis/xemacs.html">XEmacs 19.14 for Macintosh</a> (and also XEmacs 21.5.9 for Macintosh, which is considered alpha right now).  I haven&#8217;t tested to see whether this works with Panther.</li>
</ul>



<p>I&#8217;m fairly sure that all of them are based on <span class="caps">GNU</span> Emacs (except the XEmacs port, obviously).</p>

<p>The version I used in Jaguar is Enhanced Carbon Emacs: it&#8217;s been very stable and comes with lots of useful packages.  Mind you, I haven&#8217;t used it that much&#8212;I use vim for most of my Unix editing&#8212;but Emacs works when I need it.  Now Enhanced Carbon Emacs is available for Panther, but I haven&#8217;t tried it yet since I don&#8217;t use Emacs too often.</p>

<p>When you install any of those Emacs packages, it&#8217;ll stick an Emacs application in the <code>/Applications</code> directory like any other Mac app.  If you&#8217;re using it from the terminal a lot, here&#8217;s a shell script I wrote which will open the <span class="caps">GUI </span>version of Emacs (and leave the console window &#8220;frozen&#8221; while the <span class="caps">GUI </span>is running, just like a normal <span class="caps">X11 </span>app):</p>



<pre>
#!/bin/sh

if [ -x '/Applications/Emacs.app/Contents/MacOS/Emacs' ]; then
  exec /Applications/Emacs.app/Contents/MacOS/Emacs &quot;$@&quot;
else
  exec /usr/bin/emacs &quot;$@&quot;
fi
</pre>



<h2>Emacs in text fields?</h2>

<p>If you haven&#8217;t found out by accident yet, you can actually press C-a and C-e inside a text field in Cocoa application to go to the beginning and end of the line.  It turns out that key bindings for Cocoa applications are completely customisable, which is just <em>way</em> cool.  The default key bindings are in a property list file at <code>/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict</code>, and you can override those key bindings with a file in <code>~/Library/KeyBindings/DefaultKeyBinding.dict</code>.  You&#8217;ll never look at the humble TextEdit application in the same way again.</p>

<p>If you&#8217;re an Emacs guy, I highly recommend getting <a href="http://www.lorax.com/FreeStuff/TextExtras.html">TextExtras</a> , which allows you to do things like pipe the contents of the text field through filters (run your word processing document through <code>sed -e s/foo/bar/</code>, sweet), and also adds the can&#8217;t-live-without <a href="http://www.cs.ucsb.edu/facilities/software/emacs-info/viper/Abbreviation_Facilities.shtml">dynamic abbreviation</a> and abbreviations features.</p>

<p>See <a href="http://gnufoo.org/macosx/macosx.html">gnufoo&#8217;s Mac OS X page</a> for a slightly more in-depth look at how to bind keys to Emacs commands.  After that,  you can grab <a href="/files/mac_os_x/DefaultKeyBinding.dict">my DefaultKeyBinding.dict</a> file, which has things like <code>M-/</code> bound to dynamic abbreviation already.</p>]]></content:encoded></item><item><title>Playing iTunes&#x27;s M4A files in XMMS on Debian GNU/Linux</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2003-08-05T20:08:48-07:00</dc:date><link>http://algorithm.com.au/blog/files/c08636ea142f6d56faa61e4416bea0de-280.html#unique-entry-id-280</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c08636ea142f6d56faa61e4416bea0de-280.html#unique-entry-id-280</guid><content:encoded><![CDATA[<p>This took way too much futzing around to get working (or perhaps I&#8217;m just too used to Mac OS X now), so here&#8217;s a no-frills guide to get it working:</p>


<ul>
<li>Add the lines<br />
<code>deb http://marillat.free.fr/ unstable main</code><br />
and<br />
<code>deb http://pessoal.onda.com.br/rjamorim/debian/ ./</code><br />
to your <code>/etc/apt/sources.list</code> file.</li>
<li><code>apt-get update; apt-get install libfaad2-dev</code></li>
<li><code>apt-get -t unstable install libstdc++5</code></li>
<li>If you&#8217;re on x86, download the <a href="/files/hacking/xmms-mp4plugin_0.2-1.andrep_i386.deb">i386 .deb</a> of my patched version of Frederic Fondriest&#8217;s xmms-mp4plugin <span class="caps">XMMS </span>input plugin.</li>
<li>If you&#8217;re exotic enough to not have an x86, download the <a href="/files/hacking/xmms-mp4plugin-0.2-andrep.tar.bz2">debian source</a>, and run<br />
<code>fakeroot debian/rules binary</code><br />
to build the .deb for you.  You need the <em>g++-3.3</em> and <em>automake1.7</em> packages installed to compile this thing.</li>
<li>Execute <code>sudo dpkg -i xmms-mp4plugin_0.2-1.andrep_*.deb</code> to install the package.</li>
<li>Run <span class="caps">XMMS </span>and enjoy.</li>
</ul>



<p>Useful links:</p>


<ul>
<li><a href="http://rarewares.hydrogenaudio.org/debian.html">http://rarewares.hydrogenaudio.org/debian.html</a>: RareWares Debian repository for faad2, faac, aac/mp4, lame, lame-ha, lamip, cue2toc, shntool</li>
<li><a href="http://rarewares.hydrogenaudio.org/debian.html">http://www.xmms.org/comments.php?show=P211</a>: Original sources for Frederic Fondriest&#8217;s <span class="caps">MP4 XMMS </span>input plugin</li>
</ul>



<p>(Random keywords to be more search-engine friendly: Debian, Linux, <span class="caps">XMMS, </span>iTunes, <span class="caps">MPEG</span>-4, <span class="caps">MP4, AAC, M4A.</span>)</p>]]></content:encoded></item><item><title>ABC CMWeb Installation Overview</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Publications</category><dc:date>2003-11-13T20:07:42-08:00</dc:date><link>http://algorithm.com.au/blog/files/807f9bc02cde152960b0461036c9cae1-281.html#unique-entry-id-281</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/807f9bc02cde152960b0461036c9cae1-281.html#unique-entry-id-281</guid><content:encoded><![CDATA[<p>S. Pfeiffer, C. Parker, A. Pang, &#8220;ABC <span class="caps">CMW</span>eb Installation Overview&#8221;, Technical Report, <span class="caps">CSIRO</span> Mathematical and Information Sciences No. 03/177, September 2003.</p>]]></content:encoded></item><item><title>Porting UNIX Programs to Mac OS X</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-01-16T16:53:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/d7aee06bfc94fd19172062b51abe760c-282.html#unique-entry-id-282</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d7aee06bfc94fd19172062b51abe760c-282.html#unique-entry-id-282</guid><content:encoded><![CDATA[<p>This is a short list of problems that I frequently encountered when porting applications to Mac OS X.  As any veteran Linux hacker will predict, most of them involve libtool :-)</p>

<p>libtool problems</p>


<ul>
<li>Can&#8217;t dlopen/dlsym a file properly?  Make sure that you have <code>-module</code> parameter in the plugin&#8217;s <code>plugin_LDFLAGS</code> entry in its <code>Makefile.am</code>.</li>
<li>libtool doesn&#8217;t write the proper information to its <code>.la</code> files if you compile a library as <code>--enable-static --disable-shared</code>.  You&#8217;ll have to edit the .la file and change the <code>library_names</code> parameter there to be <code>libname.a</code>.</li>
</ul>



<p>C++ problems</p>


<ul>
<li>g++&#8217;s support for templates is pretty good now, but if you&#8217;re having problems, have a look at <span class="caps">GCC&#8217;</span>s <a href="http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/gcc/Template-Instantiation.html#Template%20Instantiation">documentation on templates</a>.  In particular, note the <code>-frepo</code> flag: using that solved a few template problems for me.</li>
</ul>]]></content:encoded></item><item><title>Amusement on #haskell</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2004-02-25T20:27:43-08:00</dc:date><link>http://algorithm.com.au/blog/files/637ab51301dead078e4bf001464e0606-283.html#unique-entry-id-283</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/637ab51301dead078e4bf001464e0606-283.html#unique-entry-id-283</guid><content:encoded><![CDATA[<p>14:48 &lt; Pseudonym&gt; Riastradh: With a mind like that&#8230; ever considered a career as a C++ luminary?<br />
14:48  * Riastradh throws a pointy template at Pseudonym.<br />
14:49  * Pseudonym carefully places it in a smart pointer container<br />
14:49  * SyntaxLaptop frees it<br />
14:49  * Riastradh dereferences Pseudonym.<br />
14:50 &lt; SyntaxLaptop&gt; sorry, delete<br />
14:50 &lt; Pseudonym&gt; Why do I feel like I&#8217;ve suddenly accessed some of my uninitialised memory?<br />
14:50  * Riastradh unsafePerformIOs Pseudonym.<br />
14:51 &lt; DeezNuts&gt; just trying to run the prebuilt version of ghc 5.04.3 it bitches that it can&#8217;t find &#8220;libgmp.so.3:&#8221;<br />
14:51  * Pseudonym <span class="caps">FFI</span>s Riastradh<br />
14:51 &lt; DeezNuts&gt; err thats &#8220;libgmp.so.3&#8221;<br />
14:51 &lt; Pseudonym&gt; Do you have <span class="caps">GMP </span>installed?<br />
14:51  * Riastradh <span class="caps">DEFINE</span>-FOREIGNs Pseudonym.<br />
14:52  * Pseudonym reinterpret_cast&lt;&gt;()s Riastradh<br />
14:52  * Riastradh Obj.magics Pseudonym.<br />
14:52  * Pseudonym <span class="caps">GOTO</span>s Riastradh<br />
14:52 &lt; Pseudonym&gt; Riastradh considered harmful.<br />
14:52  * Riastradh reflects Pseudonym.<br />
14:53  * Pseudonym reifies Riastradh<br />
14:53  * Riastradh shifts Pseudonym with no reset in place to delimit the shift.<br />
14:53 &lt; Pseudonym&gt; Careful with all my bits.<br />
14:53  * Riastradh converts Pseudonym to base three!<br />
14:54  * Pseudonym pushbacks Riastradh<br />
14:54 &lt; DeezNuts&gt; blah<br />
14:54 &lt; DeezNuts&gt; could u explain?<br />
14:54 &lt; Pseudonym&gt; Careful with my trits!s<br />
14:54  * Riastradh throws Pseudonym.<br />
14:54  * Pseudonym raises Riastradh<br />
14:54  * Riastradh signals Pseudonym.<br />
14:54 &lt; DeezNuts&gt; fine! linux-ppc won&#8217;t be getting a build<br />
14:55  * Pseudonym kills Riastradh<br />
14:55 &lt; jameson&gt; This is getting just a bit surreal&#8230; at least no one has used pointer arithmetics or &#8216;memfrob()&#8217; yet&#8230;<br />
14:55 &lt; jameson&gt; DeezNuts: Well, you have to install libgmp.<br />
14:55 <del>!</del> monotonom [trebla@130.63.90.200] has quit [&#8220;Do not join the channels joined by all who join all channels you join.&#8221;]<br />
14:55 &lt; jameson&gt; It should be a dependency for the ghc package.<br />
14:55 &lt; Pseudonym&gt; jameson: How dare you suggest such a thing.<br />
14:55  * Riastradh throws himself and unsafely kills Pseudonym&#8217;s thread.<br />
14:55 &lt; Pseudonym&gt; memfrob() is banned by the Geneva Convention<br />
14:56  * Pseudonym cancels Riastradh&#8217;s thread and reaps his zombie children<br />
14:56  * Riastradh throws across a process boundary and terminates Pseudonym&#8217;s process with a <span class="caps">SIGSEGV.</span><br />
14:56  * jameson makes sure that his lambda lifter and <span class="caps">CPS </span>converter are fully charged, just in case<br />
14:57  * Pseudonym marshals Riastradh down a pipe and maps him to anonymous memory<br />
14:57  * Riastradh incrementally lambda-lifts jameson before he gets to put his inferiour lambda-lifter into action.<br />
14:57  * Riastradh comes out the other end of the pipe in yet another process and <span class="caps">ANF</span>-transforms Pseudonym.<br />
14:57 &lt; jameson&gt; Keep playing guys, but keep in mind: No side effects on my memory!<br />
14:57  * Pseudonym unsafeCasts jameson<br />
14:58  * Riastradh throws into the kernel and twiddles jameson&#8217;s memory carefully.<br />
14:58  * Pseudonym transfers Riastradh&#8217;s control over a superblock boundary<br />
14:58  * Riastradh traps Pseudonym into one process, having full access to the kernel, and patches the scheduler so it doesn&#8217;t transfer control to that process ever.<br />
14:59 &lt; Etaoin&gt; pwned<br />
14:59  * Riastradh jumps down into the firmware, off into a firewire cable, emerges from a nearby hard drive, and unplugs the firewire cable, causing a kernel panic.<br />
14:59 &lt; Riastradh&gt; <span class="caps">HAH</span>!<br />
14:59  * Pseudonym loads a modular scheduler from flash and disables all interrupt threads<br />
15:00 &lt; Pseudonym&gt; You forgot I was running Solaris, didn&#8217;t you?<br />
15:00  * Riastradh picks up a sledgehammer and blowtorch and turns the computer upon which Pseudonym is barely staying alive into a pile of beaten slag.<br />
15:01  * Pseudonym transfers himself to a different <span class="caps">NUMA </span>node to recover before disabling Riastradh&#8217;s processor set<br />
15:01  * Pseudonym severs the backplane connection just in case<br />
15:01  * Riastradh was reified, so he is no longer constrained to the internals of a computer.<br />
15:02  * Pseudonym insert a nonassociative morphism into Riastradh&#8217;s category<br />
15:02 &lt; Riastradh&gt; <span class="caps">AAAAAGH</span>!<br />
15:02 &lt; Riastradh&gt; <span class="caps">NOT THE NONASSOCIATIVE MORPHISM</span>!<br />
15:02 &lt; Pseudonym&gt; Now you&#8217;re inconsistent!<br />
15:02  * Riastradh helplessly slumps to the floor&#8230;<br />
15:02 &lt; Pseudonym&gt; Haha!<br />
15:02  * Riastradh paws about for any weapon with which to retaliate&#8230;<br />
15:02 &lt; Pseudonym&gt; You thought being abstract would save you.<br />
15:02  * Riastradh picks up a monad and a comonad&#8230;hmmm&#8230;I wonder what happens when I cross the, er, duals.<br />
15:03 &lt; Pseudonym&gt; No!  <span class="caps">DON&#8217;T CROSS THE DUALS</span>!<br />
15:03  * SyntaxLaptop tosses Riastradh an arrow<br />
15:03 &lt; Pseudonym&gt; That comonad is unsafe!<br />
15:03 &lt; SyntaxLaptop&gt; s/tosses/throws<br />
15:04  * Riastradh straps the comonad onto one side of the arrow and the monad onto the other, and throws it at Pseudonym.<br />
15:04  * Riastradh homomorphisizes Pseudonym!<br />
15:04  * Riastradh uhohs as he realizes that that attack wasn&#8217;t sufficient.<br />
15:04  * Pseudonym left-cancels the arrow<br />
15:05  * Riastradh hides under a catamorphic syntamorphism.<br />
15:05  * Pseudonym retracts the monad, but realises too late that it&#8217;s idempotent<br />
15:05  * Riastradh plots coalgebraically while Pseudonym cannot find him.<br />
15:06  * Pseudonym searches for Riastradh on an endomap<br />
15:07  * Pseudonym flips off the safety on a terminal object<br />
15:07  * Riastradh whets an eslupherum as he monofunctorializes his handy exomorph.<br />
15:08  * SyntaxLaptop eats some syntactic sugar<br />
15:08  * Riastradh watches with revulsion as SyntaxLaptop gets semicolon cancer.<br />
15:11  * Riastradh qopas Pseudonym and stuffs him into a monadic canister, sealed tightly with a polyfunctorialism disguised as a monofunctorialized exomorph!<br />
15:11  * Pseudonym claims this channel in the name of Free Constructions<br />
15:12  * Riastradh forces coalgebra upon Pseudonym so that his constructor fails.<br />
15:12  * Pseudonym gets out through a safe destructor<br />
15:12  * Riastradh duals Pseudonym so <em>both</em> his constructor and destructor fail.<br />
15:13  * Pseudonym hops on a natural transformation into a free functor<br />
15:14  * Riastradh impales that free functor with an extrintolphoric arrow.<br />
15:15  * Pseudonym stops the arrow with a terminal object<br />
15:15  * Riastradh terminates Pseudonym&#8217;s terminal object and lets the arrow continue.<br />
15:16  * Pseudonym turns it around with a contravariant functor<br />
15:16  * Riastradh cocontravaries Pseudonym&#8217;s functor, negating the effect completely.<br />
15:16 &lt; sam-&gt; oh god make it stop<br />
15:16  * Pseudonym adjuncts it into the Herbrand universe<br />
15:17  * Riastradh discojuncts Pseudonym hyperbolically.<br />
15:17 &lt; Pseudonym&gt; Ooh, kinky.<br />
15:18 &lt; Riastradh&gt; An irrelevant statement!  I win!<br />
15:18  * Pseudonym traps Riastradh under a cocone<br />
15:18  * Riastradh treaps Pseudonym in a cacao bean.<br />
15:18 &lt; Pseudonym&gt; Never!  Irrelevancy is always part of the game.<br />
15:19  * Riastradh catamorphs Pseudonym into a simple seed!<br />
15:21  * Pseudonym notes the seed is isomorphic to a human, so what&#8217;s the big deal?<br />
15:21  * Riastradh squishes it and ends the big deal, having triumphed.<br />
15:22  * Pseudonym notes the gooey mess is isomorphic to a large cauldron of boiling oil<br />
15:23  * Riastradh takes it off of the burner and then dips chips in it to enhance their flavour.</p>]]></content:encoded></item><item><title>Auto-Save Every 5 Minutes&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-04T13:13:12-08:00</dc:date><link>http://algorithm.com.au/blog/files/607046bbf7486e096f0aea0ffb932e46-284.html#unique-entry-id-284</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/607046bbf7486e096f0aea0ffb932e46-284.html#unique-entry-id-284</guid><content:encoded><![CDATA[<p>Play in multiplayer all the time, even if you&#8217;re just playing single-player mode&#8212;and turn on the auto-save option and set it to save every 5 minutes or so.  That&#8217;s saved my arse a few times now!</p>]]></content:encoded></item><item><title>NWScript Dissassembly</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-04T13:28:05-08:00</dc:date><link>http://algorithm.com.au/blog/files/3a891b6b12bcd6b8a3f9afb77ac4ee36-285.html#unique-entry-id-285</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3a891b6b12bcd6b8a3f9afb77ac4ee36-285.html#unique-entry-id-285</guid><content:encoded><![CDATA[<p>After Neverwinter Nights just came out, I started dissembling the <span class="caps">NWS</span>cript bytecode that it uses internally for its game engine, with the intention of writing a command-line script compiler some day.  I since stopped work on it since I had a few other things to do.  It seems that the great Torlack (who now works at BioWare) <a href="http://www.torlack.com/index.html?topics=nwnnsscomp_readme">beat me to it</a>, but I thought I&#8217;d put up my results for download anyway.  For budding dissasemblers (like myself :-), I&#8217;ve also put up all the scripts I used to try to figure out the bytecode, which may be more important than the bytecode itself for some people.</p>

<p>Note that BioWare provides their own command-line compiler now anyway, if you have a version more recent than 1.40 or something like that&#8212;see <code>utils\clcompile.exe</code>.</p>

<p>I find it interesting that BioWare chose their own scripting format for <span class="caps">NWN </span>considering that they used the very flexible and extensible <a href="http://www.lua.org/">Lua</a> for Baldur&#8217;s Gate I/II (which is also used in a number of other games; in fact, one of the Monkey Island games had a bar named Lua as a dedication to the Lua community for their great efforts).  While <span class="caps">NWS</span>cript is OK as a language, I certainly wonder why they didn&#8217;t stick with Lua &#8230;</p>

<p>Anyhoo, feel free to <a href="/files/nwn/nwscript_disassembly.zip">download the results of my peeking and poking</a>.</p>]]></content:encoded></item><item><title>Use HakPaks in the Standard Campaigns</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-04T13:44:41-08:00</dc:date><link>http://algorithm.com.au/blog/files/c717886bb6decaa3d0ebb330e03c0b85-286.html#unique-entry-id-286</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c717886bb6decaa3d0ebb330e03c0b85-286.html#unique-entry-id-286</guid><content:encoded><![CDATA[<p>If you extract the files from a <code>.hak</code> pack and place those extracted files in Neverwinter Night&#8217;s <code>override</code> directory, you can use that hakpack in any of the standard BioWare campaigns (with the usual disclaimer that hakpacks may break stuff, you will actually need to put in new merchants to use any of the new items, etc.)  This is very useful for non-intrusive hak-pack changes, like the <del>jiggly</del> <a href="http://nwvault.ign.com/Files/hakpacks/data/1077549067000.shtml">hi-poly human torsos</a> models.</p>

<p>You can use tools like <a href="http://nwvault.ign.com/Files/other/data/1055545441750.shtml"><span class="caps">NWN</span> Explorer</a> or <a href="http://nwvault.ign.com/Files/other/data/1026158289673.shtml"><span class="caps">NWN</span> Viewer</a> to extract the files from a <code>.hak</code> pack.</p>]]></content:encoded></item><item><title>Interfacing Haskell to Object-Oriented Languages</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Publications</category><dc:date>2004-03-04T14:28:16-08:00</dc:date><link>http://algorithm.com.au/blog/files/5386b4a2303802986635370871fa0376-287.html#unique-entry-id-287</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5386b4a2303802986635370871fa0376-287.html#unique-entry-id-287</guid><content:encoded><![CDATA[<p><em>Andr&Egrave; T. H. Pang</em> and <a href="http://www.cse.unsw.edu.au/~chak/"><em>Manuel M. T. Chakravarty</em></a></p>

<p>In Greg Michaelson and Phil Trinder, editors, <a href="http://www.macs.hw.ac.uk/~ifl03/"><span class="caps">IFL</span> 2003 - 15th International Workshop on the Implementation of Functional Languages</a>, <a href="http://www.springerlink.com/index/8MLVKRCDD1EVPULR"><span class="caps">LNCS,</span> Springer-Verlag</a>, 2004.</p>

<h2>Abstract</h2>

<p>The interfacing of object-oriented languages with functional languages, in general, and with Haskell, in particular, has received a considerable amount of attention. Previous work, including Lambada, a Haskell to Java bridge, showed how an object-oriented class hierarchy can be modeled using Haskell type classes, such that Java libraries can be used conveniently from Haskell.</p>

<p>The present paper extends this previous work in two major directions. Firstly, we describe a new implementation of object-oriented style method calls and overloading in Haskell, using multi-parameter type classes and functional dependencies. This enables calling of a foreign object&#8217;s methods in a syntactically convenient, type-safe manner. Secondly, we sketch an approach to automating the generation of library bindings using compile-time meta-programming for object-oriented frameworks featuring reflection. We have evaluated the practicality of our approach by implementing a Haskell binding to the Objective-C language on the Mac OS X platform.</p>

<h2>Download</h2>

<p><em>16 pages</em>: <a href="/files/publications/Interfacing_Haskell_with_OO.ps">Postscript</a> (<a href="/files/publications/Interfacing_Haskell_with_OO.ps.gz">.ps.gz</a>), <a href="/files/publications/Interfacing_Haskell_with_OO.pdf">Adobe Acrobat <span class="caps">PDF</span></a>.  The copyright for the papers is held by the authors or by the publisher. The papers are provided for personal use only; other use requires the explicit permission of the copyright holder.</p>

<h2>Related Webpages</h2>


<ul>
<li><a href="http://citeseer.ist.psu.edu/683568.html">Citeseer Page</a></li>
</ul>]]></content:encoded></item><item><title>Suggested Neverwinter Nights Additions</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-06T05:44:53-08:00</dc:date><link>http://algorithm.com.au/blog/files/e339775e7e88798eb9e2c55a8d379edd-288.html#unique-entry-id-288</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e339775e7e88798eb9e2c55a8d379edd-288.html#unique-entry-id-288</guid><content:encoded><![CDATA[<h3>Hakpacks</h3>

<p>Note that all hakpacks can be used in any modules&#8212;including the standard BioWare campaigns&#8212;by extracting the data in them and <a href="http://www.algorithm.com.au/mt/archives/neverwinter_nights/use_hakpaks_in_the_standard_campaigns.html">putting their data files into <span class="caps">NWN&#8217;</span>s <code>override\</code> directory</a>.  In fact, that&#8217;s what I do with all the hakpacks listed below.</p>


<ul>
<li><a href="http://nwvault.ign.com/Files/models/data/1071468025277.shtml">Alternate Combat Animations</a></li>
<li><a href="http://nwvault.ign.com/Files/hakpacks/data/1077549067000.shtml">Hi-Poly Human Torsos</a></li>
</ul>]]></content:encoded></item><item><title>Disable the Splash Screens (Introduction Movies)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-06T06:08:27-08:00</dc:date><link>http://algorithm.com.au/blog/files/088e7f0e2e2ee4098e6dfef4493f9196-289.html#unique-entry-id-289</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/088e7f0e2e2ee4098e6dfef4493f9196-289.html#unique-entry-id-289</guid><content:encoded><![CDATA[<p>Add the line:</p>

<p><code>Disable Intro Movie=1</code></p>

<p>to the <code>[Display Options]</code> section of the <code>nwn.ini</code> file in your Neverwinter Nights directory.  (This tip&#8217;s fairly widely known: it&#8217;s described in the <a href="http://nwvault.ign.com/kb/data/TipsandHints/TipsandHints.shtml#Maximus@Vaultnetwork.comV57HMzSvqA"><span class="caps">NWV</span>ault <span class="caps">FAQ</span></a>, and it&#8217;s also a <a href="http://nwn.bioware.com/forums/viewtopic.html?topic=233482&amp;forum=65">topic in the BioWare <span class="caps">NWN </span>forums</a>.  I mostly have it here for my own reference.)</p>]]></content:encoded></item><item><title>VideoLAN Annodex patches</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-03-08T16:01:59-08:00</dc:date><link>http://algorithm.com.au/blog/files/2d9912c8d6ccd39456caeca7e880f14e-290.html#unique-entry-id-290</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2d9912c8d6ccd39456caeca7e880f14e-290.html#unique-entry-id-290</guid><content:encoded><![CDATA[<p>Here are some patches for the <a href="http://www.videolan.org/">VideoLAN</a> cross-platform multimedia player, to enable support for <a href="http://www.annodex.net/">Annodex</a> bitstreams.</p>


<ul>
<li>Annodex support for the Ogg demuxer (<code>modules/demux/ogg.c</code>): <a href="/files/hacking/vlc/vlc_modules_demux_ogg.c.diff">vlc_modules_demux_ogg.c.diff</a> <strong>(MERGED)</strong></li>
<li>A modification to the <code>vout_ShowTextAbsolute</code> function in <code>src/video_output/video_text.c</code>, so that it returns the <code>subpicture_t</code> created.  This is required for the upcoming <span class="caps">CMML </span>support: <a href="/files/hacking/vlc/vout_STA_returns_subpicture_t.diff">vout_STA_returns_subpicture_t.diff</a> <strong>(MERGED)</strong></li>
</ul>



<p><span class="caps">VLC </span>now supports playback of <a href="http://www.annodex.net/">Annodex</a> files and <a href="http://www.ietf.org/internet-drafts/draft-pfeiffer-cmml-01.txt"><span class="caps">CMML</span></a> tracks as of version 0.7.2.  Woo!</p>]]></content:encoded></item><item><title>USB Numeric Keypad</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Games</category><dc:date>2004-03-08T16:18:28-08:00</dc:date><link>http://algorithm.com.au/blog/files/cc0de6536ada61b5dd353a3f1adf101d-291.html#unique-entry-id-291</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/cc0de6536ada61b5dd353a3f1adf101d-291.html#unique-entry-id-291</guid><content:encoded><![CDATA[<p>If you didn&#8217;t know, you can use the numeric keypad to select options that appear on the radial menu (that appears when you, for example, right-click on your character).  Of course, the numeric keypad is in an inconvenient spot: most gamers have their left hand resting on the left-hand side of the keyboard on the Quake-inspired <code>W/A/S/D</code> keys, not on the right-hand side where the numeric keypad is.  On laptops, it&#8217;s in an even more inconvenient spot&#8212;like, it doesn&#8217;t exist and stuff.  D&#8217;oh.</p>

<p>If you&#8217;re willing to fork out a bit of dough for a game, drop $50 on a <span class="caps">USB </span>numeric keypad, and put that to the left of your keyboard.  Your enjoyment of Neverwinter will go up dramatically.  It&#8217;s also useful for Alpha Centauri if you&#8217;re a laptop person :-).</p>]]></content:encoded></item><item><title>Mail.app Pictures</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-03-11T08:17:10-08:00</dc:date><link>http://algorithm.com.au/blog/files/b6fc31f0fc220527e32e9cd8be5c79aa-292.html#unique-entry-id-292</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b6fc31f0fc220527e32e9cd8be5c79aa-292.html#unique-entry-id-292</guid><content:encoded><![CDATA[<p>You know those <a href="http://www.algorithm.com.au/gallery/screenshots/MailScreenSnapz002?full=1">cute little pictures</a> which pop up if you receive an email from somebody with a Mac.com account?  It turns out that you can set that picture with an email header: no Mac.com account needed.</p>

<p>Simply add a <code>X-Image-Url</code> header to your email, with the contents being a <span class="caps">URL </span>that contains the picture, e.g. <code>X-Image-Url: http://www.algorithm.com.au/albums/ozone/Me.jpg</code>.</p>

<p>Credit where credit is due: I found out about this tip from the following two links:</p>


<ul>
<li><a href="http://www.geeklair.net/~dluke/archives/000231.html">http://www.geeklair.net/~dluke/archives/000231.html</a></li>
<li><a href="http://weblog.karelia.com/MacOSX/Putting_your_pictur.html">http://weblog.karelia.com/MacOSX/Putting_your_pictur.html</a></li>
</ul>]]></content:encoded></item><item><title>Subversion for Mac OS X</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-03-14T20:13:21-08:00</dc:date><link>http://algorithm.com.au/blog/files/6ed0b2e058fb5ff8f1aa8545f6801269-293.html#unique-entry-id-293</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6ed0b2e058fb5ff8f1aa8545f6801269-293.html#unique-entry-id-293</guid><content:encoded><![CDATA[<p><em>Note</em>: I don&#8217;t support this package anymore: Martin Ott of <a href="http://www.codingmonkeys.de/">TheCodingMonkeys</a> provides his own <a href="http://homepage.mac.com/martinott/">statically-linked Subversion binaries</a>, and <a href="http://darwinports.opendarwin.org/">Darwinports</a> also supplies their own <a href="http://darwinports.opendarwin.org/ports/?by=name&amp;substr=subversion&amp;Search=Submit">subversion package</a>.  The main reason I made this package was because I wanted an easy way to install Subversion without going through Fink, which wants to install Apache 2 at the same time.  Both the above two places enable you to do that.  I&#8217;m only keeping this around for posterity&#8217;s sake :).</p>

<h2>Subversion Package</h2>


<ul>
<li><a href="/files/mac_os_x/Subversion%20Client.pkg.zip">Subversion <code>svn</code> client 1.0.1 Mac OS X Installer Package</a></li>
</ul>



<h3>Detailed Dependency Build Information</h3>

<p>Subversion has quite a number of dependencies, which make building it not a lot of fun.  My binary distribution puts all of Subversion&#8217;s dependencies into the <code>/usr/local/libexec/subversion</code> directory, so if you have any of its required libraries installed yourself or via Fink, none of these versions will conflict.  The downside is that you use a bit more disk space, but hey, who&#8217;s complaning about a few megabytes these days?</p>

<p>The <span class="caps">APR </span>(the Apache Portable Runtime) 0.9 branch was used, checked out on 15 March 2003 3:20pm (UTC +10), with the following <code>./configure</code> line:</p>

<p><code>./configure --prefix=/usr/local/libexec/subversion/apr</code></p>

<p>apr-util <code>./configure</code> line:</p>

<p><code>./configure --prefix=/usr/local/libexec/subversion/apr-util --with-dbm=db42 --with-berkeley-db=/usr/local/libexec/subversion/berkeley-db --with-apr=/usr/local/libexec/subversion/apr</code></p>

<p>Berkeley DB 4.2.52 with the <a href="http://www.sleepycat.com/update/4.2.52/patch.4.2.52.1">4.2.52.1</a> and <a href="http://www.sleepycat.com/update/4.2.52/patch.4.2.52.2">4.2.52</a> patches applied.  The following <code>./configure</code> line was used to compile it:</p>

<p><code>../dist/configure --prefix=/usr/local/libexec/subversion/berkeley-db</code></p>

<p>The version of OpenSSL that is distributed with Mac OS X Panther 10.3.2 (0.9.7, I believe) was used.</p>

<p>Neon.  Note: <code>./autogen.sh</code> was run for Neon, so that a newer version of libtool and the auto{conf,make} utilities would be installed which understands how to build shared libraries on Mac OS X.</p>

<p><code>./configure --prefix=/usr/local/libexec/subversion/neon --with-ssl --enable-shared</code></p>

<p><span class="caps">SWIG</span>:</p>

<p><code>./configure --prefix=/usr/local/libexec/subversion/swig</code></p>

<p>Subversion itself was ./<code>configure</code>d with (note also ./autogen.sh was run):</p>

<p><code>./configure --with-ssl --with-apr=/usr/local/libexec/subversion/apr --with-apr-util=/usr/local/libexec/subversion/apr-util  --with-neon=/usr/local/libexec/subversion/neon --with-apxs=/Library/Apache2/bin/apxs --prefix=/usr/local/libexec/subversion</code></p>]]></content:encoded></item><item><title>Subversion Tips</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-04-18T06:37:16-07:00</dc:date><link>http://algorithm.com.au/blog/files/6ca54b859891d5b5717f201c0fb49c52-295.html#unique-entry-id-295</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6ca54b859891d5b5717f201c0fb49c52-295.html#unique-entry-id-295</guid><content:encoded><![CDATA[<p>Here&#8217;s a few tips that I&#8217;ve discovered to ease working with <a href="http://subversion.tigris.org">Subversion</a>.</p>

<h3>Long <span class="caps">URL</span>s</h3>

<p>Tired of those long <span class="caps">URL</span>s, like <code>svn+ssh://foo@bar.com/long/directory/hierarchy/to/svn/repo/trunk</code>?  Use a shell alias, function or shell script which simply prints the <span class="caps">URL.  </span>e.g.</p>

<pre><code>#!/bin/sh
echo &quot;svn+ssh://foo@bar.com/long/directory/hierarchy/to/svn/repo/$@&quot;</code></pre>

<p>Save the shell script as, say, <code>FooSVN</code>.  Now, instead of typing those long <span class="caps">URL</span>s on the commandline, you can just write <code>svn co `FooSVN trunk`</code> instead.</p>]]></content:encoded></item><item><title>Embedding Frameworks in Applications</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-05-27T22:46:39-07:00</dc:date><link>http://algorithm.com.au/blog/files/ee3fe0086cc8fb11f384123e51e8e924-298.html#unique-entry-id-298</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ee3fe0086cc8fb11f384123e51e8e924-298.html#unique-entry-id-298</guid><content:encoded><![CDATA[<p>If your Mac OS X application uses a framework, you can embed it in your application even after you&#8217;ve built and linked the application against a framework which you&#8217;ve installed privately to <code>/Library/Frameworks</code>.</p>

<p>The secret is to use the obscure <code>install_name_tool</code> command.  You&#8217;ll need to do two things:</p>


<ol>
<li>Change the <em>identification name</em> of the framework itself from <code>Foo.framework/...</code> to <code>@executable_path/../Frameworks/Foo.framework/...</code></li>
<li>Change the application&#8217;s main executable dependent shared library list, from  <code>Foo.framework/...</code> to <code>@executable_path/../Frameworks/Foo.framework/...</code></li>
</ol>



<p>Here&#8217;s how to do it:</p>


<ol>
<li><em>Copy</em> your existing framework first and work on that: the <code>install_name_tool</code> command directly modifies the framework, so you&#8217;ll probably want be operating on a copy of it.</li>
<li>Run <code>install_name_tool -id '@executable_path/../Frameworks/Foo.framework/...' Foo.framework/Foo</code></li>
<li>Run <code>install_name_tool -change 'Foo.framework/...' '@executable_path/../Frameworks/Foo.framework/...' MyApplication.app/Contents/MacOS/MyApplication</code></li>
</ol>



<p>To find out what to put in the <code>...</code> bit of the commands above, run the <code>otool -L</code> command on the executable or shared library to see the full pathname.  It should look something like <code>Versions/A/Foo</code>.</p>

<p>It&#8217;s a bit of a pain in the arse, but at least it works.  Until I figured this out, it was really a bit of a pain to embed frameworks into applications properly!</p>]]></content:encoded></item><item><title>Plugging Haskell In</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Publications</category><dc:date>2004-06-11T09:36:49-07:00</dc:date><link>http://algorithm.com.au/blog/files/db9bfa35c56446f502e1b79c4696ae8e-299.html#unique-entry-id-299</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/db9bfa35c56446f502e1b79c4696ae8e-299.html#unique-entry-id-299</guid><content:encoded><![CDATA[<p><em>Andr&Egrave; Pang</em>, <a href="http://www.cse.unsw.edu.au/~dons/"><em>Don Stewart</em></a>, <a href="http://www.cse.unsw.edu.au/~sseefried/"><em>Sean Seefried</em></a>, and <a href="http://www.cse.unsw.edu.au/~chak/"><em>Manuel M. T. Chakravarty</em></a>. </p>

<p>Submitted to the <a href="http://www.cs.nott.ac.uk/~nhn/HW2004/">2004 Haskell Workshop</a>.</p>

<h2>Abstract</h2>

<p>Extension languages enable users to expand the functionality of an application without touching its source code. Commonly, these languages are dynamically typed languages, such as Lisp, Python, or domain-specific  languages, which support runtime plugins via dynamic loading of components.  We show that Haskell can be comfortably used as a statically typed extension language, and that it can support type-safe dynamic loading of plugins using dynamic types. Moreover, we discuss how plugin support is especially useful to applications where Haskell is used as an embedded domain-specific language (EDSL). We explain how to realise type-safe plugins using dynamic types, runtime compilation, and dynamic linking, exploiting infrastructure provided by the Glasgow Haskell Compiler. We demonstrate the practicability of our approach with several applications  that serve as running examples.</p>

<h2>Download</h2>

<p>The paper&#8217;s official website, where you can download the <em>hs-plugins</em> library and example programs, is at <a href="http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/">http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/</a>.</p>

<p><em>12 pages</em>: <a href="/files/publications/Plugging_Haskell_In.ps">Postscript</a> (<a href="/files/publications/Plugging_Haskell_In.ps.gz">.ps.gz</a>), <a href="/files/publications/Plugging_Haskell_In.pdf">Adobe Acrobat <span class="caps">PDF</span></a>.  The copyright for the papers is held by the authors or by the publisher. The papers are provided for personal use only; other use requires the explicit permission of the copyright holder.</p>

<h2>BibTeX Entry</h2>

<pre><code>@inproceedings{PSSC04,
 author = {Andr{\'e} Pang and Don Stewart and Sean Seefried and Manuel M. T. Chakravarty},
 title = {Plugging Haskell in},
 booktitle = {Proceedings of the ACM SIGPLAN workshop on Haskell},
 year = {2004},
 isbn = {1-58113-850-4},
 pages = {10--21},
 location = {Snowbird, Utah, USA},
 doi = {http://doi.acm.org/10.1145/1017472.1017478},
 publisher = {ACM Press},
}</code></pre>

<h2>Related Webpages</h2>


<ul>
<li><a href="http://citeseer.ist.psu.edu/634246.html">Citeseer Page</a></li>
</ul>]]></content:encoded></item><item><title>WWDC 2004 Cuteness</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2004-06-29T07:55:04-07:00</dc:date><link>http://algorithm.com.au/blog/files/7d0beea7050a8d1f4ec6dea5e7036966-300.html#unique-entry-id-300</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7d0beea7050a8d1f4ec6dea5e7036966-300.html#unique-entry-id-300</guid><content:encoded><![CDATA[<p>I like Apple&#8217;s sense of humour :)</p>


<ul>
<li>In one screenshot of the Stock Ticker dashboard app, Microsoft (MSFT) was the only company in the shot which had their <a href="http://images.apple.com/macosx/tiger/images/dashboardstock_20040628.jpg">stock price going down</a>.</li>
</ul>




<ul>
<li>The calculator app in this <a href="http://www.apple.com/macosx/tiger/theater/dashboard.html">Dashboard demonstration</a> shows the number 1.337.</li>
</ul>




<ul>
<li>And, of course, the most excellent <a href="http://www.gizmodo.com/archives/wwdc-apple-takes-potshots-at-microsoft-016871.php">Introducing Longhorn</a> poster!</li>
</ul>]]></content:encoded></item><item><title>Beyond C&#x2c; C++&#x2c; Perl and Python</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2004-07-02T11:40:42-07:00</dc:date><link>http://algorithm.com.au/blog/files/beyond-c-cxx-perl-python.html#unique-entry-id-301</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/beyond-c-cxx-perl-python.html#unique-entry-id-301</guid><content:encoded><![CDATA[<h2>Abstract</h2>

<p>As a Linux user or developer, you probably know a few programming and scripting languages: shell scripting, Perl perhaps, Python, C or C++, and maybe Java or <span class="caps">XSLT. </span> Once you&#8217;ve learnt one systems language or one scripting language, you&#8217;ve learnt them all, right?  Especially because of that &#8220;Turing-complete&#8221; thing &#8230;</p>

<p>In this talk, I&#8217;ll explore the research and developments that have happened outside of mainstream programming languages in the past decade, in languages such as Objective-C, Haskell, <span class="caps">O&#8217;C</span>aml, and Nemerle.  The scope of the talk is broad: I&#8217;ll touch on many topics, such as meta-programming, generics, type systems, and proof-carrying code, without going too in-depth into any of them.  (Believe me, you don&#8217;t want to hear me talk for seventeen hours about type systems.)  Most of the topics covered (such as meta-programming) are not language-specific, and can be directly applied to your own work, increasing your own programming expertise and repertoire of techniques.</p>

<h2>Download</h2>

<p>Slides: <a href="/downloads/talks/Beyond%20C,%20C%2B%2B,%20Perl%20and%20Python%20%28SLUG%29.pdf">Adobe Acrobat <span class="caps">PDF</span></a></p>]]></content:encoded></item><item><title>6-Star Smart Playlists in iTunes</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-07-07T05:53:29-07:00</dc:date><link>http://algorithm.com.au/blog/files/14e37b34209a5c4ff3bf5dc0744afd0f-303.html#unique-entry-id-303</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/14e37b34209a5c4ff3bf5dc0744afd0f-303.html#unique-entry-id-303</guid><content:encoded><![CDATA[<p>iTunes is nice and all, but I wish you could rank a song between 0-6 stars rather than 0-5 stars.  That way, you can classify 0-star songs as unrated, and have 5 stars leftover for your own classification, rather than 4, which may be a bit too restrictive.  Well, you can do this pretty easily for purposes of including it in a smart playlist, which is all I wanted to do.</p>

<p>How to do it?  Easy:</p>


<ul>
<li>Rate all your 6-star songs as 5-star, so they&#8217;ll be included in any matches that would normally include 5-star songs.</li>
<li>Add the text &#8220;6-star&#8221; to the comment of any of the songs you want to rate as 6-star.</li>
<li>Make a new Smart Playlist, and include the &#8220;6-star&#8221; text as part of the criteria for the playlist.</li>
</ul>



<p>That&#8217;s it.  You can obviously expand the scheme to 69 stars if you want, but 6 is enough for me.</p>]]></content:encoded></item><item><title>Me on Xoltar on Static Typing</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-10T08:17:43-07:00</dc:date><link>http://algorithm.com.au/blog/files/9969bc914a6ff9056536433886dc3907-305.html#unique-entry-id-305</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9969bc914a6ff9056536433886dc3907-305.html#unique-entry-id-305</guid><content:encoded><![CDATA[<p>Bryn Keller (a.k.a. Xoltar) <a href="http://www.xoltar.org/misc/static_typing_eckel.html">takes on Bruce Eckel&#8217;s comments</a> about Python and static typing, and does a pretty good job at poking all the holes in Eckel&#8217;s arguments while remaining objective.  Worth a read, especially if you&#8217;re wondering what all the hoopla is about Haskell and <span class="caps">O&#8217;C</span>aml&#8217;s type systems.</p>

<h2>My Comments</h2>

<p>Bryn comments toward the end of his article about how duck typing can lead to &#8216;dangerous&#8217; situations.  He uses the example of a method named <code>draw</code>, which has different semantics for the <code>Gunslinger</code> class (where <code>draw</code> means &#8216;Bang!&#8217;) vs a <code>Artist</code> class (where <code>draw</code> means &#8216;paint&#8217;).  While it&#8217;s possible to have such name clashes with different semantics, in reality I don&#8217;t think it&#8217;s a big problem: certainly one not worth spending a few paragraphs on in an article.  (When would this situation ever crop up, for example?)</p>

<p>He points out that in the <a href="http://nice.sourceforge.net/">Nice</a> language, you can write a class, and make them part of the interface later.  In his words: <em>&#8220;We also got additional power in the bargain, because now we can selectively bless any class we like into the Speaker interface, without including classes we don&#8217;t want - we can ensure that our Artist doesn&#8217;t end up in a gunfight by mistake!&#8221;</em>.  In languages such as Java or C++, you must declare that a class implements an interface when you write the class: you cannot write a class and declare later that it implements the interface.  It is very cool to program in a language which enables you to separate the code you write, from declaring how that code is used as part of your whole system design.  Some other examples of this feature in other languages are:</p>


<ul>
<li>Haskell, which enables you to declare a <em>type class</em> to capture common functionality provided by different functions.  So, you could write a Haskell module which provides a new Hashtable data type, and another Haskell module to provide a new balanced tree data type.  You can then later write a type class to capture operations common to such colletion/aggregate types, by writing a new type class that declare type signatures for functions such as inserting objects into the collection, or retrieving objects from the collection.  Note that you could have completely different interfaces to the hashtable/tree classes with completely different type signatures: the type class performs the &#8216;glue&#8217; code necessary to provide one clean, consistent interface to both of them.  (Plus, the very small glue code required to do that will be optimised away by any optimising Haskell compiler, such as <span class="caps">GHC.</span>) This is the same idea as Nice&#8217;s separation of code declaration vs interface declaration, though type classes are a <a href="http://okmij.org/ftp/Haskell/number-parameterized-types.html">far more powerful and generic concept</a>.</li>
<li>Objective-C&#8217;s <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/3objc_language_overview/chapter_3_section_7.html#//apple_ref/doc/uid/20001424/TPXREF139">categories</a>, which enable you to add new methods to existing classes.  You don&#8217;t like it how the <code>NSFileHandle</code> class doesn&#8217;t have a method to create a new temporary file and return you a file descriptor for it?  No problem, just add your own method to do that to the class &#8212; no subclassing necessary.  Categories are possibly the greatest thing I miss about Objective-C when I use any other language (Haskell included: it would be really cool to be able to extend type classes by adding new methods to them!).  C# has a similar feature named <a href="http://www.developer.com/net/net/article.php/2232061">partial types</a>, although it&#8217;s nowhere near as elegant as categories.  <a href="http://www.perl.com/pub/a/2004/04/16/a12.html?page=16%23open_vs_closed_classes">Perl 6 takes this idea even further</a> than Objective-C does: it differentiates between <em>open classes</em>, which can have methods added to them, and <em>closed classes</em>, which can&#8217;t.  The clever bit is that all classes are open by default, but any <em>users</em> of that class will close the class unless it&#8217;s specifically declared open.  This is really smart because it means that you can have the same flexibility that open classes give you, but you gain all the optimisation opportunities that come with closed classes, such as performing static dispatch rather than dynamic dispatch on a function call, which opens up a whole new set of optimisations that weren&#8217;t previously possible, such as inlining.</li>
</ul>



<p>One of the points of Bryn&#8217;s article seems to be that static typing detects different errors from unit tests: while this is true, I&#8217;d phrase this a different way.  One benefit of unit testing is that it helps you develop your code faster because unit tests enable your code to be more robust as you develop it, saving you from hunting down those stupid bugs later on.  Modern static type systems give you different test coverage, and I think they speed up your development even more, because they often pick up a lot more errors than unit tests do.  If you&#8217;re a Perl programmer, the <code>use strict;</code> pragma that Perl has basically turns on static type checking.  Think about how many bugs you&#8217;ve found thanks to its warnings and errors, and imagine how much of a nightmare it&#8217;d be if you didn&#8217;t have that facility at all.  Now think about extending Perl&#8217;s simple type system (which is limited to only type checking of scalars/arrays/hashes), so that types are pervasive in your program design that enable far better coverage by the type checker, and you&#8217;ll hopefully have some idea of what I&#8217;m talking about.</p>

<p>He remarks right at the end of his article that &#8220;We need both strong testing and strong typing&#8221; &#8212; I think he means static typing, not strong typing, considering that was what his entire article was about :).  Mind you, static and strong typing seems to be confused quite easily: even <a href="http://www.artima.com/intv/strongweak.html">Guido van Rossum confuses strong typing with static typing</a>.  I personally find it a bit worrying that the designer of such a popular (and great!) language gets it wrong, but hey, nobody&#8217;s perfect.</p>

<p>Bryn, I think, doesn&#8217;t point out the biggest benefit of modern static typing systems: it saves you time because so often, when that anal type checker finally does let your program compile, it just works a <em>really</em> surprisingly large amount of the time.  (This is closely related to the increase in productivity that I discussed above, but it&#8217;s not quite the same thing.)  It&#8217;s downright <em>unnerving</em> just how many times your program performs correctly: <a href="http://www.haskell.org/pipermail/cvs-ghc/2004-February/019899.html">one thread on the <em>cvs-ghc</em> mailing list</a> gives an anecdote, where most of the Glasgow Haskell Compiler back-end was ripped out and re-written (14000 lines of code!), and the PowerPC code generator worked <em>first-go</em>.  I&#8217;m yet to nail down whether this phenomenon is only due to the advanced type systems alone, or whether it&#8217;s a combination of the powerful type system and a (purely?) functional programming style; I suspect it&#8217;s the combination of the two.  Programs are much easier to reason about when state changes are made explicit.</p>]]></content:encoded></item><item><title>Imperative Code as Streams</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-10T09:11:10-07:00</dc:date><link>http://algorithm.com.au/blog/files/e4a103323c90d85716f942b447ae936e-306.html#unique-entry-id-306</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e4a103323c90d85716f942b447ae936e-306.html#unique-entry-id-306</guid><content:encoded><![CDATA[<p>In imperative languages, you usually get a new random number by calling a function (such as C&#8217;s <code>rand(3)</code>) when you need a new one.  You can do this in a functional language like Haskell too, but then you&#8217;re forced into an imperative style, which isn&#8217;t very functional.  (An imperative style would be required because generating a new random number depends on the current state of the random number generator.)  You can keep a functional programming style by having a random number generator produce a (lazy) list of numbers, rather than a single number: any code which wants a random numbers simply pulls the next one out of the list.  I posted some <a href="http://www.haskell.org//pipermail/haskell-cafe/2004-July/006444.html">example code</a> to the <em>haskell-cafe</em> mailing list recently to demonstrate this, in answer to a Haskell newcomer&#8217;s post.  Lazy lists are often also called <em>streams</em>.</p>

<p>Normally, monads are used to encapsulate state changes in Haskell in a purely functional manner, but you can use streams too: any state changes which occur can be represented with new list elements.  It&#8217;s no coincidence that <a href="http://www.nomaware.com/monads/html/listmonad.html">streams are monads</a>: they&#8217;re powerful enough to sequence non-deterministic operations.  The Haskell <a href="http://www.cse.unsw.edu.au/~chak/haskell/ports/">Ports Library</a> gives you even more convenience when working with streams by modelling time as a list, and the awesome <a href="http://www.cse.unsw.edu.au/~chak/haskell/gtk/#iHaskell">iHaskell</a> and <a href="http://www.md.chalmers.se/Cs/Research/Functional/Fudgets/">Fudgets</a> libraries for Haskell manage to model an entire <em><span class="caps">GUI</span></em> in a purely functional manner.  Just to show that this is also has a practical benefit, the <a href="http://www.md.chalmers.se/Cs/Research/Functional/Fudgets/Intro/ex2.html">Fudgets code examples</a> show how succinct writing <span class="caps">GUI </span>code can be.  The <a href="http://www.cs.chalmers.se/~hallgren/Thesis/">Fudgets thesis</a> is a great introduction and explanation to how it all works.</p>

<p>Closely related is the newer concept of <a href="http://www.haskell.org/arrows/">arrows</a>, which provide a formal framework to reason about stream-based (and also various other non-stream-based) computations.  Anyone up for writing a Haskell library to interface to the <a href="http://www.gstreamer.net/">gstreamer media framework</a> as an arrow?</p>]]></content:encoded></item><item><title>Boo: A New CLR Language</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-17T00:29:22-07:00</dc:date><link>http://algorithm.com.au/blog/files/0c0d441e438689a47467e722c03f2a09-307.html#unique-entry-id-307</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0c0d441e438689a47467e722c03f2a09-307.html#unique-entry-id-307</guid><content:encoded><![CDATA[<p>Lambda the Ultimate has a <a href="http://lambda-the-ultimate.org/node/view/107">story</a> on a new <span class="caps">CLR </span>(.NET) language named <a href="http://boo.codehaus.org/">Boo</a>.  Ian Bicking&#8217;s comparison of <a href="http://blog.colorstudy.com/ianb/weblog/2004/07/16.html#P133">Boo vs Python</a> is a nice, succinct summary of it.  Looks quite interesting: type inference, duck typing, macros, and string interpolation.  Seems that the <span class="caps">CLR </span>does seem to be breeding all sorts of new languages &#8230;</p>]]></content:encoded></item><item><title>Unused parameters in gcc</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-17T00:37:17-07:00</dc:date><link>http://algorithm.com.au/blog/files/1a0fd9c7a163e88c0ae011730d155318-308.html#unique-entry-id-308</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/1a0fd9c7a163e88c0ae011730d155318-308.html#unique-entry-id-308</guid><content:encoded><![CDATA[<p><a href="http://www.sourcefrog.net/">Martin Pool</a> has a really nice blog entry on how to use <code>-Wall</code> to turn on all warnings in gcc, and <a href="http://sourcefrog.net/weblog/software/languages/C/unused.html">stop it from complaining when you have unused parameters</a>.  This is quite a common scenario when you&#8217;re using callbacks (a.k.a. delegate or visitor methods).</p>]]></content:encoded></item><item><title>I&#x27;m Windows XP</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2004-07-22T04:14:34-07:00</dc:date><link>http://algorithm.com.au/blog/files/e67dc7c551bbd4660eba3e3a4d5ab11f-310.html#unique-entry-id-310</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e67dc7c551bbd4660eba3e3a4d5ab11f-310.html#unique-entry-id-310</guid><content:encoded><![CDATA[<p><a href="http://bbspot.com/News/2003/01/os_quiz.php"><img
src="http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/xp.jpg" width="300" height="90"
border="0" alt="You are Windows XP.  Under your bright and cheerful exterior is a strong and stable personality.  You have a tendency to do more than what is asked or even desired." /></p>

<p>Which OS are You?</p>]]></content:encoded></item><item><title>Functional Programming Koans</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-26T02:18:12-07:00</dc:date><link>http://algorithm.com.au/blog/files/e760be4709038dff852deff6c2a53bd8-311.html#unique-entry-id-311</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e760be4709038dff852deff6c2a53bd8-311.html#unique-entry-id-311</guid><content:encoded><![CDATA[<p>Doug Bagley&#8217;s most excellent&eacute; <a href="http://web.archive.org/web/20041012103936/http%3a//www.bagley.org/~doug/ocaml/Notes/okoans.shtml">functional programming koans</a>, courtesy of Sean Seefried.  Here&#8217;s one example:</p>

<blockquote><p><em>The Koan of Lazy Evaluation</em>: Michel Mauny was giving a guest lecture to new computer science  students. After the students were seated, Michel pronounced &#8220;Today&#8217;s  lecture will be about Lazy Evaluation&#8221;, he paused for a moment then  concluded with, &#8220;Are there any questions?&#8221;</p></blockquote>]]></content:encoded></item><item><title>Rusty&#x27;s Interface Simplicity Spectrum</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-07-31T09:39:29-07:00</dc:date><link>http://algorithm.com.au/blog/files/7631696abd9c51ccd7ea9a1b8c7bee19-312.html#unique-entry-id-312</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7631696abd9c51ccd7ea9a1b8c7bee19-312.html#unique-entry-id-312</guid><content:encoded><![CDATA[<p><a href="http://www.sourcefrog.net/">Martin Pool</a> writes yet another excellent blog entry, this time about <a href="http://sourcefrog.net/weblog/software/aesthetics/interface-levels.html">Rusty on Interface Simplicity</a>.  His <a href="http://www.ozlabs.com/~rusty/ols-2003-keynote/ols-keynote-2003.html"><span class="caps">OLS</span> 2003 keynote</a> had an &#8220;interface simplicity spectrum&#8221;, which is so good, Martin reproduced it in his blog, and I&#8217;m going to reproduce it in mine, for my own reference:</p>


<ol>
<li>Compiler/linker won&#8217;t let you get it wrong.</li>
<li>Compiler will warn if you get it wrong.</li>
<li>The simplest use is the correct one.</li>
<li>The name tells you how to use it.</li>
<li>Do it right or it will break at runtime.</li>
<li>Follow common convention and you&#8217;ll get it right.</li>
<li>Read the documentation and you&#8217;ll get it right.</li>
<li>Read the implementation and you&#8217;ll get it right.</li>
<li>Read the correct mailing list thread and you&#8217;ll get it right.</li>
<li>Read the documentation and you&#8217;ll get it wrong.</li>
<li>Follow common convention and you&#8217;ll get it wrong.</li>
<li>Do it right and it will break at runtime.</li>
<li>The name tells you how not to use it.</li>
<li>The obvious use is wrong.</li>
<li>Compiler will warn if you get it right.</li>
<li>Compiler won&#8217;t let you get it right.</li>
<li>It&#8217;s impossible to get right.</li>
</ol>



<p>(Obligatory Haskell plug: a nice one-line summary of the Haskell language is that just using it for your code, puts you at #1 on that spectrum an incredible amount of the time.)</p>]]></content:encoded></item><item><title>Shared Haskell Libraries: Finally&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-01T19:59:11-07:00</dc:date><link>http://algorithm.com.au/blog/files/8c0af75847d3d4faeb3605a595b9a805-313.html#unique-entry-id-313</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/8c0af75847d3d4faeb3605a595b9a805-313.html#unique-entry-id-313</guid><content:encoded><![CDATA[<p>Wolfgang Thaller&#8217;s been working on <a href="http://www.haskell.org//pipermail/cvs-ghc/2004-August/021220.html">bringing the Glasgow Haskell Compiler into the 1990s</a>:</p>

<blockquote><p>Yes. In fact, I already have a &#8220;Hello, world&#8221; program linked against dynamic libraries libHSrts.dylib, libHSbase.dylib and libHShaskell98.dylib on Mac OS X, and another one doing the same thing on PowerPC Linux.</p></blockquote>

<p>All I can say is: <strong>thank God</strong>!  Wolfgang, you rule.  I can&#8217;t wait for this to hit the <span class="caps">GHC </span>stable tree!</p>]]></content:encoded></item><item><title>Statically Checking for NULL</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-03T17:49:44-07:00</dc:date><link>http://algorithm.com.au/blog/files/69892400591b31ab310873185bd932f6-314.html#unique-entry-id-314</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/69892400591b31ab310873185bd932f6-314.html#unique-entry-id-314</guid><content:encoded><![CDATA[<p>Lambda the Ultimate has some pretty interesting <a href="http://lambda-the-ultimate.org/node/view/157#comment">discussion</a> about <em>compile-time</em> checking for taking the tail of an empty list, which is generalisable to compile-time checking of any partial function (functions which are not defined for their domain, i.e. their input values).  Some particularly interesting comments I found in that thread:</p>


<ul>
<li>&#8220;I see the empty list as being like null, which Nice has static checking for&#8221;.  Wow, impressive (probably not impressive from the type theory angle, but particularly impressive from a practical viewpoint: all <code>NullPointerException</code> exceptions detected at compile-time?  Cool indeed.  Something tells me I should have a closer look at Nice.  Maybe for my Ph.D, I can write a type inference engine for Objective-C.  Nehhh &#8230;</li>
<li>[On modifying the <code>tail</code> function to return <code>Maybe [a]</code> instead of just <code>[a]</code>]: &#8220;Using Maybe for this is like saying - let&#8217;s turn this partial function into a total one by lifting its range to include Nothing. It became total by obtaining permission to return something I have no use of.&#8221;</li>
<li>&#8220;My point is that [the] Hindley-Milner type system is not expressive enough to allow two (or more) consent programmers to state their mutual expectations. As an author of <code>tail</code> function I can&#8217;t promise to always return list given non-empty list and expect the compiler to reject all programs that try to call <code>tail</code> on empty list.  I suspect it&#8217;s possible to stretch Haskell a bit to encode this particular constraint, but as you said, dependent types are way to go for those who seek more static expressiveness.&#8221;</li>
<li>&#8220;In <a href="http://www.dur.ac.uk/CARG/epigram/">Epigram</a> type checking is decidable, because all functions are total. Conor McBride plans to add general recursion, but its use would be tracked by the system so that types can only depend on terms from the total fragment.&#8221;</li>
</ul>



<p>And of course, the obligatory type wizardry post from Oleg:</p>


<ul>
<li>&#8220;I&#8217;d like to point out that it is possible in Haskell98 to write non-trivial list-processing programs that are statically assured of never throwing a `null list&#8217; exception. That is, tail and head are guaranteed by the type system to be applied only to non-empty lists. Again, the guarantee is static, and it is available in Haskell98. Because of that guarantee, one may use implementations of head and tail that don&#8217;t do any checks. Therefore, it is possible to achieve both safety and efficiency. Please see the second half of the following message: <a href="http://www.haskell.org/pipermail/haskell/2004-June/014271.html">http://www.haskell.org/pipermail/haskell/2004-June/014271.html</a>&#8221;.</li>
</ul>]]></content:encoded></item><item><title>Usabililty Cruft</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-08T03:00:54-07:00</dc:date><link>http://algorithm.com.au/blog/files/323ca276bc662f665febd8dd27c03094-315.html#unique-entry-id-315</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/323ca276bc662f665febd8dd27c03094-315.html#unique-entry-id-315</guid><content:encoded><![CDATA[<p>Matthew Thomas writes about the lack of usability advancements in the past two decades in this excellent <a href="http://mpt.phrasewise.com/stories/storyReader$374">blog entry</a>.  Why, indeed, do we still make people use filepickers at all?  (Though, I should note that <span class="caps">KDE&#8217;</span>s File Open dialog box is actually a fully-embedded Konqueror view, which is a step in the right direction.)</p>]]></content:encoded></item><item><title>Great Hacker &#x21;= Great Hire</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-11T04:53:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/9470699bb493a7c2b3ee1feff5c773a5-316.html#unique-entry-id-316</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9470699bb493a7c2b3ee1feff5c773a5-316.html#unique-entry-id-316</guid><content:encoded><![CDATA[<p>By way of <a href="http://www.joelonsoftware.com/">Joel Spolsky</a>, a good article on <a href="http://software.ericsink.com/entries/No_Great_Hackers.html">Great Hacker != Great Hire</a>.  (And in case you haven&#8217;t guessed yet, I agree with the article by the simple action of linking to it from my blog ;-).</p>]]></content:encoded></item><item><title>pycore vs IronPython</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-12T05:20:30-07:00</dc:date><link>http://algorithm.com.au/blog/files/40351b10b60d761654011e0f8969a081-317.html#unique-entry-id-317</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/40351b10b60d761654011e0f8969a081-317.html#unique-entry-id-317</guid><content:encoded><![CDATA[<p><a href="http://patricklogan.blogspot.com/">Patrick Logan</a> talks about Yet Another Python implementation named <a href="http://webpages.charter.net/allanms/2004/08/you-dont-tug-on-supermans-cape.html">pycore</a>, a Python VM implemented in Smalltalk.  Yawn, you say?  Well, right now it&#8217;s completely unoptimised, and seems to benchmark better than CPython.  I can see this giving the much-more publicised <a href="http://ironpython.com/">IronPython</a> a run for its money.  Isn&#8217;t it great how Smalltalk can still compete well with today&#8217;s modern VMs?</p>]]></content:encoded></item><item><title>On Disgusting Hacks and Proofs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-12T07:09:06-07:00</dc:date><link>http://algorithm.com.au/blog/files/b7fb9f145827e300823c316768da5cee-318.html#unique-entry-id-318</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b7fb9f145827e300823c316768da5cee-318.html#unique-entry-id-318</guid><content:encoded><![CDATA[<p>Spotted this little gem in a <a href="http://lambda-the-ultimate.org/node/view/176">thread about programming languages and software engineering</a>, on (where else?) Lambda the Ultimate:</p>

<blockquote><p>John Reynolds told me that he once described a correctness proof for <span class="caps">XOR</span>ing together pointers in a doubly-linked list to someone. This person asked why he would ever want to prove such a disgustingly nasty hack correct, to which he replied that it was no longer a disgusting hack, because he had a clean proof of correctness for it.</p></blockquote>]]></content:encoded></item><item><title>Guy Steele on Java</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-13T02:20:24-07:00</dc:date><link>http://algorithm.com.au/blog/files/8d51d5843b89474e6254faba780327e8-319.html#unique-entry-id-319</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/8d51d5843b89474e6254faba780327e8-319.html#unique-entry-id-319</guid><content:encoded><![CDATA[<p>A snippet from a <a href="http://www.ai.mit.edu/~gregs/ll1-discuss-archive-html/msg04045.html">post by Guy Steele</a> on the <a href="http://ll1.ai.mit.edu/">ll1-discuss</a> list:</p>

<blockquote><p>And you&#8217;re right: we [the Java language designers] were not out to win over the Lisp programmers; we were after the C++ programmers.  We managed to drag a lot of them about halfway to Lisp.  Aren&#8217;t you happy?</p></blockquote>]]></content:encoded></item><item><title>Python and Dictatorship</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-08-16T00:26:24-07:00</dc:date><link>http://algorithm.com.au/blog/files/d3a0e73c72ec3e3b4bcf11249bc13e34-320.html#unique-entry-id-320</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d3a0e73c72ec3e3b4bcf11249bc13e34-320.html#unique-entry-id-320</guid><content:encoded><![CDATA[<p>A quote from a nice <a href="http://lambda-the-ultimate.org/node/view/191#comment">comment</a> from Dave Benjamin on <a href="http://www.lambda-the-ultimate.org/">Lambda</a>:</p>

<blockquote><p>&#8230; I really wish Python had gotten a ternary operator; having to abuse &#8220;and&#8221; and &#8220;or&#8221; just to embed a conditional in an expression is tacky. I don&#8217;t care what the syntax is! Pick one! I feel like that feature died because of the noise, because nobody could agree on anything, and if that&#8217;s the direction of Python&#8217;s future, it&#8217;s a little bit scary.</p>

<p>Look, we&#8217;re not all going to agree on anything. I thought that&#8217;s why Guido was chosen as &#8220;Benevolent Dictator for Life&#8221;. Lately, his strategy has been to say something like &#8220;Well, I don&#8217;t care if we add the feature, and I don&#8217;t care if we don&#8217;t, but if you all can decide on a syntax, we&#8217;ll do it.&#8221; I think that this approach is killing progress. Of course we won&#8217;t all agree. We&#8217;re a bunch of opinionated hackers, and we like things our way. That&#8217;s why you&#8217;re dictator, Guido. Dictate!</p>

<p>Language is the one concrete dependency that we never seem to be able to abstract away. Changing a language affects more people the more successful a language becomes. Is it the destiny of every language to eventually grind to a halt, for no other reason than people&#8217;s inability to agree on the next step for growth? I hope not, but I&#8217;m glad we have lots of other languages that are not so constrained.</p></blockquote>

<p>Totally agreed.  Design by committee rarely turns out elegantly.</p>]]></content:encoded></item><item><title>The Apple Product Cycle</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-08-17T07:24:28-07:00</dc:date><link>http://algorithm.com.au/blog/files/fdf6ff6b2bf2b2eee18345d14ebe00e5-321.html#unique-entry-id-321</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fdf6ff6b2bf2b2eee18345d14ebe00e5-321.html#unique-entry-id-321</guid><content:encoded><![CDATA[<p><a href="http://www.misterbg.org/AppleProductCycle/">Only funny because it&#8217;s true.</a></p>]]></content:encoded></item><item><title>crunchyRawUnbonedPanel indeed</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-08-17T07:25:53-07:00</dc:date><link>http://algorithm.com.au/blog/files/cbac17e788426066819d9175716ba366-322.html#unique-entry-id-322</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/cbac17e788426066819d9175716ba366-322.html#unique-entry-id-322</guid><content:encoded><![CDATA[<p>Aww, who says Apple don&#8217;t sprinkle <a href="http://www.codepoetry.net/archives/2004/08/01/tired_bored_and_coding.php">easter eggs</a> in their code anymore?</p>]]></content:encoded></item><item><title>iPhotoToGallery</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-08-21T20:17:07-07:00</dc:date><link>http://algorithm.com.au/blog/files/4795438e74433cb9dea66c77a6e9b32e-323.html#unique-entry-id-323</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/4795438e74433cb9dea66c77a6e9b32e-323.html#unique-entry-id-323</guid><content:encoded><![CDATA[<p><a href="http://zwily.com/iphoto/">iPhotoToGallery</a> totally rules.  How much <a href="http://www.algorithm.com.au/gallery/screenshots/iPhotoToGallery_Snapshot">simpler</a> can you make exporting things from iPhoto?</p>]]></content:encoded></item><item><title>Paper Napkin</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-08-23T04:22:46-07:00</dc:date><link>http://algorithm.com.au/blog/files/275051efb6454c5dbb7b18b1c004f291-324.html#unique-entry-id-324</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/275051efb6454c5dbb7b18b1c004f291-324.html#unique-entry-id-324</guid><content:encoded><![CDATA[<p>So here&#8217;s the scenario: You&#8217;re out at a bar, riding transit, or even just walking down the street, and some bozo who desperately wants into your pants starts up a conversation with you. Rather than make a scene or make them upset, you&#8217;re polite and at least nod at the proper times. Then, of course, they ask you for your number. Except this is 2004, so maybe they ask for your email address instead.  That&#8217;s where <a href="http://papernapkin.net/">Paper Napkin</a> comes in.</p>]]></content:encoded></item><item><title>The Raymond Chen camp</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-08-25T17:32:32-07:00</dc:date><link>http://algorithm.com.au/blog/files/936b91d40169dad7054362535d5e79ea-325.html#unique-entry-id-325</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/936b91d40169dad7054362535d5e79ea-325.html#unique-entry-id-325</guid><content:encoded><![CDATA[<p>Raymond Chen on more <a href="http://www.joelonsoftware.com/articles/APIWar.html">herculean efforts to retain backward compatibility</a> in Windows, this time related to <a href="http://weblogs.asp.net/oldnewthing/archive/2004/08/11/212720.aspx">virtual memory management</a>:</p>

<blockquote><p>In Windows&dagger;95, the memory manager was completely rewritten and the above coincidence was no longer true. To conserve kernel-mode virtual address space, physical memory was now mapped linearly only as necessary.  Of course, the drivers that relied on the old behavior were now broken because the undocumented behavior they relied upon was no longer present.  As a result, when it starts up, Windows&dagger;95 looks around to see if any drivers known to rely on this undocumented behavior are loaded.</p></blockquote>

<p>Wow.  (<a href="http://www.liutilities.com/products/wintaskspro/processlibrary/wowexec/">Pun intended</a>.)</p>]]></content:encoded></item><item><title>My Action Figure Can Beat Up Microsoft&#x27;s Action Figure</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-08-31T22:13:06-07:00</dc:date><link>http://algorithm.com.au/blog/files/2711f554ddbb058fde78b7298237bdd7-326.html#unique-entry-id-326</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2711f554ddbb058fde78b7298237bdd7-326.html#unique-entry-id-326</guid><content:encoded><![CDATA[<p>Quote from Tidbits:</p>

<blockquote><p><a href="http://www.tidbits.com/tb-issues/TidBITS-744.html#lnk3">Now here&#8217;s an odd marketing campaign</a> &#8212; so odd, in fact, that I wonder if I&#8217;m missing a level or two of self-mocking irony. Microsoft is running a sweepstakes to promote Microsoft Office 2004 for Mac based on the slogan, &#8220;Get in touch with your inner suit.&#8221;</p></blockquote>]]></content:encoded></item><item><title>Non-Sucky Bluetooth Adapter</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2004-08-31T23:35:57-07:00</dc:date><link>http://algorithm.com.au/blog/files/8a6ca8b45fe0844f84f84052b1a57517-327.html#unique-entry-id-327</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/8a6ca8b45fe0844f84f84052b1a57517-327.html#unique-entry-id-327</guid><content:encoded><![CDATA[<p>If you&#8217;re looking for a non-sucky Bluetooth adapter, the <a href="http://www.dlink.com.au/Default.aspx?ArticleID=103">D-Link <span class="caps">DBT</span>-120</a> seems like one of the best ones out there.  It appears to have good <a href="http://www.holtmann.org/linux/bluetooth/devices.html">Linux support</a> and <a href="http://iratescotsman.com/index.php/tech/bluetooth_in_mac_os_x.html">Mac OS X support</a>, and its Windows drivers are actually half-decent.  (Perhaps Windows XP <span class="caps">SP2 </span>might standardise on a Bluetooth stack, but I wouldn&#8217;t trust that to make the dismal state of Bluetooth on Windows any better.)</p>]]></content:encoded></item><item><title>XKeymacs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-09-01T07:10:51-07:00</dc:date><link>http://algorithm.com.au/blog/files/816de31344dd126270a71f28b4fef835-328.html#unique-entry-id-328</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/816de31344dd126270a71f28b4fef835-328.html#unique-entry-id-328</guid><content:encoded><![CDATA[<p>If you just can&#8217;t get your fingers away from those magical Emacs <code>C-a</code> and <code>C-e</code> keys and you&#8217;re using Windows a lot, <a href="http://www.cam.hi-ho.ne.jp/oishi/indexen.html">XKeymacs</a> might just be the thing for you:</p>

<blockquote><p>XKeymacs is a keyboard utility to realize emacs like-useability on all windows applications. With XKeymacs you can use emacs keybindings with any windows application. You also get bash-like command completion in your <span class="caps">DOS </span>shell.</p></blockquote>

<p>The only serious missing feature is the magical <code>M-/</code> key (Dynamic Abbreviation), which is unfortunately one of <em>the</em> biggest reasons that I love Emacs so much.  Even so, it&#8217;s pretty damn nice having those familiar keys available in Windows applications, from Notepad to Visual Studio.</p>]]></content:encoded></item><item><title>The Perfect Father&#x27;s Day Present</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2004-09-08T23:13:52-07:00</dc:date><link>http://algorithm.com.au/blog/files/93364121299b142743029fe215a38cba-329.html#unique-entry-id-329</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/93364121299b142743029fe215a38cba-329.html#unique-entry-id-329</guid><content:encoded><![CDATA[<p><img src="http://www.algorithm.com.au/albums/foobar/kone.jpg"/></p>]]></content:encoded></item><item><title>Hotham 2004 Photos</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-09T10:11:51-07:00</dc:date><link>http://algorithm.com.au/blog/files/a6647c8a20d0cfd4f03d1305506476a4-330.html#unique-entry-id-330</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/a6647c8a20d0cfd4f03d1305506476a4-330.html#unique-entry-id-330</guid><content:encoded><![CDATA[<p>I&#8217;ve put up <a href="http://www.algorithm.com.au/gallery/hotham2004">the photos</a> from our skiing trip to Mount Hotham and Dinner Plain.  It was one of the best holidays of my life, and the best skiing I&#8217;ve ever done.  Three days later, and I&#8217;m still on a high from it.  We&#8217;re already tossing around skiing in <a href="http://www.arlberg.com/englisch/informationen/ortsinformation.php3">Arlberg</a> next year :).</p>]]></content:encoded></item><item><title>From Sydney to LAX</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-18T20:39:39-07:00</dc:date><link>http://algorithm.com.au/blog/files/fa1886c7c33575f8b8cb0c996f7f0224-331.html#unique-entry-id-331</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fa1886c7c33575f8b8cb0c996f7f0224-331.html#unique-entry-id-331</guid><content:encoded><![CDATA[<p>This is coming to you live from <span class="caps">QF155 </span>(well, if by &#8220;live&#8221;, you mean &#8220;at the time it was written&#8221;, anyway :-).  The flight&#8217;s been rather nonplussed: we had a pleasant 2-hour journey or so from Sydney to Auckland, and stopped over in Auckland for around 30 minutes or so before jumping back on the plane.  Of course, I decided that since Auckland was quite possibly the last place I was going to get a decent coffee for most likely the next entire month, I just had to grab my last mocha at Auckland airport.  Executive summary of coffee experience: (1) mocha in New Zealand is good, (2) New Zealand accents are giggly funny, and (3) New Zealand currency is the same as Australian, but different.  Hey, I&#8217;d never seen New Zealand currency before, so I thought it would be worthwhile to withdraw $20 from the nearby <span class="caps">ATM. </span> Pretty colourful notes!  Oh, and I also bought an Ecuadorian banana.  All good.</p>

<p>The only unpleasant part of the trip was getting back on the plane.  It looks like the Auckland Airport security staff don&#8217;t trust the Sydneysiders to give their passengers a good cavity search, so they made us go through the whole security checkpoint rigmarole garbage again.  (Mind you, I don&#8217;t blame them: the only good cavity search is one done yourself.)  So, that added a rather unnecessary 30 minute delay or so.</p>

<p>Back on the plane, I had a fairly reasonable choice of movies.  Being the hardcore action flick guy that I am, I of course had to watch Suddenly 30, starring Jennifer Garner.  Nah, actually, that was a joke (sorry if you brought out some Johnny Walker at that statement, Foo.)  I really watched &#8220;The Girl Next Door&#8221;, with one tasty Elisha Cuthbert, a.k.a. Kim &#8220;I am the most pretty-looking trouble magnet ever&#8221; Bauer in 24.  It was rather average: I didn&#8217;t quite expect such a teeny flick, though.  I guess it&#8217;s not particularly mainstream Hollywood to produce movies like the Opposite of Sex (Christina Ricci), which I was more expecting than an American teenage romantic comedy.  Note to the girls though: the main guy in the movie is pretty hot, in an American innocent-boy-with-possible-use-of-brille-cream kind of way.  Your Mileage May Vary.</p>

<p>Don and I geeked out a bit after our respective movies (I am informed that Don watched Tom Smith, which &#8220;was pretty good&#8221;), and proceeded to pull out our laptops to hack on Haskell code.  For the Haskellers reading this, I tidied up a nice swishy <span class="caps">GUI </span>example so that it works with his latest version of hs-plugins, which I&#8217;m hoping to present in his talk, because nice swishy <span class="caps">GUI </span>examples are  great for talks.  For the non-Haskellers amongst you, just let it be said that there was a <span class="caps">CAT6 </span>network cable running between our two laptops (that I&#8217;m sure attracted some stares from the poor passenger sitting next to us), and it was fun.  I also managed to catch up on personal emails, though I&#8217;m still 200-300 messages behind on mailing lists, and played one of the Qantas in-flight games named &#8220;Professional Gold Digger&#8221;, which is totally unashamed clone of Lode Runner, except that it has a more crappy name.  Really, c&#8217;mon: Lode Runner vs Professional Gold Digger?  What were they thinking?</p>

<p>Anyway, off to read more email now, then either chill out to the iPod or sleep for a while.  (I should probably mention at this point that I did catch some powernaps between movies and coding, so don&#8217;t worry about the lack of sleep, mum and dad :-).</p>]]></content:encoded></item><item><title>LAX&#x2c; Trial the 1st</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-18T20:40:23-07:00</dc:date><link>http://algorithm.com.au/blog/files/4d4fcf85ba19a2947ee3346f73967443-332.html#unique-entry-id-332</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/4d4fcf85ba19a2947ee3346f73967443-332.html#unique-entry-id-332</guid><content:encoded><![CDATA[<p>Ah, <span class="caps">LAX, </span>my favourite airport.  You know, the whole <span class="caps">LAX </span>experience thing would be so much more enjoyable if you just didn&#8217;t have to queue up for 3 hours when  just transferring from an international flight to a domestic flight.  Some sort of priority system for international to domestic transfers (and vice versa) really would almost make it enjoyable.  I&#8217;m just looking forward to having to line up for 3 hours again when I leave later in the trip from Los Angeles to Toronto.  E-tickets (which I don&#8217;t have for the domestic North American flights on this trip) really speed things up.</p>

<p>I&#8217;m pretty nonplussed about the whole thing though; having an iPod or any sort of <span class="caps">MP3 </span>player makes things <em>much</em> more tolerable.  Fidgeting and being totally bored in a queue is quite sucky compared to bobbing your head up and down because DJ Shadow is going off.  I also had friendly immigrations and security officials (for once!), which made things much more pleasant.  One tip for those who travel frequently: if you&#8217;re like me and carry around lots of metallic thingys in your pocket, empty it out into your backpack (ne&Egrave; handbag) <em>before</em> you reach the front of security.  Security checkpoints are much more pleasant when you can do things at your own pace relaxedly, rather than having loud, American-accented security guards telling you for the nth time that you really should take your shoes off while you&#8217;re trying to empty your pockets.</p>

<p>I also succumbed to American pop culture and got a white chocolate mocha.  I figure that since I&#8217;m in the land with totally s**thouse coffee, I might as well make the most of it and absolutely 100% guarantee that what I have is off the wall and sweet.  I&#8217;m <em>really</em> quite tempted to ask for an Orange Mocha Frappucino from Starbucks :-).</p>

<p>Anyway, just killing time until my flight leaves for Salt Lake City &#8230; the geek in me is calling out to go hack on TextExtras so that I have proper Emacs dynamic abbreviation in every Mac application.  Mmmm, let&#8217;s just see.</p>]]></content:encoded></item><item><title>LAX On-The-Go iPod Playlist</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-18T20:40:53-07:00</dc:date><link>http://algorithm.com.au/blog/files/1a114a9a58037f2359d34f7d7b58e69d-333.html#unique-entry-id-333</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/1a114a9a58037f2359d34f7d7b58e69d-333.html#unique-entry-id-333</guid><content:encoded><![CDATA[<p>So I might try a little experiment with blog posting and see whether people like it or not: here&#8217;s what I had on the On-The-Go playlist on my iPod today when I was lining up for about 17 days in the United check-in queue &#8230;</p>


<ul>
<li>Peace Orchestra: Who Am I? (Animatrix mix), from the Animatrix album</li>
<li>Sarah McLachlan: Fallen, from Afterglow</li>
<li>Sarah McLachlan: World on Fire, from Afterglow</li>
<li>Venus Hum: Hummingbirds, from Big Beautiful Sky</li>
<li>DJ Shadow: Live! In Tune and On Time, yeah, the whole album.  Mmm, vocoded Lonely Soul mixed into Guns Blazing so does it for me &#8230;</li>
<li>Way Out West: Stealth (Quivver mix)</li>
<li>Junxie XL: Beauty Never Fades (Animatrix edit)</li>
<li>Juno Reactor: Conga Fury (Animatrix edit)</li>
<li>Energy 52: Caf&Egrave; del Mar (Solar Stone remix)</li>
</ul>



<p>Hey, I figure if what I&#8217;m listening to is totally uninteresting (which it most likely is unless you frequently discuss music with me), you can just ignore the post right? :)</p>]]></content:encoded></item><item><title>Tom Bradley&#x2c; Terminal 8&#x2c; Terminal 5 ...</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-18T20:42:18-07:00</dc:date><link>http://algorithm.com.au/blog/files/fef929be6dcf6ec6f573c468eef527db-334.html#unique-entry-id-334</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fef929be6dcf6ec6f573c468eef527db-334.html#unique-entry-id-334</guid><content:encoded><![CDATA[<p>Well, my impression of the American airline industry just gets better and better: my United flight to Salt Lake City at 1:19pm was cancelled, so they shoved me on a Delta Airlines flight at 3pm instead.  Oh vey, another 2 hours of killing time at Los Angeles airport!  (Though I admit I&#8217;ve actually been productive and have been hacking on TextExtras as I intended to in the last blog, so it wasn&#8217;t much of a waste of time.)  At least the staff are pretty friendly: they do seem quite sympathetic to the numerous screw-ups that keep happening.  I don&#8217;t think I&#8217;ve had a single trip to the <span class="caps">USA </span>in the past 2 or 3 years where <em>something</em> didn&#8217;t go wrong.</p>

<p>The good part of the story is that I managed to book myself on an earlier Delta flight which left Los Angeles at 1pm, so oddly enough I ended up catching an earlier flight than the one which was cancelled.  The bad part of the story is that means I had to move terminals yet again.  My Qantas flight into Los Angeles arrived at the Tom Bradley International terminal, from which point I walked with Don to Terminal 5 since I was killing time and didn&#8217;t have anything better to do.  Then, onward to Terminal 8, where my cancelled United flight was, and then back to Terminal 5 for my final Delta flight.  In conjunction with the Auckland stopover, that meant I&#8217;d gone through security screening four times.  Fun, fun, fun.</p>

<p>The really bad part of the story is that my baggage didn&#8217;t travel with me on the flight and got misdirected somewhere between Los Angeles and Salt Lake City, although the baggage assistant dude who helped me claimed that it&#8217;s very likely coming on the next United flight, which lands in Salt Lake City at 6pm.  Since there&#8217;s not much else I can do about that, I&#8217;ll just pray it does come, otherwise I&#8217;ll be wearing my Afterglow long-sleeve shirt again tomorrow &#8230;</p>]]></content:encoded></item><item><title>Snowbird&#x2c; Utah and the Cliff Lodge</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-18T20:42:43-07:00</dc:date><link>http://algorithm.com.au/blog/files/621550b2adfabdbe815159ee22221c3e-335.html#unique-entry-id-335</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/621550b2adfabdbe815159ee22221c3e-335.html#unique-entry-id-335</guid><content:encoded><![CDATA[<p>All I can say is: Holy. Crap!</p>

<p>The one-line summary is that I am <em>so</em> coming back here again.  It&#8217;s absolutely stunning.  Scenery totally abounds: unfortunately I didn&#8217;t carry the camera in my pocket on the way from Salt Lake City to Snowbird so I didn&#8217;t snap any shots, and the camera on my phone simply won&#8217;t do the scenery justice at all.  Utah has some truly magnificent mountains, and the colours of the trees in autumn are simply spectacular: you get ranges from that pine-tree forest green, to near-tropical darker shades of green, but also very pretty browns and yellows which just aren&#8217;t seen in Australia.  It&#8217;s a breathtaking sight if you don&#8217;t see mountains and pretty green-yellow shades very often, which I don&#8217;t.</p>

<p>As for the Cliff Lodge where the <span class="caps">ICFP </span>conference is being held and also where I&#8217;m staying, well &#8230; I&#8217;ve never seen a better hotel bargain in my life.  This place is very much up there amongst the more luxurious hotels I&#8217;ve stayed at, at around three cheaper than what I would expect to pay (especially considering Snowbird is a ski town, and ski towns aren&#8217;t renown for being cheap).  My room has two double beds, a huge desk, a refrigerator, two plonk-your-arse-in chairs surrounding a posh marbly table, a full-size wardrobe, a sit-down place to put on your shoes, and a freakin&#8217; <em>leather sofa</em>.  Not bad considering it&#8217;s less than $100/night.  The view out the room looks out onto the mountains, too, which is really damn nice: I promise I&#8217;ll take a photo tomorrow when the sun&#8217;s up.  Even cooler, the bathroom has a clear window out into the room (though there&#8217;s a shower curtain you can zip across if you want some privacy), and from some conversations I overheard over dinner, that&#8217;s so you can have a shower and enjoy the mountain view at the same time.  Very clever.  Must remind self to design clear shower window out into room with a mountain view if I ever get around to designing a house (along with designing the mountain view, of course).</p>

<p>The skiing here looks pretty damn awesome too: you can see the ski trails carved out on the mountain even though there&#8217;s no snow.  Ski bunnies, we absolutely have to come here.  The skiing looks totally carving.  I swear I&#8217;d be missing a day or two of the conference this week if it were still snowing here &#8230;</p>

<p>After basking in the awe for about half an hour after I arrived at the Cliff Lodge, I de-plane-ified a bit (had shower etc) and then met up with Manuel and Gabi for dinner.  We found a pretty decent little bistro downstairs named the Keyhole, and I did the traditional American thing and got me-self one Angus Steak Burger.  It Was Good.  Along with burger was a Pilsner Urquell: let it be said that Urquell was also good, but drinking beer when you&#8217;re 8,000 feet makes it noticeably harder to breathe properly, or at least it did for me.  Don didn&#8217;t come to dinner since he didn&#8217;t get much sleep from Sydney to Los Angeles, so he crashed at about 6 o&#8217;clock.  Manuel and Gabi didn&#8217;t get a whole of sleep either, but they appeared in good spirits.  Leon (their one-and-a-half year old son) was also looking in good spirits, and was being very cute and wanted me to read him a German picture book.  Now I know that the German word for &#8216;bear&#8217; is &#8216;bear&#8217;.</p>

<p>So now it&#8217;s post-dinner, and I&#8217;m just listening to some Lamb on the laptop waiting for my big bag to arrive from Delta: hopefully it&#8217;ll get here in about half an hour.  So far, the international flight was fine, domestic flights sucked, but Snowbird and the Cliff Lodge has totally made up for that misadventure.  I am so going to use the Cliff Spa while I&#8217;m here &#8212; in fact, I&#8217;d probably be there right now if I had my board shorts &#8230; aww jeah, it&#8217;s looken&#8217; good.</p>]]></content:encoded></item><item><title>Mein bag&#x21;  Mein bag&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-19T05:19:12-07:00</dc:date><link>http://algorithm.com.au/blog/files/dc1b4c5edd134a4b14b53485f8637029-336.html#unique-entry-id-336</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dc1b4c5edd134a4b14b53485f8637029-336.html#unique-entry-id-336</guid><content:encoded><![CDATA[<p>Looks like Delta airlines baggage staff have redeemed themselves and found my bag.  I don&#8217;t think I&#8217;ve ever been more happy to see my toiletries bag in my life.</p>]]></content:encoded></item><item><title>ICFP&#x2c; Day 1</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-20T22:07:39-07:00</dc:date><link>http://algorithm.com.au/blog/files/287b7a43893efa0bfd0f444d6d698381-337.html#unique-entry-id-337</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/287b7a43893efa0bfd0f444d6d698381-337.html#unique-entry-id-337</guid><content:encoded><![CDATA[<p>I&#8217;m not quite sure if I&#8217;m jet-lagged or not: I woke up this morning at about 4:30 feeling quite refreshed.  While I quite like getting up early, 4:30 is definitely a bit earlier than I had intended, but hey, I felt perfectly <span class="caps">OK, </span>so I thought I might as well just run with it.  There&#8217;s nothing quite like being productive for a few hours before the day starts!</p>

<p>Right now, I&#8217;m really quite happy that I got a Powerbook rather than a PC laptop, the motivating reasons being the <a href="http://www.apple.com/isight/">iSight</a> and <a href="http://www.apple.com/ichat/">iChat AV</a>.  It&#8217;s amazing how much seeing a face adds to the conversation: Michelle and I were talking face-to-face for half an hour this morning, and just left the video feed going for over 2 hours when we were both doing our own work.  <em>This</em> is what&#8217;s possible when you have high-speed, unlimited-bandwidth Internet connectivity!  While there are still moments where a PC laptop would be really handy (such as doing Symbian mobile phone development work on the road), right now, an iSight and iChat AV are really a totally killer reason for buying a Mac.</p>

<p>I caught up on email and hacked around with some Haskell stuff (the &#8220;Typing Haskell in Haskell&#8221; module, if you&#8217;re a Haskeller) after chatting with Michelle, before meeting up with Manuel and Gabi for breakfast at the Atrium Breakfast Buffet, on the bottom floor of the Cliff Lodge.  This place continues to impress me: just check out the <a href="http://www.algorithm.com.au/gallery/usa2004/IMG_2462">view</a> from the Atrium to see what I mean.  How often do you get to have breakfast with that kind of a view?  And the breakfast buffet was <em>good</em>, too: I had lots of bacon, 2 sausages, scrambled eggs, watermelon, grapes, pancakes with maple syrup (yep, pancakes on buffet, freaking awesome), and to top that all off, about 10 pieces of salmon.  I was full after that.  I mean, really full.  As in, I was walking around exclaiming &#8220;man, I&#8217;m full&#8221;.  That kind of full.  I think I might just have to do this breakfast buffet thing again tomorrow: for $13, I&#8217;m fairly certain it beats room service, and I don&#8217;t think there are too many other breakfast places around.</p>

<p>The conference itself started at 9: I won&#8217;t bore non-programmers with the details here; if you&#8217;re interested, see the <a href="http://www.algorithm.com.au/mt/icfp_2004/"><span class="caps">ICFP </span>archive</a> for my notes about the actual talks.  The succinct summary, though, is that they were very good, and the invited talk by John Launchbury on industrial use of functional programming was excellent.  After the morning talks, we headed out to lunch at Snowbird Central, which is a five minute walk away from the Cliff Lodge.  Lunch was buffet-style standard conference food: not too bad nor not too good.  That&#8217;s <span class="caps">OK,</span> I&#8217;ll just have ultra-yummy breakfasts at the Atrium instead :-).  The talks after lunch were OK: I think I nodded off a few times in the talk straight after lunch, but my excuse for that is that it was straight after lunch :).  (I&#8217;m glad that our talk isn&#8217;t straight after lunch!)</p>

<p>I skipped out on the last two talks in the afternoon since I glanced at the abstracts for them, and either had absolutely no idea what on earth they were talking about, or just plain not interested.  (Sorry, backtracking theory just doesn&#8217;t turn me on that much!)  After the session concluded, we did the geek-circling thing and chatted to each other for a while, and decided to meet at the Keyhole Junction restaurant for dinner that night, where Manuel, Gabi, Leon and I ate at the night before.  I wasn&#8217;t complaining in the least since my steak burger was pretty good, but we ended up going to the Aerie Bar for food since the Keyhole was absolutely packed.</p>

<p>Food at the Aerie was pretty average: I had a caesar salad with some slightly-too-hard croutons, but I did have a pretty decent American wheat beer named Pyramid Kezef &#8230; Kezefasomething.  Andy Moran (who works at Galois Connections) gave me a quick rundown on American beers: in a nutshell, all the big commercial beers (e.g. Bud, Miller) suck hard, and there are lots of smaller breweries around which try to imitate the big breweries; they also suck.  However, there are plenty of microbreweries around (mostly in the north west of the <span class="caps">US, </span>apparently) which do produce some very good beer.  I guess an analogy with Australian beers would be Fosters and VB (the big breweries) vs Coopers and James Squire (smaller breweries).  Utah also has some interesting liquor laws: it seems that you cannot order alcohol at a restaurant unless you also order food to go with it, and they&#8217;re not legally allowed to give you the alcohol list unless you specifically request it.</p>

<p>Dinner was pretty good: I was chatting to Andy Moran and his fianc&Egrave;, Don, and Simon Marlow for most of the night, mostly about non-geek stuff like Portland and how nice it is to have mountains as a backdrop for a city.  The atmosphere was very relaxed and comfortable, and I think everyone headed to bed after that since they were all quite tired, myself included.  So, end day 1 of <span class="caps">ICFP.  </span>&#8216;twas good.</p>]]></content:encoded></item><item><title>ICFP Day 1 Wake-Up Music</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-20T22:08:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/853340b07582192df4db58ba0910a4a0-338.html#unique-entry-id-338</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/853340b07582192df4db58ba0910a4a0-338.html#unique-entry-id-338</guid><content:encoded><![CDATA[<p>Ah, wake-up music.  There&#8217;s nothing quite like having good wake-up music for getting into the Zone at 6:30am:</p>


<ul>
<li>Sarah McLachlan: World On Fire, from Afterglow</li>
<li>Delerium: Love, from Chimera</li>
<li>The Beloved: Sweet Harmony (Live the Dream mix), from Delicious the Album</li>
<li>CJ Bolland: The Tower of Naphtali, from Electronic Highway</li>
<li>Dido: Sand in my Shoes, from Life for Rent</li>
</ul>]]></content:encoded></item><item><title>Griffin SightLight</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2004-09-21T05:22:22-07:00</dc:date><link>http://algorithm.com.au/blog/files/519d266bf9e44104a82c1429eb3ec595-339.html#unique-entry-id-339</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/519d266bf9e44104a82c1429eb3ec595-339.html#unique-entry-id-339</guid><content:encoded><![CDATA[<p>If you travel alot and want to be able to video conference with iChat AV properly, the <a href="http://www.griffintechnology.com/products/sightlight/">Griffin SightLight</a> is an awesome little gadget.  I&#8217;ve now had numerous iChats which would have been crap without the SightLight, and worked very well thanks to it.</p>]]></content:encoded></item><item><title>ICFP Day 1 Hacking and Wind Down Music</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-23T21:03:04-07:00</dc:date><link>http://algorithm.com.au/blog/files/5fa2e07b640fd76cb0432bbd58dbbf10-340.html#unique-entry-id-340</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5fa2e07b640fd76cb0432bbd58dbbf10-340.html#unique-entry-id-340</guid><content:encoded><![CDATA[<p>(Guess where the &#8220;winding down&#8221; stage started)</p>


<ul>
<li>The Future Sound of London: Expander, from Accelerator</li>
<li>Orbital: Doctor Who, from The Altogether</li>
<li>Satoshi Tomiie: Up in Flames, from Gatecrasher: Disco-Tech</li>
<li>Bedrock: Heaven Scent, from Gatecrasher: Disco-Tech</li>
<li>Alaska: Sacrifice, from Gatecrasher: Disco-Tech</li>
<li>Chicane: Live at Palladium (yeah, the whole thing)</li>
<li>Yoko Kanno: Sweet Feather, from Macross Plus <span class="caps">OST</span> 2</li>
<li>Dido: Here with Me, from No Angel</li>
</ul>]]></content:encoded></item><item><title>ICFP&#x2c; Days 2 and 3&#x2c; and the Haskell Workshop</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-23T21:05:37-07:00</dc:date><link>http://algorithm.com.au/blog/files/5b0592568600f09c0090a7b36f24e190-341.html#unique-entry-id-341</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5b0592568600f09c0090a7b36f24e190-341.html#unique-entry-id-341</guid><content:encoded><![CDATA[<p>The last three days of Snowbird have been pretty routine: breakfast, conference, dinner, sleep.  I&#8217;m not saying the routine&#8217;s bad, of course; quite the opposite.  Breakfast at the Atrium has been awesome every single day.  Who can go past a breakfast buffet of bacon, sausages, poached eggs, (lots of) salmon, pancakes, french toast, fruits, an exhilarating view, and the company of Manuel, Gabi and cute liddle Leon?  I found the talks at <span class="caps">ICFP </span>pretty good, and the Haskell Workshop talks were great; there wasn&#8217;t a single boring talk from the latter.  I did skip a couple of talks at <span class="caps">ICFP </span>to mingle with the other conference attendees, do a bit of shopping and/or general admin stuff (like confirming flights etc).</p>

<p>There&#8217;s a pretty amusing <a href="http://www.algorithm.com.au/gallery/snowbird2004/IMG_2494">picture</a> which was taken when I skipped one talk to hang out with Don Stewart, Ganesh Sittampalam and Arthur Baars.  Since I was the only one who paid to get Internet access at the Cliff Lodge, I of course decided to share my much-loved Internet connection with Don and Arthur.  So, half a minute later, there was an ethernet cable running from my Powerbook to Don&#8217;s Thinkpad laptop, and another Apple-white Firewire cable running from my laptop to Arthur&#8217;s Powerbook.  (If you&#8217;ve never tried networking via Firewire, it works very well, and even works between Mac OS X and Windows.)  To top it all off, Arthur was using my shared Internet connection to talk to his dad back in Holland on a bluetooth headset via <a href="http://www.skype.com/">Skype</a>.  The Internet still amazes me sometimes!</p>

<p>While at the conference, I managed to meet lots of new people: the whole mob from Chalmers University in Sweden (Pete, why didn&#8217;t you come along you slacker?), guys from Melbourne Uni and the National University of Singapore, the Oxford/Cambridge/York folks, and of course I met up with some old friendly faces too.  My alcohol-loving friends will be proud to hear that I drunk at least one beer every night: from memory, I had a Pyramid Kezefasomething (see last blog entry for details :-), Sapporo, Becks, and two Pilsner Urquells, not necessarily in that order.  There was a funnily-titled beer named Polygamy (which came with the amusing subtext of &#8220;Why have just one?&#8221; printed on its label), but I wasn&#8217;t game to try it: funny name, but probably tastes like crappy American.  Will have to ask the Swedish folks to see if they liked it or not.</p>

<p>Probably Snowbird&#8217;s only small disappointment is that there aren&#8217;t very many restaurants around: amongst the four hotels there, there are six or so restaurants.  This would be OK if the food was amazing (like the High Plains Lodge at Dinner Plain), but it&#8217;s not amazing: the food&#8217;s rather average.  Not a big problem, but I imagine the food might get a tad boring after a week or more.  Apparently lots of people head down to Salt Lake City during the ski season to sample the finer foods that Utah has to offer.</p>

<p>The only real tourist stuff I did was take the tram up to the top of Hidden Peak mountain, along with Don, Arthur, Ganesh, Tom and Duncan.  Hidden Peak had an elevation of 11,000 feet, and was completely white with snow when we got there. Crazy Tom was only wearing a t-shirt up there, which made him quite the Man considering it was 20 degrees fahrenheit.  Quite a few people also decided to skip some <span class="caps">ICFP </span>talks and hike up there during the daytime, which takes around 3 hours, but I wasn&#8217;t quite passionate enough about hiking to do that.  Check out the <a href="http://www.algorithm.com.au/gallery/snowbird2004?page=2">photo gallery</a> for some pictures of Hidden Peak, though.</p>

<p>So, overall, Snowbird was fantastic: <span class="caps">ICFP&#8217;04 </span>was pretty good, the Haskell Workshop was excellent, and breakfast (very important), the accommodation, the social life, and the view were all awesome.  I&#8217;m <em>so</em> coming back here one day.</p>

<p><span class="caps">P.S. </span> I&#8217;ve decided not to post notes about the talks <span class="caps">ICFP&#8217;04 </span>on my public website, since I don&#8217;t really want to offend any of the speakers by saying who was crap ;-).  Email me if you&#8217;re really interested about the talks.</p>

<p><span class="caps">P.P.S. </span> Adrian, you&#8217;ll be glad to know that I asked around about Suddenly 30, and the general consensus was that if, indeed, a guy asked another guy to see it, most people I asked thought that former guy would indeed be unequivocally gay.</p>]]></content:encoded></item><item><title>Frequent Flyers&#x27; Tip: Non-check-in Baggage</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-23T21:06:22-07:00</dc:date><link>http://algorithm.com.au/blog/files/5305228e111ebe23bcc9c6883cef74f1-342.html#unique-entry-id-342</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5305228e111ebe23bcc9c6883cef74f1-342.html#unique-entry-id-342</guid><content:encoded><![CDATA[<p>It seems that at least United Airlines lets you bring &#8220;medium-size&#8221; carry-on bags.  By &#8220;medium-size&#8221;, I mean bigger than a backpack, but smaller than a suitcase.  Instead of checking them in, bring them through security and to the gate.  When you board, you can get a little green ticket, and pass the bag to some dude on the passageway to the plane.  So you don&#8217;t actually bring the back with you to the cabin, but the nice thing is that you can pick up the bag right outside the door of the aircraft, rather than having to go to baggage claim and waiting nine hours for your bag to (not?) turn up.  I don&#8217;t know if this applies to US domestic flights, all flights, or just United, but it&#8217;s a neat party trick.</p>]]></content:encoded></item><item><title>On-The-Go Playlist from Salt Lake City to Los Angeles</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-23T21:06:57-07:00</dc:date><link>http://algorithm.com.au/blog/files/daa04c14c9fe4102bfce747e7ad4d2d7-343.html#unique-entry-id-343</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/daa04c14c9fe4102bfce747e7ad4d2d7-343.html#unique-entry-id-343</guid><content:encoded><![CDATA[<p>Hmm, looks like I&#8217;m in a heavy heavy rhythm mood today:</p>


<ul>
<li>Tool: Eulogy, from Aenima</li>
<li>Tool: Stinkfist, also from Aenima</li>
<li>James Brown: Ain&#8217;t it Funky Now, from Love Power Peace: Live at Olympia</li>
<li>The Prodigy: Break &amp; Enter, from Music for the Jilted Generation</li>
<li>Iio: Rapture (Armin van Buuren mix)</li>
<li>Jaded Little Pill: Accelerator (Hybrid mix), from Remix and Additional Production By &#8230;</li>
<li>Energy 52: Caf&Egrave; del Mar (Hybrid remix), from Remix and Additional Production By &#8230;</li>
<li>Nev&Egrave;: Sacrifice (Starecase remix)</li>
<li>Juno Reactor: Conga Fury (Animatrix mix), from Animatrix: The Album.  (Incidentally, the Animatrix mix is far better than the version on Bible of Dreams, <span class="caps">IMHO.</span>)</li>
</ul>]]></content:encoded></item><item><title>Life is Good</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-29T16:32:36-07:00</dc:date><link>http://algorithm.com.au/blog/files/947900d4f34759d16da8571f2e504715-344.html#unique-entry-id-344</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/947900d4f34759d16da8571f2e504715-344.html#unique-entry-id-344</guid><content:encoded><![CDATA[<p>Blog updates soon, I promise.  In the meantime, since I&#8217;m sure you all miss me (hallo?), here&#8217;s what I&#8217;ve been up to in a nutshell:</p>

<p><img src="http://www.algorithm.com.au/albums/toronto2004/IMG_2608.sized.jpg"/></p>]]></content:encoded></item><item><title>Los Angeles: Shopping&#x2c; Shopping&#x2c; Shopping</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-30T09:27:46-07:00</dc:date><link>http://algorithm.com.au/blog/files/d1d96f0de4da949a3196655e5e5c130a-345.html#unique-entry-id-345</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d1d96f0de4da949a3196655e5e5c130a-345.html#unique-entry-id-345</guid><content:encoded><![CDATA[<p>First, my apologies for not writing any blog entries in the past half a week.  I&#8217;ve just been having quite a lot of fun, and have been rather tired (as in, falling asleep in 5 minutes) every day after coming back home and chatting with <a href="http://www.dilabs.net/">Dominic and Zoe</a>.  But before I jump ahead and start yabbering about what I&#8217;ve been doing in Toronto for the last few days, first, Los Angeles &#8230;</p>

<p>Mmm, the City of Angels, with unique Calcium Water&#8482;, freeways which defy belief and reason, and lots and lots of good, hard shopping.  Next time I come to Los Angeles, I&#8217;ll be sure to bring at least two bags, because the one poor duffle bag I&#8217;ve brought along this trip just went from about 70% full to about 92% full, mostly consisting of new gadgets and new clothes (although it would be about 10000% full if I could buy out the entirety of <a href="http://www.brookstone.com/">Brookstone</a> &#8212; man, that store is so evil).  I&#8217;m quite scared thinking about how much money I spent only going to <a href="http://www.frys.com/hisframe.html">Fry&#8217;s</a>, the <a href="http://www.beverlycenter.com/">Beverly Center</a>, and <a href="http://www.thegrovela.com/">The Grove</a>; that list doesn&#8217;t even include the two usual shopping malls I venture to whenever I hit <span class="caps">L.A. </span>(<a href="http://www.westsidepavilion.com/">Westside</a> <a href="http://www.seeing-stars.com/Shop/CenturyCity.shtml">Century City</a>).  Somehow, I managed to restrain myself to buying no more than about 7 new items of clothing (a-ha, but not all of them are for me!), and less than <span class="caps">USD</span>$350 worth of gadgets.</p>

<p>What to do when you have clothing stores such as Banana Republic, Club Monaco, and of course, Victoria&#8217;s Secret (yeah baby)?  Not to mention other stores such as the Sony Store, Borders, Barnes and Nobles, and real Apple Stores (transparent staircases, yum!), all selling stuff that&#8217;s far less than you could get stuff back home in Sydney, if you can in fact get the thing in Sydney at all!  Since describing what clothes I got would make me look like a girl (along with watching <a href="http://imdb.com/title/tt0337563/">Suddenly 30</a>, of course), I won&#8217;t bore you with those details.  Instead, I&#8217;ll bore you with what gadgets and goodies I got instead:</p>


<ul>
<li>A very very tiny Vakoss <span class="caps">USB </span>hub, (as in, it&#8217;s just a tiny bit bigger than a CompactFlash card) because everybody needs a <span class="caps">USB </span>hub.  Hey, at $10, I think I was quite justified!</li>
</ul>




<ul>
<li>A 5-1 in one flash card reader, which reads the usual plethora of memory card formats, but it&#8217;s a <span class="caps">PCMCIA </span>card, so it&#8217;s much smaller than other flash card readers.  As a cool bonus, it has a <span class="caps">PCMCIA </span>to <span class="caps">USB </span>adapter, so in case you&#8217;re not   working with a laptop (_as if_ you wouldn&#8217;t have a laptop, haw), you can still use it anyway.</li>
</ul>




<ul>
<li>Another classy 4-in-1 pen.  Gotta have more clasy 4-in-1 pens.  (Those of you who went with me on the ski trip this year will know exactly why I want another 4-in-1 pen :-).  Black pen, highlighter, 0.5mm, and stylus.  Wicked.</li>
</ul>




<ul>
<li><a href="http://www.amazon.com/exec/obidos/tg/detail/-/B00024I18W/103-6795994-6708612?v=glance">Ghost in the Shell, Standalone Complex</a> <span class="caps">DVD,</span> Episodes 1-4, Special Edition, with accompanying CD soundtrack by <a href="http://www.jameswong.com/ykproject/">Yoko Kanno</a> (all praise her).</li>
</ul>




<ul>
<li>A Brookstone blue &amp; white <span class="caps">LED </span>torch which is small enough to fit on your keyring.  Like a Maglite, but <span class="caps">LED</span>s never break unlike torch bulbs.  Hooray!</li>
</ul>




<ul>
<li>A mini tripod.  Who doesn&#8217;t need a mini tripod, I tell you?  I should probably mention it was about A$10.  I was very happy considering I saw the exact same model in another store for $25.  Glee.</li>
</ul>



<p>I also got a Logitech Mouseman Traveler, which was unfortunately broken, so I had to return that.  I also bought and returned an <a href="http://www.iomega.com/na/products/product_detail.jsp;IomegaProdComSession=Baz1VQ1vgNpi1EQgNRH6ToxsUHHbGqgmCIy5XWx61zwEWNBkW85m!-429219364!-1817048987!7005!7002!1615656010!-1817048988!7005!7002?PRODUCT%3C%3Eprd_id=18014083&amp;FOLDER%3C%3Efolder_id=3037523&amp;ASSORTMENT%3C%3East_id=63191&amp;bmUID=1096430399260">Iomega Micro Mini</a> 256MB <span class="caps">USB </span>flash drive, but returned that too, because I really wanted the 512MB or 1GB version.  The Micro Mini is awesome, though: it&#8217;s the first flash drive I&#8217;ve seen that really is small enough to fit on your keychain.</p>

<p>Other than the shoppingness of <span class="caps">L.A.,</span> I&#8217;ve of course been enjoying myself catching up with my cousins.  I also played the first real game of tennis I&#8217;d played in a long time, and let me give you some advice: <em>never</em> play tennis (or basketball, or any other high-impact sport) in crappy $10 shoes.  Your knees will be whimpering for a while.</p>

<p>So, Los Angeles has been fun, as always.  I&#8217;ll have to come back next time with 2 nice large suitcases, and a bigger credit card limit &#8230;</p>]]></content:encoded></item><item><title>On Windows Marketshare</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-09-30T10:19:33-07:00</dc:date><link>http://algorithm.com.au/blog/files/ec1565c8a4c4305c6e41f8fe089e1d21-346.html#unique-entry-id-346</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ec1565c8a4c4305c6e41f8fe089e1d21-346.html#unique-entry-id-346</guid><content:encoded><![CDATA[<p><a href="http://daringfireball.net/">John Gruber</a> writes a good article titled <a href="http://daringfireball.net/2004/09/windows_vs_world">Windows Versus the World</a>:</p>

<blockquote><p>Most regular people don&iacute;t even realize that there <em>exist</em> any choices other than Windows. It&iacute;s not they haven&iacute;t heard of Apple or Linux, but that they don&iacute;t really understand what they are. Part of Apple&iacute;s stated reasons for launching their own retail initiative a few years ago was simply to raise awareness that the Mac even is an alternative to Windows PCs.</p></blockquote>

<p>The article&#8217;s a little bit Apple-centric, but that&#8217;s quite OK considering that John&#8217;s blog is largely about Macs.  I think he&#8217;s completely right that desktop Linux distributions will start overtaking Macintosh marketshare in the next few years, though (if it hasn&#8217;t already).</p>]]></content:encoded></item><item><title>Toronto&#x2c; Pt 1</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-30T12:55:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/b0808c3d270f32c34c46c139740add39-347.html#unique-entry-id-347</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b0808c3d270f32c34c46c139740add39-347.html#unique-entry-id-347</guid><content:encoded><![CDATA[<p>My flight from Los Angeles to Toronto was thankfully rather uneventful, which meant no free upgrades to business or first class (yeah, like <em>that</em> was going to happen), but no baggage lost or overbooked flight either, which is equally as good.  I landed at the inappropriately-named <span class="caps">YYZ </span>airport on time, picked up luggage, and met up with the ever-fun <a href="http://www.dilabs.net/">Dom and Zoe</a>, who I haven&#8217;t seen in nearly two years.  They have an absolutely lovely place right in the heart of downtown Toronto, but it&#8217;s in a quiet area since it&#8217;s on one of the rare one-way streets in the city.</p>

<p>Toronto is lovely: its downtown is segregated into a number of districts, such as the fashion district, the entertainment district, the financial district, the distillery, Chinatown and little Italy.  Dom and Zoe&#8217;s place is in the middle of the fashion district, which borders the entertainment district, Chinatown, and the financial district: i.e. absolutely perfect for me.  The fashion district provides plenty of shopping opportunity, the entertainment district provides, well, entertainment, Chinatown provides awesome cheap food, and the financial district provides lots of commercial shops to check out.  Downtown looks much like New York and feels a bit like it too: square blocks, lots of commercial shops, food places and caf&Egrave;s interspersed with each other, and an energetic, alive atmosphere.  Outside of downtown, I&#8217;ve ventured out to Danforth Av, a.k.a. the Greek district, a.k.a. the place where they filmed My Big Fat Greek Wedding (a totally excellent movie, err, or so I&#8217;ve been told).</p>

<p>One thing which is a contrast between Toronto and Sydney (or even Australia in general) is that stuff in general is cheap: a very filling meal can be had for around $7, compared to around $10 for the same thing in Australia.  Clothes, electronics, CDs, etc are all significantly cheaper.  About the only thing which is similar to Sydney&#8217;s prices is renting a place (not to be confused with buying a place, which <em>is</em> cheaper).  But in general, your dollar goes a lot further here than in Australia, even with the 15% <span class="caps">GST </span>which isn&#8217;t included in the prices.</p>

<p>Speaking of dollars, I managed to find quite a few goodies in the city, including quite a few CDs:</p>


<ul>
<li>Amon Tobin: Live in Melbourne</li>
<li>Juno Reactor: Odyssey 1992-2002</li>
<li>The Best of Delerium</li>
<li>Satoshi Tomiie &amp; Hector Romero: Undulation 1</li>
<li><span class="caps">LTJ</span> Bukem: Earth, Limited Edition CD+DVD</li>
</ul>



<p>and also Saturday Night Live: The Best of Will Ferrell (Volumes 1 and 2) and Christopher Walken, and to top it all off, quite a number of new <a href="http://www.jormungand.de/">Luis Royo</a> books and portfolios.  Yeah baby.</p>

<p>Our night life mostly consists of chilling at home watching movies and venturing out for some supper or tea, although we did watch Resident Evil 2 the other night since one of the guys that Dom works with did the special effects for it.  Total schlockfest, but so much fun &#8212; especially if you like seeing Milla Jovovich and similarly sexy girls going kung-fu on zombies, which I <em>quite</em> like.  We also saw Dr. Strangelove, which is even more amusing the second time around.</p>

<p>I&#8217;ve also been managing to mix play with work: making some (slow) progress on making a proper <a href="http://www.xinehq.de/">xine</a> framework build on Mac OS X.  But for now, I&#8217;m about to head out to CN Tower and see if I remember anything from my visit there when I was a young&#8217;en.  Tomorrow, I&#8217;m hopefully meeting <a href="http://www.kfunigraz.ac.at/imawww/thaller/wolfgang/aboutme.html">Wolfgang Thaller</a> in Hamilton to talk Haskell geek stuff, and buggered if I know what I&#8217;m doing on the weekend (besides heading out to Boston for Monty&#8217;s on Sunday, that is).  Coming soon!</p>]]></content:encoded></item><item><title>Music to Eat Strawberry &#x26; Ice Cream Waffles To</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-30T12:56:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/e5e2e13e0e7c33cfbde1b51bd95688ab-348.html#unique-entry-id-348</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e5e2e13e0e7c33cfbde1b51bd95688ab-348.html#unique-entry-id-348</guid><content:encoded><![CDATA[<p>Or, music to enjoy on a beautiful Toronto morning:</p>


<ul>
<li>Dido: White Flag, from Life for Rent</li>
<li>Dido: Stoned, from Life for Rent</li>
<li>Energy 52: Caf&Egrave; del Mar (Solar Stone remix)</li>
<li>Way Out West: The Gift (Club remix edit), from Elven Sundays</li>
<li>Andrew Sega (a.k.a. Necros): Orchard Street, from Elven Sundays</li>
<li>Donna Lewis: I Love You Always Forever, from Elven Sundays</li>
<li>Orbital: Halcyon+On+On (edit), from Elven Sundays</li>
<li>Chicane: Autumn Tactics (Chicane&#8217;s End of Summer edit), from Elven Sundays</li>
<li>Enzso &amp; Boh Runga: One Step Ahead, from Elven Sundays</li>
<li>Delerium: Love (featuring Zoe Johnston), from Chimera</li>
<li>Sarah McLachlan: Path of Thorns (live), from Mirrorball</li>
<li>Paul Oakenfold: Southern Sun (DJ Ti&Icirc;sto remix)</li>
<li>Dido: Don&#8217;t Leave Home</li>
</ul>]]></content:encoded></item><item><title>Breakfast is Good</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-09-30T16:42:00-07:00</dc:date><link>http://algorithm.com.au/blog/files/7892be1594293f9dfb090414fde8d75f-349.html#unique-entry-id-349</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7892be1594293f9dfb090414fde8d75f-349.html#unique-entry-id-349</guid><content:encoded><![CDATA[<p>Yum:</p>

<p><img src="http://www.algorithm.com.au/albums/toronto2004/IMG_2609.sized.jpg"/></p>

<p>That is all.</p>]]></content:encoded></item><item><title>Haskell&#x27;s Performance</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-10-06T09:47:30-07:00</dc:date><link>http://algorithm.com.au/blog/files/36ca9a664954e680edb64d260d763252-350.html#unique-entry-id-350</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/36ca9a664954e680edb64d260d763252-350.html#unique-entry-id-350</guid><content:encoded><![CDATA[<p><a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;c2coff=1&amp;safe=off&amp;th=23a053364bff630a&amp;rnum=2">This thread</a> (still currently active at the time of writing this blog entry) on the <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe"><em>haskell-cafe</em></a> mailing list is a nice example of the one big, major problem I have with Haskell: performance.</p>

<p>To summarise the thread, the infamous <a href="http://shootout.alioth.debian.org/">great language shootout</a> (which is only infamous if you&#8217;re into alternative languages like Haskell, which get their asses handed to them in microbenchmarks for varying numbers of silly reasons) showed that Haskell placed last in the <a href="http://shootout.alioth.debian.org/bench/wc/">word count test</a>.  (Note that the benchmark results have since been updated with a new <span class="caps">GHC</span>-specific version of the solution, which is <em>far</em> uglier, but also about 60x faster than the original version.)  The Ocaml guys <a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;c2coff=1&amp;safe=off&amp;selm=fa.f6p8taq.1g7enim%40ifi.uio.no">went to town</a> on this result, and of course claimed that Haskell was dreadfully inefficient, with a half-condescending remark at the end that &#8220;Haskell&#8217;s approach has been expensive in terms of performance&#8221;.  The Haskell community ignites, and comes up with a version within a day or two that is twice as fast as <span class="caps">GNU </span><code>wc@, which is more or less on par with the Ocaml @wc</code> version.  This is good.  However, two rather bad things stand out to me:</p>


<ul>
<li>Malcolm Wallace&#8217;s <a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;c2coff=1&amp;safe=off&amp;selm=fa.jd0827s.19k2iju%40ifi.uio.no"><em>Space leak or what?</em></a> post.  Sure, Haskell has a space leak here.  The problem is, you don&#8217;t notice these space leaks unless you&#8217;re an expert Haskell programmer.  (I certainly can&#8217;t tell that code has a space leak, and I&#8217;ve been using Haskell for quite a while now.)  The bigger problem is how to <em>fix</em> those space leaks.</li>
<li>The final solution to the <code>wc@ program submitted for the contest &quot;looks like a goat&quot;:http://shootout.alioth.debian.org/lang/ghc/wc.ghc.html.  Why should I have to use @unsafeRead</code> (and thus potentially destroy any guarantees that Haskell&#8217;s awesome type system gives me) to get decent performance out of this thing, and why do I need to resort to <code>IOUArray</code> and lots of uses of <code>seq</code>?  Compare the <a href="http://shootout.alioth.debian.org/lang/ghc/wc.ghc.html">Haskell version</a> to the <a href="http://shootout.alioth.debian.org/lang/ocaml/wc.ocaml.html"><span class="caps">O&#8217;C</span>aml version</a>, and draw your own conclusions about which is more declarative, high-level, and most importantly, which one doesn&#8217;t require an expert in the language to write.</li>
</ul>



<p>The main problem I see with all this is that it&#8217;s just too hard for an average Haskell programmer to get good performance out of Haskell.  As people have shown on the <em>haskell-cafe</em> mailing list, you certainly can get very good performance out of Haskell: in plenty of cases, surpassing an equivalent version written in C.  However, you can only do that if you&#8217;re a complete Haskell guru, and even then, things start looking really ugly: you might as well just rewrite that part of the program in C and call it via the Haskell Foreign Function Interface.  I think the main cause of this is that Haskell is simply too unpredictable: in most cases, it&#8217;s laziness which causes the unpredictability.  Note that this is different from saying laziness leads to slower performance: this is untrue, because in many cases, laziness can improve performance.  Predictability is the important factor.</p>

<p>For optimisation, you must know what factors are causing things to be slow, otherwise you&#8217;ll be searching in the dark for what bits to optimise.  So, Haskell users will tell you to profile (which is sound advice no matter what language you&#8217;re using).  That&#8217;s fine.  The problem then is you have to know <em>why</em> something is slow, and there&#8217;s where Haskell can get complex.  Is there a space leak?  (Do you even know what a space leak is?)  Is your array strict instead of lazy?  If it&#8217;s strict, is it boxed instead of unboxed?  (Do you even know what unboxing is?)  Can you use <code>unsafeRead</code> instead of <code>readArray</code>?  (Did you know that <code>unsafeRead</code> exists?  I sure didn&#8217;t!)</p>

<p>I think if Haskell were to give the programmer slightly more control (or, in more formal terms, enable the programmer to choose from different operational semantics), Haskell optimisation could be moved from the expert&#8217;s domain to the novice&#8217;s domain.  This is one area where the <a href="http://www.cs.kun.nl/~clean/">Clean language</a> has innovated over Haskell: one may claim that uniqueness types and heavyweight use of strictness/unboxing annotations make Clean programs far less pretty than their Haskell version (and I agree), but if you need speed, you can get it in Clean much more easily in than Haskell.  The language specification gives you more control over what&#8217;s going on; strictness annotations are one example of such a control mechanism.  <span class="caps">GHC </span>does give the programmer access to many new operations intended for optimisation, but in a syntactically-heavy manner, which discourages you from using them.  This is in contrast to Clean, where you can, for example, make an unboxed, strict array just by writing <code>[# 1, 2, 3 !]</code> rather than <code>[1, 2, 3]</code>.  I don&#8217;t know how to make a strict, unboxed array in Haskell without looking up <span class="caps">GHC&#8217;</span>s library documentation.</p>

<p>It&#8217;ll be interesting to see whether the Haskell language itself evolves to plug this problem.  I know I would recommend Haskell rather than <span class="caps">O&#8217;C</span>aml to more people if it made performance optimisation easier.  Note that what I&#8217;m discussing here is convincing a Haskell compiler to give <em>good</em> performance, rather than blazing performance: if you absolutely require blazing performance and nothing else will do, code that small fragment in C or Assembly, and call it via the <span class="caps">FFI. </span> Multi-language approaches are good.  However, the goal is to make it <em>easy</em> to optimise programs from an abysmal run time to a good run time: a run time that you wouldn&#8217;t be embarrassed about demonstrating to non-Haskell folks.</p>

<p><em>Update</em>: This was originally written toward the end of 2004.  I&#8217;m glad to say that things have changed since then: Don Stewart&#8217;s <a href="http://www.cse.unsw.edu.au/~dons/fps.html">Data.ByteString</a> library has nailed the performance gap between Haskell and C for string processing and binary I/O (even beating C occasionally, thanks to <span class="caps">GHC&#8217;</span>s <em>far</em> superior compiler optimisations vs C and gcc), which is arguably the main area where you&#8217;d run into serious performance  problems easily.  <span class="caps">GHC</span> 6.6 has also gained <a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-bang-patterns.html">bang patterns</a> and <a href="http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell">some syntactic sugar for arrays</a>.  (The latter isn&#8217;t quite as nice as Clean&#8217;s strict array syntax, but it&#8217;s a huge improvement.)  Both these features greatly lower the barrier to entry if you&#8217;re trying to coax blazing performance out of Haskell.</p>]]></content:encoded></item><item><title>Toronto&#x2c; Part the Second</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-10-06T14:44:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/4e1a561b857b6f949a6354252a80405a-351.html#unique-entry-id-351</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/4e1a561b857b6f949a6354252a80405a-351.html#unique-entry-id-351</guid><content:encoded><![CDATA[<p>Well, CN Tower isn&#8217;t very exciting when you don&#8217;t ride the elevator to the top.  It is rather impressively tall and everything, but I didn&#8217;t feel like paying the $30 to ride up to the top with no Michelle.  (Cue &#8220;awwww&#8221; sound here.)  Ditto for visiting Niagara falls: I&#8217;m really quite keen to go there, but I&#8217;ll bide my time until I&#8217;m there with the Better Half.  (It&#8217;ll make my experience there more rewarding: yeaaaah, that&#8217;s right!)  So, instead of sightseeing, I mixed with the locals: walked around Toronto a bit more and explored the city during the day, and went to the pub and played pool with some of Dom and Zoe&#8217;s mates.  (I actually lost to Dom at pool, which was apparently quite an effort &#8212; I blame the excellent beer.)  Since we were all feeling a little bit knackered by the end of the night but not quite ready for sleep yet, we sat down to watch The Lion King (the movie, not the play), which was absolutely excellent.  If you haven&#8217;t seen it, &#8216;tis highly recommended: definitely one of Disney&#8217;s finer creations.</p>

<p>I visited Herr Wolfgang Thaller the next day in <a href="http://www.city.hamilton.on.ca/">Hamilton, Ontario</a>, which is about an hour away from Toronto via bus.  I found Hamilton to actually be a little bit more seedy than Toronto, which was odd considering that Hamilton&#8217;s population is much smaller, but it was still felt reasonably friendly and safe.  After a long lunch and coffee (as in, coffee took the entire afternoon), over which much Haskell discussion took place, Wolfgang and I headed back to Toronto to grab some dinner and do some <span class="caps">GHC </span>hacking.  More accurately, I introduced Wolfgang to Vietnamese Beef Noodle Soup (possibly one of the greatest creations known to humankind), and then encouraged him to do <span class="caps">GHC </span>hacking while I surfed the web and reaped the fruits of his labours.  What can I say?  Distributed code development is excellent when you&#8217;re a lazy sod.  We ended up staying up until a respectably late hour (~2am), and the next day, did the geek thing and went gadget shopping.  All I have to say about gadget shopping is: how on <em>earth</em> do those little dozen or so Yum Cha Asian computer sweatshops within about 10 metres of each other manage to stay in business?</p>

<p>And so, that was Toronto.  Cheap, awesome food, got to catch up with Dom, Zoe and Wolfgang, meet some dudes who worked on Lord of the Rings (&#8220;Dudette, do you know who I am?!  I worked on <em>Lord of the Rings</em>!&#8221; works quite well as a pick up line), explore a great city, and generally had myself a ball.  Next stop: Boston!</p>]]></content:encoded></item><item><title>Boston</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-10-06T20:04:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/0de884109cd170c1e62cdb67f95e6e44-352.html#unique-entry-id-352</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0de884109cd170c1e62cdb67f95e6e44-352.html#unique-entry-id-352</guid><content:encoded><![CDATA[<p>Boston&#8217;s a really pretty, quaint little city: a population of 600,000, mostly to support students (including masses of computing geeks who own far too many Powerbooks and iBooks &#8212; more on that later), with gorgeous harbours and peninsulas, and awesome neo-classical architecture which permeates the heart of the city.  <span class="caps">MIT </span>and Harvard would be absolutely fantastic places to study: like Cambridge in the <span class="caps">UK,</span> Boston really makes me wish I was five years younger again, staying at a college, and studying at a great university.  The surroundings really are inspiring, and even though the city is a bit old and squalid in some places, the neo-classical sandstone architecture which forms downtown just gives it a really awesome classical charm.  The public transport system here isn&#8217;t too bad either, despite <a href="http://slashdot.org/article.pl?sid=00%2F08%2F14%2F1034209">Monty</a>&#8217;s attempts to convince me that it&#8217;s a load of crud.  The subway system seems to be quite reasonable, and one interesting design aspect of it is that there&#8217;s about a kilometre between the subway stops located downtown &#8212; meaning that a subway station is never more than about 5 minutes walk away if you&#8217;re in Boston proper.  Very convenient: while that means that trains stop more often in the city, it sure beats Sydney&#8217;s 15-odd minute walk between Town Hall and Central.</p>

<p>So far, Conrad and I haven&#8217;t explored too much, though this is partially because Boston really isn&#8217;t all that big: the population is only around 600,000 people, after all.  We&#8217;ve walked around the city quite a bit, and covered some of Cambridge and <span class="caps">MIT </span>(but not Harvard &#8212; yet).  Since we are officially here on work business, we&#8217;ve both been good boys and done quite a reasonable amount of work during the day.  Rather than hacking at Monty&#8217;s, we&#8217;ve been enjoying the facilities provided by the fine <a href="http://www.diesel-cafe.com/">Diesel Caf&Egrave;</a>: reasonable coffee, wireless Internet access, power points, and comfortable seats for hours of hacking.  I&#8217;ve mostly been working on our (Symbian-based) mobile phone multimedia browser, since we&#8217;re demonstrating tomorrow at <span class="caps">MIT. </span> So, it&#8217;s been hacking during the day with beer and socialising at night.  Not that we&#8217;re reinforcing the Australian stereotyping by bringing back two cases of beer back to the house every day and polishing it off.  (Though I&#8217;ve been a <em>responsible</em> boy and have only been drinking one or two bottles per night, yes sirree.)</p>

<p>For now, it&#8217;ll be a bit more Symbian hacking, and then hopefully we&#8217;ll go visit Harvard tomorrow followed by a big successful demo at <span class="caps">MIT. </span> All good.</p>]]></content:encoded></item><item><title>Boston&#x2c; Part the Second</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-10-09T22:25:51-07:00</dc:date><link>http://algorithm.com.au/blog/files/198502d9842bacdb8c4a5671fe4fc20f-353.html#unique-entry-id-353</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/198502d9842bacdb8c4a5671fe4fc20f-353.html#unique-entry-id-353</guid><content:encoded><![CDATA[<p>You&#8217;ll all be glad (I hope) to know that our presentation at the <span class="caps">MIT</span> Media Lab went quite well.  We spoke with some of the folks there, including <a href="http://web.media.mit.edu/~selker/">Ted Selker</a> (inventor of the beloved (?) red-nosed pointing device popular on the <span class="caps">IBM</span> Thinkpad and Toshiba laptops), <a href="http://web.media.mit.edu/~lieber/">Henry Lieberman</a> and <a href="http://web.media.mit.edu/~bv/">Barry Vercoe</a> (inventor of Csound), and gave a presentation to around 10 people which went quite smoothly.  I definitely felt humbled at <span class="caps">MIT</span>: they have a lot of smart people there, who do a lot of rather smart things.  Whether the media lab is part of the smart group, I&#8217;ll reserve judgement on that and leave that decision for the Internet rumour-mongers ;).</p>

<p>Since that was the major task for the week all over, I&#8217;ve have had two pretty cruisy days on Friday and Saturday: both days involved beer, learning a bit about baseball, exploring Boston, and chatting to Monty.  On Friday lunch (ne&eacute; breakfast), Monty took us to an awesome little Chinese restaurant named Mary&#8217;s, famous for their <a href="http://www.google.com/search?hl=en&amp;lr=&amp;c2coff=1&amp;q=mary+chung+dun+dun+noodles&amp;btnG=Search">Dun Dun Noodles</a>, which were apparently so beloved by the Boston community that they somewhat regularly pack them into dry ice containers for their customers to take on plane flights to other cities.  (True story.  No coincidence that Mary&#8217;s carries the <a href="http://www.improbable.com/">Annals of Improbable Research</a> magazine, I&#8217;m sure.)  On the rest of Friday, Conrad and I visited the <span class="caps">MIT</span> Coop campus store, which, in America, is pronounced &#8220;Kupe&#8221;.  As in, the things which chickens go cluck clik in.  Riiight.  We also visited the Harvard Coop book store (since we were too manly and/or stupid to find the actual Harvard Coop campus store), which disappointingly did not have any <a href="http://www.jormungand.de/">Luis Royo</a> nor <a href="http://en.wikipedia.org/wiki/BattleTech">BattleTech</a> books in stock.  After that, we met up with Monty at home for some Tex-Mex flava dinner, where I had a Corona, a Tequila shot and another beer later on.  It was all good until I was wiped out at eleven o&#8217;clock, and decided to hit the hay early.  (I&#8217;m sure the Tequila had absolutely nothing to do with that, too.)</p>

<p>Today, Conrad went to the <a href="http://live.gnome.org/Boston2004"><span class="caps">GNOME</span> Summit</a> at <span class="caps">MIT, </span>so I&#8217;ll let <a href="http://sully.kfish.org/~conrad/">him</a> tell you about that.  I instead went to the <a href="http://ww11.e-tractions.com/mos/servlet/Gamelet?req=BjEzg%2F5aM3E3tzM6bjEi%2BaO3Q%2FUaBetZt2MJQ41upF1%2F%2BW%2BEQ%2Fdc%2BW%2BPQ%2FoctXM3Q%2FdaK6Frb4H0bA%3D%3D">Lord of the Rings exhibition</a> at the Museum of Science, only to find out that the first ticket available was for 5:15pm.  That turned out to be pretty good timing, since I also wanted to visit the <a href="http://www.cambridgesidegalleria.com/">Cambridgeside Galleria</a> shopping mall and, err, do a bit of window shopping.  Of course, window shopping turned into non-window shopping since I found a <a href="http://www.brookstone.com/">Brookstone</a> store there, as well a <a href="http://www.bestbuy.com/">Best Buy</a>.  All I can say is: I am now the owner of Ghost in the Shell: Standalone Complex, Volumes 1 <em>and</em> 2, special editions.  Awesome.</p>

<p>After non-window shopping, I visited the Museum of Science again to attend the Lord of the Rings Exhibition.  In a nutshell, it was fantastic.  You get to see all the costumes, armour, weapons, models, and behind-the-scenes techniques behind the film, for every character from goblins to Frodo.  It would be worth going to just to see the incredible amount of love and care put into the costumes: the painstaking amount of work done by Three Foot Six Studios and <span class="caps">WETA </span>in New Zealand really are worthy of being exhibited.  (For all the guys, yes, you get to see Arwen&#8217;s gowns, and for all the girls, you can all see Galadriel&#8217;s gowns :-).  Some of the armours, weapons and models take your breath away.</p>

<p>I think it&#8217;s a fitting end to a wonderful week in Boston: closing the week with the exhibition of the revival of a classic tale suits the city so quaintly.</p>]]></content:encoded></item><item><title>Ghost in the Shell: Standalone Complex</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2004-10-09T22:36:22-07:00</dc:date><link>http://algorithm.com.au/blog/files/a2c415c81d01a174a43a0327324e4aaa-354.html#unique-entry-id-354</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/a2c415c81d01a174a43a0327324e4aaa-354.html#unique-entry-id-354</guid><content:encoded><![CDATA[<p>I&#8217;ve seen Volumes 1 and 2 now, and it&#8217;s looking like it&#8217;s going to be a <em>really</em> good anime series.  It&#8217;s rather difficult to compare it to the quintessential <a href="http://www.futureblues.com/">Cowboy Bebop</a> series since I haven&#8217;t got to the ending yet (and Bebop went from <em>great</em> to <em>awesome</em> after seeing its memorable ending), but the episodes so far seem to set up a very, very promising storyline indeed.</p>

<p>Aside from that, the theme song (&#8220;Inner Universe&#8221;) by <a href="http://www.jameswong.com/ykproject/">Yoko Kanno</a> just absolutely rips. Her soundtrack for Cowboy Bebop showed that she&#8217;s a genius, and her consistent, continued awesomeness in the soundtrack for Standalone Complex shows she&#8217;s a true prodigy.  Arguably one of the best musicians of this entire century, in my totally overrated opinion.</p>]]></content:encoded></item><item><title>New York&#x2c; Sunday to Tuesday</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2004-10-14T10:04:44-07:00</dc:date><link>http://algorithm.com.au/blog/files/5fdf9cd246f2f4f36f9e49e2dec03ca8-355.html#unique-entry-id-355</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5fdf9cd246f2f4f36f9e49e2dec03ca8-355.html#unique-entry-id-355</guid><content:encoded><![CDATA[<p><a href="http://sully.kfish.org/~conrad/">Conrad</a>, <a href="http://www.flea.org/">Felicity</a> and I took an Amtrak train from Boston to New York without any dramas, which is nearly always a good thing when you&#8217;re travelling.  One  nice thing about taking the train (apart from missing the ten-hour airport queues and security checkpoints) is that you get to see all the gorgeous scenery along the way.  Since it&#8217;s autumn in the <span class="caps">USA </span>right now, I got some very picturesque scenery of gorgeous brown and yellow tree leaves.  I unfortunately didn&#8217;t see any autumn-like scenery in Boston, since the city&#8217;s a bit too warm for the browning leaves, so all the nice autumnness is out in the countryside.  Mmm, soothing scenery good.</p>

<p>We unloaded at Penn(sylvania) Station in New York City on 34th Street: I was planning to catch a taxi to my hotel (on 77th and Broadway), but since Flea is a native New Yorker and knows the subway lines pretty well, navigating the subway to the hotel was simple with her help.  I&#8217;m <em>really</em> impressed by New York&#8217;s subway system: trains tend to be very much on time, there are subway stops very frequently (at least in Manhattan), there are lots of signs posted up everywhere telling you what platform you&#8217;re on and what platforms you can transfer to, transferring is really simple, and the trains are <em>fast</em>.  (Express trains actually run on a completely separate line rather than sharing a line with slower trains; what a concept! :-)  It looks like the designers of the subway managed to make it cope with the population increase very well: in the few times that we&#8217;ve caught the subway in rush hour, the trains weren&#8217;t all that full, and trains came once every two or three minutes.  If only Sydney had a subway system to match New York&#8217;s!</p>

<p>As for the actual <a href="http://www.mm2004.org/">conference</a> that we&#8217;re attending here, that&#8217;s been great so far.  Conrad and I gave a demo and a poster session (short paper) on Tuesday, and both of them went well: we had over a dozen people talk to us in the demo session, of which a few seemed genuinely interested in the <a href="http://www.annodex.net/">work we&#8217;re doing</a>, and around ten people visit us in the poster session.  I also managed to finish off an initial implementation of what hand-wavingness we were discussing in our short paper about 10 minutes before the poster session started, which ruled.  Flying by the seat of your pants is always fun.  There were some very cool other posters and demos around, too, including a very cool one on graphing relationships between various sorts of music and musicians (which was admittedly mostly very cool because it was graphing relationships between bands I like, such as DJ Shadow and Faithless &#8230;).  There was even one poster was on algorithms for maintaining consistent global state for online multiplayer games; buggered if I know what that has to do with multimedia, but it was appropriately awesome, nevertheless.</p>

<p>Columbia University, where the conference is being hosted, is gorgeous.  I promise I&#8217;ll put some photos up in my <a href="http://www.algorithm.com.au/gallery/usa2004">gallery</a> soon, but for the time being, I can try to summarise it as: renaissance-like, neo-classical, generally pearl-white coloured, peaceful, inspiring feel.  Like Cambridge, <span class="caps">MIT </span>and Harvard, it makes me wish I was five years younger and doing an undergraduate degree again. :)  (Though New York isn&#8217;t quite as much of a <a href="http://www.google.com/search?q=meat+market+colloquial&amp;ie=UTF-8&amp;oe=UTF-8">meat market</a> as Boston is.  Very important factor, you know.)</p>

<p>Anyhoo, now that all our demos and presentations for the conference are over, we can wind down a bit and relax: attend the conference (and/or satisfy my shopping fix) during the day, and head to the clubs and pubs at night.  We did go out to two cool pubs on Sunday (<a href="http://www.feznyc.com/">Fez</a> and some-other-name-I-can&#8217;t-remember) since it was K&#8217;s birthday that day, but I&#8217;m sure I&#8217;ll be dragged out to be sufficiently intoxicated later in the week too.  Yay, work bit over, time to play!</p>]]></content:encoded></item><item><title>For the price of one ink cartridge</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2004-10-26T07:50:11-07:00</dc:date><link>http://algorithm.com.au/blog/files/56eab34319574224123ff7e0d0a925a3-356.html#unique-entry-id-356</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/56eab34319574224123ff7e0d0a925a3-356.html#unique-entry-id-356</guid><content:encoded><![CDATA[<p><a href="http://www.codepoetry.net/archives/2004/10/23/an_ounce_of_ink.php">I can buy 7 gallons of motor oil</a>.</p>]]></content:encoded></item><item><title>fork: Resource temporarily unavailable</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-11-01T23:46:50-08:00</dc:date><link>http://algorithm.com.au/blog/files/6b8177327214bc5567a3afc141dd0799-357.html#unique-entry-id-357</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6b8177327214bc5567a3afc141dd0799-357.html#unique-entry-id-357</guid><content:encoded><![CDATA[<p>If you&#8217;re seeing the above error on Mac OS X, see <a href="http://www.macosxhints.com/article.php?story=200311151254441">pdm&#8217;s Mac OS X hint</a> for the quick fix.  For a more thorough explanation, check out John Bellardo&#8217;s page about the <a href="http://ramp.ucsd.edu/~bellardo/darwin/vfork.html"><em>fork</em> and <em>vfork</em> problem in Darwin</a>.  John&#8217;s page also has a neat kernel extension that somewhat fixes the bug, but it didn&#8217;t work for me with Panther (10.3.5), and I was after a really simple fix.</p>

<p><strong>Update</strong>: If you&#8217;re running Mac OS X 10.4 Tiger, there&#8217;s a <a href="http://ruminate.net/pdm/mt/os_x_tips/os_x_tiger_104_process_limits_solution.html">much easier solution</a> that involves (you guessed it) editing a launchd configuration file.</p>]]></content:encoded></item><item><title>Geeky T-Shirt or Wot?</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-11-11T21:09:56-08:00</dc:date><link>http://algorithm.com.au/blog/files/69195f9b3b01d74c2f9411de82704dc1-358.html#unique-entry-id-358</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/69195f9b3b01d74c2f9411de82704dc1-358.html#unique-entry-id-358</guid><content:encoded><![CDATA[<p><img src="http://www.macologist.org/files/frazzled.jpg"/></p>]]></content:encoded></item><item><title>On Language Evolution</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-11-22T02:03:51-08:00</dc:date><link>http://algorithm.com.au/blog/files/efb5a9583f352b9a5be6fd34743b2053-359.html#unique-entry-id-359</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/efb5a9583f352b9a5be6fd34743b2053-359.html#unique-entry-id-359</guid><content:encoded><![CDATA[<p><a href="http://patricklogan.blogspot.com/">Patrick Logan</a> writes an insightful blog entry about <a href="http://patricklogan.blogspot.com/2004/11/more-problems-with-rigid-languages.html">problems with &#8216;rigid&#8217; languages</a>:</p>

<blockquote><p>I am not sure why Python is changing or needs to. But the core language is more limited than Lisp or Smalltalk in the sense that it is &#8220;C&#8221;-like and distinguishes significantly between function calls, operators, and control structures &#8230; A more uniform language would not have as many of these backward-compatibility issues. This is the main issue I have with Python&#8230; it&#8217;s syntax is <span class="caps">OK, </span>but not great for extension.</p></blockquote>

<p>This is also one issue that I have with Haskell (its syntax and semantics aren&#8217;t <em>quite</em> malleable enough for some embedding of domain-specific languages), but I&#8217;ll save that rant for a rainy day.</p>]]></content:encoded></item><item><title>Language Mavens vs Tool Mavens</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-11-27T21:01:25-08:00</dc:date><link>http://algorithm.com.au/blog/files/ef6714cb271a83f08fb68b1a6e434859-360.html#unique-entry-id-360</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ef6714cb271a83f08fb68b1a6e434859-360.html#unique-entry-id-360</guid><content:encoded><![CDATA[<p>Oliver Steele writes an excellent article on <a href="http://osteele.com/archives/2004/11/ides">language mavens vs tool mavens</a>, or: do you use Emacs/Vim+<em>insert obscure language of your choice here</em> vs do you use a mainstream language such as C#/Java with an excellent supporting <span class="caps">IDE, </span>such as Visual Studio or Eclipse?  (Or maybe you use a mainstream language without any sort of <span class="caps">IDE, </span>in which case you&#8217;re doing yourself a great disservice.)  Two quotes I liked from the article:</p>

<blockquote><p>Why can&iacute;t one be a language maven and a tool maven? It&iacute;s hard. One reason is that developers have limited time, especially for learning new skills. You can use any given block of time to master language features, or to master development tools &#8230; in fact, the most powerful languages may initially have the least powerful tool support. The reason for this is that the language developer, like the language adopter, has to make a choice: whether to dedicate limited development resources towards language features, or towards tool support.</p></blockquote>

<p>Kudos to the <a href="http://www.lambda-the-ultimate.com/">Lambda community</a> for <a href="http://lambda-the-ultimate.org/node/view/395">finding the article</a>.</p>]]></content:encoded></item><item><title>Frozen Bubble for Mac OS X</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-11-28T04:19:12-08:00</dc:date><link>http://algorithm.com.au/blog/files/13c0ec2c4ee13ef7923758bb5a790c47-361.html#unique-entry-id-361</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/13c0ec2c4ee13ef7923758bb5a790c47-361.html#unique-entry-id-361</guid><content:encoded><![CDATA[<p>If you&#8217;ve got a weird graphics corruption problem when you try to play Frozen Bubble on Mac OS X that looks like this:</p>

<p><img src="http://www.algorithm.com.au/albums/screenshots/Frozen_BubbleScreenSnapz001_001.jpg"/></p>

<p>Try downloading my patched version of <a href="/files/mac_os_x/Frozen-Bubble.zip">Frozen Bubble</a> which fixes the problem.</p>

<p>Note to hackers: the patch to fix the problem is pretty trivial &#8230;</p>

<pre><code>diff -Nru Frozen-Bubble (Original).app/Contents/Resources/__main__.pl Frozen-Bubble.app/Contents/Resources/__main__.pl
--- Frozen-Bubble (Original).app/Contents/Resources/__main__.pl	Thu Jan  1 06:12:48 2004
+++ Frozen-Bubble.app/Contents/Resources/__main__.pl	Sun Nov 28 23:00:13 2004
@@ -1679,12 +1679,8 @@
 	generate_new_bubble($PLAYERS[1], $next_bubble{$PLAYERS[0]}-&gt;{img});
     }
 
-    if ($graphics_level == 1) {
-	$background-&gt;blit($apprects{main}, $app, $apprects{main});
-	$app-&gt;flip;
-    } else {
-	fb_c_stuff::effect($app-&gt;{-surface}, $background-&gt;display_format-&gt;{-surface});
-    }
+    $background-&gt;blit($apprects{main}, $app, $apprects{main});
+    $app-&gt;flip;
 
     $display_on_app_disabled = 0;
 </code></pre>

<p>I have no idea why the <code>fb_c_stuff::effect</code> there is screwing things up so badly; I suspect it&#8217;s either a problem with <span class="caps">SDL </span>for Mac OS X, or Frozen Bubble&#8217;s <em>fb_c_stuff.xs</em> Perl/C code.  Furthermore, it only doesn&#8217;t work on some Macs I&#8217;ve tried (my 1GHz TiBook/Radeon Mobility 9000, and Michelle&#8217;s 800MHz iBook G4).  Some Macs work <span class="caps">OK, </span>some Macs don&#8217;t.  With the patch, all Macs work <span class="caps">OK. </span> Beats me completely.  I&#8217;ve emailed the <a href="http://redivi.com/~bob/frozenbubble.html">Frozen Bubble for Mac OS X</a> maintainer to see if he can dig around a bit to find out why it&#8217;s causing such a ruckus &#8230;</p>

<p><em>Update</em>: The <a href="http://redivi.com/~bob/frozenbubble.html">official Mac OS X port</a> has now properly fixed the graphics corruption bug as of version 1.0.0e, so this patch is now redundant.  Go grab the new version!</p>]]></content:encoded></item><item><title>Numerics Support in Programming Languages</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-12-02T06:18:47-08:00</dc:date><link>http://algorithm.com.au/blog/files/16b1a1f92941381806a9050cc150c3ec-362.html#unique-entry-id-362</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/16b1a1f92941381806a9050cc150c3ec-362.html#unique-entry-id-362</guid><content:encoded><![CDATA[<p>A nice quote I found from <a href="http://books.slashdot.org/comments.pl?sid=131267&amp;cid=10962064">a comment on Slashdot</a>:</p>

<blockquote><p>Languages like <span class="caps">OCAML </span>and Java are <em>defective</em> as general purpose languages because they don&#8217;t support efficient data abstraction for numerical types. The fact that their designers just don&#8217;t get that fact is a testament to the ignorance of their designers. It&#8217;s also what people really mean when they say that those kinds of languages are &#8220;just not efficient as C/C++&#8221;: it means that in C/C++, you can get whatever code you write to run fast, while in <span class="caps">OCAML </span>or Java, there are always problems where you have to drop down to C.</p></blockquote>

<p>I&#8217;ll insert the usual &#8220;I agree&#8221; here.  This is especially a problem with language benchmarks, which typically have benchmarks that operate on huge numbers of tiny bits of data.  This usually destroys any chances that a functional language has of competing with a very low-level language like C/C++, because often these big arrays are represented as a series of pointers to the actual data, rather than simply big arrays that directly contain the data.  This means one more pointer indirection for every index operation in the array, blowing away your cache hits and thus making your program run several orders of magnitudes slower.  (If your language is also lazy, like Haskell is, you basically cannot work around this performance restriction unless you make your data structure strict &#8230; in which case, well, you&#8217;re not using laziness any more.)</p>

<p>This problem needs to be solved, without forcing the programmer to spend lots of time annotating exactly what data structures should be unboxed and what should be boxed, and what functions are OK to work with unboxed/strict data structures.  Otherwise, people just aren&#8217;t going to these other languages for processing large quantities of small data.  And in this day and age of computing, processing large quantities of small data is required for quite a lot of applications &#8230;</p>

<p>There&#8217;s also some <a href="http://developers.slashdot.org/comments.pl?sid=131214&amp;cid=10953569">interesting comments about Python 2.4&#8217;s new generator expressions</a>, and how they are similar yet different to lambda expressions/anonymous functions: in particular, how they appear to give rather nice performance benefits.  I haven&#8217;t given generators too much thought at all yet, assuming they were less elegant, ad-hoc implementation of representing lazy data structures.  Sounds like I have some investigation to do!</p>]]></content:encoded></item><item><title>RDF&#x2c; the Semantic Web&#x2c; Filesystems&#x2c; and Databases</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-12-03T21:17:53-08:00</dc:date><link>http://algorithm.com.au/blog/files/95089310a56aee06e88585368446be52-363.html#unique-entry-id-363</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/95089310a56aee06e88585368446be52-363.html#unique-entry-id-363</guid><content:encoded><![CDATA[<p>The <a href="http://developer.syndetic.org/query_jargon.pl?term=propeller+head&amp;submit=Go%21">propellerheads</a> at <a href="http://www.lambda-the-ultimate.com/">Lambda</a> have an <a href="http://lambda-the-ultimate.org/node/view/404#comment">interesting discussion that started with <span class="caps">RDF</span></a> (at least, interesting if you&#8217;re already familiar with <span class="caps">RDF</span>)), and evolved to discussing not only <span class="caps">RDF, </span>but also the semantic web, data schema, and ReiserFS and file systems.</p>]]></content:encoded></item><item><title>Logitech V500</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2004-12-03T21:25:16-08:00</dc:date><link>http://algorithm.com.au/blog/files/03cf722f332537e83db35ebf1523af7d-364.html#unique-entry-id-364</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/03cf722f332537e83db35ebf1523af7d-364.html#unique-entry-id-364</guid><content:encoded><![CDATA[<p>Aww jeah, I gotta have me <a href="http://www.logitech.com/index.cfm/products/details/US/EN,CRID=3,CONTENTID=9508">one of these</a>.  And it&#8217;s even accompanied by <a href="http://images.amazon.com/media/i3d/01/logitech_v500_lang.swf">the most impressive advertising I&#8217;ve ever seen for a mouse</a>.  (I particularly like the &#8220;see the scroll panel in action&#8221; demo.  Look at that spreadsheet <em>fly</em>!)</p>]]></content:encoded></item><item><title>I&#x27;m .cgi</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2004-12-06T09:53:36-08:00</dc:date><link>http://algorithm.com.au/blog/files/105442aeefc8928d0ae8c0fcc45289e5-365.html#unique-entry-id-365</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/105442aeefc8928d0ae8c0fcc45289e5-365.html#unique-entry-id-365</guid><content:encoded><![CDATA[<p><a href="http://www.bbspot.com/News/2004/10/extension_quiz.php"><img
src="http://www.bbspot.com/Images/News_Features/2004/10/file_extensions/cgi.jpg" width="300" height="90"
border="0" alt="You are .cgi Your life seems a bit too scripted, and sometimes you are exploited.  Still a  workhorse though." /></p>

<p>Which File Extension are You?</a></p>]]></content:encoded></item><item><title>Custom Screen Sizes with NVidia Chipsets</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2004-12-13T00:46:05-08:00</dc:date><link>http://algorithm.com.au/blog/files/01ec8f17fd6bb8b07f2068be0acc8254-366.html#unique-entry-id-366</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/01ec8f17fd6bb8b07f2068be0acc8254-366.html#unique-entry-id-366</guid><content:encoded><![CDATA[<p>Well, here&#8217;s something I had absolutely no idea existed before today: you can add your own custom screen resolutions with NVidia&#8217;s video drivers.</p>


<ul>
<li>Control Panels -&gt; Display Properties -&gt; Settings tab -&gt; Advanced button -&gt; <em>your nvidia chipset</em> tab</li>
</ul>




<ul>
<li>Select the Screen Resolutions &amp; Refresh Rates menu item on the &#8216;drawer&#8217; next to the dialog box</li>
</ul>




<ul>
<li>Click on the Add button, and add away.</li>
</ul>



<p>This is great for those monitors which can&#8217;t quite push it to 1600&#215;1200 comfortably (e.g. being either too blurry or just having too low a refresh rate at such high resoutions).  I&#8217;m running my old-ish 21&#8221; CRT at 1400&#215;1050 now at 85Hz: quite a decent amount more desktop real estate than 1280&#215;1024, with a refresh rate where I won&#8217;t be tearing my eyes out.  Nice.</p>]]></content:encoded></item><item><title>Spirit: Parser Combinators for C++</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2004-12-28T04:52:30-08:00</dc:date><link>http://algorithm.com.au/blog/files/d6192210d86b365be3327e2ef3af4f9e-367.html#unique-entry-id-367</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d6192210d86b365be3327e2ef3af4f9e-367.html#unique-entry-id-367</guid><content:encoded><![CDATA[<p>I was thinking of writing a <a href="http://www.cs.nott.ac.uk/Department/Techreports/96-4.html">parser combinator</a> library for C++ today so that I could write a C++ parser in a style similar to using Daan Leijen&#8217;s awesome <a href="http://www.cs.uu.nl/~daan/parsec.html">Parsec</a> Haskell library.  Then, I came across <a href="http://spirit.sourceforge.net/">Spirit</a>, part of the excellent C++ <a href="http://www.boost.org/">Boost libraries</a>.  Of course, they&#8217;re advertised as template-based parsers rather than parser combinator-based parsers, since C++ programmers will go blank in the face when you say &#8216;parser combinators&#8217;.  If you&#8217;re not familiar with parser combinators, here should be all the motivation you need for using Spirit, from its introduction page:</p>

<pre><code>A simple EBNF grammar snippet:

    group       ::= '(' expression ')'
    factor      ::= integer | group
    term        ::= factor (('*' factor) | ('/' factor))*
    expression  ::= term (('+' term) | ('-' term))*

is approximated using Spirit's facilities as seen in this code snippet:

    group       = '(' &gt;&gt; expression &gt;&gt; ')';
    factor      = integer | group;
    term        = factor &gt;&gt; *(('*' &gt;&gt; factor) | ('/' &gt;&gt; factor));
    expression  = term &gt;&gt; *(('+' &gt;&gt; term) | ('-' &gt;&gt; term));</code></pre>

<p>Mapping an <span class="caps">EBNF </span>directly on to the language syntax: ahh, so good.  If only more people realised that the whole <a href="http://c2.com/cgi/wiki?EmbeddedDomainSpecificLanguage">embedded domain-specific language</a> approach is so nice!</p>]]></content:encoded></item><item><title>Je ne sais quoi</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-01-03T20:54:03-08:00</dc:date><link>http://algorithm.com.au/blog/files/3ff8e7bcaee607d4cc16b464683adad8-368.html#unique-entry-id-368</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3ff8e7bcaee607d4cc16b464683adad8-368.html#unique-entry-id-368</guid><content:encoded><![CDATA[<p>This is gold:</p>

<blockquote><p><a href="http://apple.slashdot.org/comments.pl?sid=134742&amp;cid=11246218">Mr. Jobs, please establish eligibility requirements for the purchase of a new Mac.</a> A good start would be to disqualify anyone who listens to Ashanti or anything they play on K-Rock.</p></blockquote>]]></content:encoded></item><item><title>Guido gets serious about types in Python</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-01-04T02:57:39-08:00</dc:date><link>http://algorithm.com.au/blog/files/0fa152499e669771d47ef1a1ca291913-369.html#unique-entry-id-369</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0fa152499e669771d47ef1a1ca291913-369.html#unique-entry-id-369</guid><content:encoded><![CDATA[<p>Hmm, so Guido&#8217;s blogged even more about <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=86641">adding static typing to Python</a>.  I&#8217;m not sure if that&#8217;s a good idea.  While I&#8217;m certainly a static typing evangelist, Python has always been a dynamic language, and shoe-horning a static type system on to a language which was never designed for it sets off alarm bells in my head.  Objective-C deals with &#8216;static typing&#8217; quite nicely: you get compiler warnings if the types don&#8217;t match.  This doesn&#8217;t limit any of its dynamism, but you get some extra safety if you decide to use types in your program.  Patrick Logan <a href="http://patricklogan.blogspot.com/2005/01/road-to-ruin.html">doesn&#8217;t like Guido&#8217;s proposal</a> <a href="http://patricklogan.blogspot.com/2005/01/freeze.html">either</a>, although that&#8217;s no surprise.</p>

<p>So, Python might just get static typing in the future.  What&#8217;s next, <a href="http://www.cse.unsw.edu.au/~dons/hs-plugins/paper/">Haskell getting more dynamic</a>?</p>]]></content:encoded></item><item><title>Linux Kernel Patch of the Week</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-01-09T08:00:23-08:00</dc:date><link>http://algorithm.com.au/blog/files/bfa59d8f38903da05574b34f3eb6b3af-370.html#unique-entry-id-370</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/bfa59d8f38903da05574b34f3eb6b3af-370.html#unique-entry-id-370</guid><content:encoded><![CDATA[<p>And the Linux Kernel Patch of the Week award goes to &#8230;</p>

<blockquote><p>Jake Moilanen provided a series of <a href="http://kerneltrap.org/node/4493">four patches</a> against the 2.6.9 Linux kernel [story] that introduce a simple genetic algorithm used for automatic tuning. The patches update the anticipatory IO scheduler [story] and the zaphod <span class="caps">CPU </span>scheduler [story] to both use the new in-kernel library, theoretically allowing them to automatically tune themselves for the best possible performance for any given workload.</p></blockquote>

<p>Whether it really is truly effective will only be seen, but the coolness factor is so there &#8230;</p>]]></content:encoded></item><item><title>DownloadComment</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-01-09T08:53:08-08:00</dc:date><link>http://algorithm.com.au/blog/files/d16f6a8da365a42927f5e08fd19e4ac7-371.html#unique-entry-id-371</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d16f6a8da365a42927f5e08fd19e4ac7-371.html#unique-entry-id-371</guid><content:encoded><![CDATA[<p>If you&#8217;re like me and have about 100 files sitting in your Safari downloads folder, have a look at <a href="http://www.ecamm.com/mac/free/">DownloadComment</a>:</p>

<blockquote><p>When you download things in Safari, DownloadComment will put the original <span class="caps">URL </span>into the saved file&#8217;s Finder Comments. Now you&#8217;ll always know where your downloads came from. </p></blockquote>

<p>Cmd-I in Finder to display the file comments, and <a href="http://en.wikipedia.org/wiki/Zapp_Brannigan"><span class="caps">BAM</span></a>!  Instant reminder where on earth you got that file from and why.  I&#8217;ve been using it for less than a week, and it&#8217;s already proven itself useful.<br />
 </p>]]></content:encoded></item><item><title>Windows Calling Conventions</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-01-10T22:22:18-08:00</dc:date><link>http://algorithm.com.au/blog/files/c551353edfc0a06e1e19bb8d4969f38a-372.html#unique-entry-id-372</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c551353edfc0a06e1e19bb8d4969f38a-372.html#unique-entry-id-372</guid><content:encoded><![CDATA[<p>I found an excellent webpage about <a href="http://www.unixwiz.net/techtips/win32-callconv.html">Win32 calling conventions</a> when I had the pleasure of writing a C++ <a href="http://httpd.apache.org/docs-2.0/mod/mod_so.html">Apache 2 module</a>.  If you&#8217;re a <span class="caps">UNIX </span>guy who&#8217;s learning to deal with anything that involves both C and C++ on Windows, and you&#8217;re getting stack dumps which just <a href="http://www.connect-dots.com/Poofs/chewbacca.html">does not make sense</a>, it could be a calling convention problem.  If you don&#8217;t think that&#8217;s too bad, just wait until you have to write <code>typedef</code>s and use type casts which involve calling conventions!  (C&#8217;s <code>typedef</code> syntax seriously needs a kick in the nuts.)</p>]]></content:encoded></item><item><title>SD card with built-in USB</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2005-01-19T23:43:36-08:00</dc:date><link>http://algorithm.com.au/blog/files/47d5eb09306edd846b5fe2e316fe4246-373.html#unique-entry-id-373</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/47d5eb09306edd846b5fe2e316fe4246-373.html#unique-entry-id-373</guid><content:encoded><![CDATA[<p>Mmm, I want one of these (never mind that I already have a 1GB SD card and a <a href="http://www.pqi1st.com/products/istick.asp">tiny</a> 1GB <span class="caps">USB </span>flash drive): </p>

<blockquote><p>SanDisk has today <a href="http://www.dpreview.com/news/0501/05010606sandisksdflip.asp">announced</a> a unique SD card which has a hinged portion, flip this over and the card becomes a <span class="caps">USB</span> 2.0 Flash Drive. This neat piece of engineering means that you can flip the card out of your camera and straight into your computer without the need for any card readers or cables. Clever. SanDisk expect to be able to produce this new card in capacities of up to 1.0 <span class="caps">GB, </span>they will have more detail and initial samples at the upcoming <span class="caps">PMA</span> 2005 show.</p></blockquote>]]></content:encoded></item><item><title>Australian Open 2005</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-01-27T07:56:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/e3f70676f2d2ba87d9a619aa18e48360-374.html#unique-entry-id-374</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e3f70676f2d2ba87d9a619aa18e48360-374.html#unique-entry-id-374</guid><content:encoded><![CDATA[<p>I just wanted to make a short comment to say how absolutely awesome the tennis in the <a href="http://www.ausopen.org/">Australian Open</a> has been this year.  The level of play is fantastic and the competition has been great (a crazy number of five-setters!).  I don&#8217;t ever remember an Australian Open which has been this good.  I only wish I were in Melbourne!</p>]]></content:encoded></item><item><title>Martin Pool on Revision Control Systems</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-01-31T07:17:19-08:00</dc:date><link>http://algorithm.com.au/blog/files/e659676d88b50214c398438533003d17-375.html#unique-entry-id-375</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e659676d88b50214c398438533003d17-375.html#unique-entry-id-375</guid><content:encoded><![CDATA[<p>Coders of the world rejoice, for Martin Pool is <a href="http://sourcefrog.net/weblog/personal/at-canonical.html">building a distributed revision control system</a>:</p>

<blockquote><p>I am not working directly on Ubuntu, but rather on improving the tools used by open source developers inside and outside of Canonical. The charter is to build a distributed version-control system that open-source hackers will love to use.</p></blockquote>

<p>Knowing Martin, this will have the usability of Subversion and Darcs, the algorithms of Arch, and the pure leetness of rsync.  Beware, other <span class="caps">RCS </span>authors: your days are numbered!</p>]]></content:encoded></item><item><title>&#x22;Witch&#x22; Window Switcher</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-02-12T18:30:21-08:00</dc:date><link>http://algorithm.com.au/blog/files/fc8e33ca2eeb54b18ec1fa4e6cc11c68-376.html#unique-entry-id-376</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fc8e33ca2eeb54b18ec1fa4e6cc11c68-376.html#unique-entry-id-376</guid><content:encoded><![CDATA[<p>A man named Peter Maurer has published a most excellent bit of software for the Mac named <a href="http://www.petermaurer.de/nasi.php?thema=witch&amp;sprache=english&amp;kopf=labor">Witch</a>.  Witch is a window switcher, in the spirit of LiteSwitch X in the pre-Panther days.  I quite like the standard &#8984;-Tab window switcher that&#8217;s built into Panther, so I won&#8217;t be using Witch for that.  However, Witch&#8217;s killer feature for me is that it can also replace the &#8984;-` key with its own switcher, which works in a <span class="caps">MRU </span>(Most-Recently-Used) fashion, similarly to how &#8984;-Tab works.</p>

<p>Witch&#8217;s standard &#8984;-Tab window switcher replacement also cycles through all documents in all windows, rather than only cycling through the active windows, which is gives more Windows-like behaviour if you prefer that.  It also has other nifty features like being able to assign window zoom/minimise to keyboard shortcuts &#8212; but <span class="caps">IMHO, </span>that&#8217;s all small candy compared to the excellent &#8984;-` document switcher replacement!</p>]]></content:encoded></item><item><title>Consider Phlebas</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2005-02-13T06:11:33-08:00</dc:date><link>http://algorithm.com.au/blog/files/abae7d3e01d0cbabf84edc1518e61da4-377.html#unique-entry-id-377</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/abae7d3e01d0cbabf84edc1518e61da4-377.html#unique-entry-id-377</guid><content:encoded><![CDATA[<p>First, new blog category: &#8220;Books&#8221;.  Go me.  One of my New Year&#8217;s promises was to read more (fiction) books.  Well, it wasn&#8217;t really a New Year&#8217;s promise &#8212; more of a general promise I&#8217;ve been wanting to keep to myself for about the last 5 years, so hopefully blogging about it will bring my non-book-readingingness out of inertia.</p>

<p>Anyhoo, the subject of today&#8217;s bookdom is <a href="http://www.iainbanks.net/sf01.htm">Consider Phlebas</a> by Iain M. Banks.  If you like big, grand, massive sci-fi scales and plots, this should float your boat quite nicely.  The back-page summary of &#8220;a space opera of stunning power and awesome imagination&#8221; fits it very nicely.  If you&#8217;ve ever played the magnificent computer game <a href="http://www.freespace2.com/">Freespace 2</a> and gaped in awe at capital ships which are kilometres long and supported thousands of crewmembers, this book evokes the same feeling &#8212; only several orders of magnitudes more epic.  The main character, Horza, is interesting and is fleshed out quite well, and the supporting cast are decent too.  Banks&#8217;s universe is filled with great, non-boring detail, from the philosophies of the Culture to the concepts in the Damage gambling game.</p>

<p>To top it all off, the ending of the book is quite interesting, in that the extra &#8220;factual pages&#8221; at the end of the book give it a sense of closure, while not completely resolving the main plotline.  You&#8217;ll have to read it to understand what I mean, I suppose.</p>

<p>It&#8217;s not a thought-provoking kind of novel like the <a href="http://www.ender.com/ender/">Ender series</a> is, but that&#8217;s not a bad thing considering it clearly never has that goal in mind.  If you want serious thought-provoking material, I&#8217;ve heard that some of Iain Bank&#8217;s numerous other books are quite the <em>hardcore</em> sort.  (i.e. At least one person I know simply can&#8217;t read his other books simply because they&#8217;re so &#8230; grim.)  As for Consider Phlebas, I loved it.  I haven&#8217;t read an excellent epic sci-fi tale in a very long time.  Recommended.</p>]]></content:encoded></item><item><title>JWZ: Groupware Bad</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2005-02-18T23:58:02-08:00</dc:date><link>http://algorithm.com.au/blog/files/9498362786319d0fee5c52aadd3f1a29-378.html#unique-entry-id-378</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9498362786319d0fee5c52aadd3f1a29-378.html#unique-entry-id-378</guid><content:encoded><![CDATA[<p>Boring summary: the ever-entertaining <a href="http://www.jwz.org/">Jamie Zawinski</a> <a href="http://www.jwz.org/doc/groupware.html">talks about why groupware is stupid</a>.</p>

<p>Fun summary: Jamie Zawinski vs Nat Friedman, awesome <span class="caps">JWZ</span>-style swearing throughout the article, paying out on stupid managers, and, as usual, telling us how crap Netscape went from version 2 to version 4.</p>

<p>(Props to <a href="http://www.joelonsoftware.com/">Joel on Software</a> for pointing out the article.)</p>]]></content:encoded></item><item><title>Paul Graham on Usability</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2005-03-10T21:07:02-08:00</dc:date><link>http://algorithm.com.au/blog/files/9a9e50112933c7ee31b9b517f58d20d3-379.html#unique-entry-id-379</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9a9e50112933c7ee31b9b517f58d20d3-379.html#unique-entry-id-379</guid><content:encoded><![CDATA[<p>Paul Graham has a new article titled <a href="http://www.paulgraham.com/start.html">How to Start a Startup</a>, which is an excellent article for hackers who are interested in business.  There&#8217;s lots of gems in there, but I particularly liked this one:</p>

<blockquote><p>It&#8217;s worth trying very, very hard to make technology easy to use. Hackers are so used to computers that they have no idea how horrifying software seems to normal people. Stephen Hawking&#8217;s editor told him that every equation he included in his book would cut sales in half. When you work on making technology easier to use, you&#8217;re riding that curve up instead of down. A 10% improvement in ease of use doesn&#8217;t just increase your sales 10%. It&#8217;s more likely to double your sales.</p></blockquote>

<p>Maybe Graham can get through to hackers where <a href="http://slashdot.org/interviews/00/03/03/096223.shtml">Jakob Neilsen</a> and other usability experts have failed.  That one paragraph is a concise summary of a point that Neilsen has been trying to advocate for years: spend the time and money on improving your software&#8217;s usability, and it&#8217;ll turn out to be a net profit.</p>]]></content:encoded></item><item><title>YzShadow</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-03-11T23:44:14-08:00</dc:date><link>http://algorithm.com.au/blog/files/b26ed22a94796a21b63fe1b00443c19d-380.html#unique-entry-id-380</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b26ed22a94796a21b63fe1b00443c19d-380.html#unique-entry-id-380</guid><content:encoded><![CDATA[<p>I just found a little gadgety program for Windows named <a href="http://www.osx-e.com/modules.php?modid=1&amp;action=show&amp;id=100">Y&#8217;z Shadow</a>: all it does is add a little shadow effect to your windows (similarly to Mac OS X&#8217;s window shadow).  While it sounds gimmicky, it&#8217;s amazing just how much difference a little shadow makes in distinguishing one window from the next.  Try it out and see if it makes window management just that little bit easier for you!</p>

<p><strong>Update</strong>: It looks like the YzShadow link above is dead, but you can appear to download it from at least <a href="http://www.electricboom.com/download_plus.htm">one other website</a>.</p>]]></content:encoded></item><item><title>reduce() in Python</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-03-18T07:17:50-08:00</dc:date><link>http://algorithm.com.au/blog/files/7fb96d2e2a1058b488d00e788fe6786b-381.html#unique-entry-id-381</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7fb96d2e2a1058b488d00e788fe6786b-381.html#unique-entry-id-381</guid><content:encoded><![CDATA[<p>There&#8217;s been a <a href="http://lambda-the-ultimate.org/node/view/587">reasonable</a> <a href="http://tacojuice.org/cgi-bin/plnews/nb.cgi/view/PLNews/2005/03/14">amount</a> of <a href="http://www.xoltar.org/2005/mar/17/python-reduce.html">publicity</a> about Guido van Rossum&#8217;s <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=98196">comments on the usefulness of the reduce function in Python</a>, but there&#8217;s quite an <a href="http://lambda-the-ultimate.org/node/view/587#comment-4837">interesting comment</a> on Lambda the Ultimate about how <code>reduce()</code> in Python is quite, well, broken:</p>

<blockquote><p>Heh. reduce() is broken in python (in that it&#8217;s not actually a fold function), so I don&#8217;t blame Guido for not being able to figure it out in his head. Rather than handling the zero- and one-element list cases properly, it (a) doesn&#8217;t take a basis element, (b) raises an error on empty lists and &#169; <span class="caps">RETURNS THE SINGLE ELEMENT WITHOUT CALLING</span> A <span class="caps">FUNCTION</span> ON IT in the one-element case (true even in recursion). &#8230; The way it&#8217;s defined, reduce is not fold, it&#8217;s a broken fold.</p></blockquote>

<p>Folding an empty list results in an error?  If that is the case, well, it&#8217;s no wonder it wasn&#8217;t used in Python very much.  I&#8217;d very much rather Python rip out a half-arsed fold function altogether rather than trying to make it semi-functional (pun intended).  That only gives a bad impression about functional programming, and doesn&#8217;t benefit anyone.  (Disclaimer: I haven&#8217;t double-checked the above claim myself, so I don&#8217;t know if what Jacob says it&#8217;s true.  The Lambda the Ultimate folks usually have their heads screwed on very right when it comes to anything to do with programming language semantics, though &#8230;)</p>

<p>For the record, I also disagree with Guido&#8217;s assertions that <code>map()</code> and <code>filter()</code> should go away just because list comprehensions exist.  <code>map</code> and <code>filter</code> have single purposes: to transform lists, and filter lists.  Since list comprehensions can do the job of both map and filter, it&#8217;s not immediately obvious what they do, because they now give you more choice, and more choice means less immediate obviousness.  If you see a map or filter, you know it&#8217;s just doing a list tranformation or a list filter, and that&#8217;s it.  If you see a list comprehension, you have to read its innards to understand what it&#8217;s doing.  Or (using Haskell syntax) do you really think <code>[ x | x &lt;- [1..10], isEven x ]</code> more immediately obvious <code>filter (isEven) [1..10]</code>?  Considering Python&#8217;s heavy emphasis on code readability, that sounds like a step backwards to me.</p>

<p><strong>Update</strong>: As pointed out, if you use an initialiser with <code>reduce()</code>, you get sane behaviour back.  That&#8217;s good.  However, I find it a bit odd that an initialiser is optional, rather than mandatory.  (It&#8217;s managed to fool at least one user into thinking fold is broken &#8212; how many more people had the same misconception?)</p>

<p><strong>Update #2</strong>: Shane Stephens points out that the optional-initialiser-version of <code>reduce()</code> is actually quite useful.  Rather than try to repeat it abysmally, I&#8217;ll just clag in a part of Shane&#8217;s email here:</p>

<blockquote><p>&#8230; there&#8217;s a very good (but possibly non functional-programming-oriented) reason for the optional lack of a basis in python&#8217;s reduce function: sometimes you don&#8217;t <span class="caps">WANT </span>to run the function on a single element.  A good example is concatenating strings: <code>reduce(lambda a, b: a + &quot;, &quot; + b, some_array)</code>.</p></blockquote>

<p>Indeed, this is 100% analagous to the <code>foldl1</code> function in Haskell, which is the same as a <code>fold</code>, but doesn&#8217;t take an initialiser element.  So, it looks like half of this article of mine is full of crap. :)</p>]]></content:encoded></item><item><title>An alternative PDF viewer for Windows</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-03-20T01:07:50-08:00</dc:date><link>http://algorithm.com.au/blog/files/866d3d6273773edcb605a2f40a350424-382.html#unique-entry-id-382</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/866d3d6273773edcb605a2f40a350424-382.html#unique-entry-id-382</guid><content:encoded><![CDATA[<p>Welp, I finally got sick of Adobe Acrobat Reader 6.0 for Windows.  Rather than downgrade to Acrobat Reader 5.0, which definitely sucks less (but still sucks), I Googled around and found an alternative <span class="caps">PDF </span>viewer for Windows called <a href="http://www.foxitsoftware.com/pdf/rd_intro.php">Foxit <span class="caps">PDF</span> Reader</a>.  Wow, double-click on a <span class="caps">PDF </span>and a viewer window opens in half a second.  It can render fonts using ClearType, and you can select text too.  Lightweight goodness.</p>]]></content:encoded></item><item><title>A Short History of Nearly Everything</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2005-03-28T05:21:59-08:00</dc:date><link>http://algorithm.com.au/blog/files/d9dad003a06f7ec2d44204c7df468045-383.html#unique-entry-id-383</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/d9dad003a06f7ec2d44204c7df468045-383.html#unique-entry-id-383</guid><content:encoded><![CDATA[<p>This book has received a hell of a lot of praise from a hell of a lot of people: all I can say is that it greatly deserves it.  Bill Bryson manages to make the book both educational and entertaining.  I wish this was a textbook that I had to read for high school (in addition to more in-depth textbooks on the particular topic being studied, of course): it&#8217;s the only book I&#8217;ve read that made geology seem <em>non-boring</em>.  (I wouldn&#8217;t quite say that it stirred an interest in geology for me, but it at least made me appreciate it as a science, which I never did before.)  Even if you do know quite a lot about the Stars and the Earth, it&#8217;s worthwhile reading this just to get an idea of the personalities who were behind all the discoveries.</p>

<p>Best of all, many of the topics it discusses, such as life and the galaxy, gave me back that sense of wonder I had about science and discovery when I was a younger lad.  Every time it got me thinking about the beauty of nature and the universe, it brought a smile to my face &#8212; and I think it&#8217;s worth reading just for that.  Highly recommended!</p>]]></content:encoded></item><item><title>Coding Fonts</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-03-29T23:08:59-08:00</dc:date><link>http://algorithm.com.au/blog/files/c6f90655859a8297714cb1f391101e05-384.html#unique-entry-id-384</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c6f90655859a8297714cb1f391101e05-384.html#unique-entry-id-384</guid><content:encoded><![CDATA[<p>I&#8217;m frequently surprised whenever I see veteran coders whittling away in Windows using Courier New or some equally horrible monospace font.  (Yeah, I know this is all subjective, so if you don&#8217;t like my opinions, go back to using Comic Sans <span class="caps">MS,</span> OK?)  Considering how much you can stare at the screen all day if you&#8217;re a professional coder, a readable pleasant font could actually improve your productivity and lifestyle, in every Dilbertesque sense.</p>

<p>Windows actually comes with a great monospace font that unfortunately seems to be reserved for use by its console windows only.  Macintosh folks have been lucky to have had an excellent monospace font (Monaco 9) since its inception in 1984, and <span class="caps">UNIX</span>/X11 people have been blessed with truly excellent monospace fonts (<code>schumacher-clean</code> and good ol&#8217; <code>fixed</code>, whoever made that.)</p>

<p>So, if you&#8217;re never thought about your choice of a coding font, check out the following fonts which were made for heavy-duty programmers (complete with slashed zeros; long live the <span class="caps">IBM</span> PS/2!).  Most of them are available for Windows, the Mac and Linux, too.</p>


<ul>
<li><a href="http://www.tobias-jung.de/seekingprofont/">ProFont</a>, my current coding font of choice.</li>
<li>Metrowerk&#8217;s <a href="ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./Miscellaneous/MPW_Font.sit.hqx"><span class="caps">MPW </span>font</a> (Mac OS X only).</li>
<li><a href="http://www.netalive.org/tinkering/triskweline/">Triskweline</a></li>
<li><a href="http://www.proggyfonts.com/index.php?menu=download">Proggy Fonts</a></li>
</ul>]]></content:encoded></item><item><title>I&#x27;m 100&#x25; smart&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2005-03-29T23:45:41-08:00</dc:date><link>http://algorithm.com.au/blog/files/df4f8552a864bcb6b8b2b59038267f96-385.html#unique-entry-id-385</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/df4f8552a864bcb6b8b2b59038267f96-385.html#unique-entry-id-385</guid><content:encoded><![CDATA[<p>(Warning: formatting is borked.  Sue me for being lazy with copy&#8217;n&#8217;paste.)</p>

<p>  <TABLE align="center" cellpadding="20"> <TBODY><TR><br />
<TD align="center"> <FONT size="5"><br />
<B>Your brain: 25% interpersonal, 15% visual, 25% verbal,  and 35% mathematical!</B><br />
</FONT><br />
    <BR> </TD><br />
</TR><br />
    <TR><br />
<TD> Congratulations on being 100% smart! The above score breaks down <FONT color="blue"><B>what kind of thinking you most enjoy</B><br />
</FONT><br />
 doing. It says nothing about how good you are at any one, just how <I>interested</I><br />
 you are in each, relatively. A substantial difference in scores between two people means, conclusively, that they are <FONT color="#006600">different kinds</FONT><br />
 of thinkers.<br />
<BR>    <BR></p>

<p><B>Matching Summary:</B><br />
 Each of us has different tastes.  Still, I offer the following advice,  which I think is obvious:<BR>    <BR><br />
<OL><LI><br />
Don&#8217;t date someone if your <FONT color="#ff0066">interpersonal percentages</FONT><br />
 differ by more than <FONT color="#ff0066">50%</FONT><br />
.<br />
</LI><br />
    <LI><br />
Don&#8217;t be friends with someone if your <FONT color="#ff6600">verbal percentages</FONT><br />
 differ by more than <FONT color="#ff6600">60%</FONT><br />
.<br />
</LI><br />
    <LI>Don&#8217;t have sex with someone if their <FONT color="#009900">math percentage</FONT><br />
 is over <FONT color="#009900">50%</FONT><br />
.</LI><br />
</OL></p>

<BR>    <BR>    <B>Update, April 2005:</B><br />
 Try my new test, the <A href="http://www.okcupid.com/tests/take?testid=8797531974480148663">3-Variable Purity Test</A><br />
. </TD><br />
</TR><br />
    <TR><TD align="center"> <IMG src="http://is0.okcupid.com/users/704/510/7055112809383642671/mt1111506225.gif"> </TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
 <BR>    <BR>    <BR> <TABLE cellpadding="20"> <TBODY><TR><TD> <SPAN id="comparisonarea">My test tracked 4 variables How you compared to other people <I>your age and gender</I><br />
:<BLOCKQUOTE><TABLE cellspacing="4" cellpadding="0" border="0"><TBODY><TR><br />
<TD valign="middle"><br />
<TABLE cellpadding="0" cellspacing="1" border="0" bgcolor="black"><TBODY><TR><TD height="20" bgcolor="#b2cfff" width="105"><br />
<IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
    <TD width="45" bgcolor="white"><IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
</TD><br />
    <TD valign="middle">You scored higher than <B>70%</B><br />
 on <B>interpersonal</B><br />
</TD><br />
</TR><br />
    <TR><br />
<TD valign="middle"><br />
<TABLE cellpadding="0" cellspacing="1" border="0" bgcolor="black"><TBODY><TR><TD height="20" bgcolor="#b2cfff" width="17"><br />
<IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
    <TD width="133" bgcolor="white"><IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
</TD><br />
    <TD valign="middle">You scored higher than <B>11%</B><br />
 on <B>visual</B><br />
</TD><br />
</TR><br />
    <TR><br />
<TD valign="middle"><br />
<TABLE cellpadding="0" cellspacing="1" border="0" bgcolor="black"><TBODY><TR><TD height="20" bgcolor="#b2cfff" width="105"><br />
<IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
    <TD width="45" bgcolor="white"><IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
</TD><br />
    <TD valign="middle">You scored higher than <B>70%</B><br />
 on <B>verbal</B><br />
</TD><br />
</TR><br />
    <TR><TD valign="middle"><br />
<TABLE cellpadding="0" cellspacing="1" border="0" bgcolor="black"><TBODY><TR><TD height="20" bgcolor="#b2cfff" width="72"><br />
<IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
    <TD width="78" bgcolor="white"><IMG src="http://is3.okcupid.com/graphics/0.gif"></TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
</TD><br />
    <TD valign="middle">You scored higher than <B>48%</B><br />
 on <B>mathematical</B><br />
</TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
</BLOCKQUOTE><br />
</SPAN><br />
 </TD><br />
</TR><br />
</TBODY><br />
</TABLE><br />
 <table cellpadding=20><tr><td>Link: <a href='http://www.okcupid.com/tests/take?testid=15273633770079357960'>The 4-Variable IQ Test</a> written by <a href='http://www.okcupid.com/profile?tuid=7055112809383642671'>chriscoyne</a> on <a  href='http://www.okcupid.com'>Ok Cupid</a></td></tr></table>]]></content:encoded></item><item><title>CSV to Address Book Importer</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-04-18T02:34:36-07:00</dc:date><link>http://algorithm.com.au/blog/files/a1c8741b70246ddd0c7a7ed1055e9636-388.html#unique-entry-id-388</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/a1c8741b70246ddd0c7a7ed1055e9636-388.html#unique-entry-id-388</guid><content:encoded><![CDATA[<p>Mostly for my own reference, here&#8217;s an awesome <a href="http://homepage.mac.com/phrogz/CSV2vCard_v2.html"><span class="caps">CSV </span>to vCard webpage</a> which will import <span class="caps">CSV </span>data, and output vCard (.vcf) format files.  This is rather useful if you have masses of contacts to import into Apple&#8217;s Address Book program.  Bonus coding-fu points for being totally implemented in Javascript!</p>]]></content:encoded></item><item><title>Flip4Mac&#x27;s WMV Player</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-04-26T22:27:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/31ca96fe3713724829a5588db313bb9b-389.html#unique-entry-id-389</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/31ca96fe3713724829a5588db313bb9b-389.html#unique-entry-id-389</guid><content:encoded><![CDATA[<p>For those of you looking to play Windows Media on the Mac and absolutely loathe Windows Media Player, check out Flip4Mac&#8217;s <a href="http://www.flip4mac.com/wmv.htm"><span class="caps">WMV</span> Player component</a> for the Mac.  For US$10, you can play Windows Media files in QuickTime player.  (Though see the note about open-source players below; their support for Windows Media may be good enough for your purposes.)  I bought it, and I&#8217;ve been quite happy with it.  It will even use the QuickTime plugin instead of the dreaded Windows Media plugin to handle playback of Windows Media on the Web, even when they&#8217;re served those clunky .asx files.</p>

<p>Note: Several open-source multimedia players, such as <a href="http://www.videolan.org/vlc/"><span class="caps">VLC</span></a>, <a href="http://xineplayer.berlios.de/">XinePlayer</a> and <a href="http://mplayerosx.sourceforge.net/">mplayerosx</a>, will play .wmv files, but some <span class="caps">WMV </span>files have an advanced codec that these players don&#8217;t support yet, so they unfortunately won&#8217;t play <em>all</em> .wmv files.  While I&#8217;m fairly certain that the codec will be reverse-engineered in time, for me, $10 is a pretty good deal to make sure I don&#8217;t have to deal with the pain of Windows Media Player ever again.  (Of course, the arguably better solution is to use non-proprietary media file formats such as Ogg Vorbis and Ogg Theora!)</p>]]></content:encoded></item><item><title>The Commentator</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-04-27T19:25:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/3e9881d046cc15d8b27c8b337a80a9f9-390.html#unique-entry-id-390</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3e9881d046cc15d8b27c8b337a80a9f9-390.html#unique-entry-id-390</guid><content:encoded><![CDATA[<p>Are you a totally <a href="http://www.outpost9.com/reference/jargon/jargon_26.html#TAG980">k-rad</a> coder who just can&#8217;t stop cutting code to spare time for those silly comments?  Cenqua&#8217;s <a href="http://www.cenqua.com/commentator/">Commentator</a> was made just for you:</p>

<blockquote><p>The Commentator uses revolutionary real-time language processing to <em>actually grok your code</em> and <em>add the necessary comments on the fly</em>. No more doco to slow you down. Just install The Commentator and watch as your coding elegance is eloquently decorated with insightful, nuanced commentary &#8230; <em>as you type</em>. What&#8217;s more, The Commentator&#8217;s powerful Personality Controls allow you to tweak it&#8217;s output so completely that it&#8217;s as if The Commentator is <em>speaking for you</em>. In your voice. Explaining to those that need it, so that you can <em>get on</em> and <em>get busy</em>.</p></blockquote>

<p>It&#8217;s worth checking out just for the personality controls screenshot.  <span class="caps">SCO </span>or chicks indeed!</p>]]></content:encoded></item><item><title>The Mother of All Demos</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-05-07T08:18:02-07:00</dc:date><link>http://algorithm.com.au/blog/files/6db23abd87536ac15fdfba8cf084b8d8-391.html#unique-entry-id-391</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6db23abd87536ac15fdfba8cf084b8d8-391.html#unique-entry-id-391</guid><content:encoded><![CDATA[<p>Ars Technica has an new article (that Slashdot seemed to miss) titled <a href="http://arstechnica.com/articles/paedia/gui.ars">A History of the <span class="caps">GUI</span></a>.  The first couple of pages of the article are great, but unfortunately it soon degenerates into screenshots of various <span class="caps">GUI</span>s that were introduced in the late 1980s.</p>

<p>However, it does talk for nearly a full page about Doug Engelbart&#8217;s <a href="http://www.google.com/search?q=Mother%20of%20All%20Demos">Mother of All Demos</a>, given in 1968.  As befits its name, Engelbart&#8217;s demo is one of the most important events to ever happen in the history of computing.  It not only featured the first demonstration of the mouse, but also &#8230;</p>

<blockquote><p><a href="http://arstechnica.com/articles/paedia/gui.ars/2">&#8230;</a> featured hypertext linking, full-screen document editing, context-sensitive help, networked document collaboration, e-mail, instant messenging, even video conferencing!</p></blockquote>

<p>Hypertext linking and networked document collaboration guys, in <strong>1968</strong>.  We <em>still</em> don&#8217;t have a decent networked document collaboration system today, bar wikis (which aren&#8217;t real-time), and <a href="http://www.codingmonkeys.de/subethaedit/">SubEthaEdit</a> (which is great, but is limited to plaintext, and only works on the Mac).  Engelbart was doing stuff <em>37 years ago</em> that we still haven&#8217;t managed to conquer today.</p>

<p>Anyway, to get to the point of this post, I really <em>encourage</em> you to check out the following two video recordings if you can make time for them &#8212; they&#8217;ve been lovingly digitized and preserved so that we can view them so many, many years later:</p>


<ul>
<li>Doug Engelbart&#8217;s 1968 <a href="http://sloan.stanford.edu/MouseSite/1968Demo.html">Mother of All Demos</a></li>
<li>Steve Jobs&#8217;s <a href="http://macslash.org/article.pl?sid=05%2F01%2F25%2F1016211&amp;mode=thread">Unveiling of the Macintosh in 1984</a>.</li>
</ul>



<p>They&#8217;re absolutely amazing.  So damn amazing, this will probably be the one and only time I&#8217;ll tell you to download and install <a href="http://www.real.com/">RealPlayer</a> just so you can view Doug&#8217;s 1968 demo.  You can <em>feel</em> history in the making as you watch the videos, I kid you not.  To some extent, I almost despise Kernighan and Ritchie for spawning a culture and mindset that ultimately won, <a href="http://www.jwz.org/doc/worse-is-better.html">despite being more mediocre</a>.  Where would we be today if the world had embraced Smalltalk instead?  Ah, time to stop being sentimental and crank out more C code, so I don&#8217;t look like such a starry-eyed kid again &#8230;</p>]]></content:encoded></item><item><title>coLinux</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Linux</category><category>Windows</category><dc:date>2005-05-23T06:18:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/9989c11cfafc867816effffdef2a7b65-392.html#unique-entry-id-392</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9989c11cfafc867816effffdef2a7b65-392.html#unique-entry-id-392</guid><content:encoded><![CDATA[<p>We needed to set up some <a href="http://www.annodex.net/">Annodex</a> servers for demos this week, and our server software currently runs best on Linux.  So, what to do if you&#8217;re using Windows machines which you can&#8217;t install Linux on for whatever reason, political or technical?  Run Linux inside Windows, of course, via <a href="http://www.colinux.org/">coLinux</a>.</p>

<p>coLinux is great.  No, scratch that &#8212; coLinux is <em>really</em> great.  Not only does it work, it works really well: it&#8217;s fast (I really don&#8217;t think I&#8217;ve ever seen a Debian system boot up in 2-3 seconds), it&#8217;s stable, and it even uses a pretty small amount of memory, since Linux servers tend to be on the trim side.  A full-blown Linux installation for us with Apache serving multi-megabyte multimedia streams to multiple Windows clients was using up less than 30MB of Windows&#8217;s memory pool.  Low fat.</p>

<p>If you must have Windows on your desktop/laptop for whatever reason, but need Linux and are getting sick of doing the reboot dance just to switch OSs, give coLinux a whirl.  And, if you want to get geek cred points, watch your friends&#8217; jaws drop when they see <span class="caps">X11 </span>applications hosted on coLinux displaying in Cygwin/X; it&#8217;s pretty scary just how well it all works.  Now, whither my coLinux for Mac OS X port (and flying car)?</p>]]></content:encoded></item><item><title>Off to North America</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-05-26T10:32:31-07:00</dc:date><link>http://algorithm.com.au/blog/files/2f46b96d258946344253951557016d12-393.html#unique-entry-id-393</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2f46b96d258946344253951557016d12-393.html#unique-entry-id-393</guid><content:encoded><![CDATA[<p>I&#8217;m off to North America for the next 2 weeks: Toronto, Los Angeles and San Francisco, in that order.  If any readers are attending <a href="http://developer.apple.com/wwdc/"><span class="caps">WWDC</span></a> in San Francisco, drop me an email and let&#8217;s meet up!</p>]]></content:encoded></item><item><title>Control-T</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-06-03T08:05:38-07:00</dc:date><link>http://algorithm.com.au/blog/files/fa96eac0be51cde465653fb1ff4f8485-394.html#unique-entry-id-394</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fa96eac0be51cde465653fb1ff4f8485-394.html#unique-entry-id-394</guid><content:encoded><![CDATA[<p>Well, you learn something new every day.  How many Unix veterans know about the Unix status character, <a href="http://www.macosxhints.com/article.php?story=20050520120407161">Control-T</a>?</p>]]></content:encoded></item><item><title>Toronto&#x2c; 27th May to 5th June</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-06-06T21:14:55-07:00</dc:date><link>http://algorithm.com.au/blog/files/67b74ef3683cbbd53c38edd94a22ddc6-395.html#unique-entry-id-395</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/67b74ef3683cbbd53c38edd94a22ddc6-395.html#unique-entry-id-395</guid><content:encoded><![CDATA[<p>First, apologies for the lack of posts.  I&#8217;ve been a pretty busy boy, and the few hours I&#8217;ve had to myself, I&#8217;ve either had to do Uni work, <span class="caps">CSIRO </span>work, or sleep (usually in that order :).</p>

<p>How do I sum up Toronto?  It was one of the most busy and best one-week holidays I&#8217;ve had.  For those of you who don&#8217;t know, the main reason I went there was to attend my cousin&#8217;s wedding.  It was a traditional Hindu wedding (you can find some photos on my <a href="http://www.algorithm.com.au/gallery/jenash_wedding">gallery site</a>) and was absolutely wonderful.  It was possibly the only wedding reception that I attended where we had two hours of speeches and dancing before dinner was served at nearly 10pm, and I wasn&#8217;t bored in the least.  I got to meet and catch up with cousins who I haven&#8217;t seen in 15 years; you know when you meet up with some friends from your childhood and you&#8217;re so relieved and happy that you just click with them?  That&#8217;s what it felt like &#8212; one of those natural highs that keeps you going for days, multiplied by every single one of them I met.</p>

<p>Apart from meeting up with the relatives, I of course also visited <a href="http://www.dilabs.net/">Dom and Zoe</a>, who are very much settled in and happy in Toronto.  I got an excellent reminder of just how nice it is to live in the heart of a city: a 10-minute walk brings you to fantastic caf&Egrave;s, excellent shopping, and even the water (for those Australians who miss seeing the ocean glitter during a sunny day, like spoiled old me).</p>

<p>Amongst other things, I met up with the esteemed <a href="http://www.uni-graz.at/imawww/thaller/wolfgang/">Wolfgang Thaller</a>, the <a href="http://www.haskell.org/ghc/">Glasgow Haskell Compiler</a> Mac maintainer, all-around far-too-clever person who knows a hell of a lot about everything, from World War I to Alpha Centauri to s Objective-C and C++ wizardry.  Plus, Wolfgang didn&#8217;t even yell at me when I was half an hour late to meet him at the bus station (oops).  Nice chap, he is!  We ended up soaking up the sun on a rare sunny Toronto day at Harbourside, which is just south of CN Tower, drinking latt&Egrave;s, tea, and beer, and consuming a most excellent 600oz steak for dinner.  (I still don&#8217;t get Canada&#8217;s units of measurement, by the way: make up your mind whether you use metric or imperial!  Metric preferable.)</p>

<p>The other surprise to come in Toronto was meeting up with an old friend of mine, Astrid Fauchon, for those of you who knew me 10 years ago and remember her.  For those who want the details, feel free to email me, but I&#8217;m happy to say that it was really good to see her again, and that it gave closure to one of the only bits of my life that I felt never really wrapped up nicely.</p>

<p>The most interesting bit of the trip was really feeling all the events happen together: I just had a great time.  I was getting probably an average of 4-6 hours of sleep every day, and while I was a little stressed at times, I was really glad I was kept so bu.  Catching up with cousins and old friends and just clicking with all of them felt wonderful, and drove the point home that friends and family really are the important things around.  I&#8217;m really lucky to be able to see all of them again, and I guess it changed my perspective on things a little.  A trip like this reminded me that making the trek halfway across the world to see friends and family is so much more than worth it, and all the nervousness of not seeing them in 15 years and worrying about whether you&#8217;ll get along well is often gone in the first few seconds.  Here&#8217;s a toast to good mates!</p>

<p>Update: I&#8217;ve posted some photos online of <a href="http://www.algorithm.com.au/gallery/toronto">Toronto in general</a>, <a href="http://www.algorithm.com.au/gallery/jenash_wedding">Jennifer and Ashish&#8217;s wedding</a>, and meeting up with <a href="http://www.algorithm.com.au/gallery/liems_toronto">my cousins</a>.</p>]]></content:encoded></item><item><title>Sony PSP and Wipeout Pure</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2005-06-06T21:17:59-07:00</dc:date><link>http://algorithm.com.au/blog/files/b59ee63d385bc87e26477c704f82db87-396.html#unique-entry-id-396</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b59ee63d385bc87e26477c704f82db87-396.html#unique-entry-id-396</guid><content:encoded><![CDATA[<p>One thing that made a serious dent into my ever-growing credit card debt while I was in Toronto was getting a <a href="http://www.us.playstation.com/psp.aspx">Sony <span class="caps">PSP</span></a>, which I&#8217;m glad to say was money well-spent.  <a href="http://www.gamespot.com/psp/driving/wipeout/">Wipeout Pure</a> absolutely rips arse.  (Dom, I&#8217;m up to 21 gold medals now, go me!)</p>

<p>There&#8217;s been plenty of good reviews on the <span class="caps">PSP </span>floating around on the Web, so I won&#8217;t add to them.  All I will say about it is that Wipeout Pure is <em>great</em>: if you&#8217;re an oldskool Wipeout 2097/XL fan like myself and was a bit disappointed with the feel of Wipeout Fusion, Pure brings back all the goodness of 2097.  At first I thought it would be a bit restricting playing on a small screen instead of a nice big TV or monitor, but the freedom the <span class="caps">PSP </span>gives you is a big win: I was playing the thing at the airport lounges, planes, and in bus shuttles.  I wouldn&#8217;t use it as an iPod replacement simply because the iPod does that job a lot better (and as significantly longer battery life, too), plus the <span class="caps">PSP </span>isn&#8217;t quite small enough to fit into one&#8217;s pocket yet.</p>

<p>So, at least if you were interested in the <span class="caps">PSP </span>for Wipeout Pure, go get one.  Pure is the pinnacle of the Wipeout series so far.</p>]]></content:encoded></item><item><title>Los Angeles</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-06-06T21:21:18-07:00</dc:date><link>http://algorithm.com.au/blog/files/1228cb9d393aea00eedfb5827a30226e-397.html#unique-entry-id-397</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/1228cb9d393aea00eedfb5827a30226e-397.html#unique-entry-id-397</guid><content:encoded><![CDATA[<p>Shopping, shopping, shopping.  That sums up <span class="caps">L.A. </span>pretty nicely for me: all those fun boutique shops that haven&#8217;t come to Australia yet (Banana Republic, Club Monaco, Zara, the Apple Store, Barnes and Nobles, and of course, Victoria&#8217;s Secret), and the one-and-only <a href="http://www.frys.com/">Fry&#8217;s Electronics</a>, the biggest place I know of that has such a craphouse website.</p>

<p>I guess Dom and Zoe were feeling like they needed a small break, so they actually came down to visit <span class="caps">L.A. </span>with me, which was awesome: I introduced the two to <a href="http://www.algorithm.com.au/gallery/grove">The Grove</a>, the only place that I absolutely have to go to while I&#8217;m in Los Angeles.  Sun, outdoors, great caf&Egrave;s and eateries (hello Cheesecake Factory!), movies, girls wearing tank tops, free wireless courtesy of an Apple Store &#8230; yep, my kinda place.  I&#8217;m a tad (but only a tad) ashamed to say that I spent far too much money there for my own good.  But hey, you only live once, right?  (At least my credit card still works, which means that I haven&#8217;t used up my credit limit yet &#8230;)</p>

<p>My relatives in Los Angeles took me to a totally awesome Japanese <span class="caps">BBQ </span>retaurant for dinner on Friday: think Korean <span class="caps">BBQ, </span>where you sit at a table with a fire-making stove thingy in the middle of the table, but Japanese intead.  Of course, this may not have been the best decision after my cousin and I ate at <a href="http://www.tonyromas.com/uploaded/CIM-C2-ToGo-031005-V37a23.pdf">Tony Roma&#8217;s</a> for lunch and thus overstuffed ourselves with ribs, but somehow I still managed to scoff down the huge piles of beef and veges.  Very, very yum; very, very good.</p>

<p>All in all (much like this blog entry), my trip to Los Angeles was too short.  It was great catching up with my cousins and being able to see Dom and Zoe for a bit longer, but really, one and a half days just isn&#8217;t that much time to do anything, particularly in a city as diverse as Los Angeles.  Ahh well, considering that the <a href="http://www.auc.edu.au/">Apple University Consortium</a> <a href="http://www.auc.edu.au/audf/wwdc05/delegates.html">scholarship</a> more-or-less paid for the trip over here, I guess I can&#8217;t complain too much!</p>]]></content:encoded></item><item><title>San Francisco&#x2c; Saturday and Sunday</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-06-06T21:55:31-07:00</dc:date><link>http://algorithm.com.au/blog/files/90a280aedbcb1e67d0606fd414a7b24f-398.html#unique-entry-id-398</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/90a280aedbcb1e67d0606fd414a7b24f-398.html#unique-entry-id-398</guid><content:encoded><![CDATA[<p>I left Los Angeles on Saturday afternoon (to the great sadness of my cousin&#8217;s kids: sorry Kevin and Kallista!) for the windy city of San Francisco.  For the first time evar, <span class="caps">LAX </span>did not completely suck.  Traveller&#8217;s tip: if you can, try catching an afternoon flight from <span class="caps">LAX. </span> There are <em>no</em> queues.  Since I&#8217;m sure frequent <span class="caps">LAX </span>travellers will be stunned after reading that, let me repeat that: no queues.  I had maybe five people in line before me at the check-in counter,  exactly two people in line before me at security, and that was it.  I was a very happy camper on that <span class="caps">LAX </span>visit.</p>

<p>The flight itself was fine: a tiny little aircraft (three seats per row; one on the port side, two on the starboard side) with complementary beverages (<a href="http://www.supercalafragalistic.com/sounds2/anchorman/scotch.mp3">I love Coke, Cokey Coke Coke, Here It Goes Down, Down In My Belly, Mmm Mmm Mmm</a>).  I arrived in San Francisco around 4:15pm; strangely enough, that was one hour ahead of schedule, but I ain&#8217;t complaining.  By the time I arrived at the hotel (the <a href="http://marriott.com/courtyard/default.mi">Courtyard Marriott</a>, for those interested) and settled in, it was about 6pm.  The Moscone convention centre where <span class="caps">WWDC </span>was held was <a href="http://ckdake.com/gallery/2004-june-wwdc/IMG_2032">kinda very hard to miss</a> (that&#8217;s the 2004 image, but 2005 is more-or-less the same), so I grabbed my <a href="http://www.algorithm.com.au/gallery/wwdc_2005/IMG_2928">fancy <span class="caps">WWDC </span>badge</a> from there, and had dinner at the <a href="http://images.google.com/images?q=sony%20metreon&amp;hl=en&amp;lr=&amp;c2coff=1&amp;safe=on&amp;sa=N&amp;tab=wi">Sony Metreon</a> building across the street.  (What is it about the <span class="caps">USA </span>that gives rise to meal names such as &#8220;croissandwich&#8221; and &#8220;chickenshroom&#8221;?)</p>

<p>After that, of course, I visited the Apple Store, which was a mere 5-minute walk away from the Sony Metreon building.  As usual, I didn&#8217;t end up buying anything there, but it was just one of those mandatory things I had to do when you&#8217;re in a North American city.  What was more intriguing was the Virgin Megastore that was right next to the Apple Store: after spending around half an hour there, I picked up a James Lavelle Global Underground mix CD (Barcelona #023, not the more popular Romania #026 one), and the new DJ Rap album named <a href="http://www.internetdj.com/article.php?storyid=609">Bulletproof</a>: we&#8217;ll see if the oldskool jungle and drum&#8217;n&#8217;bass girl is still as good as she was in the late 90s!</p>]]></content:encoded></item><item><title>WWDC&#x2c; San Francisco&#x2c; Monday</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>Mac OS X</category><dc:date>2005-06-07T14:13:52-07:00</dc:date><link>http://algorithm.com.au/blog/files/3ef0e046ff0c71533ea111f0fa991fd7-399.html#unique-entry-id-399</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3ef0e046ff0c71533ea111f0fa991fd7-399.html#unique-entry-id-399</guid><content:encoded><![CDATA[<p>Geek news first: I guess all the geeks have heard the news that Apple&#8217;s switching to Intel x86 processors.  I won&#8217;t offer any particular opinion of mine here (at least, not yet &#8230;), though I will warn that there are plenty of totally crackpot theories flying around.  If you&#8217;re not a long-time Mac user (or possibly even a Mac developer), it&#8217;s far too easy to believe some outlandish theories that so-called respectable people are crying about.  Probably the two most balanced and accurate things I&#8217;ve read so far about it is <a href="http://arstechnica.com/columns/mac/mac-20050607.ars">John Siracusa&#8217;s editorial</a>, and (somewhat surprisingly) <a href="http://forums.macrumors.com/showthread.php?s=&amp;threadid=130673">MacRumor&#8217;s Intel <span class="caps">FAQ</span></a>.  I&#8217;m waiting for the hype to die down (and also to play with one of the Intel Mac developer systems) before I make any judgements.</p>

<p>The rest of the day was pretty good too, though quite uneventful.  The sessions that day were relatively interesting (yep, that means I actually attended all the sessions, aren&#8217;t I a good boy?), and I retired back to the Courtyard Marriott early since I&#8217;ll have plenty more times in my life to come back to San Francisco and party like it&#8217;s 1999.  (Nothing to do with how I have plenty of work to do, email to check, and sleep to catch up on, I swear.)  I seem to run into all the other Australian students when I&#8217;m least looking for them, too: no sign of them for almost the whole day, and then when I&#8217;m just about to leave, I run into about ten of them.</p>

<p>All in all, a pretty cheap&#8217;n&#8217;cheerful day for me, with the small exception of that small announcement by Steve Jobs, of course.  Sounds like fun, if you ask me!  I&#8217;m all about fun.</p>]]></content:encoded></item><item><title>WWDC&#x2c; San Francisco&#x2c; Tuesday</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>Mac OS X</category><dc:date>2005-06-08T13:53:11-07:00</dc:date><link>http://algorithm.com.au/blog/files/07a724bdea14757e1a3a0ef19db08e97-400.html#unique-entry-id-400</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/07a724bdea14757e1a3a0ef19db08e97-400.html#unique-entry-id-400</guid><content:encoded><![CDATA[<p>Not much news other than geek news again, I&#8217;m afraid.  (I guess attending a conference from 9-6:30pm saps most of the day away!)  The day was pretty uneventful, though I did sneak out to visit the Apple Store and CompUSA during one session time slot where I really wasn&#8217;t interested in anything that was running.  You&#8217;d all be very proud of me: I picked up quite a few things at both places, but put them back down before I bought them.  Fear my willpower.</p>

<p>One thing I did forget to mention on Monday was one awesome demo at the end of the day.  During the Graphics and Media State of the Union talk, a DJ was invited up on stage to show off some of the new graphics features on the Mac.  A DJ showing off graphics, you say?  He demonstrated completely live, real-time &#8220;sequencing&#8221; of visual compositions of movies, and had hooked up visual effects to effects he was running on the music.  e.g. Mixing between two songs would blend two different videos together, and applying a grinding resonance filter to the music would make the screen warp and distort.  It was all very, very cool stuff: something I wanted to do quite a number of years ago when I was actively doing mixing.  Apple is really being a bad boy and inviting me back into some of my old habits!  The DJ there is playing at a local San Francisco club on Thursday: I&#8217;ll so be there.</p>

<p>At the end of the day, I ran into <a href="http://www.cse.unsw.edu.au/~ashleyb/">Ashley Butterworth</a>, one of the other people at <span class="caps">WWDC </span>from my own Uni who I hadn&#8217;t met yet.  We ended up going back to his room and randomly nattering about various geeky things, from Cocoa development to Objective-C vs Haskell.  After that, I retired to my hotel room and flopped into bed, and that was that.  Zzzz &#8230;</p>]]></content:encoded></item><item><title>Creating Universal Binaries with GNU autotools</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-06-10T16:33:02-07:00</dc:date><link>http://algorithm.com.au/blog/files/76381583a86ba9e11768bd58ff15cc50-401.html#unique-entry-id-401</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/76381583a86ba9e11768bd58ff15cc50-401.html#unique-entry-id-401</guid><content:encoded><![CDATA[<p>If you&#8217;re a Unix hacker on Mac OS X, chances are you&#8217;ll be using a very large number of open-source projects that use <span class="caps">GNU </span>autotools: these are the projects that you typically compile with the <code>./configure</code> script.  It turns out that building a Mac OS X &#8220;Universal Binary&#8221; that runs on both PowerPC and Intel isn&#8217;t too hard at all, with the appropriate magic incantations to the <code>./configure</code> script:</p>

<pre><code>CFLAGS=&quot;-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc&quot; \
./configure </code></pre>

<p>Notes about this:</p>


<ul>
<li>You will get a ton of warnings from the linker during the compile that the <code>-syslibroot</code> parameter was ignored since no linking was done.  Just ignore them.  (If you find out how to shut <em>ld</em> up, do email me!)</li>
<li>You may need to pass the <code>--disable-dependency-tracking</code> to <code>./configure</code>, especially for projects that use <span class="caps">GNU </span>libtool.  Yeah, this means you won&#8217;t get proper dependency tracking for your project, so (just like the <a href="https://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/">Universal Binary Programming Guidelines</a> suggests) I&#8217;d suggest you compile a universal binary only when you build a proper release package.</li>
</ul>



<p><strong>Update</strong>: Note that this is merely a way to get autotools to <em>build</em> universal binaries.  It definitely does not mean that your project will automagically work with on both PowerPC and x86.  (In particular, you&#8217;ll have to change autoconf-supplied architecture and endian macros such as <code>AC_C_BIGENDIAN</code>: see the autoconf section of the <a href="http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_compiling/chapter_2_section_6.html#//apple_ref/doc/uid/TP40002217-//apple_ref/doc/uid/TP40002217-CH206-240191-BAJJFEAC">Universal Binary Programming Guidelines</a> for more details.)</p>

<p><strong>Update (2)</strong>: It seems that this technique has officially been sanctioned by Apple: <a href="http://developer.apple.com/technotes/tn2005/tn2137.html">technical note <span class="caps">TN2137</span></a> uses the exact <code>CFLAGS</code> that I&#8217;ve described here.</p>]]></content:encoded></item><item><title>Ryan Gordon on Games Development</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-06-13T15:39:39-07:00</dc:date><link>http://algorithm.com.au/blog/files/0e321e02c82e50b5cbced03d201e004f-402.html#unique-entry-id-402</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0e321e02c82e50b5cbced03d201e004f-402.html#unique-entry-id-402</guid><content:encoded><![CDATA[<p><a href="http://www.icculus.org/">Ryan Gordon</a>, the lone gunman who&#8217;s responsible for porting quite a number of Wintendo games to Linux and Mac OS X, was <a href="http://www.phoronix.com/scan.php?page=article&amp;item=203&amp;num=1">interviewed</a> recently.  He had this to say about coding for games:</p>

<blockquote><p>None of the games are rewarding. Is that bad of me to say? Game development has nothing to do with quality and everything to do with shipping what you can get away with. That&#8217;s just how it is; I didn&#8217;t make this horrible world.</p></blockquote>

<p>Nothing unexpected, I guess.  I wonder how many fields <em>haven&#8217;t</em> succumbed to the &#8220;it&#8217;s all a matter of what you can get away with&#8221; mantra of quasi-engineering?  Writing academic papers, maybe?  Nahh &#8230;</p>]]></content:encoded></item><item><title>godskitchendigital</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Music</category><dc:date>2005-06-14T03:18:25-07:00</dc:date><link>http://algorithm.com.au/blog/files/7ad1018e600f75583172d5737999ed59-403.html#unique-entry-id-403</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7ad1018e600f75583172d5737999ed59-403.html#unique-entry-id-403</guid><content:encoded><![CDATA[<p>It&#8217;s been about a month now since I received an email about this, and I haven&#8217;t seen it mentioned anywhere else yet.  If you&#8217;re into electronica/dance music and have been looking for a decent online music store to buy tracks from, check out <a href="http://www.godskitchendigital.com/">godskitchendigital</a>.  The name is slightly misleading: they thankfully sell lots of stuff, not just God&#8217;s Kitchen CDs.  Some interesting bits of information about the site:</p>


<ul>
<li>They have a pretty good selection of electronica available, and carry quite a few tracks that aren&#8217;t available even at the <a href="http://www.apple.com/itunes/store/">iTunes music store</a>.  I managed to track down some <a href="http://www.google.com/search?q=Satoshi%20Tomiie">Satoshi Tomiie</a> tracks there that I haven&#8217;t seen anywhere else.</li>
<li>The music file quality is very impressive: pick and choose between 320k (LAME-encoded) <span class="caps">MP3,</span> 192k <span class="caps">M4A </span>(MPEG-4 audio), or, for another 50c, get the .WAV files instead (!).  Note that they have a weird system where if you order a .WAV, you get shipped it on a CD rather than just downloading it.  No, I don&#8217;t understand that either, but it&#8217;s nice to see they offer it as an option.  For all the iPod owners, the 192k <span class="caps">M4A </span>files work perfectly fine in both iTunes + iPod.</li>
<li>100% Flash interface.  An interesting idea, though I&#8217;m sure it&#8217;s going to annoy the living hell out of Mac users, where the Flash plugin is unexplainably slow as molasses.</li>
<li>The big feature: no <a href="http://en.wikipedia.org/wiki/Digital_rights_management"><span class="caps">DRM</span></a>.  None.  At all.  If you download a 320k <span class="caps">MP3, </span>that&#8217;s exactly what you get: a 320k <span class="caps">MP3, </span>with properly formatted <span class="caps">ID3 </span>tags.  No weirdass player you have to use, no iTunes music store-style <span class="caps">M4P </span>protected media.  This is real nice indeed; I wonder what their legal department had to do to pull this one off.</li>
</ul>



<p>So, if you like electronica, go check it out.  The all-Flash interface might not be that appealing (especially for Mac users), but the selection is good, the price is reasonable (especially for electronic music, where you tend to want singles/EPs more than albums) and the downloads are excellent quality.  Oh yeah, and no <span class="caps">DRM</span>!</p>]]></content:encoded></item><item><title>Endianness</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-06-23T07:07:21-07:00</dc:date><link>http://algorithm.com.au/blog/files/4ce9e39c25b8e9c8a1b6c1244a2ed8f0-404.html#unique-entry-id-404</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/4ce9e39c25b8e9c8a1b6c1244a2ed8f0-404.html#unique-entry-id-404</guid><content:encoded><![CDATA[<p>From Apple&#8217;s <a href="http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_byte_swap/chapter_4_section_2.html#//apple_ref/doc/uid/TP40002217-CH243-284985">Universal Binary Programming Guidelines</a>:</p>

<blockquote><p>Note: The terms big-endian and little-endian come from Jonathan Swift&iacute;s eighteenth-century satire Gulliver&iacute;s Travels. The subjects of the empire of Blefuscu were divided into two factions: those who ate eggs starting from the big end and those who ate eggs starting from the little end.</p></blockquote>

<p>Good to see Apple addressing the important questions in their guides.</p>]]></content:encoded></item><item><title>Valgrind vs C and C++</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-07-12T08:47:22-07:00</dc:date><link>http://algorithm.com.au/blog/files/e8bfd03aeecdd1dff1fb39a490d1bdff-405.html#unique-entry-id-405</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e8bfd03aeecdd1dff1fb39a490d1bdff-405.html#unique-entry-id-405</guid><content:encoded><![CDATA[<p>From an <a href="http://builder.com.com/5100-6375-5136747.html?tag=tt">interview with Julian Seward</a>, author of the superb <a href="http://valgrind.org/">Valgrind</a> (as well as <a href="http://www.maxuk.net/cacheprof.html">cacheprof</a>, <a href="http://www.bzip.org/">bzip2</a>, and a co-author for the <a href="http://www.haskell.org/ghc/">Glorious Glasgow Haskell Compiler</a>: quite a remarkably productive fellow, huh?):</p>

<blockquote><p>Valgrind is loaded with assertion checks and internal sanity checkers which periodically inspect critical data structures. These are permanently enabled. I don&#8217;t care if 5 percent or even 10 percent of the total run-time is spent in these checks&oacute;automated debugging is the way to go. As a result, Valgrind almost never segfaults&oacute;instead it emits some kind of a useful error message before dying. That&#8217;s something I&#8217;m rather proud of.</p></blockquote>

<p>Nice indeed; I wonder if programming languages of the future will be able to do automatic assertions of such data structures in their run-time systems.  All you&#8217;d need is to annotate the structures with some simple boolean conditions, and the language can merrily check them whenever a garbage collection pass is executed (since programming languages of the future will all <em>have</em> automatic memory management, of course.  Right?  Helllllllo?)</p>

<p>And, one more little quote (sorry, I couldn&#8217;t resist):</p>

<blockquote><p>Valgrind is only useful because C and C++ are such crappy programming languages.</p></blockquote>

<p>A-men to that, Haskell brother.  Snigger snigger snigger &#8230;</p>]]></content:encoded></item><item><title>Flash Player 8 public beta for Mac</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Mac OS X</category><dc:date>2005-07-14T04:10:07-07:00</dc:date><link>http://algorithm.com.au/blog/files/6efa1c3f0d89320f7b643c5b3fed8472-406.html#unique-entry-id-406</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6efa1c3f0d89320f7b643c5b3fed8472-406.html#unique-entry-id-406</guid><content:encoded><![CDATA[<p>Macromedia&#8217;s <a href="http://www.macromedia.com/software/flashplayer/public_beta/">Flash Player 8</a> has entered public beta testing.  For Mac OS X folks, the most significant change is that, well, it finally doesn&#8217;t suck.  Or, to put it in another way, it doesn&#8217;t feel like you&#8217;re running it on a 16Mhz 68000.  Finally, enjoy the delights of <a href="http://www.homestarrunner.com/sbemail.html">Strong Bad</a> and <a href="https://www.godskitchendigital.com/">godskitchendigital</a> without Flash grinding 100% of your <span class="caps">CPU</span>!</p>

<p>With joy, I can scratch &#8220;write Safari plugin from open-source Flash implementation&#8221; off my <span class="caps">TODO </span>list &#8230;</p>

<p><strong>Update</strong>: Flash Player 8 is now out of the beta-testing phase.  You can download the full version from Macromedia&#8217;s Flash <a href="http://www.macromedia.com/software/flashplayer/">download page</a>.</p>]]></content:encoded></item><item><title>Language Optimisations vs Domain-Specific Optimisations</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-07-16T10:03:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/7c5122ea0a0880e4af268585f4ac5715-407.html#unique-entry-id-407</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/7c5122ea0a0880e4af268585f4ac5715-407.html#unique-entry-id-407</guid><content:encoded><![CDATA[<p>To quote part of the abstract from Arch D. Robinson&#8217;s awesome paper, <a href="http://www.eecg.toronto.edu/~tsa/crgpapers/arch.pdf">The Impact of Economics on Compiler Optimization</a>:</p>

<blockquote><p> Compile-time program optimizations are similar to poetry: more are written than are actually published in commercial compilers.  Hard economic reality is that many interesting optimizations have too narrow an audience to justify their cost in a general-purpose compiler, and custom compilers are too expensive to write.  This has already happened accidentally for C++, albeit imperfectly, in the form of template metaprogramming.</p></blockquote>

<p>In a nutshell, writing optimisations is hard.  Often, it&#8217;s too much of an engineering effort to implement tons of optimisations in a production-quality compiler: the gains you see simply aren&#8217;t worth the amount of effort.  I won&#8217;t ramble on about this, since that&#8217;s the focus of Robinson&#8217;s paper, and it&#8217;s an enlightening read if you&#8217;re interested in that topic.  (It&#8217;s also an enlightening read of you&#8217;re wondering what all the fuss is about with C++ templates.)  Related to Robison&#8217;s paper is a talk given by Bill Pugh, titled &#8220;<a href="http://www.cs.umd.edu/~pugh/IsCodeOptimizationRelevant.pdf">Is Code Optimization Research Relevant?</a>&#8221;.  One standout slide from that talk is this one:</p>

<blockquote><p> 18 years from now, if we pull a Pentium <span class="caps">III </span>out of the deep freeze, apply our future compiler technology to <span class="caps">SPECINT2000, </span>and get an additional 2x speed improvement &#8230; I will be impressed/amazed.</p></blockquote>

<p>And Bill is pretty much right.  But I won&#8217;t talk about whether research on optimisations is relevant or not &#8212; again, have a browse of Bill&#8217;s talk if you want to debate that with him.</p>

<p>What I <em>do</em> want to talk about is that both Robinson&#8217;s paper and Pugh&#8217;s talk both hint at something which is never explicitly stated: the successful optimisations which have been done in the past few years are mostly <em>domain-specific</em> optimisations.  These are optimisations which apply to only to a particular problem area, e.g. graphics (thus the word &#8220;domain&#8221; in domain-specific).  Pugh gives the example that optimising matrix multiplication is quite successful: here, the domain that is being optimised is matrices, a well-defined and well-known area of maths.  Robinson makes the point that C++ templates are successful because they can be used to <em>create</em> domain-specific optimisations, since they can be used to <a href="http://c2.com/cgi/wiki?MetaProgramming">meta-program</a> the compiler.</p>

<p>One interesting example of a domain-specific optimisation are the vector units on a modern desktop system: AltiVec on the PowerPC, the PlayStation 2&#8217;s Emotion Engine, <span class="caps">MMX</span>/<acronym title="2">SSE</acronym> on Intel x86s.  While they&#8217;re not part of the compiler, they are a perfect example of just how well you can optimise code when you start having domain-specific constructs available (in this case, vector operations).  Modern-day programmable graphics cards such as the latest NVidias and <span class="caps">ATI</span> Radeons are proof that native language (and hardware) support for vectors can reap massive speed benefits, and <span class="caps">IBM&#8217;</span>s new Cell <span class="caps">CPU </span>begs for properly vectorised code to get <em>any</em> decent performance out of it.  The point of all this is: if your programming language natively supports expressing the problem domain you want to solve, you can really optimise the hell out of it.</p>

<p>In the future, I hope that languages or compilers will enable us to easily write domain-specific optimisations, because language optimisation research &#8212; especially for imperative languages &#8212; simply aren&#8217;t going to give us that much of a speedup anymore.  Look at the number of optimisation options in the gcc manpage and count how many of them will really give you a significant speedup.  Beyond some basic, well-known optimisations, such as <a href="http://en.wikipedia.org/wiki/Constant_propagation">constant propagation</a> and <a href="http://en.wikipedia.org/wiki/Inlining">inlining</a>, are the rest of those obscure optimisations really worthwhile?  Is it worth it to put the engineering effort into those optimisations when you not only have to code them up, but also maintain them and  make sure that they don&#8217;t cause optimised program to behave differently to non-optimised programs?</p>

<p>I&#8217;d rather that all that engineering effort be put into making the language and compiler more extensible, so that <em>libraries</em> can come bundled with their own optimisations that can be added to the compiler.  This potentially gives a much greater speed increase.  In low-level languages such as C, this doesn&#8217;t make such a big difference because you&#8217;re programming so close to the hardware (though it certainly can sometimes: observe the success of C++ templates).  High-level languages that enable the programmer to more closely express the problem domain in the language, such as Python and Haskell, have much more to gain.</p>]]></content:encoded></item><item><title>Patterns in Software</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-07-23T08:55:54-07:00</dc:date><link>http://algorithm.com.au/blog/files/fcf5234493f935e6612334ca6dd81ce7-408.html#unique-entry-id-408</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fcf5234493f935e6612334ca6dd81ce7-408.html#unique-entry-id-408</guid><content:encoded><![CDATA[<p>Paul Graham writes in his &#8220;<a href="http://www.paulgraham.com/icad.html">Revenge of the Nerds</a>&#8221; article:</p>

<blockquote><p>&#8230; in the OO world you hear a good deal about &#8220;patterns&#8221;. I wonder if these patterns are not sometimes evidence of &#8230; the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble.  The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I&#8217;m using abstractions that aren&#8217;t powerful enough &#8212; often that I&#8217;m generating by hand the expansions of some macro that I need to write.</p></blockquote>]]></content:encoded></item><item><title>Mighty Mouse</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2005-08-06T00:01:26-07:00</dc:date><link>http://algorithm.com.au/blog/files/1ff014b3e7866a3f9f4bc2dafdf31177-409.html#unique-entry-id-409</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/1ff014b3e7866a3f9f4bc2dafdf31177-409.html#unique-entry-id-409</guid><content:encoded><![CDATA[<p>I wrote up some <a href="http://forums.whirlpool.net.au/forum-replies.cfm?t=378293&amp;p=6%23r103">first impressions</a> of Apple&#8217;s new <a href="http://www.apple.com/mightymouse/">Mighty Mouse</a> on the Whirlpool forums, if anyone&#8217;s curious.  The things appear to be selling like hotcakes at my local AppleCentre!</p>]]></content:encoded></item><item><title>My Cyborg Name</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2005-08-24T17:10:26-07:00</dc:date><link>http://algorithm.com.au/blog/files/ccdf94589262c6bb5aae77b575e0bfcd-410.html#unique-entry-id-410</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ccdf94589262c6bb5aae77b575e0bfcd-410.html#unique-entry-id-410</guid><content:encoded><![CDATA[<p><a href="http://www.cyborgname.com"><br />
<img src="http://www.cyborgname.com/webimages/edox-ANDRE.png"
width="240" height="180"
alt="Artificial Networked Device Responsible for Exploration"
border="0" /></a></p>]]></content:encoded></item><item><title>Your code as a filesystem</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2005-09-07T17:31:43-07:00</dc:date><link>http://algorithm.com.au/blog/files/a8cf2786255f05e9edff60d43d6edb9c-411.html#unique-entry-id-411</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/a8cf2786255f05e9edff60d43d6edb9c-411.html#unique-entry-id-411</guid><content:encoded><![CDATA[<p>Ever wanted to <a href="http://www.cincomsmalltalk.com/userblogs/avi/blogView?showComments=true&amp;entry=3303394043">view the classes and methods in your code via <span class="caps">FTP</span></a>?  If not, why not?</p>]]></content:encoded></item><item><title>My South Park Character</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2005-09-07T17:40:53-07:00</dc:date><link>http://algorithm.com.au/blog/files/5e3149d85912fb61ebc91710801cd1d8-412.html#unique-entry-id-412</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5e3149d85912fb61ebc91710801cd1d8-412.html#unique-entry-id-412</guid><content:encoded><![CDATA[<p>For those who haven&#8217;t seen the awexome <a href="http://www.planearium2.de/flash/spstudio.html">South Park Character Studio</a> yet:</p>

<p><img src="/files/about_me/My-South-Park-Character.png" alt="" /></p>

<p>Ice cream in the left hand, skis on the feet.  Aww jeah.</p>]]></content:encoded></item><item><title>The Unbearable Lightness of Being</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2005-09-17T03:10:20-07:00</dc:date><link>http://algorithm.com.au/blog/files/aa1550103d4c9276b43256a46bc11744-413.html#unique-entry-id-413</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/aa1550103d4c9276b43256a46bc11744-413.html#unique-entry-id-413</guid><content:encoded><![CDATA[<p>Wow.  How on Earth does one do justice to such a classic book with a little, meagre blog entry?  There are plenty of comprehensive reviews of it already on <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0060932139/104-5049586-4509558?v=glance">Amazon.com</a>, so I encourage you to read those reviews and descriptions if you&#8217;ve never heard of the book.  It&#8217;s apparently pinned as a difficult-to-read book, but I found the writing style quite conversational, and easy to put down and pick up where you left off (unlike those evil books which you just can&#8217;t put down even when it&#8217;s 5am and you <em>really</em> should be going to bed so you can stay awake at work the next day).  One thing that surprised me about it is that it&#8217;s more recent than I expected: from what I can gather, the first publishing date is in 1984.</p>

<p>(Note: spoilers follow!)</p>

<p>While I loved pretty much every part of the book, the most striking bits for me were:</p>


<ul>
<li>Milan Kundera&#8217;s vivid descriptions of Karenin, Tomas and Tereza&#8217;s dog.  I don&#8217;t think I&#8217;ve ever been moved so much about an animal as when I read about how joyful Karenin was about his daily activities, and later in the book when he&#8217;s not so joyful.  I didn&#8217;t quite shed a tear, but the descriptions evoked some serious happiness and sadness.</li>
<li>Kundera&#8217;s thoughts about &#8220;what happens once happens not at all&#8221;, and the idea that chance is what defines your life.  It&#8217;s only a short paragraph or two, but the description of the six unlikely events that led Tereza to meet Tomas has stuck with me long after reading it.</li>
<li>The idea that a man (ahem, in this politically correct age, I mean, a <em>person</em>) is defined by the <em>heavy</em> decisions he makes.  It&#8217;s interesting to note which philosophers Kundera refers to when he compares lightness and heaviness, and how some viewed lightness as a Good Thing and heaviness and weightiness as a Bad Thing.</li>
<li>The whole idea of monogamy: is sleeping around on your partner an <em>acceptable</em> thing to do?  Can it be forgiven in some circumstances, or for some people?  Is anybody who sleeps around when they&#8217;re married a Bad Person for breaking the vow of marriage (which, I&#8217;d like to point out for the record, I take pretty seriously)?  I don&#8217;t know.  Is <em>anything</em> in this world so black and white?  Are relationships so important and sacred that they&#8217;re not also susceptible to the laws of complexity?</li>
</ul>



<p><em>Es muss sein, es muss sein, es muss sein</em>.  Immense thanks to the person  who gave me this book; my life is certainly richer for it!</p>]]></content:encoded></item><item><title>The Old vs the Different</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2005-10-13T21:47:47-07:00</dc:date><link>http://algorithm.com.au/blog/files/8e45b8c460f9d5df386fd1c5c0595eae-414.html#unique-entry-id-414</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/8e45b8c460f9d5df386fd1c5c0595eae-414.html#unique-entry-id-414</guid><content:encoded><![CDATA[<p><a href="http://www.unsanity.org/">Rosyna Keller</a> writes an interesting blog entry about patching some bugs in Apple&#8217;s Safari and Preview applications.  All good and well, but if you&#8217;re a veteran Unix hacker, the following statement will likely catch your eye:</p>

<blockquote><p><a href="http://www.unsanity.org/archives/000433.php">In a perfect world paths would never be used in software. They&#8217;re evil.</a></p></blockquote>

<p>It&#8217;s interesting coming from a Unix-centric background that there may be ways to refer to things on your filesystem with something&#8212;anything&#8212;<em>other</em> than a path (and inodes don&#8217;t really count).  In a similar fashion to groupthink, the idea of paths as the Primary Way of locating files have been so ingrained into Unix culture that it&#8217;s quite hard to think about anything else.</p>

<p>The operating system world is so largely dominated by Unix and Windows these days that it&#8217;s hard to conceive of other ways of doing basic things like naming files.  I greatly respect people like <a href="http://kerneltrap.org/node/5654">Hans</a> <a href="http://www.namesys.com/">Reiser</a> who are trying to advance the state of computing, and have to fight tooth and nail with traditionalists to do so.  (Note that I&#8217;m not saying tradition, nor Unix, is bad: it&#8217;s just not a good enough excuse to reject new ideas that might conflict with it.)</p>

<p>I wonder if Unix (or at least Linux) will ever have something as user-friendly as the Mac&#8217;s aliases to locate files?  It is kind of nice that, you know, you can actually <em>move</em> a file to somewhere else on your disk and the application will automagically know where it is anyway.  You&#8217;d think that in 30+ years of computing, we&#8217;d be able to do at least <em>that</em> by now.</p>]]></content:encoded></item><item><title>IHT on Nguyen Tuong Van</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2005-12-02T18:57:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/f03080055a833fa107c41a02a8661a82-416.html#unique-entry-id-416</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/f03080055a833fa107c41a02a8661a82-416.html#unique-entry-id-416</guid><content:encoded><![CDATA[<p>I normally don&#8217;t post about current affairs, but there&#8217;s an <a href="http://www.iht.com/articles/2005/12/02/news/singapore.php">excellent article</a> on the <a href="http://www.iht.com/">International Herald Tribune</a> about <a href="http://www.google.com/search?q=Nguyen+Tuong+Van">Nguyen Tuong Van</a>&#8217;s execution, and its effects on the minds of the Australian public, and Australia-Singapore relations:</p>

<blockquote><p>Singapore&#8217;s dawn execution Friday of Nguyen Tuong Van, a convicted Australian drug smuggler, may ultimately raise fewer questions about Singapore&#8217;s rigorous penal code than it does about Australia&#8217;s readiness to integrate with rapidly developing Asian neighbors that do not share its views on human rights and other basic issues.</p></blockquote>

<p>Now, back to your regularly scheduled tech blogging&#8230;</p>]]></content:encoded></item><item><title>Star Wars&#x2c; Salvatore&#x2c; Vector Prime&#x2c; and Knights of the Old Republic</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2005-12-02T22:44:08-08:00</dc:date><link>http://algorithm.com.au/blog/files/87ab8bbe5c3ab4449cacaa8647800c15-417.html#unique-entry-id-417</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/87ab8bbe5c3ab4449cacaa8647800c15-417.html#unique-entry-id-417</guid><content:encoded><![CDATA[<p>I played the computer role-playing games Star Wars: Knights of the Old Republic <a href="http://www.bioware.com/games/knights_old_republic/">I</a> and <a href="http://www.lucasarts.com/games/swkotor_sithlords/">II</a> a while ago, and KoTOR II was up there with the immortal <a href="http://en.wikipedia.org/wiki/Planescape:_Torment">Planescape: Torment</a> and <a href="http://goinside.com/98/11/fo2.html">Fallout 2</a> as the best <span class="caps">RPG</span> I&#8217;ve ever played.  They presented the Star Wars universe in a whole new light that the movies don&#8217;t even hint at; I was actually <em>annoyed</em> that Star Wars <span class="caps">III </span>was such a <a href="http://www.thebestpageintheuniverse.net/c.cgi?u=episode3">Steaming Pile of Sith</a> because KoTOR I and <span class="caps">II&#8217;</span>s production values were just orders of magnitudes better &#8212; to the point where I felt the movies actually did some severe injustice to the Star Wars universe that it founded.  If you don&#8217;t know me that well, you&#8217;ll have to take it as a given that I really don&#8217;t get annoyed with movies very often; it&#8217;s just sad to see that such a rich world full of rich characters has such a bad reputation because the movies don&#8217;t give it any depth.</p>

<p>(I am completely aware that this all makes me sound like a raving militant geek, by the way.)</p>

<p>So, as an attempt to explore more Star Wars stuff, I picked up Vector Prime, the first of the books in the series about the New Jedi Order, written by R. A. Salvatore.  I really wanted to like this book, especially considering Salvatore wrote it and I respect him greatly as a fantasy author.  (I&#8217;d like to remind people who think Drizzt and the Forgotten Realms are totally clich&Egrave;, that the whole dark elf genre didn&#8217;t <em>exist</em> until Salvatore brought it to the greater public and <span class="caps">RPG </span>awareness.  Even if you don&#8217;t like his characters or the setting he writes in, he still writes the most vivid combat scenes out of any author I&#8217;ve ever read.)  To my minor disappointment, I thought Vector Prime was pretty average.  Maybe it&#8217;s because I was unjustifiably comparing its storyline to the one I experienced when I played KoTOR <span class="caps">II, </span>or maybe it&#8217;s because I&#8217;ve been reading &#8220;higher&#8221; literature lately such as the <a href="http://www.algorithm.com.au/mt/books/the_unbearable_lightness_of_being.html">Unbearable Lightness of Being</a>, but Vector Prime just seemed to be a bit&#8230; rushed, I think.  Too much happening, with not enough substance on the new characters you meet (as opposed to the portrayal of Luke, Leia, Han and Chewbacca, which were done perfectly).</p>

<p>You know that when you read a really good book, or (much more rarely) played an incredible computer game, you were glad you did because it <em>added</em> something to your life, and that you learnt something from it?  Vector Prime&#8217;s plot didn&#8217;t evoke those kind of feelings.  I put it in the category of good, enjoyable sci-fi, but you&#8217;re not missing out on much if you don&#8217;t read it.</p>

<p>So, Vector Prime&#8217;s an adequate introduction to the Star Wars universe, but for now, the Knights of the Old Republic games represent everything that&#8217;s awesome about Star Wars.  KoTOR <span class="caps">II, </span>in particular, is to be highly commended for exploring some pretty interesting philosophical issues while working within the confines of a licensed world where the artists and storytellers were restricted in what they were allowed to do.  I find it a bit of a shame that the computer games bring out the best in the genre, because books are just so much more <em>accessible</em> to the general public than computer games, so a lot of people just won&#8217;t experience what an excellent plot setting the Star Wars universe can be.  I&#8217;d love to see a good novel adaptation of the KoTOR plot lines, but somehow I don&#8217;t think that&#8217;ll ever happen.</p>

<p>Long story short: Vector Prime was pretty average, while KoTOR I and II rocked.  KoTOR I is much more accessible than II since BioWare are incredibly talented at writing <a href="http://www.bioware.com/games/shadows_amn/">mainstream <span class="caps">CRPG</span>s</a>, whereas KoTOR II throws you in the deep end: it&#8217;s much darker and gritty, but ultimately more rewarding thanks to ex-<a href="http://en.wikipedia.org/wiki/Black_Isle_Studios">Black Isle</a> folks being responsible for its development.  If you&#8217;re into <span class="caps">RPG</span>s at all, do yourself a favour and play them.</p>]]></content:encoded></item><item><title>Perfume</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2005-12-02T22:56:51-08:00</dc:date><link>http://algorithm.com.au/blog/files/48e5cf10820976816f1a686a8e87afe3-418.html#unique-entry-id-418</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/48e5cf10820976816f1a686a8e87afe3-418.html#unique-entry-id-418</guid><content:encoded><![CDATA[<p>Perfume&#8217;s a fascinating book written by Patrick S&cedil;skind; it&#8217;s set in the 18th century, and is about the story of Jean-Baptiste Grenouille, a person born with an unearthly sense of smell.  It&#8217;s fascinating for S&cedil;skind&#8217;s portrayal of what&#8217;s possible when you have this incredibly keen sense that gives you so many opportunities about life that you&#8217;ve never even imagined of, from being able to smell lost pocket change from across to the room to passing through crowds undetected.  I also enjoyed S&cedil;skind&#8217;s tangents and diatribes about the secondary characters partially because the pages he spends on them adds a lot to the atmosphere, but also because plenty of it is just downright amusing.</p>

<p>Unusually, though, I didn&#8217;t find it find it a particularly <em>compelling</em> read: it wasn&#8217;t a book that made me want to keep reading to find out what happens next.  I&#8217;m not saying that makes it a bad book &#8212; I think it&#8217;s an excellent read &#8212; merely that I didn&#8217;t find I had the <em>urge</em> to read it, which a characteristic that I usually associate with uninteresting books.  However, I&#8217;m glad I did persist in reading it: the ending is clearly the peak of the book, and finally unveils the full awe of the protagonist&#8217;s superhuman scent abilities that S&cedil;skind has been building up since the very beginning.</p>

<p>Recommended reading, though if you&#8217;re like me, you may need some willpower to persist to the good bits (i.e. the ending).</p>]]></content:encoded></item><item><title>Your Laptop LCD vs the Sun</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2005-12-10T03:34:08-08:00</dc:date><link>http://algorithm.com.au/blog/files/0462cd84b71bcd9ce50e9b22a9ad1f2a-419.html#unique-entry-id-419</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0462cd84b71bcd9ce50e9b22a9ad1f2a-419.html#unique-entry-id-419</guid><content:encoded><![CDATA[<p>If you&#8217;re like me and quite enjoy caf&Egrave;-style computing, you&#8217;ve no doubt tried to use your laptop sometimes in some pretty harsh sunlight.  <span class="caps">LCD </span>backlights just aren&#8217;t powerful enough to compete with our lovely life-giving star, so usually I have a lot of trouble reading stuff on the screen in bright sunlight.</p>

<p>The solution?  Try inverting your screen colours, so that black comes out white, and white comes out black.  You&#8217;ll be amazed just how much more readable white-on-black is in bright lighting than black-on-white, and also how little you&#8217;ll have to set your screen brightness to properly read stuff:</p>


<ul>
<li>Mac OS X: Ctrl-Option-Command-8</li>
<li>Windows: <a href="http://www.microsoft.com/enable/training/windowsxp/magnifierinvertcolors.aspx">Run the Magnifier utility</a> and select Invert Colors.</li>
</ul>



<p>I don&#8217;t know if there&#8217;s a way to invert colours on <span class="caps">UNIX </span>systems (XFree86/X11): if somebody&#8217;s keen enough to find out and drop me an email, I&#8217;ll add the information in here.  (Of course, all you hardcore <span class="caps">UNIX </span>geeks who run white-on-black terminals will now get black-on-white terminals instead.  Ahh well, just screen invert back when you&#8217;re in a terminal I suppose!)</p>

<p>As an added benefit, some laptop <span class="caps">LCD</span>s also seem to get longer battery life when they do this.  Kudos to this <a href="http://www.macosxhints.com/article.php?story=20051202125641391">Mac OS X hint</a> for the heads-up on this!</p>]]></content:encoded></item><item><title>IBM Model M now in USB</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2005-12-16T18:05:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/3693aec041fd7a96f0d47ac77307f1e4-420.html#unique-entry-id-420</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3693aec041fd7a96f0d47ac77307f1e4-420.html#unique-entry-id-420</guid><content:encoded><![CDATA[<p>For followers of the <a href="http://www.dansdata.com/ibmkeyboard.htm">One</a> <a href="http://www.dansdata.com/clickykeyboards.htm">True</a> <a href="http://www.clickykeyboards.com/index.cfm">Keyboard</a>, <a href="http://www.pckeyboard.com/">UniComp</a> now have the <span class="caps">IBM</span> Model M (a.k.a. the Battleship, a.k.a. <span class="caps">IBM</span> 42H1292, a.k.a. 1391401) available in a <a href="http://www.pckeyboard.com/"><span class="caps">USB </span>model</a>.  Now, if only I could get some volume and eject keys, and the Command (&#8984;) and Option (&#8997;) sigils emblazoned on them&#8230;</p>]]></content:encoded></item><item><title>iTunes Video Quality vs DivX</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2005-12-18T05:39:47-08:00</dc:date><link>http://algorithm.com.au/blog/files/f4a0701d580c8cdc70340fee3e958421-421.html#unique-entry-id-421</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/f4a0701d580c8cdc70340fee3e958421-421.html#unique-entry-id-421</guid><content:encoded><![CDATA[<p>I finally found some free time this week to watch the modern Battlestar Galactica TV series, which I bought from the iTunes Music (ne&Egrave; video) Store.  (As an aside, Battlestar Galactica is absolutely <a href="http://www.homestarrunner.com/awexome.html">awexome</a> &#8212; but that&#8217;s a whole &#8216;nother story).</p>

<p>I actually have DivX versions of the episodes that can be obtained from the usual places where people obtain DivX versions of TV episodes.  I decided to buy the episodes from iTunes anyway, to see how they&#8217;d compare in quality to the DivX ones.  I&#8217;m not particularly surprised to say that the quality of the iTunes videos are slightly worse than the DivX versions floating around: there are some people who are pretty damn crazy and spend <em>weeks</em> tweaking their DivX video encoding parameters to make them look really good.  Thanks to the rabid fanbase on <span class="caps">P2P </span>distribution networks that demand very high video quality, you also generally find that most videos on <span class="caps">P2P </span>networks have been lovingly hand-tweaked and encoded quite well.</p>

<p>(Note: I&#8217;m using the term DivX to mean the whole plethora of <span class="caps">MPEG</span>-4 video codecs, such as the &#8220;real&#8221; DivX, xvid, 3ivx, etc.  You can start endless debates about which codec is better than the rest for encoding particular types of motion video, and that&#8217;s not my goal here.)</p>

<p>However, even though the iTunes video versions aren&#8217;t quite as good quality as the DivX versions that you find floating around on the &#8216;net, it&#8217;s not quite that simple:</p>


<ul>
<li>First, I was playing the videos on a 1GHz Powerbook <span class="caps">G4, </span>which may not quite be powerful enough to do decent post-processing on the <span class="caps">H.264</span>-encoded video.  iTunes uses QuickTime for its video playback, and QuickTime is a pretty adaptable beast: if your <span class="caps">CPU </span>isn&#8217;t powerful enough to perform decent post-processing, it simply will make the frames look worse rather than dropping frames, even resorting to simple linear sampling to perform scaling if absolutely necessary.  It&#8217;s entirely possible that the videos would look much better on a high-end computer such as a modern Athlon system or a Power Mac <span class="caps">G5.</span></li>
<li>The iTunes videos were encoded at 320&#215;240, which is much lower than typically encoded DivXs (the Galactica DivXs that I had were encoded at 640&#215;352).  This also means that the iTunes videos weren&#8217;t widescreen, for those of you lucky punks who have 16:9 screens.</li>
<li>I was playing the videos on a <span class="caps">TV, </span>which has a lower resolution than on a computer monitor.  The raw resolution of the videos don&#8217;t make such a big difference because of this, which partially negates the last point.  I should point out that the TV I was watching it on was pretty big (42&#8221;), so it&#8217;s still very easy to see encoding artefacts.</li>
<li>The iTunes videos were much more colour-accurate than the DivX versions: all the DivX encodes I&#8217;ve seen were far less saturated.  (I&#8217;m sure that it&#8217;s possible to get DivX versions that are more colour-correct; I&#8217;m just going on the DivX videos that I have.)  A/B&#8217;ing the iTunes video and the DivX on the <span class="caps">TV,</span> I&#8217;d actually say that the richer colour on the iTunes version more than compensated for the DivX&#8217;s increased resolution, and made the &#8216;feel&#8217; of the video better overall.  Except&#8230;</li>
<li>There were some <em>very</em> visible blockiness during the space combat sequences of Battlestar Galactica: outer space is quite black, and the <span class="caps">H.264 </span>encoder that Apple uses on its videos decided to seriously quantize the black bits and produce large blocks of visible non-colour-matching blackness.  I suspect this would be less of a problem for non-sci-fi series, and this problem didn&#8217;t come up very often, but the encoding artefacts were bad enough that they did detract from the whole cinematic experience when they appeared.</li>
<li>The iTunes videos were <em>much</em> smaller; part 2 of the Battlestar Galactica mini-series was ~400MB for iTunes, vs ~700MB for DivX.</li>
</ul>



<p>Overall, I was generally happy with the iTunes versions of the TV episodes except for the blockiness during the space combat scenes.  It&#8217;d be interesting to play the episodes on a PC or Mac with some grunt (or a 5G video-capable iPod), and see if the blockiness disappears due to better post-processing.  If it does, I&#8217;d be tremendously happy with them.</p>

<p>So, if it were pretty much any other TV series, I&#8217;d be pretty happy with buying them from the iTunes store, but Battlestar Galactica is looking like it&#8217;ll be my favourite hard(ish) sci-fi series ever, so I&#8217;ll probably hunt down the HD broadcasts or buy the <span class="caps">DVD</span>s at some point.  I feel that the <span class="caps">USD</span>$2 per episode at the iTunes store is very well-priced, and that it&#8217;s cheap enough to sus out a couple of episodes before deciding that (a) you&#8217;re happy with the quality, or (b) you&#8217;ll chase down the <span class="caps">DVD</span>s because the quality isn&#8217;t good enough for you and you&#8217;re a big fan of the show.</p>

<p>Obviously, there are other reasons besides just technical ones in the iTunes store vs <span class="caps">P2P </span>debate, such as where you personally lie on the ethical compass about giving money back to the people who produce the series and the distribution houses, what your stance on iTunes&#8217;s <span class="caps">DRMS </span>policy is, and also the ease of buying stuff on iTunes vs the ease of searching on <span class="caps">P2P </span>networks.  I think that the videos available on the iTunes store are a good first step in the right direction, though.  Technically, though, I&#8217;m reasonably happy with the iTunes videos, and would certainly buy from the store again.</p>]]></content:encoded></item><item><title>Can Asians Think?</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Books&#x2c; Movies</category><dc:date>2006-01-02T05:47:45-08:00</dc:date><link>http://algorithm.com.au/blog/files/5d47699e2ad9d975881fd7c026164529-422.html#unique-entry-id-422</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5d47699e2ad9d975881fd7c026164529-422.html#unique-entry-id-422</guid><content:encoded><![CDATA[<p>Yeah, sure, you could say that this book has a bit of controversial title.  The reason I was interested in it was because I read an interview with the author, Kishore Mahbubani, on a random Web site about a year ago, and he sounded like he had some pretty interesting things to say about the world, politics, and the Asian/European dichotomy.  Of course, after reading the half-page biography spiel on Mahbubani, I shouldn&#8217;t have been surprised: it turns out that he&#8217;s Singapore&#8217;s ambassador to the United Nations.</p>

<p>The reason for the controversial title (other than to make people give it more than just a passing glance at the bookstore, I suppose) is this question that Mahbubani poses: on the total timeline that humanity has been present on this Earth, the East (including the Middle East) have been the dominant civilisation until very recently.  To an outside observer, it seems quite incredible that Europeans have ascended so quickly, so fast: in 1500 years, they&#8217;ve gone from being the most backwards culture to being the world leaders in almost every respect.  The simple question that Mahbubani asks is: why, and how, did this happen?</p>

<p>Once you get past the first few essays, however, it&#8217;s clear that this historical question is just a teaser: <em>Can Asians Think</em> covers much more ground than just that.  For example, the book discusses the conflicting agendas of the United States and the United Nations, gives insight into the moral and ethical values of the more traditional Asian mindset (which many Australians may be interested in reading given Singapore&#8217;s recent capital punishment of Nguyen Tuong Van), says quite frankly why the imposition of democracy on lesser-developed countries is doomed to fail, and talks about the occupation of Cambodia by Vietnam and the Khmer Rouge.</p>

<p>People who have grown up being truly exposed to both the Western and Asian mindsets will probably not get a huge amount out of the book, simply because they will most likely understand and agree with much of what Mahbubani wants to say.  I&#8217;m reluctant to state whether people who have been exposed to only either the Asian or Western mindset will find the book useful, but only because I haven&#8217;t given it yet to any of my Intelligent Worldly Friends&#8482; I consider to be in those categories and discussed the issues in the book with them yet.  I am, however, <em>very</em> keen on doing exactly this.  The book talks about some damn interesting topics, and if it can generate intelligent (perhaps heated) discussion at a dinner table, it&#8217;s hit its mark, has it not?</p>

<p>About the only criticism I have about the book is that the essays now seem a bit dated, even if the oldest ones were only written around 15 years ago.  It would be a much more compelling read, for example, to see his opinion on the United States&#8217;s reaction to September 11, 2001, their recent opposition against the United Nations, and his thoughts on the occupation of Iraq given his views on the spread of democracy before economic development.  It would also be interesting to read about his thoughts on post-British Hong Kong, and China&#8217;s incredible economic growth since the turn of the century.  However, it&#8217;s impossible to fault the book for this lack of discussion: even mathematics textbooks can become outdated at some stage of their life :).</p>

<p>Highly recommended.</p>]]></content:encoded></item><item><title>ext2fs IFS</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Windows</category><dc:date>2006-01-16T07:28:04-08:00</dc:date><link>http://algorithm.com.au/blog/files/b0ef937fdff8e8d7bf4e4df75819aa89-423.html#unique-entry-id-423</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b0ef937fdff8e8d7bf4e4df75819aa89-423.html#unique-entry-id-423</guid><content:encoded><![CDATA[<p>Well, some kind-hearted soul has finally written a kernel-mode Installable File System (IFS) <a href="http://www.fs-driver.org/index.html">ext2 driver for Windows NT/2000/XP</a>.  While it ain&#8217;t no reiserfs driver for Mac OS X (now <em>that&#8217;d</em> be worth some serious <a href="http://66.102.7.104/search?q=cache%3AnCG3Y61_AWIJ%3Awww.imdb.com%2Ftitle%2Ftt0284837%2Fquotes+restecp&amp;hl=en">restecp</a>), it&#8217;s still rather schmick.  Plus, now that free kernel-mode ext2 drivers are available for all the major desktop operating systems, hopefully we&#8217;re one step closer to destroying <span class="caps">FAT </span>as the lowest common denominator filesystem once and for all&#8230;</p>]]></content:encoded></item><item><title>To the Australian demoscene and ANSI scene folks</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-21T10:26:28-08:00</dc:date><link>http://algorithm.com.au/blog/files/fec8665a341b68ef8d7e0d783fb22559-424.html#unique-entry-id-424</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/fec8665a341b68ef8d7e0d783fb22559-424.html#unique-entry-id-424</guid><content:encoded><![CDATA[<p>Prompted by a <a href="http://www.cse.unsw.edu.au/~sseefried/">good friend</a> of mine, I dug out a little bit of mid-90s history and found myself staring at <span class="caps">ANSI </span>login screens for my old <span class="caps">BBS,</span> Mindflux, along with an <a href="http://www.ojuice.net/687/party_infofile.htm">Oz96</a> announcement.  After a while, I even managed to track down many art packs from old art groups I was in (DiE and fORCE), and remembered a lot of old aliases I haven&#8217;t heard of in years from all over Australia.</p>

<p>And so, for old times&#8217; sake, here&#8217;s some shouts out to some folks that I had some damn good times with: Squirt, Pulse, Chuck Biscuits, Black Artist, Squidgalator, Hunz, Rogue and Void/Reality, Firelight, <span class="caps">HB,</span> Yannis, Mick Rippon, Astrid, Sudden Death, Entropus X, Frozen Time, Legend, Mandalas Zarich, Flick, Clef, Acme, Caliban, Jedi/Oxygen, Maral, Jase, Countzero, Ranger, Turrican, Maeve Wolf/Tatharina, and Anubis.  Sincere apologies if I&#8217;ve forgotten you &#8212; it has been ten years, after all&#8230;</p>

<p>If you were in the Australian demoscene, music scene or art scene at all and know any of those names (or even better, if you <em>are</em> one of those names!), or you remember any of Oz96, Mindflux, Bloodnet, DiE, fORCE, Alternate Reality, do me a favour and drop me an email (especially if you were a Mindflux or Bloodnet user!).  I&#8217;m still amazed that the Internet&#8217;s managed to preserve quite a lot of the scene history (especially the Australian scene history) if you look hard enough for it, and I have the odd feeling that a lot of the demoscene folks have moved into the Linux and Mac developer communities.</p>

<p>And for those of you who used to be in the scene in Sydney back in the day, here&#8217;s something you can reminisce on:</p>

<p><img src="/files/mindflux_logon.png"/></p>]]></content:encoded></item><item><title>Linux.conf.au 2006&#x2c; Day 0 (Sunday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-23T21:27:06-08:00</dc:date><link>http://algorithm.com.au/blog/files/b9ad534bb8b65a223c0c421deebc654d-425.html#unique-entry-id-425</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b9ad534bb8b65a223c0c421deebc654d-425.html#unique-entry-id-425</guid><content:encoded><![CDATA[<p>Wow.  I was already looking forward to Linux.conf.au in New Zealand this year, but it&#8217;s even better than I expected, and it hasn&#8217;t even started yet.</p>

<p><a href="http://www.visit-dunedin.co.nz/">Dunedin</a>, the host city on New Zealand&#8217;s south island, is incredibly picturesque (I&#8217;ve taken a few <a href="http://www.algorithm.com.au/gallery/dunedin">photos of it</a> for those interested) with beautiful mountains and glittering lakes for a backdrop, and lovely wooden architecture that reminisces of the wooden-style buildings that are characteristic of the types of snow houses in Mount Hotham and Dinner Plain.</p>

<p>Oh, and in honour of being in New Zealand right now and to blend in with the locals, I am replacing all a&#8217;s with ae&#8217;s.  After all, a thing that you put stuff into is a <em>b&#230;g</em> according to New Zealanders, not a bag.</p>

<p>I r&#230;n into plenty of friends from the Linux community &#230;t Sydney &#230;irport th&#230;t m&#230;de the trip there quite enjoy&#230;ble indeed: <a href="http://www.spacepants.org/">J&#230;mie Wilkinson</a>, <a href="http://www.vergenet.net/~conrad/">Conr&#230;d P&#230;rker</a>, <a href="http://www.silvia-pfeiffer.de/">Silvi&#230; Pfeiffer</a>, Sh&#230;ne Stephens, <a href="http://www.hezmatt.org/~mpalmer/blog/">M&#230;tt P&#230;lmer</a>, <a href="http://research.operationaldynamics.com/blogs/andrew/">&#198;ndrew Cowie</a> &#230;nd <a href="http://www.mega-nerd.com/erikd/">Erik de Castro Lopo</a>.  Of course, we &#230;ll decided to stopover &#230;t the b&#230;r &#230;t Christchurch &#230;irport while we were w&#230;iting for our connecting flight from there to Dunedin, &#230;nd h&#230;d our first t&#230;ste of New Ze&#230;l&#230;nd beer.  I tried &#230; <a href="http://www.speights.co.nz/">Speights</a>, which I&#8217;m gl&#230;d to s&#230;y is excellent.  It&#8217;s not quite my f&#230;vourite beer (th&#230;t privilege still belongs to <a href="http://www.bluetonguebrewery.com.au/">Bluetongue</a>), but it&#8217;s cert&#230;inly up there with the better ones I&#8217;ve tried.  Those who know me m&#230;y be surprised to know th&#230;t I h&#230;d five beers tod&#230;y &#230;nd w&#230;s still st&#230;nding &#230;t the end of it (&#230;nd I even m&#230;n&#230;ged to rem&#230;in re&#230;son&#230;bly diplom&#230;tic; sorry for dis&#230;ppointing you on th&#230;t front, Se&#230;n!).</p>

<p>Our little residence in Dunedin is the <a href="http://motel594.co.nz/">Woodl&#230;nds</a> lodge, which, like Dunedin itself, is very ch&#230;rming &#230;nd qu&#230;int.  We h&#230;ve &#230; <a href="http://www.algorithm.com.au/gallery/woodlands">spect&#230;cul&#230;rly big &#230;p&#230;rtment</a> for $70 per night: two stories, one room with two single beds, &#230;nother m&#230;ssive bedroom with &#230; single &#230;nd &#230; double bed, &#230; l&#230;rge living room with &#230; dining t&#230;ble &#230;nd some pretty comfort&#230;ble sof&#230;s, &#230; kitchen &#230;nd fridge, &#230;nd even &#230; combin&#230;tion w&#230;shing m&#230;chine &#230;nd dryer.  The lodge is less th&#230;n 10 minutes&#8217; w&#230;lk &#230;w&#230;y from the building where the conference is loc&#230;ted, so it&#8217;s &#230;lso in &#230; gre&#230;t loc&#230;tion.</p>

<p>&#198;fter &#230;rriving &#230;nd checking in, we met up with the &#230;forementioned geeks &#230;nd went to &#230; most excellent b&#230;r &#230;nd grill in the Oct&#230;gon (Dunedin&#8217;s n&#230;me for the town centre) n&#230;med The Terr&#230;ce.  Mmmmm: <a href="http://www.algorithm.com.au/gallery/lca2006/P1000406">$18 ste&#230;ks on hot rocks</a>, &#230;nd &#230; verit&#230;ble <a href="http://www.algorithm.com.au/gallery/lca2006/P1000403">beer t&#230;p</a> on your t&#230;ble.  Let it be known th&#230;t the ste&#230;ks there were <em>&#230;wesome</em>; I don&#8217;t believe I&#8217;ve ever h&#230;d ste&#230;ks th&#230;t good for $18, let &#230;lone ste&#230;ks-while-U-w&#230;it on cr&#230;zy-hot volc&#230;nic rocks; the beer t&#230;p (th&#230;t w&#230;s full of Speights, which we l&#230;ter le&#230;rned is &#230; loc&#230;l Dunedin beer) w&#230;s &#230;lso ultr&#230;-t&#230;sty.  Most of the geeks retired &#230;fter dinner, but my workm&#230;te &#230;nd I ended up dropping in on <a href="http://www.perkypants.org/">Jeff</a> &#230;nd <a href="http://www.pipka.org/blog/">Pia</a>&#8217;s &#230;p&#230;rtment in our lodge &#230;nd c&#230;mped out there for the next hour or two.  They&#8217;ve m&#230;n&#230;ged to find some more Speights in six-p&#230;cks from &#230; 24-hour superm&#230;rket less th&#230;n five minutes&#8217; w&#230;lk &#230;w&#230;y, so we s&#230;t there m&#230;rvelling &#230;t Christi&#230;n B&#230;le in Equilibrium on the <span class="caps">TV, </span>&#230;nd continued to drink &#230;nd be merry until I hit the h&#230;y &#230;t &#230;bout 1&#230;m.</p>

<p>Some New Ze&#230;l&#230;nd trivi&#230; I le&#230;rnt &#230;long the w&#230;y: blue milk is st&#230;nd&#230;rd milk, while green milk is &#8216;trim&#8217; (skim) milk (so n&#230;med bec&#230;use they&#8217;re the colour of the cont&#230;iners they they come in).  Cold w&#230;ter t&#230;ps &#230;re usu&#230;lly on the left h&#230;nd side r&#230;ther th&#230;n the right h&#230;nd side, with hot w&#230;ter t&#230;ps on the left.  (Yes, this is weird.)</p>

<p>&#198;ll in &#230;ll, possibly the best prelude I&#8217;ve ever h&#230;d to &#230; geek conference.  I&#8217;m looking forw&#230;rd to tomorrow!</p>]]></content:encoded></item><item><title>Linux.conf.au&#x2c; Day 1 (Monday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-24T20:20:42-08:00</dc:date><link>http://algorithm.com.au/blog/files/469087c8a8a4bd60eaa244ebdf7fcaab-426.html#unique-entry-id-426</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/469087c8a8a4bd60eaa244ebdf7fcaab-426.html#unique-entry-id-426</guid><content:encoded><![CDATA[<p>I&#8217;ve had not a bad start to the day at all.  Anthony and I went to Jeff and Pia&#8217;s apartment &#8212; a whole 30 steps away from our apartment, them being directly below us in the building &#8212; for an excellent bacon and eggs breakfast this morning.  The <a href="http://www.odt.co.nz/">Otago Daily Times</a> newspaper is also an excellent contributor to a good start for the day, where the front page features stories such as Mexico&#8217;s <a href="http://fullcoverage.yahoo.com/s/nm/20060121/od_uk_nm/oukoe_uk_life_mexico">guns for computers</a> program.  I look forward to what&#8217;ll be on the front page of that paper tomorrow.</p>

<p>So, after breakfast, I trundled along to a three-hour talk by <a href="http://damian.conway.org/About_us/Bio_formal.html">Doctor Damian Conway</a> about presentation skills, which I&#8217;m happy to say was very worthwhile.  Damian&#8217;s one of the best presenters I know of in the Linux community (rivalling Andrew Tridgell), and an opportunity to take some presentation skills from somebody who&#8217;s damn good at it wasn&#8217;t one I was going to pass up.  I ended up taking away 3 pages of notes from it; let&#8217;s see how many of those points I can apply to our talk tomorrow!</p>

<p>The rest of the afternoon was spent at the Digital Arts miniconf, which had some very cool sessions, though I was pretty familiar with both <a href="http://www.annodex.net/">Annodex</a> and <a href="http://www.flumotion.net/">Flumotion</a> since I was one of the Annodex developers at my previous job, and was part of the team maintaining Flumotion servers at Linux.conf.au last year.  The weather&#8217;s been ranging between quite cool in the morning (~15&#8451;) to reasonably hot in the afternoon, being around 28&#8451; right now (although I think today&#8217;s hotness is an anomaly) &#8212; I&#8217;m hoping that tomorrow&#8217;s a bit cooler!</p>

<p>The Digital Arts miniconf organisers also were holding a jam that night at the Arc Caf&eacute; (whose name will no doubt amuse those of you who are involved with any Ogg/Vorbis/Theora discussions on the xiph.org mailing lists), so Anthony and I rocked along to that.  Lo and behold, a lot of people turned up that I knew &#8212; <a href="http://www.vergenet.net/~conrad/">Conrad</a>, <a href="http://www.ict.csiro.au/staff/Silvia.Pfeiffer/">Silvia</a>, <a href="http://www.mega-nerd.com/erikd/">Erik</a>, <a href="http://www.vergenet.net/~horms/">Horms</a>, Shane, Hal, Gus, <a href="http://www.inodes.org/">John</a>, <a href="http://www.spacepants.org/">Jaq</a>, with about 40 people in total.  I got to meet and socialise with a lot of new folks, too, and had three or four beers of <a href="http://www.tui.co.nz/">Tui</a>&#8217;s (not to be confused with Tooheys, which is much, much worse).  There was some rocking psytrance-style electronica being played on the big PA system there, which set the mood quite well for the night.  It makes me wish I&#8217;d finished the DJ mix I&#8217;ve been working on for the past week or two, so I&#8217;d have a chance to play it on the big speakers there too.  Ahh well, now&#8217;s the time to set a goal to have a mix of mine played at next year&#8217;s <span class="caps">LCA </span>digital arts mash-up!</p>

<p>Anthony and I ended up heading back a little early at around 11:30pm to work on our talk (mind you, 11:30 over here is only 9:30 Sydney time).  Conrad and Silvia (who were organising the Digital Arts miniconf) confirmed with us pretty much today we&#8217;d be giving a talk at the Digital Arts conference tomorrow on the use of Linux at <a href="http://www.rsp.com.au/">Rising Sun Pictures</a>, so we thought we&#8217;d actually try to make it half-decent and actually prepare for it :).</p>

<p>Oh yeah, and New Zealand TV seems to be filled with bizarre saucy phone sex advertisements at night&#8230; like, all the time.  As in, they&#8217;ll be the <em>entire</em> regiment of advertising on the night.  Coupled with the New Zealand accent (&#8220;c&#230;ll now!&#8221;), it was just plain weird.</p>

<p>So I&#8217;m predicting a bit of a late night tonight to prep for the talk tomorrow: we don&#8217;t want to have a bored audience, after all&#8230;</p>]]></content:encoded></item><item><title>Linux.conf.au 2006&#x2c; Day 2 (Tuesday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>Linux</category><dc:date>2006-01-25T17:23:53-08:00</dc:date><link>http://algorithm.com.au/blog/files/1036bd4e716c90648087d12fd2350f54-427.html#unique-entry-id-427</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/1036bd4e716c90648087d12fd2350f54-427.html#unique-entry-id-427</guid><content:encoded><![CDATA[<p>One interesting rule of thumb that Damian Conway mentioned in his presentation skills session is that, on average, it takes 8 hours of preparation per one hour of talking.  I initially raised by eyebrows at this figure, but it turns out that Damian&#8217;s likely right (as usual): I ended staying up until around 4:30am to finish off our slides, and got up rather excruciatingly at 8am to grab breakfast at Jeff and Pia&#8217;s again.  For those interested: Weet-bix + three pancakes (although I made a token attempt to be too polite to have their lovely pancakes, since I&#8217;d already had the weet-bix&#8230;).  Ah yes, and the excellent <a href="http://www.odt.co.nz/">Otago Daily Times</a>&#8217;s front page story today was about how all the poor Dunedin citizens were all pasty-white thanks to a lack of sun this summer at the beach.  I read this as a very nice excuse to slap pictures of three hot chicks in two-pieces on the front page of the paper.</p>

<p>I actually decided to skip the morning talks that day to work on the slides, so I ended up holing myself up in the (lovely) apartment until around 12.  Yes, I think Damian&#8217;s 8 hours of preparation was correct indeed: Anthony and I probably spent around 10 hours of prep in total, though I&#8217;m fairly type A when it comes to making sure all the details are nailed down right.</p>

<p>I ended up having an energy bar and a Coke for lunch (sorry about that mum!) and managed to catch the end of Conrad&#8217;s talk on <span class="caps">CMMLW</span>iki when I got back, as well as watch parts of <a href="http://keithp.com/">Keith Packard</a>&#8217;s hilarious talk on Linux-powered rockets (complete with pictures of rockets hitting the earth at 800KM/h, and stories of their failed recovery of a CompactFlash card inside said rocket&#8230;).</p>

<p>I&#8217;m glad to report that I think our talk went pretty well: we had around 30 people attending, and Anthony and I got to chat afterwards with some people who were pretty interested in the stuff we were doing.  Hopefully we&#8217;ll be able to get a videotape of it some time in the future, and I can place it here as a contribution to embarrassing myself more.</p>

<p>Since the talk was over, we decided that having some dinner was in order soon.  No-one had any plans, so I made an executive decision to meet up at the Terrace at 7 o&#8217;clock, and the 4 or 5 folks who decided to go there grew to 8, then 10, then about 18.  Hooray for lots of company!  I had a most excellent <a href="http://www.algorithm.com.au/gallery/dunedin/P1000414">mixed grill on hot rocks</a> and more <a href="http://www.algorithm.com.au/gallery/dunedin/P1000413">Speights beer</a> for dinner, and enjoyed the merry company of all the other geeks until around midnight.  Catching up with everyone here is truly great; since I&#8217;ve moved over to using a Mac as my main platform, I&#8217;m not so involved with the Linux community these days, and I forget from time to time how awesome everyone is (both from a social standpoint, and just how damn good these people are at what they do).</p>

<p><span class="caps">P.S.</span> Linus is here, for those fanboys who are interested.  The more amusing thing is that he&#8217;s <em>really</em> sunburnt.  For the serious geeks, Van Jacobson (yep, <em>that</em> Van Jacobson) is also giving a talk.  You can bet I&#8217;ll be attending that one.</p>]]></content:encoded></item><item><title>Linux.conf.au 2006&#x2c; Day 3 (Wednesday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>Linux</category><dc:date>2006-01-25T17:45:57-08:00</dc:date><link>http://algorithm.com.au/blog/files/e0e73fb7625b52bd67d1f3beb137230e-428.html#unique-entry-id-428</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e0e73fb7625b52bd67d1f3beb137230e-428.html#unique-entry-id-428</guid><content:encoded><![CDATA[<p>Right, it&#8217;s definitely shaping up to be one of <em>those</em> kind of weeks.  I finally managed to catch some sleep this morning by missing the morning tutorials: considering I had a huge three and a half hours of sleep last night, about 6 hours the night before, and no sleep on the night before I flew off to New Zealand, I think it was about time to let my poor body recover for a while.  I normally feel rather seedy and tired (in that unproductive-tired way) when I wake up at midday, but it was all good today.</p>

<p>So, I got my lazy ass over to the conference (O, the hardship of 5 minutes&#8217; walk through beautiful university grounds) and actually managed to see all the talks that day, huzzah.  <a href="http://samba.org/~tridge/">Andrew Tridgell</a>&#8217;s talk on Samba 4 absolutely rocked as you&#8217;d expect, even if you, like me, weren&#8217;t interested in Samba 4 at all.  Being able to write Javascript to script server-related Windows <span class="caps">RPC </span>calls is crazy enough, but remotely editing a Windows&#8217;s machine&#8217;s registry via an <span class="caps">AJAX</span>-style interface in your Web browser was something else.  Oh yes, and my little tip about <a href="http://www.algorithm.com.au/mt/gadgets/your_laptop_lcd_vs_the_sun.html">inverting your screen</a> to make it more readable also really saves your battery life: I was easily getting over 3 hours of battery out of my 3-year-old Powerbook.  The temperature today&#8217;s a bit more like what the forecasts predicted, too: much cooler, being around 14&#8451; in the morning and night, and around 22&#8451; in the afternoon.  I&#8217;m glad I brought along some long-sleeve tops!</p>

<p>Of course, it was after the conference proper when the fun started.  Google were holding a round of drinks for conference delegates at night at the Bennu bar in Dunedin, so of course a lot of people came along to try to completely empty out the bar.  It was meant to go from 9-10 only (so hurry up and get completely plastered in an hour) but it turns out that offering only beer for free makes a tab go a long way, so we were all still drinking courtesy of Google well past midnight.  I managed to get several rounds of free vodka shots off the Google folks too, so overall, I didn&#8217;t do too badly considering I&#8217;m a Cadbury&#8217;s boy: four beers and three vodka shots left me in quite the happy mood when we left there some time after midnight.  It was, again, damn good to catch up and socialise with everyone, and even more so when free beer&#8217;s offered!  It&#8217;s a good week to be in Dunedin indeed :).</p>]]></content:encoded></item><item><title>Linux.conf.au&#x2c; Day 4 (Thursday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-27T12:47:05-08:00</dc:date><link>http://algorithm.com.au/blog/files/ed0bfb383cb507c70701d23e803f46a4-429.html#unique-entry-id-429</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ed0bfb383cb507c70701d23e803f46a4-429.html#unique-entry-id-429</guid><content:encoded><![CDATA[<p>After the big night last night courtesy of Google, I woke up more-or-less on time this morning with no hangover, which was a bit of a small surprise considering I&#8217;ve never quite drunk that much before.  (Whoo!)  I didn&#8217;t <em>quite</em> early enough to make it to Jeff and Pia&#8217;s place for breakfast before heading off to the keynote, but I made up for that by grabbing a rather nice ham and cheese roll a bit later in the morning.</p>

<p>(Warning: geek content in this paragraph.)  Dave Miller&#8217;s keynote was pretty good, and thankfully I understood a lot more in his talk today than his original <span class="caps">TCP </span>zero-copy talk at <a href="http://www.linux.org.au/projects/calu/"><span class="caps">CALU </span>in 1999</a> (gee, my technical knowledge has increased a bit in the past seven years &#8212; who would&#8217;ve thought?).  The other talks that day didn&#8217;t set me off too much, with the exception of Rusty Russell&#8217;s talk on <a href="http://talloc.samba.org/">talloc</a>.  Here&#8217;s my take on talloc: if you absolutely have to use that portable assembly language named C, think of talloc as a gift from God.  Memory management with talloc still isn&#8217;t completely painless, but it makes it nearly as nice to use as if you were coding in Objective-C with Cocoa, or in modern C++ (using references everywhere so you don&#8217;t have to <em>new</em>/<em>delete</em> everything).  At any rate, it&#8217;s a <em>hell</em> of a lot better than using <em>malloc</em>/<em>free</em>.  If you use C, use it: you will be much happier.</p>

<p>Since <a href="http://www.risingsunresearch.com/">Rising</a> <a href="http://www.rsp.com.au/">Sun</a> were kind enough to send me as a professional this year, that also meant I got to go to the professional delegates&#8217; networking session (a.k.a. dinner).  <span class="caps">OK, </span>if <em>that</em> was the professional delegates&#8217; networking session that I attended, I&#8217;d love to see an <em>un</em>professional delegates&#8217; networking session, because we had a riot of a time.  The presence of the boisterous Aussies in combination with Australia Day led to quite an awesome night indeed: our dinner was held at the beautiful <a href="http://www.larnachcastle.co.nz/index.pasp">Larnach Castle</a> in Dunedin, with yet more free beer and wine for the entire night.  This, of course, led to plenty of <a href="/files/lca2006_movies/bus_singing.mpg">singing</a> and <a href="/files/lca2006_movies/bus_singing2.mpg">more singing</a> on the bus back home, with even our beloved Linux Australia Vice President, <a href="http://www.pipka.org/">Pia Waugh</a>, quite energetically (and <a href="/files/lca2006_movies/drunken_pia.mpg">somewhat drunkenly</a>) joining in our Australia Day celebrations.</p>

<p>So, chalk up another damn good day at Linux.conf.au &#8212; so far, it&#8217;s been four out of four (or five out of five if you count Sunday night, which I do).  I&#8217;m a lucky man to be here!</p>]]></content:encoded></item><item><title>Linux.conf.au&#x2c; Day 5 (Friday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-27T15:32:09-08:00</dc:date><link>http://algorithm.com.au/blog/files/28e94661cea8e0d00a8de9dfdb8d008e-430.html#unique-entry-id-430</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/28e94661cea8e0d00a8de9dfdb8d008e-430.html#unique-entry-id-430</guid><content:encoded><![CDATA[<p>Ah, a good start to the day: I got up nice and early so I didn&#8217;t have to rush through the morning routine, and joined a few other geeks at Pia and Jeff&#8217;s apartment for breakfast.  After downing our daily intake of <a href="http://www.flickr.com/photos/spacejaq/91569197/">leet-bix</a>, we went with high expectations to Damian Conway&#8217;s keynote, titled &#8220;Sex and Violence: Technical and Social Lessons from the Perl 6 Development Process&#8221;.  As I&#8217;ve mentioned in previous posts, Damian&#8217;s a brilliant speaker, and today was the best talk I&#8217;ve seen that he&#8217;s given.  Not too many public speakers I know can take pokes at everyone from <a href="http://www.python.org/~guido/">Guido van Rossum</a> to <a href="http://en.wikipedia.org/wiki/Type_theory">type theorists</a> and get laughs from the people he&#8217;s paying out, weave in slides featuring <span class="caps">S&amp;M </span>pictures and Web pages from <a href="http://www.whatwouldsatando.com/Newpages/main.html">What Would Satan Do</a>, give good, practical advice to people managing any sort of project, and inspire the audience about Perl 6, all at the same time.</p>

<p>Along with Gus, I was lucky enough to have a good chat to Damian afterward about the interaction between the Perl and Haskell communities, the awesomeness of the amazing <a href="http://en.wikipedia.org/wiki/Audrey_Tang">Audrey Tang</a>, and thank him for taking Perl 6 in what I consider to be the right direction.  One of the greatest things about these conferences, and Linux.conf.au in particular, is that you do get to rub shoulders with the best and brightest in the world.</p>

<p>(Warning to my non-geek friends: geek content in this paragraph!)  The rest of the day turned out to be the most educational one so far: Conway&#8217;s keynote taught me many useful things about project management, and I learnt plenty from the other talks too.  For revision control geeks who somehow missed <a href="http://svk.elixus.org/">svk</a> on their radar: go check it out.  All I have to say about it is that you can work in a distributed manner (e.g. offline) with any existing Subversion repository, in a very simple, darcs-like way.  Very nice indeed.  Van Jacobson&#8217;s talk about optimising the networking stack in the kernel actually drew a standing ovation from the crowd, and he proved that he&#8217;s still a networking God after 20 years: he had some incredible <a href="http://www.algorithm.com.au/gallery/lca2006/P1000453">tables</a> and <a href="http://www.algorithm.com.au/gallery/lca2006/P1000454">graphs</a> to show just how well he managed to optimise networking performance on Linux.  (I was quite amused how their optimisations made 10Gb Ethernet peak out at 4.3Gb/sec because that was the peak limit of <span class="caps">DDR333 RAM&#8230;</span>)  Interestingly enough, Shane and <a href="http://www.spacepants.org/">Jaq</a> pointed out that the guys at the <a href="http://www.gelato.unsw.edu.au/">Gelato</a> project at the University of New South Wales have been researching and advocating this approach for years, except that they did their research on that evil M thing that&#8217;s so hated in the Linux community (&#8220;microkernel&#8221;).  Not to discredit Van Jacobson in the least, but it&#8217;d be nice to see the <span class="caps">KEG, NICTA </span>and Gelato guys get some due credit for their work too!</p>

<p>So, after yet another afternoon of more fun geekness, it was time for the <span class="caps">LCA </span>conference dinner.  This year&#8217;s affair was pretty standard for an <span class="caps">LCA </span>dinner: that is to say, very good, with lots of drinking, plenty of socialising and chatting, and, of course, an auction.  This year, they auctioned off the the <a href="http://en.wikipedia.org/wiki/Lions_Book">John Lions book</a> on the annotated source code for the <span class="caps">AT&amp;T</span> Unix Version 6 kernel, <a href="http://www.algorithm.com.au/gallery/lca2006/P1000455">autographed</a> by some of the most renown <span class="caps">UNIX </span>hackers in history: <a href="http://en.wikipedia.org/wiki/Dennis_Ritchie">Dennis Ritchie</a>, <a href="http://en.wikipedia.org/wiki/Ken_Thompson">Ken Thompson</a>, <a href="http://en.wikipedia.org/wiki/Marshall_Kirk_McKusick">Marshall Kirk McKusick</a>, <a href="http://en.wikipedia.org/wiki/Eric_Allman">Eric Allman</a>, <a href="http://en.wikipedia.org/wiki/Peter_Salus">Peter Salus</a>, <a href="http://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a>, <a href="http://en.wikipedia.org/wiki/Van_Jacobson">Van Jacobson</a>, and all the speakers and conference organisers for <span class="caps">LCA</span> 2006.  I am proud to say that thanks to the great generosity of the students, lecturers and alumni at the University of New South Wales, <span class="caps">UNSW </span>won the bid for the book.  As such, the Lions book will return to the shining halls of <span class="caps">UNSW </span>in its rightful resting place, where John Lions lectured and inspired so many students for so many years.  Kudos to all those who contributed in the bid for this piece of history, and thanks to <a href="http://benno.id.au/blog/">Benno</a> and <a href="http://www.inodes.org/">John</a> for organising it!</p>

<p>That wrapped up the night quite nicely for me and set me in a hell of a good mood for the rest of the evening.  Thankfully, I decided that I had quite enough drinking for the evening (you know, since I actually had to <em>pay</em> for my drinks that night), and that more than four hours of sleep before another full day on Saturday might be an idea&#8230;</p>]]></content:encoded></item><item><title>makex0r</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-01-27T15:52:55-08:00</dc:date><link>http://algorithm.com.au/blog/files/b4aaf562abdf6885a47108d8bc239078-431.html#unique-entry-id-431</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b4aaf562abdf6885a47108d8bc239078-431.html#unique-entry-id-431</guid><content:encoded><![CDATA[<p>I have the weirdest things in my <code>.zshrc</code> file sometimes&#8230;</p>

<pre><code>~ % which -a makex0r
makex0r: aliased to make</code></pre>]]></content:encoded></item><item><title>Linux.conf.au&#x2c; Day 6 (Saturday)</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-01-28T19:04:27-08:00</dc:date><link>http://algorithm.com.au/blog/files/65976bc13d27384824699a9576737b49-432.html#unique-entry-id-432</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/65976bc13d27384824699a9576737b49-432.html#unique-entry-id-432</guid><content:encoded><![CDATA[<p>Ah, the last day of <span class="caps">LCA</span>: it&#8217;s been a killer week, and definitely one of the best technical conferences I&#8217;ve ever been to.  Personally, I think this ties with Linux.conf.au in Adelaide and Brisbane as the best <span class="caps">LCA </span>yet: I didn&#8217;t find the talks as invigorating this year, but the social side of things have been the best ever, with action typically going well past midnight every night.  It&#8217;s finally started to take its toll on me, though: I left early tonight to both do some private hacking, and to catch up on that &#8220;sleep&#8221; thing that I&#8217;ve been missing out on for the past week.</p>

<p>Thankfully, the last day of the conference wasn&#8217;t too hectic: a late start, a keynote, one talk, followed by some best-of talks, a panel and the conference wrap-up.  Of course, even though there was a late start, I still got up early since I wanted to get a ton of personal work out of the way, and I&#8217;m glad to say that I had enough time to do both that and have the usual <a href="http://www.flickr.com/photos/spacejaq/91569197/">leet-bix</a> breakfast at Pia and Jeff&#8217;s again.   <a href="http://www.markshuttleworth.com/">Mark Shuttleworth</a>&#8217;s keynote &#8212; which I thought would be rather controversial or about Ubuntu vs Debian &#8212; turned out to be completely not about Ubuntu vs Debian, and was excellent.  Mark was pushing the whole notion of distributed revision control systems as the future of the entire open source movement, and possibly even computing in general.  I do agree with Mark: distributed revision control is an incredibly powerful tool, and it has enough potential to change the whole underlying way that entire operating systems are constructed.</p>

<p>The only thing that soured Mark&#8217;s keynote was a barrage of incredibly irritating comments in question time, initiated by people in the audience who seemed to want a microphone for themselves.  You <em>always</em> get these kind of morons at conferences: those folks that can ramble on at length about some completely unrelated topic in an attempt to show their supposed intellectual superiority, and who think that anything they can think of is important and worth nothing.  Of course, in <a href="http://en.wikipedia.org/wiki/Talk:Morissettian_irony/Delete">Alanic</a> fashion, they just end up looking like idiots rather than looking intelligent, and unfortunately also waste everyone else&#8217;s time.  These are the same dropkicks who consistently interrupt the speaker in a talk to offer &#8220;helpful hints&#8221; and &#8220;advice&#8221;; I had one such mongrel in the svk talk yesterday which nearly prompted me to show my <a href="http://www.homestarrunner.com/sbemail58.html">skillz of an artist</a> and exclaim &#8220;Let the speaker get on with his talk you stupid f***!&#8221;.  There&#8217;s nothing quite like a super-enthusiastic babbling dumbass.  <em>Anyway</em>.</p>

<p>The rest of the day wasn&#8217;t such a headspin as the past few days: we had a shaving session held at the same time as the lunch <span class="caps">BBQ. </span> Explanation: at last night&#8217;s auction, numerous silly people, such as <a href="http://perkypants.org/blog/">Jeff Waugh</a>, <a href="http://www.lemis.com/~grog/">Greg &#8216;Groggy&#8217; Lehey</a>, <a href="http://vger.kernel.org/~davem/cgi-bin/blog.cgi">Dave Miller</a> and <a href="http://ozlabs.org/~rusty/">Rusty Russell</a>, volunteered to have various bits of hair shaved off them if the bidding reached a certain price.  Of course, with the <span class="caps">UNSW </span>cartel reaching a bid of $10000, we hit that price, and so it was decided that the shaving would be done in public, today, at lunchtime.  I tell you: Rusty without a moustache is just <em>weird</em>.  He&#8217;s, like, totally not the same guy.  Jeff, Greg, and Dave all look the same, but Rusty&#8230; he could even, like, pick up chicks and stuff now.  Brr!</p>

<p>The rest of the day was spent socialising with the other geeks and attending the panel, prizes and conference close.  That was all a pretty standard affair, apart from the very sad fact that I lost my favourite silver long-sleeve Banana Republic jumper some time that afternoon.  (Weeps with the moon.)  Oh well, I guess that&#8217;s an excuse to do a little more shopping the next time I hit the <span class="caps">USA&#8230;</span></p>

<p>MySQL were holding drinks that night at the Captain Cook tavern, but unfortunately I didn&#8217;t attend them since I was sadly looking around for my jumper.  (Weeps with the moon yet again, this time with violin music in the background.)  So, I joined Erik, Matt, Shane, Jaq, Ashley and a few other folks at none-other-than The Terrace for dinner again.  I tell you: a mixed grill of lamb, chicken, pork and beef on hot rocks doesn&#8217;t get boring, and neither does a <a href="http://www.algorithm.com.au/gallery/dunedin/P1000413">Barmaid</a> full of beer.  By this time, the five hours of sleep that I&#8217;d been getting per day really hit me, so I retired at about 9 o&#8217;clock to head back home and sleep.</p>

<p>So it&#8217;s been an excellent wind-down to one of the most awesome conferences I&#8217;ve been to.  Next year&#8217;s Linux.conf.au organisers will  have to work hard to top this one, but from (very) early indications, that prospect looks promising already.  Thanks to all the organisers who made it such a educational, inspiring event to attend, and all my friends there who made it a serious boatload of fun!</p>

<p><span class="caps">P.S. </span> For those of you that know of Andrew Tridgell, he was quoted in the Otago Daily Times (that most excellent of newspapers) as being a Jim Carrey lookalike.  Truly awesome.</p>]]></content:encoded></item><item><title>Nettwerk Records vs RIAA</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Music</category><dc:date>2006-01-28T19:32:11-08:00</dc:date><link>http://algorithm.com.au/blog/files/nettwerk-records-vs-riaa.html#unique-entry-id-433</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/nettwerk-records-vs-riaa.html#unique-entry-id-433</guid><content:encoded><![CDATA[<p><a href="http://www.urbandictionary.com/define.php?term=canadia">Canadia</a>&#8217;s largest independent record label is <a href="http://www.marketwire.com/mw/release_html_b1?release_id=107623">litigating against the <span class="caps">RIAA</span></a> on behalf of consumers: schweet.  (I personally like Nettwerk since they&#8217;re the home of some of my favourite artists: Sarah McLachlan, Dido, and the Barenaked Ladies.)</p>]]></content:encoded></item><item><title>Static and Dynamic Typing: Fight&#x21;</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2007-02-28T20:35:21-08:00</dc:date><link>http://algorithm.com.au/blog/files/static-vs-dynamic-typing.html#unique-entry-id-434</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/static-vs-dynamic-typing.html#unique-entry-id-434</guid><content:encoded><![CDATA[<p>It&#8217;s rare that I find a good, balanced article on the (dis)advantages of static vs dynamic typing, mostly because people on each side are too religious (or perhaps just stubborn) to see the benefits of the other.  <a href="http://steve.yegge.googlepages.com/is-weak-typing-strong-enough">Stevey&#8217;s blog rant comparing static vs dynamic typing</a> is one of the most balanced ones that I&#8217;ve seen, even if I think half his other blog posts are on crack.</p>

<p>I lean toward pretty far toward the static typing end of the spectrum, but I also think that dynamic typing not only has its uses, but is absolutely required in some applications.  One of my favourite programming languages is Objective-C, which seems to be quite unique in its approach: the runtime system is dynamically typed, but you get a reasonable amount of static checking at compile-time by using type annotations on variables.  (Survey question: do you know of any Objective-C programmers who simply use <em>id</em> types everywhere, rather than the more specific types such as <code>NSWindow*</code> and <code>NSArray*</code>?  Yeah, I didn&#8217;t think so.)  Note that I think Objective-C could do with a more a powerful type system: some sort of parameterised type system similar in syntax to C++ templates/Java generics/C# generics would be really useful <em>just</em> for the purposes of compile-time checking, even though it&#8217;s all dynamically typed at runtime.</p>

<p>One common thread in both Stevey&#8217;s rant and what I&#8217;ve personally experienced is that dynamic typing is the way to go when your program really needs to be extensible: if you have any sort of plugin architecture or long-lived servers with network protocols that evolve (hello Erlang), it&#8217;s really a lot more productive to use a dynamic typing system.  However, I get annoyed every time I do some coding in Python or Erlang: it seems that 50% of the errors I make are type errors.  While I certainly don&#8217;t believe that static type systems guarantee that &#8220;if it compiles, it works&#8221;, it&#8217;s foolish to say that they don&#8217;t help catch a large class of errors (especially if your type system&#8217;s as powerful as Haskell&#8217;s or Ocaml&#8217;s), and it&#8217;s also foolish to say that unit tests are a replacement for a type system.</p>

<p>So, the question I want to ask is: <em>why</em> are programming languages today so polarised into either the static and dynamic camp?  The only languages I know of that strive to accommodate for the benefits of both are Objective-C, Perl (though I&#8217;d say that writing Perl without <code>use strict</code> is an exercise in pain, since its only three types are scalars, arrays and hashes), and (gasp) <a href="http://pico.vub.ac.be/~wdmeuter/RDL04/papers/Meijer.pdf">Visual Basic</a>.  Programming languages and programming language research <em>should&#8217;ve</em> looked at integrating static and dynamic typing a long time ago.  C&#8217;mon guys, it&#8217;s obvious to <em>me</em> that both approaches have good things to offer, and I ain&#8217;t that smart.  I think a big reason they haven&#8217;t is largely for religious reasons, because people on both sides are too blinded to even attempt to see each other&#8217;s point of view.  How many academic papers have there been that address this question?</p>

<p>I hope that in five years, we&#8217;ll at least have <em>one</em> mainstream programming language that we can write production desktop and server applications in, that offer the benefits of both static and dynamic typing.  (Somebody shoot me, now I&#8217;m actually agreeing with Erik Meijer.)  Perhaps a good start is for the current generation of programmers to actually admit that both approaches have their merit, rather than simply get defensive whenever one system is critiqued.  It was proved a long time ago that dynamic typing is simply staged type inference and can be subsumed as part of a good-enough static type system: point to static typing.  However, dynamic typing is also essential for distributed programming and extensibility.  Point to dynamic typing.  Get over it, type zealots.</p>

<p><span class="caps">P.S. </span> Google Fight reckons that <a href="http://www.googlefight.com/index.php?lang=en_GB&amp;word1=static+typing&amp;word2=dynamic+typing">dynamic typing beats static typing</a>.  C&#8217;mon Haskell and C++ guys, unite!  You&#8217;re on the <em>same side</em>!  Down with those Pythonistas and Rubymongers!  And, uhh, down with Smalltalk and <span class="caps">LISP </span>too, even though they rule!  (Now I&#8217;m just confusing myself.)</p>]]></content:encoded></item><item><title>Fixing console/terminal output in Xcode </title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-02-19T19:46:00-08:00</dc:date><link>http://algorithm.com.au/blog/files/2fd314dc0fa34252f7f8932bdccbdd7d-436.html#unique-entry-id-436</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2fd314dc0fa34252f7f8932bdccbdd7d-436.html#unique-entry-id-436</guid><content:encoded><![CDATA[<p>If you&#8217;re having problems with Xcode not intercepting console/terminal output from your program (with &#8984;-R, Build and Run or &#8984;-Y, Build and Debug), try this:</p>

<ul>
<li>Go to your Xcode project and select the executable in the project list.</li>
<li>Bring up the inspector for the executable (&#8984;-I, or just double-click on it).</li>
<li>Change &#8220;Use Pseudo terminal for standard input/output&#8221; to &#8220;Use Pipe for standard input/output&#8221; on the General tab of the inspector.</li>
<li>Do <em>not</em> use a Pipe for standard input/output on the Debugging tab of the inspector, unless you don&#8217;t want to be able to debug your executable.</li>
</ul>

<p>That fixed it up for me.</p>]]></content:encoded></item><item><title>Mike Evangelist on HD&#x27;s AACS</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-03-02T23:24:09-08:00</dc:date><link>http://algorithm.com.au/blog/files/707fd6b82a667fcd61a3a8945bf699bd-438.html#unique-entry-id-438</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/707fd6b82a667fcd61a3a8945bf699bd-438.html#unique-entry-id-438</guid><content:encoded><![CDATA[<p><a href="http://writersblocklive.com/">Mike Evangelist</a> (yes, I do believe that&#8217;s his real name&#8230;) is calling for a <a href="http://writersblocklive.com/part-156">boycott of HD video</a> products, due to restrictive digital rights management schemes that the industry is intending to push on to consumers.</p>

<p>There are plenty of folks out there speaking out against DRM, of course.  One thing that distinguishes Mike&#8217;s opinion from the rest of them is that he&#8217;s a <a href="http://www.twincities.com/mld/twincities/business/technology/13206081.htm">former executive at Apple</a>.  What&#8217;s also interesting is his opinion on CSS (the encryption mechanism used for consumer DVDs) and FairPlay, which he wrote in his blog comments:</p>

<blockquote>
  <p>CSS never bothered me that much because everyone in the industry knew it was just a placebo to satisfy the movie studios. Nobody expected it to actually do anything. AACS on the other hand is being designed to work, by some very smart and very serious people.</p>

<p>I view the DMCA as a criminal conspiracy that should be prosecuted under RICO statutes, but of course it won&iacute;t be, as the conspirators are in charge.</p>

<p>But the big difference with AACS is that they can change the rules after the fact. If you buy an high definition DVD, you&iacute;ll have no certainty what rights you will be granted in the future. It&iacute;s insane.</p>

<p>PS
I find FairPlay to be a reasonable compromise, but it doesn&iacute;t work for me because I want to play my music from my server using devices that don&iacute;t support it. Hence, I buy my music elsewhere.</p>
</blockquote>

<p>It appears that both Blu-Ray and HD-DVD will be adopting AACS as part of their rights management schemes, unfortunately.</p>]]></content:encoded></item><item><title>Google Talk and Jabber vs the Rest</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-03-05T16:40:31-08:00</dc:date><link>http://algorithm.com.au/blog/files/google-talk-and-jabber.html#unique-entry-id-439</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/google-talk-and-jabber.html#unique-entry-id-439</guid><content:encoded><![CDATA[<p>I have a lot of friends on the <span class="caps">MSN</span> Messenger chat network that I quite enjoy talking to, but unfortunately my favourite instant messaging program &#8212; iChat on Mac OS X &#8212; can&#8217;t talk to <span class="caps">MSN.  </span>(Linux people, keep reading, I promise this post will get more relevant to you despite my reference to iChat.)  iChat, can, however, talk to Jabber servers.  I&#8217;ve known for a while that many Jabber servers have the capability to bridge networks, so that you can talk to people on all the other chatting networks (ICQ, Yahoo!, <span class="caps">AIM, MSN, </span>and Google Talk) by simply logging into a  single Jabber server.  However, I never bothered configuring iChat to do this until today.</p>

<p>I&#8217;m very happy to say that one of the first guides I found on Google about how to set up iChat to talk to <span class="caps">MSN </span>was on the <a href="http://www.jabber.org.au/ichat">Jabber Australia</a> site, which is also one of the most professional Web sites I&#8217;ve seen for a free, open service.  The process was quite painless and nearly completely Web-based: the Jabber Australia site imports all your current <span class="caps">MSN </span>contacts into your new Jabber contacts list, so you don&#8217;t have to re-type them all in.  The Jabber&lt;-&gt;MSN bridge even sends across all your buddies&#8217; icons, so I can see iChat proudly displaying pictures of all my mates.  Very schmick.</p>

<p>Step the second: I also have friends on Google Talk, and since Google opened up their servers to Jabber federation in January 2006, that means I also get to chat with all my friends who have Gmail accounts and never bother logging into the IM networks.  (Muahaha, and they thought they could avoid me!)  Now I&#8217;m finally gotten into the 2000 era and have one chat client that can talk to any of <span class="caps">MSN, ICQ,</span> Yahoo!, Google Talk, and <span class="caps">AIM</span>; woohoo, clever me.</p>

<p>However, the story&#8217;s much bigger than just simple chat network interoperability.  Google&#8217;s move into the IM market by unleashing Google Talk might have seemed rather underwhelming when it was first announced: after all, it was just like Skype&#8230; but Google voice chat was Windows-only when Skype is Windows/Mac/Linux, and oh yeah, it also had, like, none of Skype&#8217;s user base.  However, Google Talk has one massive weapon behind it: open standards.  In the past few months, Google has done two very significant things:</p>


<ul>
<li>They&#8217;ve opened up their servers so that they can <a href="http://www.google.com/intl/en/press/annc/googletalk_federation.html">interoperate</a> with other Jabber servers.</li>
<li>Published their voice-call protocol as an <a href="http://www.jabber.org/press/2005-12-15.shtml">open standard</a>, and even provided third-party developers with a library (<a href="http://code.google.com/apis/talk/index.html">libjingle</a>) that can be integrated into any IM client.</li>
</ul>



<p>The second point is <em>huge</em>: in one move, Google has brought voice capability to the entire Jabber federation chat network.  (And, if you haven&#8217;t used Google Talk, the voice quality is damn good: better than Skype, and possibly on par or better than iChat <span class="caps">AV.</span>)  The implication of this is that there&#8217;s going to be a big split in the short-term between the official <span class="caps">ICQ</span>/Yahoo!/AIM/MSN clients and everyone else (i.e. Trillian, Gaim, AdiumX, etc).  The official clients will, of course, only work with their own network since they want to lock you in, but every other IM client that doesn&#8217;t currently support voice chatting &#8212; which means <em>everybody</em> except for Skype and iChat AV &#8212; is very, very likely to be putting Google&#8217;s voice protocols into their own chat clients.  Look a couple of years ahead, and I think you&#8217;ll find that every IM chat client is going to have voice support, and that they&#8217;ll be divided into two camps: the ones that support Google&#8217;s voice protocol because it&#8217;s an open standard, and everybody else.</p>

<p>The thing is, right now, that &#8220;everybody else&#8221; is really only one other group: Skype.  There&#8217;s also iChat <span class="caps">AV, </span>but that&#8217;s small fry compared to Skype, and since Apple piggybacks off the <span class="caps">AIM </span>network right now, they don&#8217;t have a large interest in locking customers into one particular network.  (It&#8217;d be relatively easy for Apple to migrate all their .Mac accounts over to a Jabber-federated network just by throwing a couple of Jabber servers up for their .Mac users and publishing a new version of iChat that talked to that.)  This means that it&#8217;s more-or-less going to be Skype vs Google Talk in the next coming years, and while Skype has absolutely huge mindshare right now, I don&#8217;t think they have a hope of holding out, because they&#8217;re the only damn network right now that absolutely <em>requires</em> you to use their own client.  The one killer advantage that Skype has compared to Google Talk is that you can use Skype call-out and call-in to do phone calls, but once Google gets <span class="caps">SIP </span>support into Jingle, Google Talk will have that capability as well.  Unless Skype do something radical, they&#8217;re going to be extinct in a few years as developers start pushing Jingle support into every single IM client.</p>

<p>Heh, not a bad situation at all: in one move, Google&#8217;s not only guaranteed some measure of success for themselves in the IM market, but they&#8217;ve also made the world a slightly better place by giving users client choice and software choice thanks to open standards.  One voice protocol to rule them all, and in the darkness bind them&#8230;</p>]]></content:encoded></item><item><title>Pang&#x27;s Law</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-03-14T03:21:27-08:00</dc:date><link>http://algorithm.com.au/blog/files/42b2bd71849ff6f70ffa7219e2bcb661-440.html#unique-entry-id-440</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/42b2bd71849ff6f70ffa7219e2bcb661-440.html#unique-entry-id-440</guid><content:encoded><![CDATA[<blockquote><p>When you buy a bunch of CD jewel cases, at least one in every ten will be broken or cracked.</p></blockquote>

<p>(While I&#8217;m at it, don&#8217;t buy the crystal-clear jewel cases.  They look cool, but they&#8217;re a right <em>beeyotch</em> to open up so you can slide in the inlay&#8230;)</p>]]></content:encoded></item><item><title>Reliable DNS Server Queues on the Cheap</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-03-23T02:52:28-08:00</dc:date><link>http://algorithm.com.au/blog/files/b94e922ee8e124c4b0ac51dcb3da31cd-441.html#unique-entry-id-441</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/b94e922ee8e124c4b0ac51dcb3da31cd-441.html#unique-entry-id-441</guid><content:encoded><![CDATA[<p>The traditional solution to providing a high-availibility Internet service is to throw a bunch of (preferably geographically diverse) servers together and set up a round-robin DNS record that will somewhat balance the load between them.  However, if your Internet service supports real-time collaboration between users, as in the case of a bunch of clustered worldwide Jabber servers, a round-robin DNS solution doesn&#8217;t work very well, because it dramatically increases your server-to-server traffic as users will end up logging into different servers.</p>

<p>Assuming that scalability isn&#8217;t too much of a problem and that your main goal is high availability, what you really want is a <em>failover queue</em> of servers for a single DNS record: first, try <em>server1</em>; if that fails, try <em>server2</em>; if <em>server2</em> fails, try <em>server3</em>, and so on&#8230;</p>

<p>The traditional solution for this is either (a) run your own DNS server and use BIND 9&#8217;s obscure <code>rrset-order</code> option to define a round-robin order, or, if you&#8217;re uncomfortable with doing that, outsource your DNS to a managed DNS hosting service that supports failover monitoring, such as <a href="http://www.zoneedit.com/">ZoneEdit</a> or <a href="http://www.powerdns.com/">PowerDNS</a>, which can be expensive.</p>

<p>However, <a href="http://www.vergenet.net/~horms/">Horms</a> suggested a brilliant little solution: use one of the many freely available <a href="http://www.dyndns.org/">dynamic</a> <a href="http://www.no-ip.com">dns</a> <a href="http://directory.google.com/Top/Computers/Software/Internet/Servers/Address_Management/Dynamic_DNS_Services/">services</a>.  Write a simple script to poll your servers in order, and update the dynamic DNS entry&#8217;s IP address to point to whatever the first server you&#8217;ve detected as online.  You can still point users to the normal hostname in your domain, by adding a <code>CNAME</code> record that points to the hostname provided by the dynamic DNS service.</p>

<p>We&#8217;ve used this technique in practice for several weeks and it&#8217;s worked extremely well: so well, in fact, that we cancelled the outsourced DNS failover service that we had before, because it  didn&#8217;t update as quickly or work as reliably as it does now.  Writing the monitoring script is the hardest part of this solution, and that&#8217;s pretty easy: if you&#8217;re really curious, email me and I&#8217;ll be happy to lend the monitor script that we use.</p>]]></content:encoded></item><item><title>GLTerminal</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-03-23T03:15:49-08:00</dc:date><link>http://algorithm.com.au/blog/files/ad7c93f47bd46c571851e60b615a0ee6-442.html#unique-entry-id-442</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ad7c93f47bd46c571851e60b615a0ee6-442.html#unique-entry-id-442</guid><content:encoded><![CDATA[<p>Aww jeah, this little program wins some seriously awexome geek points:</p>

<p><img src="http://www.algorithm.com.au/albums/screenshots/GLTerminal-Screenshot.png"/ alt="GLTerminal Screenshot" /></p>

<p>That, folks, is <a href="http://ldopa.net/2006/01/14/glterminal/"><span class="caps">GLT</span>erminal</a>.  It emulates the curvature of ye olde green and amber <span class="caps">CRT </span>tubes; what you can&#8217;t see in the screenshot is that it can also emulate particular baud rates (all the way from 110 to 19200), complete with the ghosting effect of the slow phosphor updates that the old terminals had.  I leave you with one of its Preferences windows:</p>

<p><img src="http://www.algorithm.com.au/albums/screenshots/GLTerminal_Options.png" alt="GLTerminal Options"/></p>]]></content:encoded></item><item><title>The Circles of Mutable State</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-03-23T05:24:36-08:00</dc:date><link>http://algorithm.com.au/blog/files/6003ab61ab8ebfb289bca933162da34c-443.html#unique-entry-id-443</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6003ab61ab8ebfb289bca933162da34c-443.html#unique-entry-id-443</guid><content:encoded><![CDATA[<p>Scott Johnson has an excellent comment on the Lambda the Ultimate forums titled &#8220;<a href="http://lambda-the-ultimate.org/node/724#comment-6621">Different levels of mutable state badness</a>&#8221;:</p>

<blockquote><p>The vestuble: Non-mutable state. Just so we have a frame of reference. (Some may argue that this is Heaven rather than the outermost circle of Hell, but in Heaven all the problems are already solved. :) )</p>

<p>1st circle: Mutable state which is not externally observable (given the programming model). Such things as variables cached in registers and other optimizations performed by the machine.</p>

<p>2nd circle: &#8220;Monotonic&#8221; mutable state. Discussed a bit in <span class="caps">CTM, </span>these correspond to variables which can be bound separately from their definition (but once bound cannot be re-bound), lazy evaluation, etc. In general, preserve referential transparency, and are well-behaved.</p>

<p>3rd circle: Linear mutable state. Mutable variables which are accessed from only one place; and generally aren&#8217;t subject to aliasing. Examples include local variables in functions (ignoring the issues of lexical closures which might alias such variables, and call-by-reference), &#8220;private&#8221; variables within objects, etc.</p>

<p>4th circle: Managed mutable state. State in a database or some other system which provides transaction semantics and other means of arbitrating access to the shared variables.</p>

<p>5th circle (getting hotter): Aliased mutable state. Mutable variables/objects which are &#8220;used&#8221; in numerous different contexts (and therefore aliased)&#8212;and thus frequently used as a backdoor communications channel (often unintentionally). Often described as a &#8220;feature&#8221; of certain OO languages (much the same way pointer arithmetic is trumpted as a feature of C).</p>

<p>6th circle (even hotter): Global (unmanaged) mutable state. As bad as the previous, but as the state is globally exported, you don&#8217;t know <span class="caps">WHO </span>might be messing with it, or where.</p>

<p>7th and 8th circles: Currently unoccupied, though I await suggestions. :) Feel free to interpose suggestsions above too, and we can demote intervening circles to fill in the gap.</p>

<p>9th circle: Concurrent mutable state. The obnoxious practice of mutating shared state from multiple threads of control, leading into a predictable cycle of race conditions, deadlocks, and other assorted misbehavior from which there is no return. And if a correct solution (for synchronization) is found for a given program, chances are any substantial change to the program will make it incorrect again. But you won&#8217;t find it, instead your customer will. Despite that, reams of code (and <span class="caps">TONS </span>of middleware) has been written to try and make this tractable. And don&#8217;t get me started on a certain programming language which starts with &#8220;J&#8221; that saw fit to make <span class="caps">EVERY </span>object have its very own monitor&#8230;.</p></blockquote>]]></content:encoded></item><item><title>In-ear Headphones Adventures</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-03-25T22:24:54-08:00</dc:date><link>http://algorithm.com.au/blog/files/in-ear-headphones-adventures.html#unique-entry-id-444</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/in-ear-headphones-adventures.html#unique-entry-id-444</guid><content:encoded><![CDATA[<p>I&#8217;ve been on a bit of a headphones splurge lately: anyone who knows me will know that I like my music, and I love my gadgets.  I like in-ear headphones for travelling since they&#8217;re small, unobtrusive, yet can still give excellent sound quality.  While nothing beats a nice pair of full-head cans for comfortable listening, they&#8217;re a little bit awkward to tote around.  Interestingly, I&#8217;ve found that my experiences with in-ear headphones have been quite different from most of the reviews that I&#8217;ve read on the &#8216;net about them, so I thought I&#8217;d post my experiences here to bore everyone.  The executive summary: make sure that whatever in-ear phones you buy, wherever you buy them, be prepared to bear the cost if you don&#8217;t like them, or make sure you can return them.</p>

<p>Note: For comparative purposes, my preferred non-in-ear headphones are the Sennheiser PX-100s (USD$60), IMHO one of the best open earphones in its price range.  I don&#8217;t consider myself to be an audiophile at all: I think I know sound reasonably well, but I&#8217;m not fussy as long as the general reproduction is good.  A general guideline is that if I state that something lacks bass compared to something else, you&#8217;ll be able to hear the difference unless you&#8217;re totally deaf, but I&#8217;m not fussy about whether the bass is &#8216;soft and warm&#8217; and all that other audiophile crap.  For serious listening/monitoring, I currently use Beyerdynamic DT 531s, and previously used AKG-141s.  The Sennheiser PX-100 nor any of the headphones below are any real comparison to these beasts: the 531s and 141s are meant for professional monitoring with serious comfort; it&#8217;s a whole different target market.</p>

<p>So, here are some in-ear headphones that I&#8217;ve tried over the years:</p>

<ul>
<li><p>Apple iPod earbuds: Mediocre sound quality, trendy white, comes with 
iPod.  Stays in the ear reasonably well.  Not enough bass for my liking, but that&#8217;s no surprise considering they come for free.  That said, they&#8217;re a hell of a lot better than the earbuds that come with most MP3/CD players; the Sony PSP also came with trendy-white headphones, and they sucked a lot more than the iPod earbuds.</p></li>
<li><p>Griffin Earjams (USD$15): Designed as an attachment to the iPod earbuds.  This doobie significantly changes the output of the earbuds so that you now get a good amount of bass, with very little treble.  Not good enough: I like bass in my <a href="http://www.urbandictionary.com/define.php?term=doof+doof&amp;defid=949472">doof-doof music</a>, but I don&#8217;t want to hear just the doof-doof-doof, you know?  If you&#8217;re tempted to get these, I&#8217;d suggest trying Koss&#8217;s The Plug or Spark Plug in-ear phones instead, which are just as cheap, have just as much (if not more bass) reproduction, and don&#8217;t suffer so badly on the treble end.</p></li>
<li><p>Apple in-ear Headphones (USD$40): I really liked these.  About the only thing I don&#8217;t like about them is that they don&#8217;t fit in my ear well enough: they&#8217;re fine for a couple of minutes, but after about 10 minutes I realise that they&#8217;re falling out a bit and I have to wiggle them in again.  I don&#8217;t find this too much of an annoyance, but no doubt other people will.  If you plan to do exercise with your in-ear phones, you will definitely want to give these a very good break in and find out whether they come loose during your gymming/running/skiing/breakdancing/whatnot.</p>

<p>I&#8217;m fairly sure the loose fitting is due to a different design they use: the actual earpiece/driver seems to be much bigger than the other in-ear headphones I&#8217;ve tried here, and I guess they&#8217;re designed to be used further away from the ear rather than being stuck deep into your ear canal, as with the Sony and Shures I tried (and no doubt like the Etymotics in-ear phones too).  The nice thing about this design is that you don&#8217;t have to stick them really, really deep, which is the main reason I like them.  I find the Sony and the Shures want to be too deep for my comfort level; see below.</p></li>
<li><p>Sony MDR-EX71SL (USD$49): Available in white or black.  After much internal debate and agony, I got the white model.  (Trendy or street-wise?  Trendy or street-wise?  Trendy it is!)  This was the first model I bought after the Apple in-ear headphones, expecting to have seriously better sound.  After all, everyone knows that for audio, more expensive always means better&#8212;especially those gold-plated, deoxygenated, shiny-looking, made-from-<a href="http://en.wikipedia.org/wiki/Unobtanium">unobtanium</a> Monster Cables.  Anyway, I was fairly disappointed with their sound quality: less bass than the Apple&#8217;s iPod earbuds.  Well, OK, let&#8217;s be honest: I&#8217;m sure they <em>do</em> sound really good if not far better, but I&#8217;ll never find out, because I really don&#8217;t want to shove them in my ear that far.  Unlike the Koss Plug series, these Sonys don&#8217;t come with foam earpieces that can be inserted at a comfortable distance, so I think you have to put the earpiece far deeper into your ear than I did.  In the very unlikely scenario that I did insert them as far as they were meant to go, they sounded pretty crap indeed.</p></li>
<li><p>Koss Spark Plug (USD$20): The sequel to Koss&#8217;s suspiciously cheap older model, which was simply named &#8220;The Plug&#8221;.  The Spark Plug&#8217;s just as cheap as The Plug, but supposedly better (or at least different).  For $20, I don&#8217;t think you can complain a whole lot: they give you a pretty good amount of bass (comparable to the Griffin Earjams), but they&#8217;re definitely lacking at the high end, though not as much as the Earjams are.  I find the foam earpieces that come with these fit my ear pretty well, don&#8217;t have to be put in that deep to deliver that doof-doof bass I&#8217;m looking for, and they&#8217;re also reasonably comfortable.  They&#8217;re not quite as comfortable as Apple&#8217;s in-ear headphones, but still, better than I&#8217;d expect for a piece of foam stuck into my ear.  If your sound-playing device has an equaliser, you can likely correct for the Spark Plug&#8217;s lack of treble response by putting it on an Eq setting that boosts the treble a bit: I found the Spark Plug to be sound pretty good on iPod&#8217;s Treble Boost or Electronic Eqs.  A good, safe (and pretty cheap) buy.</p></li>
<li><p>Shure E3c/E4c (USD$179 and USD$299): So, I found the Apple Store stocking one of the most acclaimed in-ear phones I&#8217;ve ever read about, which would be the Shure E3c.  (Note: the &#8216;c&#8217; in E3c stands for consumer, and basically translates to &#8220;trendy iPod white&#8221;.  The Shure E3 is exactly the same, but is black, and therefore faster.)  Additionally, they also had the Shure E4c in stock, which are far more pricey than the E3c (and therefore better).  Unfortunately, I put both of these headphones into the same category as the Sony MDR-EX71SLs: I&#8217;m sure they&#8217;re as absolutely awesome as all the glowing reviews say, but I&#8217;m just a wimp and refuse to shove those damn things that far into my brain.  Oh yeah, on a not-very-relevant note, Shure changed the packaging between the E3c and the E4c.  The E3c had a (gasp) easy-to-open plastic pack, but apparently Shure have since been attending the American School of Plastic Packaging, and used them <a href="http://blogs.msdn.com/oldnewthing/archive/2004/12/24/331751.aspx">evil blister packs</a> instead.</p></li>
<li><p>Griffin EarThumps (USD$20): Released at the start of 2006, I managed to find a pair of EarThumps calling me at my local AppleCentre, and I like them alot.  They&#8217;re pretty cheap (they&#8217;re sure as hell not in the Shure E3c/E4c price range), and they sound great.  The bass production is nearly as good as Koss&#8217;s Plug series, and they actually manage to produce pretty decent treble too, so you won&#8217;t have to play around with your graphic equaliser too much to make these sound decent.  Additionally, they appear to have the larger drivers that Apple used for their in-ear headphones: this means that you don&#8217;t have to shove them so far in your ear.  In fact, these were even easier to get into your ear than Apple&#8217;s in-ear headphones, and were much less annoying to put in than the Koss &#8216;phones.  They&#8217;re also reasonably comfortable and stay in your ear quite well, and come in both black and white models if colour-matching your iPod is an important thing to you.</p></li>
</ul>

<p>For on-the-road listening, my current preferred earphones are the Griffin EarThumps: small enough to fit next to an iPod nano in one of those evilly cute iPod socks, with good enough sound and a good comfort level.  I was previously using Koss&#8217;s Spark Plug, and before that, Apple&#8217;s in-ear headphones.  The EarThumps are a set of earphones that I can heartily recommend to friends, since they&#8217;re reasonably cheap, and more importantly, I know that they won&#8217;t have to shove some piece of equipment halfway inside their brain to get any decent sound out of it.</p>]]></content:encoded></item><item><title>An Optical Mouse of a Mouse</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-03-27T22:01:05-08:00</dc:date><link>http://algorithm.com.au/blog/files/ff4b4467a299b1f288d0c9b3500e8188-445.html#unique-entry-id-445</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/ff4b4467a299b1f288d0c9b3500e8188-445.html#unique-entry-id-445</guid><content:encoded><![CDATA[<p>The optical <span class="caps">LED </span>for Apple&#8217;s Mighty Mouse emits a <a href="http://arstechnica.com/journals/apple.ars/2006/3/20/3272">cute little picture of a mouse</a> if you look hard enough, and apparently this has always been the case for all of Apple&#8217;s optical mouses.  Kudos to them for the little design touches!  Now if I could only find another <a href="http://www.google.com/search?q=%22Logitech+MX-300%22">Logitech MX-300</a>, which is the best weighted and most comfortable mouse I&#8217;ve ever used.</p>

<p>(Man, you know you&#8217;re a total nerd when you start talking about the <em>weight</em> of your frigging <em>mouse</em>.)</p>]]></content:encoded></item><item><title>Ultrasone HFI-550 Headphones</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-03-30T06:30:01-08:00</dc:date><link>http://algorithm.com.au/blog/files/559faf3f594b51d1b7da586db215cba4-446.html#unique-entry-id-446</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/559faf3f594b51d1b7da586db215cba4-446.html#unique-entry-id-446</guid><content:encoded><![CDATA[<p>After quite a bit of hunting around, I found one absolutely kickass pair of headphones for work: the <a href="http://www.dansdata.com/hfi550.htm">Ultrasone <span class="caps">HFI</span>-550</a>.  They&#8217;re great for a work environment because they&#8217;re sealed headphones, which means that if you&#8217;re like me and play stuff <em>loud</em>, you won&#8217;t disturb your workmates because sealed headphones keep the sound in.  The sound quality from them is superb: they&#8217;re up there with my beloved Beyerdynamic <span class="caps">DT531</span>s for serious listening.  They&#8217;re also comfortable: I&#8217;ve worn them for hours on-end with no problem or fatigue at all.</p>

<p>For Australians, the best thing about them is that thanks to <a href="http://www.auspcmarket.com.au/">AusPCMarket</a>, you can actually get them in Australia for a reasonable price: they&#8217;re <span class="caps">USD</span>$189 at <a href="http://www.headphone.com/products/headphones/all-headphones/ultrasone-hfi-550.php">Headroom</a>, but you can get them at AusPCMarket for A$231&#8212;including shipping.  Considering that equivalent competing headphones (such as the <span class="caps">AKG</span>-K271) are around the same price range in the <span class="caps">USA </span>but are quite hard to find in stores in Australia for anything less than about A$330, A$231 for these things is a bargain.</p>

<p>And, of course, the day I got these nice pair of cans is the same day that I managed to code my way out of a coding slump, and get back into deep hack mode.  Coincidence?  I don&#8217;t think so&#8230;</p>]]></content:encoded></item><item><title>For the functional programmers</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-04-03T17:23:32-07:00</dc:date><link>http://algorithm.com.au/blog/files/090a0b62a90f05ac0c4298cc2914ca25-447.html#unique-entry-id-447</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/090a0b62a90f05ac0c4298cc2914ca25-447.html#unique-entry-id-447</guid><content:encoded><![CDATA[<p><a href="http://foldl.com/">http://foldl.com/</a> <br />
<a href="http://foldr.com/">http://foldr.com/</a></p>]]></content:encoded></item><item><title>MacBook Pro Fun</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><category>Mac OS X</category><category>Windows</category><dc:date>2006-04-08T05:26:36-07:00</dc:date><link>http://algorithm.com.au/blog/files/977642e9f9fee8b5f89dff43e437975f-448.html#unique-entry-id-448</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/977642e9f9fee8b5f89dff43e437975f-448.html#unique-entry-id-448</guid><content:encoded><![CDATA[<p>I suspect that if you don&#8217;t know that Apple released their <a href="http://www.apple.com/bootcamp/">Boot Camp</a> tool to enable normal PC operating systems to be installed on their shiny new <a href="http://www.google.com/search?q=%22Intel+Mac%22+ICBM"><span class="caps">ICBM</span>s</a>, you&#8217;re probably not a geek, and this article doesn&#8217;t really concern you&#8230;</p>

<p>Since there have been <a href="http://daringfireball.net/2006/04/windows_the_new_classic">plenty</a> <a href="http://www.macgeekery.com/column/pure_genius/beige_hardware_and_boot_camp_implications">of</a> <a href="http://www.macgeekery.com/column/eloquent_apathy/third-day_thoughts_on_boot_camp">other</a> <a href="http://www.brad-oliver.com:8081/~boliver/blog/archives/000833.html">articles</a> written about Boot Camp and its implications for the future of the Macintosh, I won&#8217;t say any more about it here.  I just wanted to say the following:</p>


<ul>
<li>Tuesday, April 4: Pick up shiny new MacBook Pro from my local AppleCentre.</li>
<li>Wednesday, April 5, ~8pm Australian <span class="caps">CST</span>: Apple announces Boot Camp.</li>
<li>Thursday, April 5, ~2am Australian <span class="caps">CST</span>: Windows XP <span class="caps">SP2 </span><a href="http://www.algorithm.com.au/gallery/album07/IMGP4714">installs</a> on my Mac.</li>
<li>Thursday, April 5, ~3am Australian <span class="caps">CST</span>: <a href="http://www.algorithm.com.au/gallery/album07/IMGP4716">Visual C++ Express 2005</a> and <a href="http://www.algorithm.com.au/gallery/album07/IMGP4721">Counter-Strike</a> are installed (the latter running at a rather nice 72.7fps in Valve&#8217;s Video Stress Test).</li>
<li>Thursday, April 5, sometime later: Parallels <a href="http://www.parallels.com/en/products/workstation/mac/">announces</a> a beta of their Workstation product, enabling Macs to virtualise running guest operating systems.  Hooray for x86 <a href="http://www.intel.com/technology/computing/vptech/">hardware</a> <a href="http://www.amdboard.com/pacifica.html">virtualisation</a> technology.</li>
</ul>



<p>Not bad for the first three days of owning a MacBook Pro, really.  Bring on the tech!</p>]]></content:encoded></item><item><title>MacBook Pro First Impressions</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><category>Mac OS X</category><dc:date>2006-04-09T00:22:19-07:00</dc:date><link>http://algorithm.com.au/blog/files/a1bdac4e4c1c4c563286fa66c4a3cf26-449.html#unique-entry-id-449</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/a1bdac4e4c1c4c563286fa66c4a3cf26-449.html#unique-entry-id-449</guid><content:encoded><![CDATA[<p>It&#8217;s been about a week since I got my shiny new MacBook Pro.  Since then, I&#8217;ve used it for both work and play, so I think it&#8217;s about time I put more crap on the Internet and <a href="http://whydontyoublogaboutit.com/">blogged about my very important personal feelings</a> on this issue.</p>

<p>First, this thing <em>screams</em>.  It&#8217;s fast as hell.  Mac OS X zips along even more smoothly than the Dual 2.3GHz Power Mac G5 I have at work, and the interface generally feels snappier than a <span class="caps">G5, </span>which is already reasonably <a href="http://72.14.203.104/search?q=cache%3AIizIQ3enrAMJ%3Aarstechnica.com%2Freviews%2Fos%2Fmacosx-10.4.ars%2F19+teh+snappy&amp;hl=en">teh snappy</a>.  To my amazement, some stuff on the MacBook Pro is <em>way</em> faster than on the <span class="caps">G5. </span> As an example, here&#8217;s how long it took to compile a debug version of <a href="http://www.cinesync.com/">cineSync</a>, our little project at work:</p>


<ul>
<li>Dual 2.3GHz Power Mac G5: 5m10s</li>
<li>MacBook Pro: <strong>1m40s</strong></li>
</ul>



<p>That&#8217;s a <em>3x</em> speed improvement &#8212; versus a <em>2.3GHz G5</em>, which is a pretty blazing fast machine already.  (I didn&#8217;t believe the performance difference that I ran the test three times!)  I really don&#8217;t understand the performance discrepancy here: the G5 is at least the equal of the fastest x86 chips in raw processing power, so where&#8217;s this 3x difference coming from?  Even <a href="http://www.robelle.com/smugbook/process.html"><em>fork(2)/exec(2)</em></a> speed in Darwin is an order of magnitude quicker on the MacBook Pro than on the <span class="caps">G5, </span>so running those one terabyte <code>./configure</code> scripts finally doesn&#8217;t look so paltry compared to Linux.  My only thought is that x86 code generator for gcc is an order of magnitude better than the code generator for the <span class="caps">PPC. </span> I guess this is a feasible possibility, but it does seem somewhat unlikely.  Can a compiler that generates better code really be responsible for <em>that</em> much of a speed difference?  Maybe indeed (quiet you <a href="http://www.funroll-loops.org/">Gentoo fanboys</a> down the back)&#8230; thoughts on this issue would be welcome!</p>

<p><a href="http://www.apple.com/rosetta/">Rosetta</a>, the <a href="http://en.wikipedia.org/wiki/Just-in-time_compilation"><span class="caps">JIT</span></a> <span class="caps">PPC</span>-to-x86 code translator, also works amazingly well.  While the technology in Rosetta is already an extremely remarkable achievement, its greatest achievement is that you don&#8217;t have to worry about it: I downloaded some Mac OS X binaries of <a href="http://subversion.tigris.org/">Subversion</a> a while ago, and only realised later that they were <span class="caps">PPC </span>binaries.  So Rosetta works completely transparently, even for <span class="caps">UNIX </span>command-line programs.  I suspect that part of the reason Apple <a href="http://www.macnn.com/articles/06/02/24/darwin.for.x86.limits/">haven&#8217;t</a> <a href="http://www.rentzsch.com/macosx/catalogingTheFallen">open-sourced</a> the Intel <a href="http://www.kernelthread.com/mac/osx/arch_xnu.html">xnu</a> kernel for Mac OS X/Darwin is because Rosetta may be tightly integrated with the kernel, and it&#8217;s technology that they don&#8217;t want to (or perhaps cannot legally) give away.</p>

<p>The whole Windows-on-Mac thing also works rather well.  Windows XP running via <a href="http://www.apple.com/macosx/bootcamp/">Boot Camp</a> is, well, the same as Windows XP running on a vanilla <span class="caps">PC, </span>except that it&#8217;s running on a very pretty silver box (with very pretty <a href="http://www.algorithm.com.au/gallery/album07/IMGP4713">ambient keyboard lighting</a>).  It does have some slightly annoying issues (such as Fn-Delete on the internal keyboard not functioning as a proper Del key), but those issues will be solved with time.  (Unfortunately, Counter-Strike isn&#8217;t all that playable with a trackpad :).</p>

<p><a href="http://www.parallels.com/en/products/workstation/mac/">Parallels Workstation</a> is equally impressive: hardware-assisted virtualisation really does fly.  It&#8217;s remarkable to see Windows XP running in a window inside Mac OS X, and have it run at more-or-less native <span class="caps">CPU </span>speed.  Setting breakpoints in Visual C++ Express also works fine, so Parallels appears to be virtualising hardware breakpoints correctly too.  There&#8217;s still a lot of work to be done in virtualising drivers, however: it would be mighty cool to see a virtualised PC game running at nearly native speeds, since that requires virtualised accelerated video and sound support.</p>

<p>The upshot of the successful Windows-on-Mac stories are that I&#8217;ll never be buying a generic PC yum-cha box ever again.  On the road, I finally have a machine that can actually run Mac OS X, Windows and Linux all side-by-side, both virtualised and &#8220;for real&#8221;.  For my family, that means that I can actually buy them an <em>iMac</em> even though they need to run Windows.  (The iMac really is a beautiful machine: there&#8217;s no single-box-with-built-in-display solution like an iMac at all in the PC world.  Yeah, I&#8217;m sure there&#8217;s some cheapass Taiwanese knockoff of an iMac, but that certainly doesn&#8217;t count.)</p>

<p>One nice touch to end of this story is that my <a href="http://www.macmall.com.au/">local AppleCentre</a> offered me no less than A$1000 to trade-in my faithful old 1GHz Titanium Powerbook, which I intend to follow-up on.  (I&#8217;d have done it already if I didn&#8217;t have to head out-of-town so soon.)  If you&#8217;re thinking about upgrading an old Mac to a new <a href="http://www.google.com/search?q=Intel-chip-based-mac+ICBM"><span class="caps">ICBM</span></a> model, see whether your AppleCentre will accept trade-ins.  I was very pleasantly surprised that I could get a four-digit figure from a trade-in of a three-and-a-bit year old laptop.</p>

<p>So, overall first impressions of a MacBook Pro?  I&#8217;m a pretty happy boy indeed.  The only regret I have is that I already used the name <a href="http://en.wikipedia.org/wiki/SHODAN">shodan</a> for another computer that&#8217;s much less deserving of the name.  Seriously, I called a <em>Dell</em> box shodan?  What the hell crack was I on?</p>]]></content:encoded></item><item><title>Controlled Chaos: Linux in the Visual Effects Industry</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2006-04-12T20:48:02-07:00</dc:date><link>http://algorithm.com.au/blog/files/6b0f6f175ebbeb33cf649dc429f4f4b6-450.html#unique-entry-id-450</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/6b0f6f175ebbeb33cf649dc429f4f4b6-450.html#unique-entry-id-450</guid><content:encoded><![CDATA[<p>&#8220;Controlled Chaos: Linux in the Visual Effects Industry&#8221; was a talk I presented at the <a href="http://lca2006.linux.org.au/">Linux.conf.au 2006</a> <a href="http://halo.gen.nz/lca2006/">Digital Arts miniconf</a>, with Anthony Menasse of Rising Sun Pictures.  We discuss using Linux in the <span class="caps">VFX </span>industry, of course, but also talk about problems encountered in <span class="caps">VFX </span>in general (e.g. mammoth data storage requirements), and how we manage the day-to-day technical issues that crop up.  The slides are now available online, for those interested!</p>

<p>Download: <a href="/downloads/talks/RSP%202006%20LCA%20Public.pdf">Adobe Acrobat <span class="caps">PDF</span></a></p>]]></content:encoded></item><item><title>Mashup Maps Australia</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-04-17T11:02:28-07:00</dc:date><link>http://algorithm.com.au/blog/files/29a98d9b01bb1db87d24323b2d15c043-451.html#unique-entry-id-451</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/29a98d9b01bb1db87d24323b2d15c043-451.html#unique-entry-id-451</guid><content:encoded><![CDATA[<p><a href="http://www.liquidx.net/">Alastair Tse</a> finally got fed up with Google Maps &#8212; despite having a Sydney development branch &#8212; not having Google Maps in Australia.  As such, he&#8217;s put an incredible amount of work into fixing this anomaly, and announced his little <a href="http://mashup.mapmarks.com/aust/">Mashup Maps</a> project yesterday.  Nice work liquidx: that&#8217;ll be going on my browser toolbar indeed!</p>]]></content:encoded></item><item><title>Apple Mail and Self-Signed SSL Certificates</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-05-23T22:32:44-07:00</dc:date><link>http://algorithm.com.au/blog/files/e1b6e33ae91db3d317c6d8b660fc6bf4-452.html#unique-entry-id-452</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/e1b6e33ae91db3d317c6d8b660fc6bf4-452.html#unique-entry-id-452</guid><content:encoded><![CDATA[<p>For those of you getting sick of Apple Mail pestering you about your beautiful self-signed <span class="caps">SSL </span>certificates running on your home-brew Gentoo 386SX/16 imaps/pop3s server, check out <a href="http://docs.info.apple.com/article.html?artnum=25593">Apple&#8217;s knowledge base article 25593</a> to fix the problem once and for all.</p>

<p>After that:</p>


<ul>
<li>double-click on your newly-imported certificate in the Keychain Access utility,</li>
<li>scroll down to the bottom of the window and click on the &#8220;Trust Settings&#8221; disclosure triangle,</li>
<li>and finally, set the &#8220;When using this certificate&#8221; selector to &#8220;Always Trust&#8221;.</li>
</ul>



<p>Huzzah, no more <span class="caps">SSL </span>shenanigans.</p>]]></content:encoded></item><item><title>Subclassing a non-existent Objective-C class</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2006-06-05T20:21:45-07:00</dc:date><link>http://algorithm.com.au/blog/files/f56ca10e93371042498a0f8b83124c78-453.html#unique-entry-id-453</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/f56ca10e93371042498a0f8b83124c78-453.html#unique-entry-id-453</guid><content:encoded><![CDATA[<p>Let&#8217;s say you&#8217;re a Mac OS X developer, and you have the following scenario:</p>


<ul>
<li>You have an application that&#8217;s required to start up without a particular Mac OS X class, framework or function definition, because it may not be installed yet on the user&#8217;s system, or they&#8217;re running an older version of Mac OS X that doesn&#8217;t have the relevant library installed.  (Note that this requirement may only be there so that you can check for the presence of a particular framework, and throwing up a simple error message to the user when your application starts that tells the user to install the framework, rather than simply terminate with some obscure output to stderr.)</li>
<li>On the other hand, your application also uses some features of the potentially missing class/framework/function on Mac OS X.  This is normally pretty easy to do by using <a href="http://developer.apple.com/technotes/tn2002/tn2064.html">weak linking</a> and <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/Using/chapter_3_section_4.html#//apple_ref/doc/uid/20002000-1114537-BABHHJBC">checking for undefined functional calls</a> (or using Objective-C&#8217;s <code>-respondsToSelector</code> method), except when&#8230;</li>
<li>You need to <em>subclass</em> one of the Cocoa classes that may not be present on the user&#8217;s system.</li>
</ul>



<p>The problem here is that if you subclass an existing class that may not be present on the user&#8217;s system, the Objective-C runtime terminates your application as it starts up, because it tries to look up the superclass of your subclass when your application launches, and then proceeds to panic when it can&#8217;t find the superclass.  The poor user has no idea what has happened: all they see is your application&#8217;s icon bouncing in the dock for the short time before it quits.</p>

<p>Here&#8217;s some examples where I&#8217;ve needed to do this in real-life applications:</p>


<ul>
<li>You use Apple&#8217;s <a href="http://tuvix.apple.com/documentation/QuickTime/Reference/QTCocoaObjCKit/Intro/IntroQTKit.html"><span class="caps">QTK</span>it</a> framework, and you&#8217;re subclassing one of the <span class="caps">QTK</span>it classes such as <span class="caps">QTM</span>ovie or <span class="caps">QTM</span>ovieView.  <span class="caps">QTK</span>it is installed only if the user has QuickTime 7 or later installed, and you&#8217;d like to tell the user to install QuickTime 7 when the application starts up, rather than dying a usability-unfriendly death.</li>
<li>You need to use all-mighty <a href="http://www.cocoadev.com/index.pl?ClassPosing"><code>+poseAsClass:</code></a> in a <code>+load</code> method to override the behaviour of existing class, but the class you&#8217;re posing as only exists on some versions of Mac OS X.</li>
</ul>



<p>There are several potential solutions to this (skip past this paragraph if you just want a solution that works): the first one I thought of was to use a <a href="http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_setClassHandler">class handler callback</a>, which gets called when the Objective-C runtime tries to lookup a class and can&#8217;t find it.  The class handler callback should then be able to create a dummy superclass so that your subclass will successfully be loaded: as long as you don&#8217;t use the dummy superclass, your application should still work <span class="caps">OK. </span> Unfortunately this approach encountered <span class="caps">SIGSEGV</span>s and <span class="caps">SIGBUS</span>s, and I ended up giving up on it after half an hour of trying to figure out what was going on.  Another method is to actually make your subclass a subclass of <span class="caps">NSO</span>bject, and then try to detect whether the superclass exists at runtime and then swizzle your class object&#8217;s superclass pointer to the real superclass if it does.  This causes major headaches though, since you can&#8217;t access your class&#8217;s instance variables easily (since the compiler thinks you&#8217;re inheriting from <span class="caps">NSO</span>bject rather than the real superclass)&#8230; and it doesn&#8217;t work anyway, also evoking <span class="caps">SIGSEGV</span>s and <span class="caps">SIGBUS</span>s.  One other possibility is to simply create a fake superclass with the same name as the real Objective-C class, and pray that the runtime choses the real superclass rather than your fake class if your application&#8217;s run on a system that does have the class.</p>

<p>The solution that I eventually settled on is far less fragile than all of the above suggestions, and is actually quite elegant: what you do is compile your subclass into a <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingCode/Concepts/AboutLoadableBundles.html">loadable bundle</a> rather than the main application, detect for the presence of the superclass at runtime via <a href="http://www.cocoadev.com/index.pl?NSClassFromString"><span class="caps">NSC</span>lassFromString</a> or <a href="http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/c/func/objc_getClass">objc_getClass</a>, load up your bundle if it&#8217;s present, and finally call your class&#8217;s initialisers.</p>

<p>Practically, this means that you have to:</p>


<ul>
<li>add a new target to your project that&#8217;s a Cocoa loadable bundle,</li>
<li>compile the relevant subclass&#8217;s source code files into the bundle rather than the main application,</li>
<li>ensure that the bundle is copied to your application&#8217;s main bundle, and</li>
<li>detect for the presence of the superclass at runtime, and if it&#8217;s present, load your bundle, and then initialise the classes in the bundle via the <code>+initialize</code> method.</li>
</ul>



<p>Here&#8217;s some example code to load the bundle assuming it&#8217;s simply in the Resources/ directory of your application&#8217;s main bundle:</p>

<pre><code>    NSString* pathToBundle = [[NSBundle mainBundle] pathForResource:@&quot;MyExtraClasses&quot;
                                                             ofType:@&quot;bundle&quot;];
    NSBundle* bundle = [NSBundle bundleWithPath:pathToBundle];
    
    Class myClass = [bundle classNamed:@&quot;MyClass&quot;];
    NSAssert(myClass != nil, @&quot;Couldn't load MyClass&quot;);
    [myClass initialize];</code></pre>

<p>You will also have to end up specifying using the <code>-weak*</code> parameters to the linker (such as <code>-weak_framework</code> or <code>-weak-l</code>) for your main application if you&#8217;re still using normal methods from that class.  That&#8217;s about it though, and conceptually this technique is quite robust.</p>

<p>Credit goes to Josh Ferguson for suggesting this method, by the way, not me.  I&#8217;m merely evangelising it&#8230;</p>]]></content:encoded></item><item><title>/etc/rc.local on Mac OS X</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Mac OS X</category><dc:date>2006-06-28T22:52:24-07:00</dc:date><link>http://algorithm.com.au/blog/files/50113a3cf453e75e92b6ea61c20035ad-454.html#unique-entry-id-454</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/50113a3cf453e75e92b6ea61c20035ad-454.html#unique-entry-id-454</guid><content:encoded><![CDATA[<p>I&#8217;ve been wanting to run a couple of trivial commands during my system startup, which would&#8217;ve been perfect if Mac OS X had an /etc/rc.local file.  Of course, since Mac OS X uses the (kick-ass) launchd and the nice StartupItems infrastructure, I didn&#8217;t quite expect it to have an rc.local file &#8212; Google wasn&#8217;t much help with this either.</p>

<p>Of course, after I actually looked at the /etc/rc file (which launchd invokes), lo and behold, I find this near the end of the file:</p>

<pre><code>if [ -f /etc/rc.local ]; then
        sh /etc/rc.local
fi</code></pre>

<p>So, Mac OS X does indeed have an rc.local, contrary to what I first expected.  Hopefully this saves at least one other <span class="caps">UNIX </span>geek a couple of minutes of Googling around on the Web&#8230;</p>]]></content:encoded></item><item><title>A History of Haskell Commentary</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-07-15T21:16:04-07:00</dc:date><link>http://algorithm.com.au/blog/files/83135ef0fef7f91c6dae1d5bda7354fd-455.html#unique-entry-id-455</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/83135ef0fef7f91c6dae1d5bda7354fd-455.html#unique-entry-id-455</guid><content:encoded><![CDATA[<p>There&#8217;s a draft paper named &#8220;<a href="http://haskell.org/haskellwiki/History_of_Haskell">A History of Haskell</a>&#8221; on the Haskell Wiki right now, which will be submitted to the <a href="http://research.ihost.com/hopl/">History of Programming Languages conference</a> (HoPL) in 2007.  I wasn&#8217;t even aware there was a conference dedicated to programming language history, and the idea is a great one: after reading the paper, I&#8217;ll be tracking down papers about other significant languages, such as <span class="caps">LISP,</span> Smalltalk and C++.  (Hey, whatever your opinion of C++, it seems to be universally respected that Stroustrup&#8217;s <a href="http://www.research.att.com/~bs/dne.html">The Design and Evolution of C++</a> is a title worthy of being on every serious programmer&#8217;s bookshelf.  Seeing <em>why</em> a language is the way it is today is a huge key in understanding how to wield it.)  The paper&#8217;s a long read (~40 pages) but a very easy read (no Greek in the entire thing!), and it&#8217;s fascinating hearing the inside stories from some obviously incredibly clever people.  I&#8217;m also glad the authors mixed in some humour into the paper, which abounds in the Haskell community: not enough papers dare to inject (and successfully deliver) humour into their materials.</p>

<p>So, here&#8217;s some of my commentary on quotes that I particularly liked from the paper.  First, it looks like the authors of the paper agree with me about Haskell&#8217;s problem with <a href="http://www.algorithm.com.au/mt/haskell/haskells_performance.html">unpredictable performance</a>:</p>

<blockquote><p>The extreme sensitivity of Haskell&iacute;s space use to evaluation order is a two-edged sword. Tiny changes&#8212;the addition or removal of a in one place&oacute;can dramatically change space requirements.  On the one hand, it is very hard for programmers to <em>anticipate</em> their program&iacute;s space behaviour and place calls of correctly when the program is first written&#8230; As designers who believe in reasoning, we are a little ashamed that reasoning about space use in Haskell is so intractable.</p></blockquote>

<p>Mind you, they do also point out something I didn&#8217;t mention in my writings at all:</p>

<blockquote><p>On the other hand, given sufficiently good profiling information, space performance can be improved dramatically by very small changes in just the right place&#8212;without changing the overall structure of the program&#8230; Yet Haskell encourages programmers&#8212;even forces them&#8212;to forget space optimisation until after the code is written, profiled, and the major space leaks found, and at that point puts powerful tools at the programmer&iacute;s disposal to fix them. Maybe this is nothing to be ashamed of, after all.</p></blockquote>

<p>Note that Don Stewart&#8217;s incredible <a href="http://www.cse.unsw.edu.au/~dons/fps.html">Data.ByteString</a> library has pretty much nailed the performance gap between Haskell and C for string processing and binary I/O, which is one area where Haskell was notoriously weak at.  (Haskell&#8217;s also <a href="http://www.mail-archive.com/haskell@haskell.org/msg18863.html">risen to the top of the heap</a> in the <a href="http://shootout.alioth.debian.org/">Great Language Shootout</a> as well, largely thanks to Don&#8217;s efforts.)</p>

<p>There&#8217;s one paragraph on the great importance of profiling tools in finding the cause of performance problems, in one case leading to an absolutely amazing reduction in heap usage:</p>

<blockquote><p>&#8230; there was no practical way of finding the causes of space leaks in large programs. Runciman and Wakeling developed a profiler that could display a graph of heap contents over time, classified by the function that allocated the data, the top-level constructor of the data, or even combinations of the two (for example, &igrave;show the allocating functions of all the cons cells in the heap over the entire program run&icirc;). The detailed information now available enabled lazy programmers to make dramatic improvements to space efficiency: as the first case study, Runciman and Wakeling reduced the peak space requirements of a clausification program for propositional logic by two orders of magnitude, from 1.3 megabytes to only 10K (Runciman and Wakeling, 1993)&#8230;  A further extension introduced retainer profiling, which could explain why data was not garbage collected&#8230; With information at this level of detail, Runciman and R&circ;jemo were able to improve the peak space requirements of their clausify program to less than 1K&#8212;three orders of magnitude better than the original version. They also achieved a factor of two improvement in the compiler itself, which had already been optimised using their earlier tools.</p></blockquote>

<p>And, two paragraphs that lend more credence to the idea that Haskell really does lead to less lines of code:</p>

<blockquote><p>Darcs was originally written in C++ but, as Roundy puts it, &#8220;after working on it for a while I had an essentially solid mass of bugs&#8221; (Stosberg, 2005). He came across Haskell and, after a few experiments in 2002, rewrote Darcs in Haskell. Four years later, the source code is still a relatively compact 28,000 lines of literate Haskell (thus including the source for the 100 page manual). Roundy reports that some developers now are learning Haskell specifically in order to contribute to darcs. </p>

<p>One of these programmers was Audrey Tang. She came across Darcs, spent a month learning Haskell, and jumped from there to Pierce&iacute;s book Types and Programming Languages (Pierce, 2002).  The book suggests implementing a toy language as an exercise, so Audrey picked Perl 6. At the time there were no implementations of Perl 6, at least partly because it is a ferociously difficult language to implement. Audrey started her project on 1 February 2005. A year later there were 200 developers contributing to it; perhaps amazingly (considering this number) the compiler is only 18,000 lines of Haskell (including comments) (Tang, 2005). Pugs makes heavy use of parser combinators (to support a dynamically-changable parser), and several more sophisticated Haskell idioms, including <span class="caps">GADT</span>s (Section 6.6) and delimited continuations (Dybvig et al., 2005). </p></blockquote>

<p>For verification and comparison, here&#8217;s a very rough lines-of-code count generated using David A. Wheeler&#8217;s &#8216;<a href="http://www.dwheeler.com/sloccount/">sloccount</a>&#8217; for Darcs, Bazaar-NG, Mercurial, Arch and Subversion.  Note that I excluded test cases, supporting libraries and other non-essentials, which can be massive (e.g. total omission of hackerlab for Arch, which comprises another 50,000 lines, and the Apache Portable Runtime for Subversion, which is another 85,000 lines):</p>


<ul>
<li>Darcs: 21,135 lines</li>
<li>Bazaar-NG: 47,084 lines</li>
<li>Mercurial: 20,537 lines</li>
<li>Arch: 48,639 lines (~100,000 with hackerlab)</li>
<li>Subversion: 98,736 lines (~185,000 with <span class="caps">APR </span>and <span class="caps">APR</span>-util)</li>
</ul>



<p>So Darcs and Mercurial are pretty similar, Bazaar-NG and Arch are nearly around the same size code base now (and it&#8217;s written in Python rather than C!), and Subversion is, well, a crapload bigger than all the others.</p>

<p>Plus, I didn&#8217;t realise that Pugs was a mere 18,000 lines of code, which is quite amazing.  I&#8217;m not sure whether I&#8217;m more impressed by that figure, or that <a href="http://www.erlang.org/">Erlang</a>&#8217;s incredible <a href="http://www.erlang.se/doc/doc-5.0.1/lib/mnesia-3.9.2/doc/">Mnesia</a> distributed database is a mere ~30,000 lines of code&#8230;</p>]]></content:encoded></item><item><title>Mount Lambda</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-07-31T19:21:54-07:00</dc:date><link>http://algorithm.com.au/blog/files/5d9bda6ebc0821f5ad8463ba7e285ab9-456.html#unique-entry-id-456</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/5d9bda6ebc0821f5ad8463ba7e285ab9-456.html#unique-entry-id-456</guid><content:encoded><![CDATA[<p>Maybe this is why there&#8217;s a crazy-good bunch of functional programmers in Japan:</p>

<p><a href="http://wwwfun.kurims.kyoto-u.ac.jp/MtLambda.html"><img src="http://wwwfun.kurims.kyoto-u.ac.jp/Lambda2.gif"/></a></p>

<p>That&#8217;s right, it&#8217;s <a href="http://wwwfun.kurims.kyoto-u.ac.jp/MtLambda.html">Mount Lambda</a> baby.</p>

<p>(Props to <a href="http://www.vergenet.net/~conrad/">kfish</a> for the link.)</p>]]></content:encoded></item><item><title>Erlang and Concurrency</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Talks</category><dc:date>2006-08-05T19:41:38-07:00</dc:date><link>http://algorithm.com.au/blog/files/0889f82d224d65b115b9520f26fb35dc-457.html#unique-entry-id-457</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/0889f82d224d65b115b9520f26fb35dc-457.html#unique-entry-id-457</guid><content:encoded><![CDATA[<p>Here, you can download the slides for a talk I presented to the Sydney Linux Users&#8217; Group on the 28th of July 2006, named &#8220;Erlang and Concurrency&#8221;.  Note that the <span class="caps">PDF </span>file I&#8217;ve linked to here is quite large, since there&#8217;s a lot of images in there.</p>

<p>Download: <a href="/downloads/talks/Erlang%20and%20Concurrency.pdf">Adobe Acrobat <span class="caps">PDF</span></a> (~7MB)</p>

<p>Some things to note about the presentation:</p>


<ul>
<li>There were two short videos presented: a tech demo of the Unreal Engine 3, and snippets from the totally groovy <a href="http://video.google.com/videoplay?docid=-5830318882717959520">Erlang the Movie</a>, which has also been transcoded to the <a href="http://media.annodex.net/cmmlwiki/ErlangMovie">Ogg Theora</a> video format thanks to Silvia Pfeiffer.  These movies didn&#8217;t make it to the <span class="caps">PDF </span>intact.</li>
<li>I&#8217;m very proud that there wasn&#8217;t a single slide there with bullet points :).</li>
</ul>



<p>There&#8217;s an excellent blog by Garr Reynolds named <a href="http://presentationzen.blogs.com/">Presentation Zen</a> that led me to doing it in the style that I did.  In particular, check out the <a href="http://presentationzen.blogs.com/presentationzen/2005/11/the_zen_estheti.html">Steve Jobs vs Bill Gates</a> comparison that Reynolds did; no prizes for guessing who Reynolds prefers as a presenter.</p>

<p>There&#8217;s a number of resources you can check out on Erlang:</p>


<ul>
<li>The <a href="http://www.erlang.org/">unofficial</a> and <a href="http://www.erlang.se/">official</a> Erlang Web sites.</li>
<li>An <a href="http://www.erlang.se/doc/doc-5.4.6/doc/getting_started/part_frame.html">Erlang tutorial</a>.</li>
<li>Another <a href="http://www.erlang.org/course/course.html">Erlang tutorial</a>.</li>
<li><a href="http://www.erlang.se/doc/doc-5.4/erts-5.4/doc/html/crash_dump.html">How to interpret Erlang crash dumps</a>.</li>
<li><a href="http://www.devmaster.net/articles/mmo-scalable-server/">Writing Low-Pain Massively Scalable Multiplayer Servers</a>, by Joel Reymont.</li>
<li><a href="http://wagerlabs.com/articles/2005/12/12/haskell-vs-erlang">Haskell vs Erlang</a>, and <a href="http://wagerlabs.com/articles/2006/01/01/haskell-vs-erlang-reloaded">Haskell vs Erlang Reloaded</a>.</li>
<li>An <a href="http://www.informit.com/articles/article.asp?p=482670&amp;rl=1">introduction to Erlang on informit.com</a>.</li>
<li>A Slashdot article about <a href="http://hardware.slashdot.org/article.pl?sid=06%2F07%2F23%2F1349206&amp;from=rss">moving toward distributed computing</a>.</li>
<li><a href="http://trapexit.org/">trapexit.org</a>, an online Erlang community site.</li>
<li>The <a href="http://www.erlang.se/doc/doc-5.0.1/lib/mnesia-3.9.2/doc/">documentation for Mnesia</a>, Erlang&#8217;s awesome distributed, soft-real-time database.</li>
<li>Joel Reymont on his dream language being a <a href="http://wagerlabs.com/articles/2006/08/03/dream-du-jour">combination of Erlang and Ocaml</a>.</li>
</ul>



<p><strong>Update</strong>: I found another Erlang tutorial named <a href="http://www.castro.aus.net/~maurice/serc/erlbk/">Erlang in Real Time</a>.  There&#8217;s also a good <a href="http://www.erlang.org/faq/t1.html">Erlang <span class="caps">FAQ</span></a>.</p>

<p><strong>Update</strong>: Jay Nelson also has some great material on his <a href="http://www.duomark.com/erlang/">Erlang web site</a>, including some presentations at <span class="caps">ICFP.</span></p>]]></content:encoded></item><item><title>Welcome to UTC -7</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-08-06T09:51:54-07:00</dc:date><link>http://algorithm.com.au/blog/files/9e511134c178d62be3bacefefd2eac43-458.html#unique-entry-id-458</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/9e511134c178d62be3bacefefd2eac43-458.html#unique-entry-id-458</guid><content:encoded><![CDATA[<p>Ah, Berkeley: the quintessential American student town, where the young gather on the road&#8217;s median strip to sit on the grass (in cheery violation of the &#8220;Keep off the median strip&#8221; signs).  Berkeley&#8217;s also home to <a href="http://www.dilabs.net/">Dominic and Zoe Glynn</a>, my dear friends who I haven&#8217;t seen in far too long and have had an excellent time re-acquanting myself with again.  It&#8217;s been a perfect warmup to the intense and crazy week that will be the Apple <a href="http://developer.apple.com/wwdc/">World Wide Developer Conference</a>.</p>

<p><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01566.thumb.jpg"/></p>

<p>So, Friday was spent re-exploring Berkeley with Dom: for those who remember, I was here at the start of 2004, and it brought back good, good memories seeing the University of California at Berkeley, and the intersection of Bancroft Ave and Telegraph where all the froody 60s peace-out stalls are.  Mahreen, if you&#8217;re reading this, you&#8217;ll be pleased to know that everything was pretty much exactly like we remember, except it&#8217;s a bit warmer right now!</p>

<p>After grabbing some lunch at Saul&#8217;s where I was reintroduced to American-size portions in the form of a West End Massive Corned Beef Sandwich, we stopped by the very dangerous and evil Amoeba records on Trafalgar, where I picked up no less than 15 CDs:</p>


<ul>
<li>Propellerheads: Propellerheads (the prequel to Decksanddrumsandrockandroll: a collector&#8217;s item, and I got it for an entire $1)</li>
<li>Propellerheads: Spybreak!</li>
<li>Sasha and John Digweed: Communicate</li>
<li>James Lavelle: Fabriclive 01</li>
<li>Future Sound of London: Lifeforms EP</li>
<li>Future Sound of London: Lifeforms</li>
<li>Photek: Modus Operandi</li>
<li>R&circ;yksopp: Melody <span class="caps">A.M. </span></li>
<li>Thievery Corporation: Babylon Rewound</li>
<li>Monk and Canatella: Do Community Service</li>
<li>Lamb: Remixed</li>
<li>DJ Shadow: Preemptive Strike</li>
<li><span class="caps">U.N.K.L.E.</span>: Never Never Land</li>
<li>Battlestar Galactica Season 1 soundtrack</li>
<li>Battlestar Galactica Season 2 soundtrack</li>
</ul>



<p>See, despite spending $150, I actually ended up <em>saving</em> money because for the price of those fifteen CDs, I could have bought a mere five CDs back at home.  <a href="http://en.wikipedia.org/wiki/O_RLY%3F">YA <span class="caps">RLY</span></a>!  Hey music industry: price your stuff reasonably and people will buy them!  Screw this $35 for an album crap back in Australia; I quite like the $8 I pay for a CD at Amoeba.  I should add that I only looked at the Electronica section too; the damage to Dinga would have been far worse if I had bothered to wander through the House section, not to mention all the <span class="caps">DVD</span>s.</p>

<p><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01577.thumb.jpg"/></p>

<p>For dinner, we dropped in to none other than Pho Hoa, the famous Vietnamese Pho Bo shop on Shattuck St.  Mahreen, no doubt your memory will be triggered by this as well: you&#8217;ll be pleased to know that I did, in fact, get the crazy-big serve of Pho Bo and finished all of it, and I of course had to have some Taro Bubble Tea.  After that it was time for some beer and a good catch-up chat with Zoe and her cousin Andrew, which ended up going until about 5:30am when we all reluctantly crashed.</p>

<p><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01557.thumb.jpg"/></p>

<p>Saturday was even better: we had a cruisy late morning double-falafel for breakfast at the Fertile Grounds cafe in conjunction with some genuine Illy coffee.  This was followed by an afternoon consisting of insanely great Cheeseboard Pizza, white wine, and hours of conversation up at Indian Rock, which provides a beautiful scenic view of Berkeley and the Bay Area.  I <em>love</em> summer.</p>

<p><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01569.thumb.jpg"/> <img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01570.thumb.jpg"/> <img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01575.thumb.jpg"/></p>

<p>Meanwhile, Dom and Zoe&#8217;s place here rocks.  The rent they&#8217;re paying is unbelievable good considering how nice the place is, and they even have the same comfortable futon that I slept on while I was staying with them in Toronto.  Dom&#8217;s love for gadgetry shows: their Robot vacuum cleaner means they never bother vacuuming the house normally, and their little Prius automobile is <em>awesome</em>.  I am so getting one of those as my next car: any car that has a Power button, voice recognise for <span class="caps">GPS </span>and telephone dialling, and does 5 litres per 100 kilometres has my vote.</p>

<p>Later today I&#8217;ll be meeting up with Yannis and Violette for Yum Cha, and after that it&#8217;ll be time to check in to the Courtyard Marriott at San Francisco, where I&#8217;ll be heading off to the Australia and New Zealand pre-WWDC drinks.  Oh yeah, life is good right now!</p>

<p>(You can find all the photos from the first few days of my Berkeley expedition in <a href="http://www.algorithm.com.au/gallery/wwdc2006/">the gallery</a>.)</p>


<h3>Sydney to San Francisco and Berkeley Playlist</h3>


<ul>
<li>James Brown: Ain&#8217;t it Funky Now</li>
<li>Massive Attack: Angel</li>
<li>Seal: Crazy</li>
<li>R&circ;yksopp: Eple</li>
<li>Tears for Fears: Everybody Wants to Rule the World</li>
<li><span class="caps">U.N.K.L.E.</span>: Lonely Soul</li>
<li>Tool: Stinkfist</li>
<li>Yoko Kanno: Fish-Silent Cruise Part 2</li>
<li>The Wallflowers: One Headlight</li>
<li>U2: All I Want Is You</li>
<li>Vogue: Ambient Energy</li>
<li>Freeland: Big Wednesday</li>
<li>Yoko Kanno, The Seatbelts and Steve Conte: Call Me Call Me</li>
<li>Faithless: Bring my Family Back</li>
<li>Propellerheads: Cominagetcha</li>
<li>Sunscreem: Cover Me (Trouser Enthusiasts mix)</li>
<li>Yoko Kanno: Dujurido</li>
<li>Decoder Ring: Escape Pod</li>
<li>Tool: Eulogy</li>
<li>Jazzanova: Fedimes Flight (Kyoto Jazz Massive remix)</li>
<li>Starsailor: Four to the Floor (Thin White Duke mix)</li>
<li>Lamb: Gabriel</li>
<li>Handel: Lascia Ch&#8217;io Pianga (performed by Single Gun Theory)</li>
<li>Cliff Martinez: Helicopter</li>
<li>Mono: Hello Cleveland!</li>
<li>Radiohead: Where I End and You Begin</li>
<li>Thievery Corporation: Warning Shots</li>
<li><span class="caps">U.N.K.L.E.</span>: Unreal</li>
<li>Depeche Mode: Useless (Kruder and Dorfmeister mix)</li>
<li>Radiohead: Planet Telex</li>
<li>Shpongle: &#8230;But Nothing is Lost</li>
<li>Zauron: Lovelight</li>
<li>NuBreed: One Day</li>
<li>Way Out West: Pulse of Life</li>
<li>Leftfield: Release the Pressure</li>
<li>Sting: Shape of my Heart</li>
<li>Yoko Kanno: Some Other Time</li>
<li>Barakka: Song to the Siren</li>
<li>Lamb: Trans Fatty Acid (Kruder and Dorfmeister remix)</li>
</ul>]]></content:encoded></item><item><title>Ejecting a stuck CD</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Mac OS X</category><dc:date>2006-08-10T16:39:25-07:00</dc:date><link>http://algorithm.com.au/blog/files/56887ee41e9aa064be9b50ac6a651ade-459.html#unique-entry-id-459</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/56887ee41e9aa064be9b50ac6a651ade-459.html#unique-entry-id-459</guid><content:encoded><![CDATA[<p>If your CD won&#8217;t eject from your Mac (for example, say, if you&#8217;re running the Leopard developer preview and the stupid mdimport process is locking files inappropriately&#8230;), the good ol&#8217; -f (force) flag on umount will be your saviour:</p>


<ul>
<li><code>sudo umount -f /Volumes/&quot;AUDIO CD&quot;</code> (or whatever the volume name is)</li>
<li>Press the Eject key</li>
</ul>]]></content:encoded></item><item><title>Battlestar Galactica Soundtrack</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Music</category><dc:date>2006-08-11T00:22:16-07:00</dc:date><link>http://algorithm.com.au/blog/files/3eb653fce8c971762b3ec3fa1f474aba-460.html#unique-entry-id-460</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/3eb653fce8c971762b3ec3fa1f474aba-460.html#unique-entry-id-460</guid><content:encoded><![CDATA[<p>Holy crap, this is <em>excellent</em> music.  It&#8217;s up there with Yoko Kanno&#8217;s fantastic work for <em>Cowboy Bebop</em> and <em>Ghost in the Shell: Standalone Complex</em>, and as interesting as Cliff Martinez&#8217;s movie soundtracks for <em>Solaris</em>, <em>Narc</em>, and others.  No cheesy John Williams stuff here.  (Seriously, the themes from Star Wars, Superman and Indiana Jones could all blend into each other and you just wouldn&#8217;t notice.)</p>

<p>The Battlestar Galactica soundtrack has also made me fall in love with baroque music again.  Oooh, those sweet sweet violas and reeds&#8230;</p>]]></content:encoded></item><item><title>WWDC 2006</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><category>Mac OS X</category><dc:date>2006-08-12T23:25:34-07:00</dc:date><link>http://algorithm.com.au/blog/files/f90bfb90b8214d3c8a7df92c3299873b-461.html#unique-entry-id-461</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/f90bfb90b8214d3c8a7df92c3299873b-461.html#unique-entry-id-461</guid><content:encoded><![CDATA[<p>Right, I believe I have found a no-frills formula for how to make your body think it&#8217;s going to self-destruct in an imminent fashion:</p>


<ol>
<li>Attend Apple&#8217;s <a href="http://developer.apple.com/wwdc/">World Wide Developer Conference</a> (WWDC) thing</li>
<li>Attempt to socialise and meet up with as many people as possible</li>
<li>Attempt to keep up with all the latest and greatest tech news and world news whilst at <span class="caps">WWDC</span></li>
<li>Have three to four coffees per day thanks to the surprisingly excellent (and free) espresso service at <span class="caps">WWDC</span></li>
<li>Combine said three or four coffees per day with beer, wine, and beer (in that order &#8212; yes, <em>ouch</em>, me dumb dumb) at night.</li>
<li>After having coffee, coffee, coffee, beer, wine, and beer, we then attempt to stay up at night to:
<ul>
<li>catch up on the deluge of urgent email (as opposed to merely the <em>important</em> emails, which I can deal with later),</li>
<li>install beta Apple operating systems,</li>
<li>attempt to actually do some coding (ha ha ha),</li>
<li>catch up with the folks back home, and</li>
<li>rip those 15 new CDs you bought at <a href="http://www.amoebamusic.com/">Amoeba records</a> to your bling iPod (<a href="http://www.bash.org/?2635">fo sheezy</a>, yo)</li>
</ul>
</li>
<li>Repeat everything the next day</li>
</ol>



<p>It has been a <em>full-on</em> week indeed.  This is the third World Wide Developer Conference that I&#8217;ve attended, and it&#8217;s by far the best one I&#8217;ve been to so far.  It was interesting seeing the Internet&#8217;s lukewarm response to Steve Jobs&#8217;s keynote on Monday morning, although the excellent Presentation Zen site gave it some <a href="http://presentationzen.blogs.com/presentationzen/">credit</a>.  As the Macintosh developers who attended the conference know, there&#8217;s actually a monstrous number of changes under the hood not spoken of in Jobs&#8217;s keynote that are <em>really</em> cool (which would be all that &#8220;top secret&#8221; stuff in the keynote); Mac OS X is truly coming into its own, both as a user experience and a developer&#8217;s haven.  Apple&#8217;s confidence is starting to shine; let&#8217;s just hope that it doesn&#8217;t turn into arrogance.  (I&#8217;m praying that Windows Vista doesn&#8217;t suck too much and actually gives Mac OS X some serious competition.)</p>

<p>And, of course, it wasn&#8217;t just the daytime that providing intellectual nourishment: I met up and chatted to dozens of people outside the conference, from <a href="http://www.littleappfactory.com/">successful</a> <a href="http://www.shirt-pocket.com/">Mac</a> <a href="http://www.yourhead.com/">shareware</a> <a href="http://www.realmacsoftware.com/">developers</a>, to low-level <a href="http://www.ertos.nicta.com.au/software/darbat/">Darwin</a> guys, folks from the <a href="http://www.llvm.org/"><span class="caps">LLVM</span></a> and gcc compiler teams, other Australian students from the <a href="http://www.auc.edu.au/"><span class="caps">AUC</span></a>, passionate open-source <a href="http://web.sabi.net/log/">developers</a>, visual effects industry <a href="http://www.pixar.com/">folks</a>, a ton of Apple engineers, oldskool NeXTSTEP folks, and even second cousins.</p>

<p>While the food at <span class="caps">WWDC </span>wasn&#8217;t particularly stellar this year, they did have a ton of these things:</p>

<p><img src="http://www.dole5aday.com/ReferenceCenter/Encyclopedia/Images/img_bananas.gif"/></p>

<p>Yeah baby, bananas!  $12/kg back at home?  How about take-as-many-as-you-frigging-stuff-into-your-backpack over here.  I&#8217;m sure it was the Australians that were responsible for the entire table of bananas vanishing in around 90 seconds.  (Not to mention the free Ghirardelli chocholate :).</p>

<p>There was something to keep me occupied every night of the week: even before <span class="caps">WWDC </span>started, there were Australia and New Zealand drinks organised on Sunday night, where I met up with a huge host of other Australian students and professional developers (some of whom got really, <em>really</em> drunk, and weren&#8217;t representing Australiasia particularly well in the international arena, I might add).  On Monday I headed out to have the best burritos ever at <a href="http://usatoday.digitalcity.com/sanfrancisco/dining/venue.adp?sbid=100950830">La Taqueria</a> on 25th and Mission with <a href="http://www.dilabs.net/">Dominic and Zoe</a>, headed to the Apple Store and Virgin Megastore (oh dear Lord they are such evil shops to have in such near proximity to the conference centre), and met up with the one and only <a href="http://www.choqolat.org/">Chuck Biscuits</a> from my <a href="http://esque.ice.org/retgolla/demo.html">old demogroup</a> along with the <a href="http://www.ertos.nicta.com.au/software/darbat/">Darbat</a> crew to catch up on old times.  Tuesday and Wednesday night was spent heading to dinner with some fellow <a href="http://www.realmacsoftware.com/rapidweaver/">RapidWeaver</a> developers that featured some <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01586">bloody good steak</a>, and Thursday was the big-ass Apple Campus Bash, where I had wine, bananas and chocolate for dinner, and then proceeded to raid the Apple Mothership Store of far too many goods.  (Put it this way: I travelled to the <span class="caps">USA </span>with one half-full bag, and now, uhh, I have two bags that are kinda full&#8230; oops.)</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01590"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01590.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01584"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01584.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01601"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01601.thumb.jpg"/></a></p>

<p>During the week I ended up discovering the totally awesome <a href="http://www.samovartea.com/">Samovar Tea Lounge</a> in the Yerba Buena gardens thanks to <a href="http://www.yourhead.com/">Isaiah</a>, where I not only had some <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01587?full=1">Monkey Picked Iron Goddess of Mercy</a> tea (seriously, how freakin&#8217; awesome is that name?), but also snarfed up a handful of <a href="http://www.scharffenberger.com/">Scharffen Berger</a> chocolate.  (Hey <span class="caps">RSR</span>/RSP folks back home, have you guys finished those damn chocolate blocks on my office desk yet?  Of course you have!)  <a href="http://www.kernelthread.com/">Amit Singh</a> of <a href="http://www.kernelthread.com/mac/challenge/book.html">Mac OS X Internals</a> fame was also at the Apple Store at Thursday lunchtime giving a talk about his excellent 3kg 1600-page book, which I briefly attended before deciding that an afternoon of live true American jazz with Dominic was a much more tasty option on the platter.</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01586"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01586.thumb.jpg" /></a></p>

<p>And, just as I thought the outings were about to calm down when the conference finished on Friday at midday, I end up meeting a like-minded <a href="http://www.overhyped.com/">video metadata</a> fellow in the lobby of the W Hotel San Francisco of all places (swanky as hell lobby, by the way), and ended up <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01611">hanging out of a cablecar</a> on the way to Fisherman&#8217;s Wharf and Ghirardelli Square, where a bunch of NeXTSTEP folks were having dinner.  I seriously don&#8217;t understand how my body&#8217;s managed to cope with all the activity so far.  But hey, at least I managed to avoid San Francisco&#8217;s <em>rather</em> dodgy <a href="http://www.tenderloin.net/">Tenderloin district</a> (<strong>warning</strong>: highly amusing but possibly offensive image on that page) :).</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01611"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01611.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01616"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01616.thumb.jpg"/></a></p>

<p>So, now that the week&#8217;s over, I currently have 31 draft emails that I need to finish writing: time to get cracking (sorry friends and enemies, I&#8217;ll get to you shortly!).  Of course, clever me managed to get an entire <em>hour</em> of sleep before heading off to <span class="caps">SFO </span>airport for the next stop in my trip: Los Angeles.  Stay tuned, same bat time, same bat channel&#8230;</p>]]></content:encoded></item><item><title>How to Coordinate a War</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2006-08-13T22:59:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/2e1e77297d3f602453e64307ebf9576b-462.html#unique-entry-id-462</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/2e1e77297d3f602453e64307ebf9576b-462.html#unique-entry-id-462</guid><content:encoded><![CDATA[<p>If you had to run a war and wished to communicate something to your generals, <a href="http://presentationzen.blogs.com/presentationzen/2006/08/powerpoint_prin.html">why not just use PowerPoint slides with bullet points</a>?  It does save you from writing all those pesky &#8220;report&#8221; things, after all.</p>]]></content:encoded></item><item><title>Sexlessness in Movies</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>About Me</category><dc:date>2006-08-13T23:09:47-07:00</dc:date><link>http://algorithm.com.au/blog/files/c794f13654df8a7e93ad5dcec968e3f5-463.html#unique-entry-id-463</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/c794f13654df8a7e93ad5dcec968e3f5-463.html#unique-entry-id-463</guid><content:encoded><![CDATA[<p>David Poland writes about <a href="http://www.moviecitynews.com/columnists/poland/2006/060727.html">the lack of sex in recent movies</a>:</p>

<blockquote><p>The Devil Wear Prada is the poster child for the sexlessness of Summer 2006. Here is a movie about women who want are obsessed with their bodies, about men who are obsessed with these women, and the things people do under stress. Directed by a Sex &amp; The City director, starring the rare lead actress who isn&#8217;t shy about showing her stuff, who is &#8220;living with&#8221; Entourage&#8217;s Adrian Grenier, who still ends up sleeping with Simon Baker in Paris&Ouml; and yet the film is a chaste as Monster House (less than Monster House in 3D).</p></blockquote>

<p>Note to <span class="caps">USA </span>censors: hey you guys, how about you introduce this brilliant new idea named having an <a href="http://www.oflc.gov.au/special.html?n=276&amp;p=134">MA-15 rating</a>, so you don&#8217;t have to tone down the fun stuff so much that you&#8217;re forcing your movie to be PG-13?</p>

<p>(To all the anti-censorship zealots out there, please don&#8217;t take this as a statement that I&#8217;m in favour of legally restricted censorship.)</p>]]></content:encoded></item><item><title>Everybody Loves Eric Raymond</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-08-17T11:21:16-07:00</dc:date><link>http://algorithm.com.au/blog/files/114706dfdb779f18c77a65924d64d609-464.html#unique-entry-id-464</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/114706dfdb779f18c77a65924d64d609-464.html#unique-entry-id-464</guid><content:encoded><![CDATA[<p>A <a href="http://geekz.co.uk/lovesraymond/archive/show-them-the-code">web comic</a> about everybody&#8217;s favourite open-source evangelists: Richard Stallman, Linus Torvalds, and, of course, <em>Eric Raymond</em>.  (Occasionally even starring <a href="http://geekz.co.uk/lovesraymond/archive/everybody-loves-john-dvorak">John Dvorak</a>).</p>

<p>(Kudos to <a href="http://www.ertos.nicta.com.au/people/home.pyl?cn=Charles%20Gray">Chuck</a> for the heads-up.)<br />
 </p>]]></content:encoded></item><item><title>Los Angeles and New York</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-08-23T15:29:34-07:00</dc:date><link>http://algorithm.com.au/blog/files/63510d2b526f35f2466e2245de13a79b-465.html#unique-entry-id-465</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/63510d2b526f35f2466e2245de13a79b-465.html#unique-entry-id-465</guid><content:encoded><![CDATA[<p>After the inspiration and buzz experienced at <span class="caps">WWDC </span>in San Francisco, chilling out in Los Angeles and New York was a welcome (and much needed) change!  I stayed with my cousins in Beverly Hills in Los Angeles, and was thus exposed to the privileged, the luxurious, and the affluent.  I&#8217;m not exaggerating when I say that practically <em>every</em> car you see is a Lexus, Mercedes, <span class="caps">BMW,</span> Porsche, Ferrari, Maserati, Bentley, Lamborghini, or something equally upmarket, expensive, and very sexy.  Even the humble <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01642">Ben Sherman&#8217;s presence in the Beverly Center</a> is quite a bit more styled than what you would find in Sydney.  I had a taste of the Ermenegildo Zegna and Prada stores along Rodeo Drive and Beverly Drive, the former of which had a beautiful suede jacket for the mere price of <span class="caps">USD</span>$4600.  Driving up Coldwater Canyon in Bel Air revealed enormous houses, each of which is at least as majestic as the biggest properties in Rose Bay and Bellevue Hill in Sydney; all of them are replete with lush gardens and fountains that they look like miniature ecosystems from the outside.  It&#8217;s another world over there.</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01650"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01650.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006?page=10"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01651.thumb.jpg" /></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006?page=10"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01654.thumb.jpg" /></a></p>

<p>So, Los Angeles turned out to be a wonderful unreality of luxury, and seeing my cousins and family again after the intense week of San Francisco was great!  I did my usual shopping rounds, dropping by Banana Republic, Borders, Barnes and Nobles, Club Monaco, Baby Gap (for my two cute nephews, not me!), Fry&#8217;s Electronics, the Apple Store, Best Buy, and more.  Thanks to me being in holiday mode, I am now the proud owner of:</p>


<ul>
<li>a crazy-small <a href="http://www.sony.net/Products/Media/Microvault/usm-h.html">Sony Micro Vault 2GB memory stick</a>,</li>
<li>the <em>entire</em> Robotech collection,</li>
<li>Ghost in the Shell: Standalone Complex, 2nd gig</li>
<li><a href="http://www.madman.com.au/samuraichamploo/index2.html">Samurai Champloo</a></li>
</ul>



<p>&#8230; amongst other goodies that I probably shouldn&#8217;t reveal in public.  (No, nothing from Victoria&#8217;s Secret&#8230;)</p>

<p>The one thing that struck me on this trip was the sheer amount of <em>stuff</em> the <span class="caps">USA </span>offers, from clothes to gadgets to media content.  Australia certainly offers a reasonable amount of variety and choice in its shops, but it&#8217;s nothing compared to the <span class="caps">USA. </span> You are simply overwhelmed the first time you walk into a Borders that occupies the entire building; it&#8217;s six floors full of nothing but books.  I looked around for a long time in Australia for a book on the history of mathematics and found one or two; in a single Borders or Barnes and Nobles in the <span class="caps">USA,</span> I was spoiled for choice, having found no less than a dozen at every store.  Fry&#8217;s Electronics features more than <em>sixty</em> cash register checkouts; the CDs at Amoeba Music in San Francisco has shelves and shelves of just movie soundtracks, and it&#8217;s mind-boggling to browse just the TV Shows section of any large store that sells <span class="caps">DVD</span>s and wonder where the section actually ends.  Every satellite city in Los Angeles will have a mammoth shopping centre bristling with mini-economies, and every block in New York will be home to one or two major brand label stores, stacked full of Yet More Stuff.</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006?page=10"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01659.thumb.jpg"/> <a href="http://www.algorithm.com.au/gallery/wwdc2006?page=11"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01661.thumb.jpg"/></a></p>

<p>And then, of course, there&#8217;s the crazy-go-nuts 24-hour Apple Store in New York, which I visited with <a href="http://www.shotgunsoftware.com/">Isaac</a> at the excellent time of 1am.  The culture that Apple have managed to create at this place is amazing: the store was <em>full</em> at 1am.  It wasn&#8217;t like a can of sardines, but it was full enough that almost every single iPod, MacBook and iMac stand was being used by someone, and you had to avoid bumping into other people when you were browsing the shelves.  I&#8217;m sure the live DJ playing reasonable dance music was part of the reason people flocked to the store at 1am, but there were also a ton of people who were just there sitting around just to <em>be there</em> and wanting to be seen there (in somewhat typical New York fashion).  The Genius Bar, where people go to for support and service, really is like a bar: people sit down and start chatting up their neighbour, and since there&#8217;s no beer in the way, it actually is easier to start conversations with strangers.  It&#8217;s all a slightly surreal experience if you haven&#8217;t been there before.  (I was most amazed that I actually left there without buying a single thing&#8230;)</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01768"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01768.thumb.jpg"/> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01765"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01765.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01764"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01764.thumb.jpg"/></a></p>

<p>Outside of shopping, that week was time well spent indeed: I got to catch up with my cousins in Los Angeles very well (though spending three days there was far from enough), and my time in New York staying with <a href="http://www.cse.unsw.edu.au/~chak/">Manuel</a> and <a href="http://www.cse.unsw.edu.au/~keller/">Gabi</a> was wonderful: I managed to catch up with them a lot, found some to finish some projects I&#8217;ve had in the works for months since I finally had some time to myself, caught up with a few other friends in the two cities, and even babysat for them for the first time ever so they could have a night off.  One highlight of the trip was visiting the absolutely spectacular New York City Museum of Natural History, which I <em>highly</em> recommend for any visitors: you could spend more than two days in there, and it&#8217;s one of those shrines that has been constructed with such thought and love that it really does inspire you to become a marine biologist, astronaut or geologist.  In a time when the world is increasingly perceiving the <span class="caps">USA </span>as a country that&#8217;s somewhat fallen from grace, the Museum is a smiling reminder that the United States has also contributed so greatly to the advance of science and human civilisation.</p>

<p><a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01780"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01780.thumb.jpg" /></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01763"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01763.thumb.jpg"/></a> <a href="http://www.algorithm.com.au/gallery/wwdc2006/DSC01759"><img src="http://www.algorithm.com.au/albums/wwdc2006/DSC01759.thumb.jpg"/></a></p>

<p>As a small aside, I find it quite interesting that all the progressive cities and states tend to reside on the coast of the <span class="caps">USA, </span>with the inland states all being conservative (sometimes to a rather scary extent).  Apparently the coastal folks like to distinguish between &#8220;America&#8221; and &#8220;Central America&#8221;.  I dunno, maybe seeing chicks in bikinis swimming at oceanic beaches makes people more progressive or something.  That sounds <em>all good</em> to me.</p>

<p>So now I&#8217;m back in the land of take-away instead of to-gos; back in a land where you can actually distinguish a $50 from a $5 by its colour (thank God), and back in a land where I can walk into most coffee shops and expect a good coffee instead of hunting around for Illy logos.  The <span class="caps">R&amp;R </span>in Los Angeles and New York has been wonderful, and a great wind-down to an intense week in San Francisco.  I&#8217;m looking forward to getting back to reality and normality now that I&#8217;ve had my fair share of excessive consumerism and opulence!</p>

<p>(Go to my <a href="http://www.algorithm.com.au/gallery/wwdc2006"><span class="caps">WWDC</span> 2006 gallery</a> to find all my photos from <a href="http://www.algorithm.com.au/gallery/wwdc2006?page=6">Los Angeles</a> and <a href="http://www.algorithm.com.au/gallery/wwdc2006?page=11">New York</a>).</p>

<h3>Los Angeles to New York Playlist</h3>


<ul>
<li>Zauron: Lovelight</li>
<li>Thievery Corporation: Marching The Hate Machines Into The Sun (Featuring The Flaming Lips)</li>
<li>Way Out West: Mindcircus</li>
<li>Queens Of The Stone Age: No one knows (U.N.K.L.E. reconstruction)</li>
<li>Necros: Orchard Street</li>
<li>Chuck Biscuits: Outlands</li>
<li>Chicane: Overture</li>
<li>Tool: Parabol</li>
<li>Tool: Parabola</li>
<li>Underworld: Pearl&#8217;s Girl</li>
<li>Cass and Slide: Perception (New Vocal Mix)</li>
<li>Layo and Bushwacka!: Ladies &amp; Gentlemen</li>
<li>Baby D: Let Me Be Your Fantasy</li>
<li>Radiohead: Karma Police</li>
<li>Bedrock: Heaven Scent</li>
<li>Faithless: God Is A DJ</li>
<li>Tool: Forty Six and Two</li>
<li>Badmarsh &amp; Shri: Day By Day</li>
<li>Sunscreem: Change (Angelic Remix)</li>
<li>New Order: Blue Monday (Hardfloor mix edit)</li>
<li>The Seatbelts: Butterfly</li>
<li>Massive Attack: A Prayer For England</li>
<li>Itch-E &amp; Scratch-E: Transit</li>
<li>Vision 4/5: Stormtrooper</li>
</ul>]]></content:encoded></item><item><title>Dumb Money</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>Life &#x26; Travels</category><dc:date>2006-08-31T00:53:25-07:00</dc:date><link>http://algorithm.com.au/blog/files/dumb_money.html#unique-entry-id-466</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dumb_money.html#unique-entry-id-466</guid><content:encoded><![CDATA[<p>I love this phrase.  <em>Dumb Money</em>.  As in:</p>

<blockquote><p>a lot of &#8220;dumb money&#8221; will be pumped into the <span class="caps">MMOG </span>market by investors hoping to cash in on the next big thing&#8230;</p></blockquote>

<p>The next time I have the chance to berate some obviously stupid business idea, I can just say &#8220;dumb money&#8221;.  Schweet.</p>

<p>(The quote&#8217;s from a <a href="http://www.insidemacgames.com/news/story.php?ID=13996">short news article</a> by Inside Mac Games, if you&#8217;re really interested.)</p>]]></content:encoded></item><item><title>Add Cmd-1 and Cmd-2 back to iTunes 7</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><dc:date>2006-09-12T23:12:02-07:00</dc:date><link>http://algorithm.com.au/blog/files/itunes_7_cmd1_cmd2.html#unique-entry-id-467</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/itunes_7_cmd1_cmd2.html#unique-entry-id-467</guid><content:encoded><![CDATA[<p>iTunes 7.0 removed the Cmd-1 and Cmd-2 shortcuts to access the iTunes window and the equaliser, for whatever reason.  You can add them back in via the Keyboard preference in System Preferences:</p>


<ul>
<li>launch System Preferences,</li>
<li>go to the Keyboard &amp; Mouse preference,</li>
<li>click on the Keyboard Shortcuts tab,</li>
<li>hit the + button, pick iTunes as the application, type in &#8220;Show Equalizer&#8221; as the menu title, and use Cmd-2 for the keyboard shortcut.</li>
<li>hit the + button, pick iTunes as the application, type in &#8220;Hide Equalizer&#8221; as the menu title, and use Cmd-2 for the keyboard shortcut.</li>
<li>hit the + button, pick iTunes as the application, type in &#8220;iTunes&#8221; as the menu title, and use Cmd-1 for the keyboard shortcut.</li>
</ul>



<p>Done.</p>]]></content:encoded></item><item><title>Pushing the Limits</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><category>Linux</category><category>Windows</category><dc:date>2006-09-13T10:43:28-07:00</dc:date><link>http://algorithm.com.au/blog/files/pushing_the_limits.html#unique-entry-id-468</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/pushing_the_limits.html#unique-entry-id-468</guid><content:encoded><![CDATA[<p><span class="caps">OK, </span>this is both ridiculous and cool at the same time.  I need to write code for Mac OS X, Windows and Linux for work, and I like to work offline at cafes since I actually tend to get more work done when I&#8217;m <em>not</em> on the Internet (totally amazing, I know).  This presents two problems:</p>


<ol>
<li>I need a laptop that will run Windows, Mac OS X and Linux.</li>
<li>I need to work offline when we use <a href="http://subversion.tigris.org/">Subversion</a> for our revision control system at work.</li>
</ol>



<p>Solving problem #1 turns out to be quite easy: get a MacBook (Pro), and run Mac OS X on it.  Our server runs fine on Darwin (Mac OS X&#8217;s <span class="caps">UNIX </span>layer), and I can always run Windows and Linux with <a href="http://www.parallels.com/">Parallels Desktop</a> if I need to.</p>

<p>For serious Windows coding and testing, though, I actually need to boot into real Windows from time to time (since the program I work on, <a href="http://www.cinesync.com/">cineSync</a>, requires decent video card support, which Parallels doesn&#8217;t virtualise very well yet).  Again, no problem: use Apple&#8217;s <a href="http://www.apple.com/bootcamp/">Boot Camp</a> to boot into Windows <span class="caps">XP. </span> Ah, but our server requires a <span class="caps">UNIX </span>environment and won&#8217;t run under Windows!  Again, no problem: just install <a href="http://www.colinux.org/">coLinux</a>, a not very well known but truly awesome port of the Linux kernel that runs as a process on Windows at blazing speeds (with full networking support!).</p>

<p>Problem #2 &#8212; working offline with Subversion &#8212; is also easily solved.  Download and install <a href="http://svk.elixus.org/">svk</a>, and bingo, you have a fully distributed Subversion repository.  Hack offline, commit your changes offline, and push them back to the master repository when you&#8217;re back online.  Done.</p>

<p>Where it starts to get stupid is when I want to:</p>


<ul>
<li>check in changes locally to the <span class="caps">SVK </span>repository on my laptop when I&#8217;m on Mac OS <span class="caps">X&#8230;</span></li>
<li><em>and</em> use those changes from the Mac partition&#8217;s <span class="caps">SVK </span>repository while I&#8217;m booted in Windows.</li>
</ul>



<p>Stumped, eh?  Not quite!  Simply:</p>


<ul>
<li>purchase one copy of <a href="http://www.mediafour.com/products/macdrive6/">MacDrive 6</a>, which lets you read Mac OS X&#8217;s <span class="caps">HFS</span>+ partitions from Windows <span class="caps">XP,</span></li>
<li>install <span class="caps">SVK </span>for Windows, and</li>
<li>set the <code>%SVKROOT%</code> environment variable in Windows to point to my home directory on the Mac partition.</li>
</ul>



<p>Boom!  I get full access to my local <span class="caps">SVK </span>repository from Windows, can commit back to it, and push those changes back to our main Subversion server whenever I get my lazy cafe-loving arse back online.  So now, I can code up and commit changes for both Windows and the Mac while accessing a local test server when I&#8217;m totally offline.  Beautiful!</p>

<p>But, the thing is&#8230; I&#8217;m using svk &#8212; a distributed front-end to a non-distributed revision control system &#8212; on a MacBook Pro running Windows XP &#8212; a machine intended to run Mac OS X &#8212; while Windows is merrily accessing my Mac <span class="caps">HFS</span>+ partition, and oh yeah, I need to run our server in Linux, which is actually coLinux running in Windows&#8230; which is, again, running on Mac.  If I said this a year ago, people would have given me a crazy look.  (Then again, I suppose I&#8217;m saying it today and people still give me crazy looks.)  Somehow, somewhere, I think this is somewhat toward the <em>evil</em> end of the scale.</p>]]></content:encoded></item><item><title>Insights into AppleScript</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><category>Mac OS X</category><dc:date>2006-09-22T07:32:15-07:00</dc:date><link>http://algorithm.com.au/blog/files/on_applescript.html#unique-entry-id-469</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/on_applescript.html#unique-entry-id-469</guid><content:encoded><![CDATA[<p>I recently encountered a paper written by <a href="http://wcook.blogspot.com/2005/08/applescript.html">William Cook</a> about a mysterious little programming language that even many programming languages researchers don&#8217;t know about: AppleScript.  Yep, that&#8217;d be the humble, notoriously English-like Mac scripting language that&#8217;s renown to be slow and annoying more than anything else.  The paper is a <em>fascinating</em> look at the history of AppleScript, and details many insights and innovations that were largely unknown.  Here&#8217;s some things that I was pleasantly surprised about.</p>

<p>Cook had <em>never used</em> a Mac before he was employed to work on AppleScript: in fact, he had a very strong <span class="caps">UNIX </span>background, and had a great amount of experience with <span class="caps">UNIX </span>shell scripting.  So, one can instantly dismiss the notion that whoever designed AppleScript had &#8220;no idea about the elegance of interoperating <span class="caps">UNIX </span>tools&#8221;: a remark that I&#8217;m sure many would have made about the language (myself included).  Cook even remarks that Apple&#8217;s Automator tool, introduced in Mac OS 10.4 Tiger, was quite similar to <span class="caps">UNIX </span>pipes:</p>

<blockquote><p>The most interesting thing about Automator is that each action has an input and an output, much like a command in a Unix pipe. The resulting model is quite intuitive and easy to use for simple automation tasks.</p></blockquote>

<p>More on <span class="caps">UNIX </span>pipes, he writes that</p>

<blockquote><p>the <em>sed</em> stream editor can create the customized text file, which is then piped into the <em>mail</em> command for delivery.  This new script can be saved as a mail-merge command, which is now available for manual execution or invocation from other scripts.</p></blockquote>

<p>He then continues with something seemingly obvious, but is nevertheless something I have never thought about <span class="caps">UNIX </span>scripts:</p>

<blockquote><p>One appealing aspect of this model is its <em>compositionality</em> [emphasis mine]: users can create new commands that are invoked in the same way as built-in commands.&#8221;</p></blockquote>

<p>Indeed!  In a way, the ability to save executable shell scripts is the equivalent of writing a named function to denote function composition in a functional programming language: it enables that composed code to be re-used and re-executed.  It&#8217;s no coincidence that the Haskell scripts used in Don Stewart&#8217;s <a href="http://www.cse.unsw.edu.au/~dons/h4sh.html">h4sh</a> project are semantically quite similar to their equivalent Bourne shell scripts, where Haskell&#8217;s laziness emulates the blocking nature of pipes.</p>

<p>More on <span class="caps">UNIX</span>: Cook later writes that</p>

<blockquote><p>A second side effect of pervasive scripting is uniform access to all system data.  With Unix, access to information in a machine is idiosyncratic, in the sense that one program was used to list print jobs, another to list users, another for files, and another for hardware configuration.  I envisioned a way in which all these different kinds of information could be referenced uniformly&#8230; A <em>uniform naming model</em> allows every piece of information anywhere in the system, be it an application or the operating system, to be accessed and updated uniformly.</p></blockquote>

<p>The uniform naming model sounds eerily familiar who had read Hans Reiser&#8217;s <a href="http://www.namesys.com/whitepaper.html">white paper</a> about unified namespaces.  Has the <span class="caps">UNIX </span>world recognised yet just how powerful a unified namespace can be?  (For all the warts of the Windows registry, providing the one structure for manipulating configuration data can be a huge benefit.)</p>

<p>Cook was also <em>quite</em> aware of formal programming language theory and other advanced programming languages: his Ph.D thesis was in fact on &#8220;A Denotational Semantics of Inheritance&#8221;, and his biography includes papers on subtyping and F-bounded polymorphism.  Scratch another urban myth that AppleScript was designed by someone who had no idea about programming language theory.  He makes references to Self and Common <span class="caps">LISP </span>as design influences when talking about AppleScript&#8217;s design.  However,</p>

<blockquote><p>No formal semantics was created for the language, despite an awareness that such tools existed. One reason was that only one person on the team was familiar with these tools, so writing a formal semantics would not be an effective means of communication&#8230; Sketches of a formal semantics were developed, but the primary guidance for language design came from solving practical problems and user studies, rather than a-priori formal analysis.</p></blockquote>

<p>(There&#8217;s some interesting notes regarding user studies later in this post.)  Speaking of programming language influences,</p>

<blockquote><p>HyperCard, originally released in 1987, was the most direct influence on AppleScript.</p></blockquote>

<p>Ah, HyperCard&#8230; I still remember writing little programs on HyperCard stacks in high school programming camps when I was a young(er) lad.  It&#8217;s undoubtedly one of the great programming environment gems of the late 80s (and was enormously accessible to kids at the same time), but that&#8217;s an entire story unto itself&#8230;</p>

<p>The <a href="http://en.wikipedia.org/wiki/Dylan_programming_language">Dylan</a> programming language is also mentioned at one point, as part of an Apple project to create a new Macintosh development environment (named Family Farm).  <a href="http://icfpcontest.org/"><span class="caps">ICFP</span></a>ers will be familiar with Dylan since it&#8217;s consistently in the top places for the judge&#8217;s prize each year; if you&#8217;re not familiar with it, think of it as Common <span class="caps">LISP </span>with a saner syntax.</p>

<p>AppleScript also had a different approach to inter-appication messaging.  Due to a design flaw in the classic MacOS, AppleScript had to package as much information into its inter-application data-passing as possible, because context switches between applications on early MacOS systems were <em>very</em> costly:</p>

<blockquote><p>A fine-grained communication model, at the level of individual procedure or method calls between remote objects, would be far too slow&#8230; it would take several seconds to perform this script if every method call required a remote message and process switch.  As a result, traditional <span class="caps">RPC </span>and <span class="caps">CORBA </span>were not appropriate&#8230; For many years I believed that <span class="caps">COM </span>and <span class="caps">CORBA </span>would beat the AppleScript communication model in the long run.  However, <span class="caps">COM </span>and <span class="caps">CORBA </span>are now being overwhelmed by web services, which are loosely coupled and use large granularity objects.</p></blockquote>

<p>Web Services, eh?  Later in the paper, Cook mentions:</p>

<blockquote><p>There may also be lessons from AppleScript for the design of web services.  Both are loosely coupled and support large-granularity communication.  Apple Events data descriptors are similar to <span class="caps">XML, </span>in that they describe arbitrary labeled tree structures without fixed semantics.  AppleScript terminologies are similar to web service description language (WDSL) files.  One difference is that AppleScript includes a standard query model for identifying remote objects.  A similar approach could be useful for web services.</p></blockquote>

<p>As for interesting programming language features,</p>

<blockquote><p>AppleScript also supports objects and a simple transaction mechanism.</p></blockquote>

<p>A <em>transaction mechanism</em>?  Nice.  When was the last time you saw a transaction mechanism built into a programming language (besides <span class="caps">SQL</span>)?  Speaking of <span class="caps">SQL </span>and domain-specific languages, do you like embedded domain-specific languages, as is the vogue in the programming language research community these days?  Well, AppleScript did it over a decade ago:</p>

<blockquote><p>The AppleScript parser integrates the terminology of applications with its built-in language constructs.  For example, when targeting the Microsoft Excel application, spreadsheet terms are known by the parser&#8212;nouns like <em>cell</em> and <em>formula</em>, and verbs like <em>recalculate</em>.  The statement <em>tell application &#8220;Excel&#8221;</em> introduces a block in which the Excel terminology is available.</p></blockquote>

<p>Plus, if you&#8217;ve ever toyed with the idea of a programming language that could be written with different syntaxes, AppleScript beat you to that idea as well (and actually implemented it, although see the caveat later in this note):</p>

<blockquote><p>A <em>dialect</em> defines a presentation for the internal language.  Dialects contain lexing and parsing tables, and printing routines.  A script can be presented using any dialect&#8212;so a script written using the English dialect can be viewed in Japanese&#8230; Apple developed dialects for Japanese and French.  A &#8220;professional&#8221; dialect which resembled Java was created but not released&#8230; There are numerous difficulties in parsing a programming language that resembles a natural language. For example, Japanese does not have explicit separation between words. This is not a problem for language keywords and names from the terminology, but special conventions were required to recognize user-defined identifiers. Other languages have complex conjugation and agreement rules, which are difficult to implement. Nonetheless, the internal representation of AppleScript and the terminology resources contain information to support these features. A terminology can define names as plural or masculine/feminine, and this information can be used by the custom parser in a dialect.</p></blockquote>

<p>Jesus, support for masculine and feminine nouns in a programming language?  Hell yeah, check this out:</p>

<p><img src="http://www.algorithm.com.au/files/applescript/applescript_dialects.png"/></p>

<p><em>How cool is that</em>?  Unfortunately, Apple dropped support for multiple dialects in 1998:</p>

<blockquote><p>The experiment in designing a language that resembled natural languages (English and Japanese) was not successful. It was assume that scripts should be presented in &#8220;natural language&#8221; so that average people could read and write them. This lead to the invention of multi-token keywords and the ability to disambiguate tokens without spaces for Japanese Kanji. In the end the syntactic variations and flexibility did more to confuse programmers than help them out. The main problem is that AppleScript only appears to be a natural language on the surface. In fact is an artificial language, like any other programming language&#8230; It is very easy to read AppleScript, but quite hard to write it&#8230; When writing programs or scripts, users prefer a more conventional programming language structure. Later versions of AppleScript dropped support for dialects. In hindsight, we believe that AppleScript should have adopted the Programmer&iacute;s Dialect that was developed but never shipped. </p></blockquote>

<p>A sad end to a truly innovative language feature&#8212;even if the feature didn&#8217;t work out.  I wonder how much more AppleScript would be respected by programmers if it did use a more conventional programming language syntax rather than being based on English.  Cook seems to share these sentiments: he states in the closing paragraph to the paper that</p>

<blockquote><p>Many of the current problems in AppleScript can be traced to the use of syntax based on natural language; however, the ability to create pluggable dialects may provide a solution in the future, by creating a new syntax based on more conventional programming language styles.</p></blockquote>

<p>Indeed, it&#8217;s possible to write Perl and Python code right now to construct and send AppleEvents.  Some of you will know that AppleScript is just one of the languages supported by the Open Scripting Architecture (OSA) present in Mac OS X.  The story leading to this though, is rather interesting:</p>

<blockquote><p>In February of 1992, just before the first AppleScript alpha release, <a href="http://www.scripting.com/">Dave Winer</a> convinced Apple management that having one scripting language would not be good for the Macintosh&#8230; Dave had created an alternative scripting language, called Frontier&#8230; when Dave complained that the impending release of AppleScript was interfering with his product, Apple decided the AppleScript should be opened up to multiple scripting languages. The AppleScript team modified the <span class="caps">OSA API</span>s so that they could be implemented by multiple scripting systems, not just AppleScript&#8230; Frontier, created by Dave Winer, is a complete scripting and application development environment. It is also available as an Open Scripting component. Dave went on to participate in the design of web services and <span class="caps">SOAP. </span> Tcl, JavaScript, Python and Perl have also been packaged as Open Scripting components. </p></blockquote>

<p>Well done, Dave!</p>

<p>As for AppleScript&#8217;s actual development, there&#8217;s an interesting reference to a <a href="http://www.codingmonkeys.de/subethaedit/">SubEthaEdit</a>/<a href="http://darcs.0x539.de/trac/obby/cgi-bin/trac.cgi">Gobby</a>/Wiki-like tool that was used for their internal documentation:</p>

<blockquote><p>The team made extensive use of a nearly collaborative document management/writing tool called Instant Update. It was used in a very wiki-like fashion, a living document constantly updated with the current design. Instant Update provides a shared space of multiple documents that could be viewed and edited simultaneously by any number of users. Each user&iacute;s text was color-coded and time-stamped.</p></blockquote>

<p>And also,</p>

<blockquote><p>Mitch worked during the entire project to provide that documentation, and in the process managed to be a significant communication point for the entire team.</p></blockquote>

<p>Interesting that their main documentation writer was the communication point for the team, no?</p>

<p>Finally, AppleScript went through usability testing, a practice practically unheard of for programming languages.  (Perl 6&#8217;s apocalypses and exegeses are probably the closest thing that I know of to getting feedback from users, as opposed to the language designers or committee simply deciding on everything without feedback from their actual userbase!)</p>

<blockquote><p>Following Apple&iacute;s standard practice, we user-tested the language in a variety of ways. We identified novice users and asked them &#8220;what do you think this script does?&#8221; As an example, it turned out that the average user thought that after the command <em>put x into y</em> the variable x no longer retained its old value.  The language was changed to use <em>copy x into y</em> instead.</p></blockquote>

<p>Even more interesting:</p>

<blockquote><p>We also conducted interviews and a round-table discussion about what kind of functionality users would like to see in the system.</p></blockquote>

<p>The survey questions looked like this:</p>

<p><img src="http://www.algorithm.com.au/files/applescript/applescript_survey.png"/></p>

<p>The other survey questions in the paper were even more interesting; I&#8217;ve omitted them in this article due to lack of space.</p>

<p>So, those were the interesting points that I picked up when I read the paper.  I encourage you to read it if you&#8217;re interested in programming languages: AppleScript&#8217;s focus on pragmatics, ease of use for non-programmers, and its role in a very heavily-based <span class="caps">GUI </span>environment makes it a very interesting case study.  Thankfully, many Mac OS X applications are now scriptable so that fluent users can automate them effectively with Automator, AppleScript, or even Perl, Python and Ruby and the <span class="caps">UNIX </span>shell these days.</p>

<p>Honestly, the more I discover about Apple&#8217;s development technologies, the more impressed I am with their technological prowess and know-how: Cocoa, Carbon, CoreFoundation, CoreVideo, QuickTime, vecLib and Accelerate, CoreAudio, CoreData, DiscRecording, SyncServices, Quartz, <span class="caps">FSE</span>vents, WebKit, Core Animation, <span class="caps">IOK</span>it&#8230; their developer frameworks are, for the most part, superbly architectured, layered, and implemented.  I used to view AppleScript as a little hack that Apple brought to the table to satisfy the Mac OS X power users, but reading the paper has changed my opinion on that.  I now view AppleScript in the same way as QuickTime: incredible architecture and power, with an outside interface that&#8217;s draconian and slightly evil because it&#8217;s been around and largely unchanged for <em>15 freaking years</em>.</p>]]></content:encoded></item><item><title>Extensible Design in C++</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-09-26T01:18:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/extensible_design_in_cxx.html#unique-entry-id-470</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/extensible_design_in_cxx.html#unique-entry-id-470</guid><content:encoded><![CDATA[<h3>Namespaces vs Static Methods</h3>

<p>In C++, if you want a bunch of plain functions that you can put into a library, you can either do this:</p>

<pre><code>class UtilityFunctions
{
public:
  static void Foo();
  static void Bar();
};</code></pre>

<p>or this:</p>

<pre><code>namespace UtilityFunctions
{
  void Foo();
  void Bar();
}</code></pre>

<p>Either way, you call the functions with the same syntax:</p>

<pre><code>void SomeFunction()
{
  UtilityFunctions::Foo();
  UtilityFunctions::Bar();
}</code></pre>

<p>So, what&#8217;s the difference between using a class full of static methods vs using namespaces?  While I&#8217;m sure there&#8217;s plenty of differences about how they&#8217;re implemented internally, the big difference is that namespaces are <em>extensible</em>, while a class full of static methods isn&#8217;t.  That means that in another file, you can just add more functions to the namespace:</p>

<pre><code>namespace UtilityFunctions
{
  void Baz();
  void Quux();
}</code></pre>

<p>but you can&#8217;t add more static methods to the class.</p>

<h3>The Expression Problem</h3>

<p>This is rather handy, since it means that C++ can quite nicely solve the <a href="http://www.daimi.au.dk/~madst/tool/papers/expression.txt">expression problem</a>, a problem that plagues nearly all modern programming languages, even ones with expressive type systems such as Haskell and Ocaml.  (Note that the expression problem specifically concerns <em>statically typed</em> languages, so while there are solutions for it in modern dynamic languages such as Python, Perl and Ruby, they don&#8217;t really count since they&#8217;re not statically typed.  It&#8217;s easy to solve the problem if you&#8217;re prepared to throw away all notions of type safety at compile time!)</p>

<p>The expression problem is basically this:</p>


<ul>
<li>You want to able to add new data types, and have existing functions work on those data types.  This is easy in an object-oriented language: just subclass the existing data types, and all existing functions will work just fine with your new subclass.  This is (very) hard in a functional language, because if you add new cases to a variant type, you must update <em>every</em> pattern match to work properly with the new case.</li>
<li>However, you <em>also</em> want to add new functions that will work with those data types.  This is very easy in a functional language: just define a new function.  This is solvable in an object-oriented language, but isn&#8217;t very elegant, because most object-oriented languages can&#8217;t add new methods to existing classes (Objective-C is a notable exception; see the footnote below).  This means that you are forced to declare a function when you really wanted to add a new method to the class, or, in OO languages which don&#8217;t even have normal functions (e.g. Java), you have to declare a totally new class with a static method instead.  Ouch.</li>
</ul>



<p>However, since C++ provides (1) objects, (2) normal functions, and (3) extensible namespaces, this means that you solve the expression problem nicely using the above techniques.  It still requires some forethought by planning to use a namespace for sets of functions that you expect to be able to extend, but it&#8217;s an elegant solution to the expression problem, as opposed to no solution or a crappy solution.  (And I thought I&#8217;d never say &#8220;C++&#8221; and &#8220;elegant&#8221; in the same sentence).</p>

<h3>Extensible Object Factories</h3>

<p>There&#8217;s one more piece to the puzzle, however.  If you&#8217;re making your own new subclass, you also want to be able to create objects of that class.  However, what if you only know the exact type of object you want to create at <em>runtime</em>?  Use a runtime-extensible object factory instead.</p>

<p>Let&#8217;s say you&#8217;re designing an extensible image library, to read a bunch of image formats such as <span class="caps">JPG, PNG, GIF, </span>etc.  You can design an abstract Image class that a <span class="caps">JPGI</span>mage, <span class="caps">PNGI</span>mage, or <span class="caps">GIFI</span>mage can then subclass.  If you want a uniform interface to create such images, you can use the <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">factory design pattern</a>:</p>

<pre><code>Image* image = ImageFactory::CreateImage(&quot;/path/to/image&quot;);</code></pre>

<p>In this case, <code>CreateImage()</code> is a factory function that will return you an appropriate <code>Image*</code> object.  (Well, if you&#8217;re really disciplined, you&#8217;ll be using the wonderful <a href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</a> rather than an evil raw pointer, but I digress&#8230;)</p>

<p>Now, let&#8217;s say you want to make this library extensible, so users could add in their own <code>JPEG2000Image</code> subclass outside of your library.  How, then, do you let the <code>CreateImage()</code> function know about the user&#8217;s new <code>JPEG2000Image</code> class?</p>

<p>There are plenty of solutions to this, but since this is meant to be a didactic post, here&#8217;s a cheap&#8217;n&#8217;cheery solution for you: use a data structure to hold references to functions that are responsible for creating each different type of <span class="caps">JPGI</span>mage, <span class="caps">PNGI</span>mage, etc.  You can then add to the data structure at runtime (usually called <em>registering</em> the creation function).  The <code>CreateImage()</code> function can then look up the registered functions in the extensible data structure and call the appropriate function, no matter whether the image class is provided by your library (JPG, <span class="caps">PNG</span>), or by the user (JPEG2000).</p>

<p>If you put together all the above techniques, what you have is a fully extensible framework.  A user can:</p>


<ul>
<li>register new data types with the library at run-time,</li>
<li>use exactly the same interface to create new types of objects,</li>
<li>add new functions to your library without the awkwardness of using a different namespace,</li>
<li>&#8230; and still retain complete static type safety.</li>
</ul>



<p>Footnote: Objective-C has a particularly interesting solution to the expression problem, via <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_7.html#//apple_ref/doc/uid/TP30001163-CH7-TPXREF139">categories</a>, which are statically type-checked despite Objective-C being a &#8220;dynamic&#8221; language.</p>]]></content:encoded></item><item><title>rcp in Erlang in 5 lines of code</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Coding</category><dc:date>2006-09-30T23:06:06-07:00</dc:date><link>http://algorithm.com.au/blog/files/rcp_in_erlang.html#unique-entry-id-471</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/rcp_in_erlang.html#unique-entry-id-471</guid><content:encoded><![CDATA[<p>Joe Armstrong, the Main Man behind Erlang, shows <a href="http://armstrongonsoftware.blogspot.com/2006/09/why-i-often-implement-things-from.html">how to write an <span class="caps">FTP </span>client in Erlang</a> in a couple of lines of code.  Some of my own points:</p>


<ul>
<li>People on his blog who comment that &#8220;what operating system comes without an <span class="caps">FTP </span>server?&#8221; are totally missing the point, which is that Erlang makes it easy to write network programs.  How many lines of code do you think it would have taken to do that in C?  That file transfer program he wrote is <em>less than half a dozen</em> lines.</li>
</ul>




<ul>
<li>Yes, it&#8217;s not a <em>real</em> <span class="caps">FTP </span>client, duh.  Erlang does actually come with an <span class="caps">FTP </span>module which you can use in your own program, though.</li>
</ul>]]></content:encoded></item><item><title>Video iPod Can Do Better Than 640x480</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-10-08T19:03:58-07:00</dc:date><link>http://algorithm.com.au/blog/files/video_ipod_640x480.html#unique-entry-id-472</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/video_ipod_640x480.html#unique-entry-id-472</guid><content:encoded><![CDATA[<p>One of the features of the new video iPod (the &#8220;<a href="http://daringfireball.net/2006/09/fifth_generation_ipod_features">Generation 5.5</a>&#8221; one) is that it handles videos bigger than 640&#215;480 just fine.  This shouldn&#8217;t be surprising for geeks who own the older video iPod that plays 320&#215;240 video, since the alpha geeks will know that the older video iPods <a href="http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-ipod-video-formats-and-display-resolutions/">could play some videos bigger than 320&#215;240 just fine</a>.</p>

<p>A nice side-effect of this is that if you are ripping <span class="caps">DVD</span>s to <span class="caps">MPEG</span>-4, you can very likely rip them at native resolution: I had zero problems playing Season 2 of Battlestar Galactica on a new video iPod, and it had a native resolution of 704&#215;400.  (Note: This is with a standard <span class="caps">MPEG</span>-4 video profile, not <span class="caps">H.264 </span>baseline low-complexity.)  This is pretty cool, since you can now hook up a little video iPod direct to a big-ass TV and know that video resolution is no longer a differentiating factor between <span class="caps">DVD</span>s and <span class="caps">MPEG</span>-4 video.  Now if only the iPod had component video connectors available&#8230;</p>]]></content:encoded></item><item><title>Dodgy blank DVDs</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-10-12T01:01:35-07:00</dc:date><link>http://algorithm.com.au/blog/files/dodgy_blank_dvds.html#unique-entry-id-473</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/dodgy_blank_dvds.html#unique-entry-id-473</guid><content:encoded><![CDATA[<p>Note to self: Before thinking your <span class="caps">DVD </span>drive is broken because it apparently can&#8217;t burn data <span class="caps">DVD</span>s properly, try another brand of recordable <span class="caps">DVD</span>s!</p>]]></content:encoded></item><item><title>Firewire and Robust Connectors</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-10-22T01:14:48-07:00</dc:date><link>http://algorithm.com.au/blog/files/firewire_connectors.html#unique-entry-id-474</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/firewire_connectors.html#unique-entry-id-474</guid><content:encoded><![CDATA[<p>I read somewhere a long time ago that the cable connectors for <span class="caps">IEEE</span> 1394 (better known as Firewire) were inspired by the connectors that Nintendo used for their game consoles.  This assertion now seems to be on <a href="http://en.wikipedia.org/wiki/FireWire">Wikipedia</a>, so it <em>must</em> be true:</p>

<blockquote><p>The standard connectors used for FireWire are related to the connectors on the venerable Nintendo Game Boy. While not especially glamorous, the Game Boy connectors have proven reliable, solid, easy to use and immune to assault by small children.</p></blockquote>

<p>Clever.  The 6-pin design for Firewire cables is great: absolutely impossible to plug in the wrong way, and you won&#8217;t damage a thing even if you try really hard to plug it in the wrong way.  There are no pins exposed on the connector that can be broken, unlike, say, those damn 9-pin serial or <span class="caps">VGA </span>cables (or even worse, <em><span class="caps">SCSI </span>cables</em>, ugh).  It&#8217;s like the Firewire was designed by <a href="http://en.wikipedia.org/wiki/Jonathan_Ive">Jonathan Ive</a>.  (I dunno if Ive designed the iPod dock connector, but that&#8217;s definitely not as robust as a Firewire one.)</p>

<p>Yay for good industrial design.</p>]]></content:encoded></item><item><title>For the Mac Vim lovers</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Mac OS X</category><dc:date>2006-10-24T00:43:15-07:00</dc:date><link>http://algorithm.com.au/blog/files/macvim.html#unique-entry-id-475</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/macvim.html#unique-entry-id-475</guid><content:encoded><![CDATA[<p>Do you like Mac OS X?</p>

<p>Do you like&#8230; Vim?</p>

<p>If so, your prayers may just have been answered: see the <a href="http://www.corsofamily.net/jcorso/vi/">Vi Input Manager Plugin</a> by Jason Corso.  Vi-style key bindings in any Mac OS X text input area?  Schyeah baby.  As Jason says:</p>

<blockquote><p>Right now, you should be thinking &#8212; &#8220;you mean the editor in XCode will behave like Vi?&#8221; Answer: Yes.</p></blockquote>

<p>It&#8217;s open source too.  Nice work Jason; let the hacking begin!</p>]]></content:encoded></item><item><title>Choice Isn&#x27;t Always a Good Thing</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Software</category><category>Windows</category><dc:date>2006-10-25T06:34:20-07:00</dc:date><link>http://algorithm.com.au/blog/files/vista_six_versions.html#unique-entry-id-476</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/vista_six_versions.html#unique-entry-id-476</guid><content:encoded><![CDATA[<p>You know that <a href="http://www.bbspot.com/News/2003/01/os_quiz.php">Which Operating System Are You</a> quiz?</p>

<p>Well, they&#8217;re gonna have to expand it to include all <em>six</em> versions of Windows Vista, whenever that decides to be unleashed unto the world.  <em><a href="http://www.macalope.com/?p=82">Hello, six versions</a></em>?  With the starter edition only being able to use 256MB of <span class="caps">RAM </span>and run three applications at once?  Even eWeek says that &#8220;<a href="http://www.eweek.com/article2/0,1895,2036157,00.asp">you would be better off running Windows 98</a>&#8221;.  You know what, instead of choosing between Vista Starter, Vista Home Basic, Vista Home Premium, Vista Business, Vista Enterprise or Vista Ultimate, how about I just run Mac OS X or Linux instead, you stupid tossers?</p>

<p>Jesus, the excellent lads over at <a href="http://research.microsoft.com/">Microsoft Research</a> (who produce some truly world-class work) must be just cringing when they hear their big brother company do totally insane stuff like this.</p>]]></content:encoded></item><item><title>640GB of Storage On the Road</title><dc:creator>ozone@algorithm.com.au</dc:creator><category>&#x2026;on Gadgets</category><dc:date>2006-10-25T23:39:09-07:00</dc:date><link>http://algorithm.com.au/blog/files/640gb.html#unique-entry-id-477</link><guid isPermaLink="true">http://algorithm.com.au/blog/files/640gb.html#unique-entry-id-477</guid><content:encoded><![CDATA[<p>Do you work with audio and video on the road?  How does an astounding 640GB of storage on your laptop sound, with performance nearly meeting that of a desktop?</p>


<ol>
<li>Buy a <a href="http://www.apple.com/macbookpro/">MacBook Pro</a>, which can net you 160GB of internal hard disk storage.</li>
<li>Rip out the internal <span class="caps">DVD </span>drive and replace it with another 160GB internal hard drive, via an <a href="http://www.mcetech.com/optibay/"><span class="caps">MCE</span> OptiBay</a>.</li>
<li><span class="caps">RAID</span>-0 your internal 320GB of storage, for twice the read/write performance.</li>
<li>Buy a <a href="http://www.lacie.com/products/product.htm?id=10178">LaCie Little Big Disk</a>, which will net you another 320GB of <span class="caps">RAID</span>-0 storage that&#8217;s totally bus-powered over FireWire 800.</li>
</ol>



<p>Wallah, 640GB on the road.  Of course, if you&#8217;re a serious performance freak, you&#8217;d probably opt for the 7200rpm 100GB drives instead of the 5400rpm 160GB ones.  But that&#8217;ll only net you a <em>meagre</em> 400GB of storage instead of 640GB.</p>

<p>Your batteries might only last for about 30 minutes, but hey, it&#8217;s probably still longer than one of those <a href="http://www.engadget.com/2006/04/18/dells-xps-m1710-gaming-laptop/">Dell <span class="caps">XPS</span> Gaming laptops</a>, and you can actually carry a MacBook Pro around without needing a truck.</p>]]></content:encoded></item></channel>
</rss>