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

	<title>Planet Fp-Syd</title>
	<link rel="self" href="http://www.kablambda.org/planet-fp-syd/atom.xml"/>
	<link href="http://www.kablambda.org/planet-fp-syd/"/>
	<id>http://www.kablambda.org/planet-fp-syd/atom.xml</id>
	<updated>2010-07-30T13:30:24+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<entry xml:lang="en">
		<title type="html">Perdition 1.19-rc3 Released</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-29T17_16_17.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-29T17_16_17.shtml</id>
		<updated>2010-07-29T08:16:17+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/2_8707.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Container Ship]&quot; align=&quot;left&quot; /&gt;
				&lt;p&gt;
				I have released version 1.19-rc3 of Perdition.
				This release fixes several problems. Perhaps most significantly,
				Thunderbird 3.1 can now re-connect to perdition SSL/TLS.
				&lt;p&gt;
				The code and related libraries are available as tarballs
				&lt;a href=&quot;http://horms.net/linux/perdition/download/1.19-rc3/&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.vergenet.net/pipermail/perdition-users/2010-July/002367.html&quot;&gt;announcement email&lt;/a&gt;.
				More information about perdition &lt;a href=&quot;http://horms.net/linux/perdition/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;right&quot; /&gt;
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">kexec-tools 2.0.2 Released</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-29T14_01_27.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-29T14_01_27.shtml</id>
		<updated>2010-07-29T05:01:27+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/2_7142.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Sumo]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				I have released version 2.0.2 of kexec-tools.
				the user-space portion of kexec
				a soft-reboot and crash-dump facility of Linux and Xen.
				&lt;p&gt;
				There are changes since 2.0.2-rc1.
				&lt;p&gt;
				The code is available as a tarball &lt;a href=&quot;http://kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.2-rc2.tar.gz&quot;&gt;here&lt;/a&gt; and in git &lt;a href=&quot;http://git.kernel.org/?p=utils/kernel/kexec/kexec-tools.git&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.infradead.org/pipermail/kexec/2010-July/004301.html&quot;&gt;announcement email.
				&lt;p&gt;
				kexec-tools recently moved, so the URLs above are new.
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Moved</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-29T12_23_52.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-29T12_23_52.shtml</id>
		<updated>2010-07-29T03:23:52+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/3_2309.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Coral in Miyakojima]&quot; align=&quot;left&quot; /&gt;
				My home page and blog have moved.  The new locations are:
				&lt;ul&gt;
				&lt;li&gt;Home: &lt;a href=&quot;http://horms.org/&quot;&gt;horms.org/&lt;/a&gt;
				&lt;li&gt;Feed: &lt;a href=&quot;http://horms.org/pleb_blossom/rss.xml&quot;&gt;horms.org/pleb_blossom/rss.xml&lt;/a&gt;
				&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;
				&lt;br clear=&quot;left&quot; /&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">R.I.P. Nedit</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/rip_nedit.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/07/27/rip_nedit.atom</id>
		<updated>2010-07-27T12:18:00+00:00</updated>
		<content type="html">&lt;p&gt;
For serious programmers, the text editor they user is an intensely personal
thing.
Try suggesting to an Emacs user that they should switch to Vim or vice-versa.
Most would shudder at the thought.
&lt;/p&gt;

&lt;p&gt;
My choice of editor for the last 15 years has been Nedit, the
	&lt;a href=&quot;http://www.nedit.org/&quot;&gt;
	Nirvana Editor&lt;/a&gt;.
Nedit has been an outstanding editor; feature full yet easy to use.
When I first started using it, Nedit was a closed source binary-only download
but sometime in the late 1990s, it was released under the GNU GPL.
&lt;/p&gt;

&lt;p&gt;
Unfortunately Nedit has been suffering from bit rot and neglect for a number
of years.
The main problem is that it uses the
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Motif_%28widget_toolkit%29&quot;&gt;
	Motif widget toolkit&lt;/a&gt;.
For open source, there are basically two options for Motif;
	&lt;a href=&quot;http://lesstif.sourceforge.net/&quot;&gt;
	Lesstif&lt;/a&gt;,
an LGPL reimplementation of Motif which has been basically unmaintained for
a number of years, or
	&lt;a href=&quot;http://www.opengroup.org/openmotif/&quot;&gt;
	OpenMotif&lt;/a&gt;
released under a license which is in no way
	&lt;a href=&quot;http://www.opensource.org/&quot;&gt;
	OSI approved&lt;/a&gt;.
On top of that, Nedit still doesn't support UTF-8, mainly because Lesstif
doesn't support it.
&lt;/p&gt;

&lt;p&gt;
I have, in the past, tried to fix bugs in Nedit, but the bugs are not really
in Nedit itself, but in an interaction between Nedit whichever Motif library
it is linked against and the underlying X libraries.
Depending on whether Nedit is linked against Lesstif and OpenMotif, Nedit will
display different sets of bugs.
I have tried fixing bugs in Nedit linked against Lesstif, but got absolutely
nowhere.
Lesstif is one of the few code bases I have ever worked on that I was
completely unable to make progress on.
&lt;/p&gt;

&lt;p&gt;
With Nedit getting flakier with each passing year I finally decided to switch
to a new editor.
I had already discounted Emacs and Vim; switching from Nedit to either of those
two archaic beasts was going to be way too painful.
Of all the FOSS editors available,
	&lt;a href=&quot;http://projects.gnome.org/gedit/&quot;&gt;
	Gedit&lt;/a&gt;
seemed to be the closest in features to Nedit.
&lt;/p&gt;

&lt;p&gt;
Unfortunately, Gedit does not compare well with Nedit feature wise.
To me it seems to try to be simultaneously as simple as possible and to have as
many features as possible and the features don't seem to fit together all that
well from a usability point of view.
On top of that, it lacks the following:
&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Regex search and regex search/replace.
		Apparently there is a regex search/replace plugin, but that uses a
		different hot key combination that literal search/repalce.
		Nedit on the other hand uses the same dialog box for literal and
		regex search/replaces; with a toggle button to switch between literal
		and regex searches. 
		&lt;/li&gt;
	&lt;li&gt;Search and replace within the selected area only.
		&lt;/li&gt;
	&lt;li&gt;Highlighting of matching braces and brackets.
		&lt;/li&gt;
	&lt;li&gt;Language specific editing modes and auto indentation.
		&lt;/li&gt;
	&lt;li&gt;A macro language allowing further customisation.
		&lt;/li&gt;
	&lt;li&gt;A simple, quick way to go to a particular line number (for Gedit,
		Control-L is supposed to work, but doesn't).
		&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
On top of that Gedit could also do with some improved key bindings and some
improvements to its syntax highlighting patterns.
The Ocaml syntax highlighting is particularly poor.
&lt;/p&gt;

&lt;p&gt;
I'm now going to try to use Gedit, by customising its setup and and using the
plugin system to see if I can regain the features that made Nedit such a
pleasure to use.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #26.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-26.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/07/25/fp-syd-26.atom</id>
		<updated>2010-07-25T12:11:00+00:00</updated>
		<content type="html">&lt;p&gt;
On Thursday July 15th, we held the 26th meeting of the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we had 18 people show up
to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had your correspondent
	&lt;a href=&quot;http://www.mega-nerd.com/erikd/Blog/&quot;&gt;
	(thats me)&lt;/a&gt;
with a presentation titled
	&lt;a href=&quot;http://fp-syd.googlegroups.com/web/ddc-llvm.pdf&quot;&gt;
	An LLVM Backend for DDC&lt;/a&gt;.
This presentation covered the problems with the current C backend, gave
a description of LLVM, the options for using LLVM from Haskell, why the LLVM
code from GHC was chosen and how if fits into the DDC compile pipeline.
Finally I demoed the very wonderful
	&lt;a href=&quot;http://llvm.org/demo/index.cgi&quot;&gt;
	LLVM CGI script&lt;/a&gt;
which allows you to enter a small C program and view the LLVM output.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was Eric Willigers who presented on the
subject of the
	&lt;a href=&quot;http://www.ats-lang.org/&quot;&gt;
	ATS programming langauge&lt;/a&gt;.
ATS is interesting because it offers functional programming with an advanced
type system with things like
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Dependent_type&quot;&gt;
	dependent types&lt;/a&gt;
and 
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Linear_type_system&quot;&gt;
	linear types&lt;/a&gt;
but has excellent performance as shown on the
	&lt;a href=&quot;http://shootout.alioth.debian.org/u64/benchmark.php?test=all&amp;lang=ats&quot;&gt;
	Computer Language Benchmarks Game&lt;/a&gt;.
Eric was able to demonstrate dependent types on a couple of list operations
which certainly showed some of the promise of dependent types.
ATS certainly does seem interesting but also seems to lack quite a bit of
polish.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Eric for presenting and Google for providing the meeting venue
and refreshments. 
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Goanna Command Style</title>
		<link href="http://redlizards.com/blog/uncategorized/goanna-command-style/"/>
		<id>http://redlizards.com/blog/?p=481</id>
		<updated>2010-07-20T03:40:57+00:00</updated>
		<content type="html">&lt;p align=&quot;justify&quot;&gt;Most users will use Goanna integrated into their development environment, either Visual Studio or Eclipse. However, we also have a command line version called Goanna Central. Since I am mostly working on the analysis engine this is the version I use most often.  And part of this entails to find open source projects and run Goanna over it. So, if you have an open source project, we might be watching you :)&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;Most open source projects provide configure scripts to generate makefiles. If that is the case using Goanna is a matter of configuring it with Goanna. There are two executables, &lt;tt&gt;goannacc&lt;/tt&gt; and &lt;tt&gt;goannac++&lt;/tt&gt;, that behave like &lt;tt&gt;gcc&lt;/tt&gt; and &lt;tt&gt;g++&lt;/tt&gt;. Configuring then just means to execute:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;goanna@KITTYHAWK:~$ ./configure CC=goannacc CXX=goannac++&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;After this you can &lt;tt&gt;make&lt;/tt&gt; you project as you are used to, with the difference that you will get feedback from Goanna.&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;Sometimes open source project do not provide a configure script. Last week I got my hands on an open source model checker - it is always some guilty pleasure to model check a model checker - and this project only included a makefile. Once all the necessary libraries were installed - the once provided were incompatible with my machine - such that the project could be build with &lt;tt&gt;g++&lt;/tt&gt;, all that remained was to edit the &lt;tt&gt;makefile&lt;/tt&gt;. It is always exciting to edit a file that says right at the top: &lt;tt&gt;Automatically-generated file. Do not edit!&lt;/tt&gt;. To use Goanna required to find all occurrences of, in this case, &lt;tt&gt;g++&lt;/tt&gt; and replace them with &lt;tt&gt;goannac++&lt;/tt&gt;. And then to &lt;tt&gt;make&lt;/tt&gt; the project.&lt;/p&gt;
&lt;p align=&quot;justify&quot;&gt;The output looks like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;tt&gt;Building file: ../src/Ned.cpp&lt;br /&gt;
Invoking: GCC C++ Compiler&lt;br /&gt;
goannac++ -DDEBUG -I../include -O0 -g3 -Wall  -c -fmessage-length=0 -Wextra -MMD -MP -MF&amp;#8221;src/Ned.d&amp;#8221;&lt;br /&gt;
Goanna - analyzing file ../src/Ned.cpp&lt;br /&gt;
Number of functions: 3&lt;br /&gt;
../src/Ned.cpp:28: warning: Goanna[COP-assign-op] Missing assignment operator for class `Ned&amp;#8217; which uses dynamic memory allocation&lt;br /&gt;
../src/Ned.cpp:28: warning: Goanna[COP-copy-ctor] Missing copy constructor for class `Ned&amp;#8217; which uses dynamic memory allocation&lt;br /&gt;
Total runtime : 6.65 seconds&lt;/tt&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That was about all it took. BTW: Kittyhawk is the name of my machine, and it is aptly named.&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Flying</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-20T09_55_18.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-20T09_55_18.shtml</id>
		<updated>2010-07-20T00:55:18+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/3_8409.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[This is not my bicycle]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				Due to tyre troubles with my other two bikes I was &quot;forced&quot; to ride my
				Cannondale road bike to work this morning. The first time I've ridden it since
				well before Hikari was born last November. Wow, that bike is light and voom
				it flies. (And I put the brakes back together correctly after shipping it
				from Sydney!)
				&lt;p&gt;
				In semi-related news, its really warm in Tokyo at the moment.
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">First release of the CUDA backend for Accelerate</title>
		<link href="http://justtesting.org/first-release-of-the-cuda-backend-for-acceler"/>
		<id>http://justtesting.org/first-release-of-the-cuda-backend-for-acceler</id>
		<updated>2010-07-18T14:31:07+00:00</updated>
		<content type="html">&lt;p&gt;
	During the first Australian Haskell Hackathon, AusHac2010, we finally managed to complete the integration of the CUDA backend, written by Sean Lee and Trevor McDonell, into the array EDSL&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/project/accelerate/&quot;&gt;Accelerate&lt;/a&gt;. &amp;nbsp;It still doesn't cover the complete functionality of the current version of the Accelerate EDSL, but already allows for interesting GPU computations. &amp;nbsp;The&amp;nbsp;&lt;a href=&quot;http://hackage.haskell.org/package/accelerate&quot;&gt;package source&lt;/a&gt;&amp;nbsp;(version 0.7.1.0) can be obtained from Hackage as usual. &amp;nbsp;There is now also a&amp;nbsp;&lt;a href=&quot;http://trac.haskell.org/accelerate&quot;&gt;bug tracker.&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/first-release-of-the-cuda-backend-for-acceler&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/first-release-of-the-cuda-backend-for-acceler#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">LLVM Backend : Milestone #1.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/llvm_milestone1.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/07/18/llvm_milestone1.atom</id>
		<updated>2010-07-18T12:18:00+00:00</updated>
		<content type="html">&lt;p&gt;
About 3 weeks ago I started work on the
	&lt;a href=&quot;http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/llvm_backend.html&quot;&gt;
	LLVM backend for DDC&lt;/a&gt;
and I have now reached the first milestone.
&lt;/p&gt;

&lt;p&gt;
Over the weekend I attended
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/AusHac2010AusHac2010&quot;&gt;
	AusHac2010&lt;/a&gt;
and during Friday and Saturday I managed to get DDC modified so I could
compile a Main module via the existing C backend and another module via the
LLVM backend to produce an executable that ran, but gave an incorrect answer.
&lt;/p&gt;

&lt;p&gt;
Today, I managed to get a very simple function actually working correctly.
The function is trivial:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  identInt :: Int -&gt; Int
  identInt a = a

&lt;/pre&gt;

&lt;p&gt;
and the generated LLVM code looks like this:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  define external ccc &amp;#37;struct.Obj* @Test_identInt(&amp;#37;struct.Obj* &amp;#37;_va)  
  {
  entry:
      ; _ENTER (1)
      &amp;#37;local.slotPtr = load &amp;#37;struct.Obj*** @_ddcSlotPtr
      &amp;#37;enter.1 = getelementptr inbounds &amp;#37;struct.Obj** &amp;#37;local.slotPtr, i64 1
      store &amp;#37;struct.Obj** &amp;#37;enter.1, &amp;#37;struct.Obj*** @_ddcSlotPtr
      &amp;#37;enter.2 = load &amp;#37;struct.Obj*** @_ddcSlotMax
      &amp;#37;enter.3 = icmp ult &amp;#37;struct.Obj** &amp;#37;enter.1, &amp;#37;enter.2
      br i1 &amp;#37;enter.3, label &amp;#37;enter.good, label &amp;#37;enter.panic
  enter.panic:
      call ccc void ()* @_panicOutOfSlots(  ) noreturn
      br label &amp;#37;enter.good
  enter.good:
      ; ----- Slot initialization -----
      &amp;#37;init.target.0 = getelementptr  &amp;#37;struct.Obj** &amp;#37;local.slotPtr, i64 0
      store &amp;#37;struct.Obj* null, &amp;#37;struct.Obj** &amp;#37;init.target.0
      ; ---------------------------------------------------------------
      &amp;#37;u.2 = getelementptr inbounds &amp;#37;struct.Obj** &amp;#37;local.slotPtr, i64 0
      store &amp;#37;struct.Obj* &amp;#37;_va, &amp;#37;struct.Obj** &amp;#37;u.2
      ; 
      br label &amp;#37;_Test_identInt_start
  _Test_identInt_start:
      ; alt default
      br label &amp;#37;_dEF1_a0
  _dEF1_a0:
      ; 
      br label &amp;#37;_dEF0_match_end
  _dEF0_match_end:
      &amp;#37;u.3 = getelementptr inbounds &amp;#37;struct.Obj** &amp;#37;local.slotPtr, i64 0
      &amp;#37;_vxSS0 = load &amp;#37;struct.Obj** &amp;#37;u.3
      ; ---------------------------------------------------------------
      ; _LEAVE
      store &amp;#37;struct.Obj** &amp;#37;local.slotPtr, &amp;#37;struct.Obj*** @_ddcSlotPtr
      ; ---------------------------------------------------------------
      ret &amp;#37;struct.Obj* &amp;#37;_vxSS0
  }

&lt;/pre&gt;

&lt;p&gt;
That looks like a lot of code but there are a couple of points to remember:
&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;This includes code for DDC's garbage collector.
		&lt;/li&gt;
	&lt;li&gt;DDC itself is still missing a huge number of optimisations that can
		added &lt;b&gt;after&lt;/b&gt; the compiler actually works.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I have found David Terei's LLVM AST code that I pulled from the
	&lt;a href=&quot;http://darcs.haskell.org/ghc/compiler/llvmGen/&quot;&gt;
	GHC sources&lt;/a&gt;
very easy to use.
Choosing this code was definitely not a mistake and I have been corresponding
with David, which has resulted in a few updates to this code, including
	&lt;a href=&quot;http://web.archiveorange.com/archive/v/j7U5dKOOHeJ2TsDJkIiW&quot;&gt;
	a commit&lt;/a&gt;
with my name on it.
&lt;/p&gt;

&lt;p&gt;
LLVM is also conceptually very, very sound and easy to work with.
For instance, variables in LLVM code are allowed to contain the dot character,
so that its easy to avoid name clashes between C function/variable names and
names generated during the generation of LLVM code, by making generated names
contain a dot.
&lt;/p&gt;

&lt;p&gt;
Finally, I love the fact that LLVM is a typed assembly language.
There would have been dozens of times over the weekend that I generated LLVM code
that the LLVM compiler rejected because it would't type check.
Just like when programming with Haskell, once the code type checked, it
actually worked correctly.
&lt;/p&gt;

&lt;p&gt;
Anyway, this is a good first step.
Lots more work to be done.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">Singleton: A general-purpose dependently-typed assembly language</title>
		<link href="http://justtesting.org/singleton-a-general-purpose-dependently-typed"/>
		<id>http://justtesting.org/singleton-a-general-purpose-dependently-typed</id>
		<updated>2010-07-17T12:31:05+00:00</updated>
		<content type="html">&lt;p&gt;
	In the paper&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/WC10.html&quot;&gt;Singleton: A general-purpose dependently-typed assembly language&lt;/a&gt;, we introduce Singleton, a typed assembly language that embeds a variant of the &lt;i&gt;calculus of inductive constructions (CiC)&lt;/i&gt; as an assertion language in its type system. &amp;nbsp;Moreover, Singleton procedures can&amp;nbsp;abstract over&amp;nbsp;propositions and proof terms. &amp;nbsp;Singleton's name comes form its support for&amp;nbsp;&lt;i&gt;generalised singleton types&lt;/i&gt;&amp;nbsp;that&amp;nbsp;allow the values from arbitrary inductive&amp;nbsp;types to be associated with the contents of registers and memory&amp;nbsp;locations. Together these features&amp;nbsp;allow strong statements to be&amp;nbsp;made about the functional behaviour of Singleton programs.&lt;p&gt;&lt;/p&gt;&lt;div&gt;Singleton's development was motivated by&amp;nbsp;the desire for a typed assembly language that can establish high-level properties that are&amp;nbsp;not implied by type safety alone, a requirement that we encountered in the context of runtime verification. &amp;nbsp;For more details on that context, see our previous papers&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/WC05.html&quot;&gt;Secure Untrusted Binaries - Provably!&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/WKC06.html&quot;&gt;On the automated synthesis of proof-carrying temporal&amp;nbsp;reference monitors&lt;/a&gt;.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;Simon Winwood, on whose PhD work the paper is based, established basic properties of Singleton's type system, namely&amp;nbsp;type safety and a type erasure property, using the Coq proof&amp;nbsp;assistant:&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~sjw/thesis/proofs/&quot;&gt;proof scripts&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/singleton-a-general-purpose-dependently-typed&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/singleton-a-general-purpose-dependently-typed#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">kexec-tools 2.0.2-rc2 Released</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-13T12_01_14.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-13T12_01_14.shtml</id>
		<updated>2010-07-13T03:01:14+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/4_4156.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Sumo]&quot; align=&quot;left&quot; /&gt;
				&lt;p&gt;
				I have released version 2.0.2-rc2 of kexec-tools.
				the user-space portion of kexec
				a soft-reboot and crash-dump facility of Linux and Xen.
				The only change since 2.0.2-rc1 is to include a number of
				files that were missing from the tarball which caused build
				failures on x86_64, ppc, ppc64 and arm.
				&lt;p&gt;
				The code is available as a tarball &lt;a href=&quot;http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/testing/kexec-tools-2.0.2-rc2.tar.gz&quot;&gt;here&lt;/a&gt; and in git &lt;a href=&quot;http://git.kernel.org/?p=linux/kernel/git/horms/kexec-tools.git&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.infradead.org/pipermail/kexec/2010-July/004237.html&quot;&gt;announcement email&lt;/a&gt;.
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Perdition 1.19-rc2 Released</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-10T10_13_03.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-10T10_13_03.shtml</id>
		<updated>2010-07-10T01:13:03+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/4_1829.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[David Miller]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				I have released version 1.19-rc2 of Perdition.
				There is a single change since 1.19-rc1 to fix
				a crash-bug on invocation of perdition in managesieve mode.
				Merge madness on my part. Thanks to Filipe Carvalho for reporting it.
				The fix is &lt;a href=&quot;http://hg.vergenet.net/perdition/perdition/rev/58e512ea83a0&quot;&gt;here&lt;/a&gt;.
				&lt;p&gt;
				The code and related libraries are available as tarballs
				&lt;a href=&quot;http://www.vergenet.net/linux/perdition/download/1.19-rc2/&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.vergenet.net/pipermail/perdition-users/2010-July/002339.html&quot;&gt;announcement email&lt;/a&gt;.
				More information about perdition &lt;a href=&quot;http://www.vergenet.net/linux/perdition/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Haskell 2010 is complete!</title>
		<link href="http://justtesting.org/haskell-2010-is-complete"/>
		<id>http://justtesting.org/haskell-2010-is-complete</id>
		<updated>2010-07-07T10:36:00+00:00</updated>
		<content type="html">&lt;p&gt;
	The final version of the Haskell 2010 edition has been released: &lt;a href=&quot;http://www.haskell.org/pipermail/haskell/2010-July/022189.html&quot;&gt;http://www.haskell.org/pipermail/haskell/2010-July/022189.html&lt;/a&gt;

This completes my stewardship of the Haskell foreign function interface specification. It is now part of the language standard proper. The next language feature I personally like to see being integrated are type families, but that still requires much work.
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/haskell-2010-is-complete&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/haskell-2010-is-complete#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Goanna Studio 2.0</title>
		<link href="http://redlizards.com/blog/uncategorized/goanna-studio-20/"/>
		<id>http://redlizards.com/blog/?p=436</id>
		<updated>2010-07-07T03:48:47+00:00</updated>
		<content type="html">&lt;p&gt;It is out! We just released a major upgrade to Goanna Studio version 2.0. There has been a lot of work going into the new version and some of the new key features include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Full (whole program) interprocedural analysis to track effects across functions and files&lt;/li&gt;
&lt;li&gt;Incremental analysis to minimize time for reanalyzing files/projects&lt;/li&gt;
&lt;li&gt;Around 100 classes of checks, up almost 70% compared to the previous release&lt;/li&gt;
&lt;li&gt;Much improved precision and elimination of some existing false positives&lt;/li&gt;
&lt;li&gt;Improved Path Simulator to display error traces&lt;/li&gt;
&lt;li&gt;New project reporting mechanism and export facilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For existing customers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We are also happy to announce that all existing customers have the possibility to upgrade to 2.0 free of charge!&lt;/li&gt;
&lt;li&gt;If you were a trial user in the past and need a trial extension visit: &lt;a href=&quot;http://redlizards.com/trial-extension&quot;&gt;http://redlizards.com/trial-extension&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Overall, the new version is another leap forward and enables to  detect more and deeper critical issues early in the development cycle.&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Perdition 1.19-rc1 Released</title>
		<link href="http://horms.org/pleb_blossom/permalink/2010/2010-07-06T11_47_19.shtml"/>
		<id>http://horms.org/pleb_blossom/permalink/2010/2010-07-06T11_47_19.shtml</id>
		<updated>2010-07-06T02:47:19+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5_6571.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Hikari]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				I have released version 1.19-rc1 of Perdition,
				a mail retrieval proxy. This release includes
				numerous bug fixes and support for the manage sieve protocol.
				&lt;p&gt;
				The code and related libraries are available as tarballs
				&lt;a href=&quot;http://www.vergenet.net/linux/perdition/download/1.19-rc1/&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.vergenet.net/pipermail/perdition-users/2010-July/002328.html&quot;&gt;announcement email&lt;/a&gt;.
				More information about perdition &lt;a href=&quot;http://www.vergenet.net/linux/perdition/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Perdition 1.19-rc1 Released</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-07-06T11_47_19.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-07-06T11_47_19.shtml</id>
		<updated>2010-07-06T02:47:19+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5_6571.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Hikari]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				I have released version 1.19-rc1 of Perdition,
				a mail retrieval proxy. This release includes
				numerous bug fixes and support for the manage sieve protocol.
				&lt;p&gt;
				The code and related libraries are available as tarballs
				&lt;a href=&quot;http://www.vergenet.net/linux/perdition/download/1.19-rc1/&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.vergenet.net/pipermail/perdition-users/2010-July/002328.html&quot;&gt;announcement email&lt;/a&gt;.
				More information about perdition &lt;a href=&quot;http://www.vergenet.net/linux/perdition/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">kexec-tools 2.0.2-rc1 Released</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-07-05T16_15_14.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-07-05T16_15_14.shtml</id>
		<updated>2010-07-05T07:15:14+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5_4790.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[A goat]&quot; align=&quot;left&quot; /&gt;
				&lt;p&gt;
				I have released version 2.0.2-rc1 of kexec-tools,
				the user-space portion of kexec
				a soft-reboot and crash-dump facility of Linux and Xen.
				The code is available as a tarball &lt;a href=&quot;http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/testing/kexec-tools-2.0.2-rc1.tar.gz&quot;&gt;here&lt;/a&gt; and in git &lt;a href=&quot;http://git.kernel.org/?p=linux/kernel/git/horms/kexec-tools.git&quot;&gt;here&lt;/a&gt;.
				More information is available in the &lt;a href=&quot;http://lists.infradead.org/pipermail/kexec/2010-July/004221.html&quot;&gt;announcement email&lt;/a&gt;.
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">LLVM Backend for DDC.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/llvm_backend.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/06/29/llvm_backend.atom</id>
		<updated>2010-06-28T20:51:00+00:00</updated>
		<content type="html">&lt;p&gt;
With the blessing of
	&lt;a href=&quot;http://www.cse.unsw.edu.au/~benl/&quot;&gt;
	Ben Lippmeier&lt;/a&gt;
I have started work on an new backend for his
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/DDC&quot;&gt;
	DDC&lt;/a&gt;
compiler.
Currently, DDC has a backend that generates C code which then gets run
through GNU GCC to generate executables.
Once it is working, the new backend will eventually replace the C one.
&lt;/p&gt;

&lt;p&gt;
The new DDC backend will target the very excellent
	&lt;a href=&quot;http://llvm.org&quot;&gt;
	LLVM&lt;/a&gt;,
the
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Low_Level_Virtual_Machine&quot;&gt;
	Low Level Virtual Machine&lt;/a&gt;.
Unlike C, LLVM is specifically designed as a general retargetable compiler
backend.
It became the obvious choice for DDC when the GHC Haskell compiler
	&lt;a href=&quot;http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM&quot;&gt;
	added an LLVM backend&lt;/a&gt;
which almost immediately showed great promise.
Its implementation was of relatively low complexity in comparison to the
existing backends and it also provided pretty impressive performance.
This GHC backend was implemented by
	&lt;a href=&quot;http://www.cse.unsw.edu.au/~davidt/papers.html&quot;&gt;
	David Terei&lt;/a&gt;
as part of an undergraduate thesis in the
	&lt;a href=&quot;http://www.cse.unsw.edu.au/~pls/PLS/PLS.html&quot;&gt;
	Programming Languages and Systems&lt;/a&gt;
group an UNSW.
&lt;/p&gt;

&lt;p&gt;
Since DDC is written in Haskell, there are two obvious ways to implement an
LLVM backend:
&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Using the haskell LLVM bindings available on
		&lt;a href=&quot;http://hackage.haskell.org/package/llvm&quot;&gt;
		hackage&lt;/a&gt;.
		&lt;/li&gt;
	&lt;li&gt;Using David Terei's code that is part of the GHC compiler.
		&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
At first glance, the former might well be the more obvious choice, but the LLVM
bindings have a couple of drawbacks from the point of view of using them in
DDC.
In the end, the main factor in choosing which to use was Ben's interest in
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29&quot;&gt;
	boostrapping&lt;/a&gt;
the compiler (compiling the compiler with itself) as soon as possible.
&lt;/p&gt;

&lt;p&gt;
The existing LLVM bindings use a number of advanced Haskell features, that is,
features beyond that of the
	&lt;a href=&quot;http://www.haskell.org/onlinereport/&quot;&gt;
	Haskell 98&lt;/a&gt;
standard.
If we used the LLVM bindings in DDC, that would mean the DDC would have to
support all the features needed by the binding before DDC could be
bootstrapped.
Similarly, the LLVM bindings use GHC's
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Foreign_function_interface&quot;&gt;
	Foreign Function Interface (FFI)&lt;/a&gt;
to call out the the LLVM library.
DDC currently does have some FFI support, but this was another mark against
the bindings.
&lt;/p&gt;

&lt;p&gt;
By way of contrast, David Terei's LLVM backend for GHC is pretty much standard
Haskell code and since it generates text files containing LLVM's
	&lt;a href=&quot;http://llvm.org/docs/LangRef.html&quot;&gt;
	Intermediate Representation (IR)&lt;/a&gt;,
a high-level, typed assembly language, there is no FFI problem.
The only downside of David's code is that the current version in the GHC Darcs
tree uses a couple of modules that are private to GHC itself.
Fortunately, it looks like these problems can be worked around with relatively
little effort.
&lt;/p&gt;

&lt;p&gt;
Having decided to use David's code, I started hacking on a little test
project.
The aim of the test project to set up an LLVM Abstract Syntax Tree (AST) in
Haskell for a simple module.
The AST is then pretty printed as a textual LLVM IR file and assembled using
LLVM's &lt;b&gt;&lt;tt&gt;llc&lt;/tt&gt;&lt;/b&gt; compiler to generate native assembler.
Finally the assembler code is compiled with a C module containing a
&lt;b&gt;&lt;tt&gt;main&lt;/tt&gt;&lt;/b&gt; function which calls into the LLVM generated code.
&lt;/p&gt;

&lt;p&gt;
After managing to get a basic handle on LLVM's IR code, the test project
worked; calling from C into LLVM generated code and getting the expected
result.
The next step is to prepare David's code for use in DDC while making it easy
to track David's upstream changes.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #25.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-25.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/06/28/fp-syd-25.atom</id>
		<updated>2010-06-28T08:08:00+00:00</updated>
		<content type="html">&lt;p&gt;
On Thursday June 17th, we held the 25th meeting of the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we about 20 people show up
to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had
	&lt;a href=&quot;http://etorreborre.blogspot.com/&quot;&gt;
	Eric Torreborre&lt;/a&gt;
on the subject of
	&lt;a href=&quot;http://code.google.com/p/specs/&quot;&gt;
	Specs&lt;/a&gt;
a Scala library designed as an alternative to JUnit for testing Scala and
Java projects.
Specs seems to remove a lot of the boilerplate normall associated with unit
testing.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was Shane Stephens who presented on the
subject of
	&lt;a href=&quot;http://www.haskell.org/arrows/&quot;&gt;
	Arrows&lt;/a&gt;,
a generalisation of
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/Monad&quot;&gt;
	Monads&lt;/a&gt;.
Shane's presentation was originally scheduled to be a 5-7 minute lightning
talk but due to a lack of other lightning presenters, Shane managed to pad
it out to a full talk in the hour before he presented.
According to Shane, his presentation was based quite closely on the original
paper
	&lt;a href=&quot;http://www.ittc.ku.edu/Projects/SLDG/filing_cabinet/Hughes_Generalizing_Monads_to_Arrows.pdf&quot;&gt;
	&lt;i&gt;&quot;Generalising Monads to Arrows&quot;&lt;/i&gt;&lt;/a&gt;
by John Hughes.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Eric and Shane for presenting and Google for providing the
meeting venue and refreshments. 
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">A few words on code style</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-06-25T11_29_35.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-06-25T11_29_35.shtml</id>
		<updated>2010-06-25T02:29:35+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/4_6993.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Kamakura]&quot; align=&quot;right&quot; /&gt;
				&lt;p&gt;
				I wish that I was writing about a new code for style
				but instead I'm writing about poor coding style. I'll keep it brief.
				&lt;ol&gt;
				&lt;li&gt; If you have a very large function that is doing lots of things,
				     its a sign that some refactoring might be in order.
				     If not for yourself, to aid others who have to work on the code.
				&lt;li&gt; If the things are interlaced for no apparently good reason,
				     you've created a maintenance monster.
				&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt;
				&lt;br clear=&quot;right&quot; /&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">New paper: An LLVM Backend For GHC</title>
		<link href="http://justtesting.org/new-paper-an-llvm-backend-for-ghc"/>
		<id>http://justtesting.org/new-paper-an-llvm-backend-for-ghc</id>
		<updated>2010-06-15T05:31:53+00:00</updated>
		<content type="html">&lt;p&gt;
	In&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/TC10.html&quot;&gt;An LLVM Backend For GHC&lt;/a&gt;, we describe the design and implementation of an LLVM backend for the Glasgow Haskell Compiler (GHC). &amp;nbsp;We outline the conceptual obstacles that we had to overcome and give a detailed performance analysis of the new backend compared to the existing C backend and native code generator.
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/new-paper-an-llvm-backend-for-ghc&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/new-paper-an-llvm-backend-for-ghc#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">One week with iPad</title>
		<link href="http://justtesting.org/one-week-with-ipad"/>
		<id>http://justtesting.org/one-week-with-ipad</id>
		<updated>2010-06-07T01:16:23+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;div&gt;When I decided to by an iPad, I had one killer application in mind: reading. &amp;nbsp;I was hoping the device would also be useful otherwise, but cutting down on printing papers and the like was my main aim. &amp;nbsp;As a researcher, I inevitably read a lot: research papers, books, reports, manuals, thesis drafts, the drafts of my own work-in-progress papers, and so on. &amp;nbsp;I have got reading material on my&amp;nbsp;desk at home, in my office, in my bag...it's a mess. &amp;nbsp;The prospect of consolidating it all into one device, which would hopefully also cover most of my note taking and sketching out of ideas, was enough to sell me on the iPad.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;So, how did it work out? &amp;nbsp;So far, very well — but slightly more than a week of use makes it hard to draw any final conclusions. &amp;nbsp;The printed area of a paper is about the same as the size of the iPad screen, which combined with the high quality of the display makes for a good reading experience. &amp;nbsp;Instead of printing a paper or other document I like to read, I now sync it to my iPad —usually using&amp;nbsp;&lt;a href=&quot;http://www.dropbox.com/&quot;&gt;Dropbox&lt;/a&gt;— and read it with&amp;nbsp;&lt;a href=&quot;http://itunes.apple.com/au/app/goodreader-for-ipad/id363448914?mt=8&quot;&gt;GoodReader for iPad&lt;/a&gt;. &amp;nbsp;If I expect that I may want to refer to a paper at a later time, I'm adding it to my mobile library kept in&amp;nbsp;&lt;a href=&quot;http://itunes.apple.com/au/app/papers/id304655618?mt=8&quot;&gt;Papers&lt;/a&gt;. &amp;nbsp;If I need to annotate a document —for example, for a review— I currently use&amp;nbsp;&lt;a href=&quot;http://itunes.apple.com/au/app/iannotate-pdf/id363998953?mt=8&quot;&gt;iAnnotate PDF&lt;/a&gt;. &amp;nbsp;I like Dropbox, GoodReader, and Papers, but I'm only using iAnnotate as there doesn't seem to be an alternative at the moment — the user interface is pretty rough.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;In addition, I found over the last week that iPad is also the perfect Twitter device (I'm currently using&amp;nbsp;&lt;a href=&quot;http://itunes.apple.com/au/app/twitterrific-for-ipad/id359914600?mt=8&quot;&gt;Twitterific for iPad&lt;/a&gt;), and great for reading blogs and online articles, which I often file away for later reading on my iPad using&amp;nbsp;&lt;a href=&quot;http://www.instapaper.com/&quot;&gt;Instapaper&lt;/a&gt;.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/one-week-with-ipad&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/one-week-with-ipad#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #24.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-24.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/05/30/fp-syd-24.atom</id>
		<updated>2010-05-30T00:08:00+00:00</updated>
		<content type="html">&lt;p&gt;
On Thursday May 20th, we held the 24th meeting of the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we a bit over 20 people
show up to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had
	&lt;a href=&quot;http://raphscallion.com/blog&quot;&gt;
	Raphael Speyer&lt;/a&gt;
presenting his impressions on leaning the Ocaml programming language and
applying to writing a version of the game &quot;Four in a Row&quot; also known as
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Connect_Four&quot;&gt;
	&quot;Connect Four&quot;&lt;/a&gt;.
The game is a two player game and Raphael implemented the game rules and some
basic artificial intelligence so that a single player can play against the AI.
Rapahel seemed to have a positive experience with Ocaml and the
	&lt;a href=&quot;http://batteries.forge.ocamlcore.org/&quot;&gt;
	Batteries Included&lt;/a&gt;
libraries.
The performance was quite as good as he would have liked, but discussion seemed
to suggest that switching from lists to arrays would probably improve things.
Raphael has made his code available as a
	&lt;a href=&quot;http://github.com/rapha/fourinarow&quot;&gt;
	github project&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was Eric Willigers who presented on the
subject of the
	&lt;a href=&quot;http://www.scala-lang.org/&quot;&gt;
	Scala&lt;/a&gt;
language's
	&lt;a href=&quot;http://www.scala-lang.org/node/242&quot;&gt;
	Actor&lt;/a&gt;
library, a library implementation of Erlang's message passing primitives.
Eric gave us a number of demos that showed how Actors behave.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Raphael and Eric for presenting and Google for providing the
meeting venue and the snacks.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">More SMH Bashing</title>
		<link href="http://www.kablambda.org/blog/2010/05/17/more-smh-bashing/"/>
		<id>http://www.kablambda.org/blog/?p=116</id>
		<updated>2010-05-17T12:43:29+00:00</updated>
		<content type="html">&lt;p&gt;I read an &lt;a href=&quot;http://www.smh.com.au/national/education/early-learning-success-inspires-schools-to-sign-up-20100513-v1ub.html&quot;&gt;interesting article in the SMH a few days ago about a technique for preparing children to learn to read by increasing their &amp;#8216;phonemic awareness&amp;#8217;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The first thing I think when I read about any innovation is &amp;#8220;does it really work?&amp;#8221; &amp;#8212; the evidence was addressed by a single paragraph:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;After 13 weeks of the program, 5 per cent of children improved in language tests administered by the foundation workers and the teachers. The number of three-year-olds who passed the tests after the program doubled.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Which tells us very little. Is that 5 per cent figure net of the children who did worse? Or is it gross? Why is the three year old improvement stated differently? Did the journalist just feel that it read better to avoid a similar turn of phrase, or did the educator phrase it that way for some reason? Obviously it makes a difference whether the 3 year old pass rate increased from 1% to 2% or 50% to 100%. Most importantly &amp;#8212; as 13 weeks is a long time in a child&amp;#8217;s life, especially a three year old &amp;#8212; you would expect improvements no matter what. A trial with a control group, and blind administration of the tests would make the figures much more convincing.&lt;/p&gt;

&lt;p&gt;No doubt there is better evidence available, as &amp;#8220;other preschools in the area are clamouring for the program&amp;#8221;, so it&amp;#8217;s a shame that the journalist couldn&amp;#8217;t have presented that evidence in their article.&lt;/p&gt;</content>
		<author>
			<name>Tom Davies</name>
			<uri>http://www.kablambda.org/blog</uri>
		</author>
		<source>
			<title type="html">My Diversions</title>
			<subtitle type="html">Notes on things I'm thinking and doing</subtitle>
			<link rel="self" href="http://www.kablambda.org/blog/feed/"/>
			<id>http://www.kablambda.org/blog/feed/</id>
			<updated>2010-05-20T19:36:09+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #23.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-23.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/04/28/fp-syd-23.atom</id>
		<updated>2010-04-28T11:25:00+00:00</updated>
		<content type="html">&lt;p&gt;
On Thursday April 15th, we held the 23rd meeting of the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we had 28 people show up
to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had
	&lt;a href=&quot;http://www.cse.unsw.edu.au/~benl/&quot;&gt;
	Ben Lippmeier&lt;/a&gt;
demonstrating
	&lt;a href=&quot;http://hackage.haskell.org/package/gloss&quot;&gt;
	Gloss&lt;/a&gt;,
a library for 2D vector graphics, animations and simulations.
Gloss grew out of a library that Ben and others were using the teach Haskell
to first year computer science students at ANU.
It is now also being used at UNSW.
The library was designed to allow students to get animations running without
having to really tangle with monads.
Programs using the library can achieve very impressive results with very few
lines of code.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/&quot;&gt;
	Barry Jay&lt;/a&gt;
demonstrating his
	&lt;a href=&quot;http://bondi.it.uts.edu.au/&quot;&gt;
	Bondi&lt;/a&gt;
programming language.
Bondi is an Ocaml-like language in that it is strictly statically typed,
is mainly functional but allows imperative constructs as well, is impure with
respect to I/O and has an object system.
&lt;/p&gt;

&lt;p&gt;
Bondi came about as a proof of concept language aiming to show that the
the ideas behind
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/patterns/&quot;&gt;
	Pattern Calculus&lt;/a&gt;
actually have practical application.
Bondi shows very clearly the value of being able to pattern match on arbitrary
compounds objects without writing code to deal with the specifics of the
compound.
A simple example Barry came up with was defining a completely new data type
&lt;b&gt;&lt;tt&gt;Complex&lt;/tt&gt;&lt;/b&gt; and having Bondi's pattern matching immediately able to
figure out how to print it using the &lt;b&gt;&lt;tt&gt;toString&lt;/tt&gt;&lt;/b&gt; function as
follows (the &quot;&lt;b&gt;&lt;tt&gt;~~&lt;/tt&gt;&lt;/b&gt;&quot; below is the Bondi REPL command prompt):
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  ~~ datatype Complex = Cmplx of Float and Float ;;
  Cmplx: Float -&gt; Float -&gt; Complex

  ~~ toString (Cmplx 1.1 2.2) ;;
  it: String
  it = &quot;Cmplx 1.1 2.2&quot;

&lt;/pre&gt;

&lt;p&gt;
Towards the end, the questions and resulting discussion turned back to the
Pattern Calculus its relationship to
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_calculus&quot;&gt;
	Lambda Calculus&lt;/a&gt;.
This discussion continued at the pub where I think we decided that the Pattern
Calculus is a super-set of the Lambda Calculus.
For more on this topic I would recommend the slides to
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/Publications/factor_talk.pdf&quot;&gt;
	Barry's presentation at SAPLING '09&lt;/a&gt;
and the full paper version titled
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/Publications/factorisation.pdf&quot;&gt;
	&quot;A Combinatory Account of Internal Structure&quot;&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Ben and Barry for presenting and Google for providing the
meeting venue and the snacks.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Goanna 1.4 release</title>
		<link href="http://redlizards.com/blog/uncategorized/goanna-14-release/"/>
		<id>http://redlizards.com/blog/?p=428</id>
		<updated>2010-04-21T06:10:58+00:00</updated>
		<content type="html">&lt;p&gt;We are happy to announce a new release of our Goanna static analysis solution. After a previous release for Visual Studio 2010 we are now bringing new technology with new benefits to all our products:&lt;/p&gt;
&lt;p&gt;Some of the advances include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;up to 300% speed improvement through improved core analysis engine&lt;/li&gt;
&lt;li&gt;even less false positives due to improved check accuracy&lt;/li&gt;
&lt;li&gt;updated output format to easier identify critical issues&lt;/li&gt;
&lt;li&gt;32-/64-bit cross-compilation support in Visual Studio&lt;/li&gt;
&lt;li&gt;support of Visual Studio property sheets&lt;/li&gt;
&lt;li&gt;initial support of new C++0x standard (&amp;#8221;auto&amp;#8221; and other features)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you like to test the new features and require a 30 day Trial Extension for your current Goanna version please complete this &lt;a href=&quot;http://redlizards.com/trial-extension&quot;&gt;trial extension request  form&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Regular, shape-polymorphic, parallel arrays in Haskell</title>
		<link href="http://justtesting.org/regular-shape-polymorphic-parallel-arrays-in"/>
		<id>http://justtesting.org/regular-shape-polymorphic-parallel-arrays-in</id>
		<updated>2010-04-06T05:34:00+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;div&gt;The paper&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/KCLPL10.html&quot;&gt;Regular, shape-polymorphic, parallel arrays in Haskell&lt;/a&gt;&amp;nbsp;describes a new Haskell library, named &lt;em&gt;Repa&lt;/em&gt;, for multi-dimensional, regular arrays based on our work on&amp;nbsp;&lt;a href=&quot;http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell&quot;&gt;Data Parallel Haskell&lt;/a&gt;&amp;nbsp;and a delayed array representation avoiding unnecessary data structures. As the following table shows, the sequential performance already gets close to the performance of C programs. More importantly, the Haskell code transparently makes use of multicore hardware &amp;mdash; something that is much more difficult in C.&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/GxVGUV9ukuFpHtNSiyR4QRYrewGYjH7sN11MI7enF9uAWg4DxZF6ahUc2BgW/PastedGraphic-2.png&quot; width=&quot;335&quot; height=&quot;91&quot; /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;The Haskell code is purely functional, using collective array operations. &amp;nbsp;Here is matrix-matrix multiplication:&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;mmMult :: (Num e, Elt e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; Array DIM2 e -&amp;gt; Array DIM2 e&amp;nbsp;-&amp;gt; Array DIM2 e&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;mmMult arr brr&amp;nbsp;= sum (zipWith (*) arrRepl brrRepl)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;where&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;trr &amp;nbsp; &amp;nbsp; = force (transpose2D brr)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;arrRepl = replicate (Z :.All :.colsB :.All) &amp;nbsp; arr&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;brrRepl = replicate (Z :.All :.All &amp;nbsp; :.rowsA) trr &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;(Z:. colsA:. rowsA) = extent arr&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;(Z:. colsB:. rowsB) = extent brr&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;In addition to good performance, the library facilitates reuse through the use of shape polymorphism.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/regular-shape-polymorphic-parallel-arrays-in&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/regular-shape-polymorphic-parallel-arrays-in#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Robert and Lynne's Wedding</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-03-27T20_15_03.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-03-27T20_15_03.shtml</id>
		<updated>2010-03-27T09:15:03+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.verge.net.au/~horms/gallery/robert-and-lynne-wedding/&quot;&gt;
				 &lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5-7551.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Marriage Registry]&quot; align=&quot;left&quot; /&gt;&lt;/a&gt;
				&lt;p&gt;
				Today Chiz, Hikari and I were lucky enough to join Robert and Lynne, and
				their friends and family at Eden Gardens in North Ryde
				to celebrate their wedding. It was a very happy and relaxed wedding,
				very fitting for Robert and Lynne. Congratulations to you both.
				&lt;p&gt;
				Photos &lt;a href=&quot;http://www.verge.net.au/~horms/gallery/robert-and-lynne-wedding/&quot;&gt;here&lt;/a&gt;
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">GHC 6.12.1 in Debian Testing.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/Debian/ghc6.12_testing.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/03/14/ghc6.12_testing.atom</id>
		<updated>2010-03-14T07:58:00+00:00</updated>
		<content type="html">&lt;p&gt;
Joachim Breitner recently
	&lt;a href=&quot;http://lists.debian.org/debian-haskell/2010/03/msg00102.html&quot;&gt;
	announced&lt;/a&gt;
on the
	&lt;a href=&quot;http://lists.debian.org/debian-haskell/&quot;&gt;
	Debian Haskell mailing list&lt;/a&gt;
that version 6.12.1 of the Glasgow/Glorious Haskell compiler was about to
transition from Debian unstable to Debian testing.
That has now happened.
This means there is a very good chance it will be part of the next stable
release of Debian.
&lt;/p&gt;

&lt;p&gt;
A big thanks is due to Kari Pahula, the Debian maintainer for GHC  who managed
to get this version of GHC working on a bunch of CPU  architectures not
officially supported by the upstream GHC maintainers.
Deserving of equal attention are Joachim Breitner and Marco Túlio Gontijo e
Silva who did a large amount of real quality work to improve the way Haskell
libraries are packaged in Debian.
&lt;/p&gt;

&lt;p&gt;
The big change recently was drastic improvements in the way library dependencies
are tracked across packages which will make it much easier to write tools to
automatically check for broken dependency chains.
Packaging Haskell libraries for Debian is now a relatively trivial and fool
proof exercise.
Packaging a library which is on
	&lt;a href=&quot;http://hackage.haskell.org/packages/archive/pkg-list.html&quot;&gt;
	Hackage&lt;/a&gt;
can take as little as 5 minutes.
&lt;/p&gt;

&lt;p&gt;
With the current version of GHC in Debian and a large and growing collection of
Haskell libraries, writing Haskell code on Debian using nothing but Debian
packages is now a pleasure.
Ubuntu and other Debian and Ubuntu derived distributions of course also benefit
from this work.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #22.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-22.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/03/13/fp-syd-22.atom</id>
		<updated>2010-03-13T00:57:00+00:00</updated>
		<content type="html">&lt;p&gt;
On Thursday February 25th we held the first meeting for 2010 of the Sydney
Functional Programming group.
The meeting was held at Google's Sydney offices and we had 17 people show up
to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had your correspondent (Erik de Castro Lopo), giving a
presentation titled
	&lt;a href=&quot;http://groups.google.com/group/fp-syd/web/hacking-ddc.pdf&quot;&gt;
	&quot;Hacking DDC&quot;&lt;/a&gt;
on my bug fixing work on Ben Lippmeier's 
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/DDC&quot;&gt;
	DDC compiler&lt;/a&gt;.
I explained a little about what DDC and Disciple were; a Haskell like language
with some interesting extensions to the type system.
I then suggested that anyone curious as to why these extensions were interesting
should read the first chapter of Ben's PhD thesis
	&lt;a href=&quot;http://cs.anu.edu.au/~Ben.Lippmeier/project/thesis/thesis-lippmeier-sub.pdf&quot;&gt;
	&quot;Type Inference and Optimisation for an Impure World&quot;&lt;/a&gt;.
I then went on how using Darcs for the revision control made it easy to use one
branch per bug or feature I'm working on,  specifically, it allowed me to work
on one until I got stuck and then move on to another without the debugging of
the first interfering with the second.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was Tim Docker who gave us an explanation
of a Domain Specific Language (DSL) for handling dates in financial systems.
Code written in his DSL looked a lot like Ocaml, but the implementation was in
C++.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Tim for presenting and Google for providing the meeting venue
and the snacks.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Intel Embedded Graphics Driver Fail.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/Embedded/intel_graphics_fail.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/03/11/intel_graphics_fail.atom</id>
		<updated>2010-03-11T09:24:00+00:00</updated>
		<content type="html">&lt;p&gt;
In my day job I do Linux embedded work and as people in the embedded world know,
Linux is a pretty commonly used embedded OS.
Today I was evaluating a new board and found it had an Intel graphics chip that
was not properly detected by Ubuntu 9.10.
The ever trusty &lt;tt&gt;&lt;b&gt;lspci&lt;/b&gt;&lt;/tt&gt; said this:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  00:02.0 VGA compatible controller: Intel Corporation System Controller Hub
        	(SCH Poulsbo) Graphics Controller (rev 07)

&lt;/pre&gt;

&lt;p&gt;
We all know that Intel employs a bunch of well known
	&lt;a href=&quot;http://www.x.org/wiki/&quot;&gt;
	Xorg&lt;/a&gt;
developers, so this shouldn't be a problem, right?
&lt;/p&gt;

&lt;p&gt;
Unfortunately, it is a problem.
Intel's offering for this chipset is the
	&lt;a href=&quot;http://edc.intel.com/Software/Downloads/IEGD/&quot;&gt;
	Intel® Embedded Graphics Drivers&lt;/a&gt;
web page where they offer a 124 megabyte download (registration required).
After registration you get to choose which driver pack you want and which OS
you are downloading it for.
Ubuntu was not on the list and neither was Debian.
I chose Fedora 10 (released in 2008) as that was the most recent one.
&lt;/p&gt;

&lt;p&gt;
Now, you can image my surprise when the driver download for Fedora Linux
contained just four files:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  Archive:  /tmp/IEGD_10_3_GOLD.zip
      testing: UsersGuide_10_3_1525.pdf   OK
      testing: IEGD_10_3_GOLD_1525.exe    OK
      testing: IEGD_SU_10_3_GOLD.pdf      OK
      testing: RELNOTES_10_3_1525.txt     OK
  No errors detected in compressed data of /tmp/IEGD_10_3_GOLD.zip.

&lt;/pre&gt;

&lt;p&gt;
Yep, thats right, the driver download for Fedora Linux contains two PDF files,
a text file and an executable installer for &lt;i&gt;Windows&lt;/i&gt;.
&lt;/p&gt;

&lt;p&gt;
Being the curious (and paranoid) type I decided to explore this further,
by running the installer under
	&lt;a href=&quot;http://www.winehq.com/&quot;&gt;
	WINE&lt;/a&gt;
in a
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Chroot&quot;&gt;
	chroot&lt;/a&gt;.
After the installer you get left with several metric craploads of Java Jar
files, and another windows executable &lt;tt&gt;&lt;b&gt;iegd-ced.exe&lt;/b&gt;&lt;/tt&gt; that
supposedly configures this nightmare.
I ran it (again, under WINE in a chroot) but it didn't seem to do anything
sensible or worthwhile so I looked around amongst the other installed files
and found &lt;tt&gt;&lt;b&gt;IEGD_10_3_Linux.tgz&lt;/b&gt;&lt;/tt&gt;.
&lt;/p&gt;

&lt;p&gt;
Inside that tarball there are a bunch of Xorg library binaries (for several
different versions of Xorg), a large chunk of source code that gets compiled
into the Linux kernel and even better yet, a couple of Microsoft Visual
Studio project files.
WTF?
&lt;/p&gt;

&lt;p&gt;
Unbe-fscking-lievable.
Needless to say, I will avoid any hardware which uses this chipset and
any other hardware that requires binary only kernel blobs packaged this
badly.
Doing so makes my life easier.
&lt;/p&gt;

&lt;p&gt;
The people at Intel who thought this was a good idea must have their own
personal mother-lode of stupid.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Goanna 1.2 released</title>
		<link href="http://redlizards.com/blog/development/goanna-12-released/"/>
		<id>http://redlizards.com/blog/?p=420</id>
		<updated>2010-03-10T10:50:09+00:00</updated>
		<content type="html">&lt;p&gt;Goanna version 1.2 has been released. &lt;a href=&quot;http://redlizards.com/download.html&quot;&gt;Download&lt;/a&gt; it now.&lt;/p&gt;
&lt;p&gt;The major change is More Checks, in fact 40% more than were previously available in v1.1. Over the next few months we will continue to add new checks with each release. You can expect to see up to 100 additional high quality checks within the coming 6 months, which as usual will be free for all existing customers. Additionally, should you require a 30 day Trial Extension for your version 1.2 update please complete this &lt;a href=&quot;http://redlizards.com/trial-extension&quot;&gt;trial extension request form&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are also very pleased to announce the Beta release of &lt;a href=&quot;http://redlizards.com/download.html&quot;&gt;Goanna for Command Line&lt;/a&gt;. This new command line version enables more flexibility and freedom for those wishing to integrate our powerful C/C++ static analyzer into their own development process. The Beta is currently available for Linux users and a version for Windows users is scheduled to be available in May. Linux users can now access a fully gcc-compatible solution integrated with over 60 classes of flow-sensitive quality checks to detect critical bugs as early as possible in the development cycle.&lt;/p&gt;
&lt;p&gt;Inter-procedural analysis is also well under way, so stay tuned for a public Beta release soon!&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Visual Studio 2010</title>
		<link href="http://redlizards.com/blog/development/visual-studio-2010/"/>
		<id>http://redlizards.com/blog/?p=411</id>
		<updated>2010-03-05T01:42:10+00:00</updated>
		<content type="html">&lt;p&gt;We&amp;#8217;re proud to have been selected for simultaneous shipment of our Goanna static analysis extension with Microsoft Visual Studio 2010. Here is a short introductory video demonstrating our Visual Studio 2010 integration, and we&amp;#8217;re on schedule for April release:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We have some further news regarding recent developments (more high quality checks being one) and we&amp;#8217;ll be posting more information next week.&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Conroy : Is He a Duck?</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/Politics/conroy.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/02/20/conroy.atom</id>
		<updated>2010-02-19T21:26:00+00:00</updated>
		<content type="html">&lt;p&gt;
The Australian Federal Minister for Communications, Stephen Conroy, may not
actually be corrupt; I certainly have no evidence that he is, but a number of
recent incidents sure look like corruption to me.
For instance:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Conroy's recommendation of a
	&lt;a href=&quot;http://news.smh.com.au/breaking-news-national/conroy-suggested-alp-staffer-for-nbn-job-20100208-nn5h.html&quot;&gt;
	former ALP Staffer&lt;/a&gt;
	for a highly paid senior position (government relations) with the National
	Broadband Network an organisation operating in the area of Conroy's
	ministry.
	&lt;/li&gt;

&lt;li&gt;
	Conroy 
	&lt;a href=&quot;http://www.smh.com.au/national/stephen-conroy-forced-to-defend-round-of-golf-with-packer-20100219-ojia.html&quot;&gt;
	playing golf with billionaire media mogul James Packer&lt;/a&gt;
	on the same day the government announced a $250 million licence fee rebate
	for free-to-air television stations (one of which is owned by Packer).
	&lt;/li&gt;
&lt;li&gt;
	Conroy
	&lt;a href=&quot;http://news.smh.com.au/breaking-news-national/conroystokes-ski-trip-not-planned-mp-20100215-o2q1.html&quot;&gt;
	skiing with media mogul Kerry Stokes in Colorado&lt;/a&gt;
	a month before the $250 million licence fee rebate was announced.
	James Packer and Kerry Stokes are the owners of 2 of the 3 main
	non-government free-to-air television stations.
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The real irony is that under
	&lt;a href=&quot;http://www.smh.com.au/opinion/society-and-culture/internet-filter-laws-need-urgent-public-debate-20091216-kwdk.html&quot;&gt;
	Conroy's proposed scheme to filter the internet in Australia&lt;/a&gt;
comments like this blog entry may end up being censored.
The problem with Conroy's filter is not that it filters porn, but rather that
the list of what is being filtered is secret and hence could easily include
web sites which contain comments which the government or the Minister for
Communications want silenced.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">More Fun Tracing Parallel Haskell Programs</title>
		<link href="http://justtesting.org/more-fun-tracing-parallel-haskell-programs"/>
		<id>http://justtesting.org/more-fun-tracing-parallel-haskell-programs</id>
		<updated>2010-02-19T07:08:17+00:00</updated>
		<content type="html">&lt;p&gt;
	I recently wrote about profiling&amp;nbsp;&lt;a href=&quot;http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w&quot;&gt;sparse-matrix vector multiplication&lt;/a&gt;&amp;nbsp;implemented with&amp;nbsp;&lt;a href=&quot;http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell&quot;&gt;Data Parallel Haskell&lt;/a&gt;. &amp;nbsp;Let's take this a step further and look at a program parallelised with&amp;nbsp;&lt;a href=&quot;http://hackage.haskell.org/package/parallel&quot;&gt;package parallel&lt;/a&gt;, instead of Data Parallel Haskell.&amp;nbsp;&amp;nbsp;Specifically, we look at the dense&amp;nbsp;&lt;a href=&quot;http://darcs.haskell.org/nofib/parallel/matmult/MatMult.hs&quot;&gt;matrix-matrix multiplication benchmark&lt;/a&gt;&amp;nbsp;of the parallel section of the nofib benchmark suite. &amp;nbsp;This benchmark uses a linewise version of the torus-based Gentleman algorithm implemented with vanilla Haskell lists. &amp;nbsp;As we see in the following profile, the algorithm parallelises very well on two cores. &amp;nbsp;It also has a low allocation rate; hence, there is little garbage collection.&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/MYWS15snOTc7Law8v7Y1rAXVpL2Fgcl8YnjV8tYA12xgXRTG0Kkn8t76KxC1/matmult-600-1-10.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/SJ6pkfwfX7R1iPYqnn9zqknHouQc59ZtWoUQHemzeb7AcTMnJV4QHVR3fgBP/matmult-600-1-10.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;103&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;In the above profile and that of the&amp;nbsp;&lt;a href=&quot;http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w&quot;&gt;sparse-matrix vector multiplication&lt;/a&gt;&amp;nbsp;that I showed in my previous post, the width of the time slices of the mutator threads and of garbage collection are determined by the &lt;i&gt;wall clock time&lt;/i&gt; of the &lt;span&gt;run-thread&lt;/span&gt;/&lt;span&gt;stop-thread&lt;/span&gt; and &lt;span&gt;gc-start&lt;/span&gt;/&lt;span&gt;gc-end&lt;/span&gt; events, respectively. &amp;nbsp;These events are generated by the Haskell thread scheduler and &lt;i&gt;do not&lt;/i&gt;&amp;nbsp;—they cannot— take the OS scheduling of the Haskell Execution Contexts (HECs) running Haskell threads into account. &amp;nbsp;In other words, a Haskell thread may be scheduled on a HEC for a long time, but if the HEC itself (i.e., the operating thread on which it executes) is descheduled by the operating system, then the Haskell thread still won't make any progress. &amp;nbsp;To visualise this effect, the custom instruments used here also support graphing the virtual time that expired in a time slice. &amp;nbsp;The following profile is a slightly magnified version of the initial portion of the previous profile, where the height of a mutator time slice indicates its virtual extent. &amp;nbsp;The screenshot also shows the configuration pane for one mutator track. &amp;nbsp;The virtual extent of time slices in the garbage collection pane can also be displayed in this alternative form, although that is not shown here.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/lNbJL2f7RWR1OpGLfiXIShmhLF2DRqeIsSX9E4lLc0GT5bzeXwLkuncDRITs/matmult-time-slices.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/EaMNVnFKDSXtmkn5OIYjroIbIetyBq6dX8xI7MmBmanVYaCeFZ4sKQSWO2eW/matmult-time-slices.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;195&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The custom instruments for GHC provide addition information that is by default not displayed in the track pane, including the wall clock percentage during which the runtime performs garbage collection and the percentage of utilisation of the mutators threads. &amp;nbsp;However, all information is accessible via Instrument's tabular detail view. &amp;nbsp;In particular, the library function &lt;span&gt;GHC.Exts.traceEvent&lt;/span&gt; can be used to inject user-defined messages into the event stream. &amp;nbsp;In the DPH benchmarking framework, we use this for example to delimit the start and end of the benchmark payload, as opposed to benchmark set up, data generation, and tear down code. &amp;nbsp;The following snapshot shows part of the detail view for the&amp;nbsp;&lt;a href=&quot;http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w&quot;&gt;sparse-matrix vector multiplication&lt;/a&gt;&amp;nbsp;benchmark, where the event indicating the start of benchmarking is highlighted.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/W1QpvtBWhB1rLVXGFfVeS3IAUU9nNBI6il9H8dOJRsLI7RmftqjTDJoBKQ9E/smvm-detailed-marked.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/l2sR2aMo1oF3mRy2plUzjknsefpjOhgj5SNSIpfReKVZkqsUfekAdgu4woJF/smvm-detailed-marked.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;276&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;By clicking on the user message events in the detail view, we can easily mark the relevant section of the profile — it is the section highlighted in blue. &amp;nbsp;Below, we see that the sequential part of the profile is only part of the set up, but not of the benchmarked code.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/a6GXPavv9S80tu141yW2VMmXAmoSgjzZ4cEbQULECVmvgXs2q74RzM2RGx2q/smvm-marked.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/hi7flpanhCw5OKQ1uvPhzmE9AHm0lgib5sadwDO6cU8X4AX8oQODo6sMb5Qy/smvm-marked.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;109&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;If you like to try for yourself, download the trace template&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/haskell/dtrace/GHC%20HEC%202-core.tracetemplate&quot;&gt;GHC HEC 2-core&lt;/a&gt;&amp;nbsp;and use it in Instruments.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;A current caveat:&lt;/b&gt; Instruments supports zooming the track views horizontally (on the time axis) with a slider. &amp;nbsp;Unfortunately, in version 2.0.1 of Instruments, the maximum resolution is not sufficient to see the exact relative timing of mutator and garbage collection time slices if garbage collection is very frequent. &amp;nbsp;Moreover, when using the &lt;i&gt;Block Graph&lt;/i&gt;&amp;nbsp;style, blocks that are very closely spaced may be coloured very lightly or appear transparent — if you are suspicious of a section that seems to show no activity in a profile, use the &lt;i&gt;Peak Graph&lt;/i&gt;&amp;nbsp;style to double check. &amp;nbsp;Instruments collects all the data to provide a better resolution; it's just a matter of supporting a wider range in the zoom slider. &amp;nbsp;(If anybody knows a work around for that, please post it in the comments.)&lt;/div&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/more-fun-tracing-parallel-haskell-programs&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/more-fun-tracing-parallel-haskell-programs#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Tracing Sparse Matrix-Vector Multiplication with DTrace</title>
		<link href="http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w"/>
		<id>http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w</id>
		<updated>2010-02-14T10:10:46+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;div&gt;The following is an example trace of a&amp;nbsp;&lt;a href=&quot;http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell&quot;&gt;Data Parallel Haskell&lt;/a&gt;&amp;nbsp;program multiplying a sparse matrix (10k x 10k elements with 10% non-zero elements) with a dense vector. &amp;nbsp;The program runs on both cores of an Intel Core 2 Duo processor and uses&amp;nbsp;&lt;a href=&quot;http://hackage.haskell.org/trac/ghc/wiki/DTrace&quot;&gt;GHC's new DTrace support&lt;/a&gt;&amp;nbsp;on Mac OS X to gather the trace data, which I visualised in&amp;nbsp;&lt;a href=&quot;http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html&quot;&gt;Instruments&lt;/a&gt;. &amp;nbsp;Of the three tracks, the topmost shows garbage collection activity in blue. &amp;nbsp;The other two show the activity of the two HECs (Haskell Execution Contexts) running the application code on two cores in green. &amp;nbsp;The program starts by loading the matrix from disk and generating a random vector — this is where only HEC #1 does any work. &amp;nbsp;Then, during the actual matrix multiplication, both cores are utilised almost evenly.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/7LqjMXtxx1F1DxAhwOskq2SBywIAwwxPDcCjCcIL639YS9pKj8ciNuAstknW/prim.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/rq4pdEuGtRPMTkBLx6CXQFULgmbGrOH4uQWQbFgb4QQzjgvwHnZnD760fGNN/prim.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;127&quot; /&gt;&lt;/a&gt;
&lt;p&gt;&lt;/p&gt;&lt;div&gt;There is little garbage collection during the parallel matrix multiplication as GHC successfully unboxes the numeric code resulting in little heap allocation.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/tracing-sparse-matrix-vector-multiplication-w#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Communication</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-02-02T15_06_07.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-02-02T15_06_07.shtml</id>
		<updated>2010-02-02T04:06:07+00:00</updated>
		<content type="html">&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5_1901.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Chiz at the Kamakura Daibutsu]&quot; align=&quot;left&quot; /&gt;
				&lt;p&gt;
				Is it ok to use chat to communicate with my wife?&lt;br /&gt;
				If she is sitting at the next desk?&lt;br /&gt;
				If there is a sleeping baby in between?
				&lt;p&gt;
				Is any of this relevant if she laughs?
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Australia Day Fireworks</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-01-27T00_47_52.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2010/2010-01-27T00_47_52.shtml</id>
		<updated>2010-01-26T11:47:52+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.vergenet.net/~horms/gallery/australia-day-2010/&quot;&gt;
				&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5_7334.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Fireworks]&quot; align=&quot;right&quot; /&gt;&lt;/a&gt;
				This evening 
				Chiz, Hikari and I went down to Darling Harbour to watch the Australia Day
				Fireworks. Although there were rather a lot of people down there we managed
				to find a good vantage point. Close enough to be impressed by the
				show. Much to my surprise I managed to take some reasonable snaps
				of the show.
				Photos
				&lt;a href=&quot;http://www.vergenet.net/~horms/gallery/australia-day-2010/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;right&quot; /&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Golden Section - Jumping the Gun (1993).</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/Music/golden_section_jumping.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/01/25/golden_section_jumping.atom</id>
		<updated>2010-01-25T11:04:00+00:00</updated>
		<content type="html">&lt;p&gt;
Almost two decades ago, when I was at university I played bass guitar in a couple
of rock bands; Golden Section and Fishtank.
Both bands playing an all original set although Golden Section did cover a song
by Fishtank and Fishtank had a song without lyrics but found by accident that
the lyrics to the Beatles' &quot;Lucy in the Sky with Diamonds&quot; worked, despite our
melody being different.
&lt;/p&gt;

&lt;p&gt;
Recently one of my bands mates in Golden Section posted a video of Golden Section
playing live at the Palais Hotel in Newcastle (Australia) in 1993.
The first real glimpse of me playing bass is at 1:10.
&lt;/p&gt;

&lt;br /&gt;

&lt;center&gt;

	
	

&lt;/center&gt;

&lt;br /&gt;

&lt;p&gt;
Playing in Golden Section was just so much fun!
Working up to the 1991 Newcastle University Band Competition (which we won) we
were rehearsing twice a week and as a result reached a state where the band
synced like clockwork.
We could play light and reasonably heavy (Fishtank was heavier) and we were
even a bit funky on certain songs.
&lt;/p&gt;

&lt;p&gt;
I absolutely loved playing in this band.
Good times, good memories.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">Profiling Garbage Collection in Haskell with DTrace &amp;amp; Instruments</title>
		<link href="http://justtesting.org/profiling-garbage-collection-in-haskell-with"/>
		<id>http://justtesting.org/profiling-garbage-collection-in-haskell-with</id>
		<updated>2010-01-24T12:54:20+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;div&gt;&lt;span&gt;&lt;span&gt;I &lt;span&gt;recently&lt;/span&gt; added&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://justtesting.org/using-dtrace-to-track-scheduler-events-of-ghc&quot; title=&quot;Using DTrace to track scheduler events of GHC's runtime&quot; target=&quot;_self&quot;&gt;&lt;span&gt;DTrace probes to the GHC runtime system&lt;/span&gt;&lt;/a&gt;&lt;span&gt;.&amp;nbsp;&amp;nbsp;In the following, I will explore the use of these probes for profiling the garbage collection behaviour of Haskell programs. &amp;nbsp;Mac OS X comes with a graphical tool, called&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html&quot;&gt;&lt;span&gt;Instruments&lt;/span&gt;&lt;/a&gt;&lt;span&gt;, that supports visualising data gathered with DTrace. &amp;nbsp;Let's start by having a look at visualising the DTrace events &lt;/span&gt;&lt;/span&gt;&lt;span&gt;gc-start&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span&gt;and&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span&gt;gc-end&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;for the standard nfib function (compiled with GHC 6.13 and &lt;/span&gt;&lt;/span&gt;&lt;span&gt;-O&lt;/span&gt;&lt;span&gt;&lt;span&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/5eVkN3PYc1eTJK3XxMGAlCW0GB9lpn9Yx8YurnLsI1J1SjoJEFPEbXFUUNCW/DTrace_GC_nfib_overview.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/G0nsgEv2Gg14NGhR3hoUwS3arKeBnAVShgcRABE9yTwtXpL67wwy0RMnznEW/DTrace_GC_nfib_overview.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;308&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The two most important parts of the Instruments window above are the &lt;i&gt;track pane,&lt;/i&gt;&amp;nbsp;which graphs numerical values computed by the DTrace probes, and the &lt;i&gt;detail pane,&lt;/i&gt;&amp;nbsp;which displays all probe data in a tabular view. &amp;nbsp;Here, the track pane contains graphs for&amp;nbsp;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;ol class=&quot;MailOutline&quot;&gt;&lt;li&gt;time slices of the mutator,&lt;/li&gt;&lt;li&gt;time slices spent on garbage collection,&lt;/li&gt;&lt;li&gt;the running sum of the mutator time slices,&lt;/li&gt;&lt;li&gt;the running sum of garbage collection time slices, and&lt;/li&gt;&lt;li&gt;the running percentage of the runtime spent on garbage collection.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The height of each spike in the graphs is proportional to the length of the time slice (or the running sum), measuring &lt;i&gt;virtual&lt;/i&gt;&amp;nbsp;time (i.e., process time determined using DTrace's &lt;span&gt;vtimestamp&lt;/span&gt;). &amp;nbsp;It is important to note that the x-axis of the Instruments track pane uses &lt;i&gt;wall clock&lt;/i&gt;&amp;nbsp;time instead. &amp;nbsp;(That is crucial when using Instruments to correlate the behaviour of two or more processes or when inspecting overall system behaviour.) &amp;nbsp;This explains the gap about one third into the above run. &amp;nbsp;During that time, the process executing our Haskell program simply was not scheduled by the operating system.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The detail pane in the above screenshot displays the numeric values corresponding to the DTrace events represented as spikes in the track pane. &amp;nbsp;In addition, it also displays the event names.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Overall, our nfib implementation spends very little time on garbage collection, only about 1%. &amp;nbsp;This becomes very clear in the following alternative few of the track pane, where we overlay the time slices for the mutator and garbage collection. Black spikes are mutator time slices, whereas red ones are garbage collection slices.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/xyh3EaRVOF67AOf6fEDoGagUWKiTTbThTyrZjmG9ZxNwJfhvzDQ8jXSVdj2T/DTrace_GC_nfib_overlay.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/p4VcPXpf7kDFqFIBVQF9lHQPhfm1vEGfq65dz9KAm33GsepRD0W5VCjXIgF4/DTrace_GC_nfib_overlay.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;114&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Let's have a look at a look at a more interesting program, namely&amp;nbsp;Andrew Tolmach and Thomas Nordin's&amp;nbsp;&lt;a href=&quot;http://darcs.haskell.org/nofib/gc/constraints/Main.hs&quot;&gt;constraint solver&lt;/a&gt;&amp;nbsp;from the GC portion of the nofib benchmark suite. &amp;nbsp;We compare executing the program with two different heap-size settings, namely with a 10MB versus a 100MB heap (the program was again compiled with GHC 6.13&amp;nbsp;&lt;span&gt;&lt;span&gt;and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;-O&lt;/span&gt;&lt;span&gt;&lt;span&gt;, and we used an input value of 10). &amp;nbsp;With Instruments, we can directly compare the 10MB and the 100MB run.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/OySC1r7FU93C2lgfkfXofsUdRriLMH05soOdRV3SPwQqlEd98PjY3sOBI4bV/DTrace_GC_Constraints_10100_pe.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/AhpH9szONsDqycAzHQ5bvs1xtZAxPjGPgyRRmYbCfZHRYHb4NFRdcreT4xBs/DTrace_GC_Constraints_10100_pe.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;397&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Remember that the x-axis of the track pane is wall clock time — i.e., the constraint solver runs approximately twice as fast with a 100MB than with a 10MB heap. &amp;nbsp;The longer 10MB run shows evenly spaced major garbage collections after an initial startup phase (the red peaks in the second graph from the top). &amp;nbsp;As GHC by default uses a generational garbage collector, we see many small red events in between the major collections — these correspond to the much less time consuming minor collections. &amp;nbsp;Except in the start up phase, the mutator graph has only very short peaks, and overall garbage collection accounts for more than half of the overall runtime.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The 100MB run presents a dramatically different picture. &amp;nbsp;Here, we only have three time consuming garbage collection events during the whole program execution. &amp;nbsp;Other than that, there are only (barely visible in the screenshot) minor collections that briefly interrupt the mutator. &amp;nbsp;Overall, the program only spends 14% of its runtime on garbage collection. &amp;nbsp;The graph of the 100MB run clearly illustrates that we graph events (as peaks) and the gaps between events are event free. &amp;nbsp;The height of a peak is the virtual duration of the corresponding mutator or garbage-collection time-slice and it will only correspond to the gap between events if the process was continuously running. &amp;nbsp;In addition to graphing peaks, Instruments supports block diagrams, too — here, the same two program runs using a block diagram.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/44wo6g15iBaifNILkv8crJJFnS5ss2l5zhAnDqCDSG7RXs4WwQzIlYc3Qf8S/DTrace_GC_Constraints_10100_bl.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/8G0FnIKfw4j6xybY9SW3ks9D9Vey2kQbZXDw1Xb14WDtOBFgbEBkD4sLIyxT/DTrace_GC_Constraints_10100_bl.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;397&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;The height of a block still corresponds to a virtual time slice and its width is wall clock time. &amp;nbsp;In the same manner as we overlayed the peak diagrams of the mutator and garbage-collection time-slices in the nfib example, we can do so with block diagrams.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/ZqEB86HmLonj1oeYT9Dqmlq84bdeYeZrK4EJllkbez3WelawyuysLPj4TGMp/0DTrace_GC_Constraints_10100_bl.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/JTnyLG65RcQu2za42xho4YXC1HTnGQsxcMTDdSHD5FB15JekqVClDOlVLVgK/0DTrace_GC_Constraints_10100_bl.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;166&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;For simple diagrams, this may seem to be the most easily understood graph. &amp;nbsp;However, its interpretation does require some care. &amp;nbsp;The human mind likes to assign meaning to the &lt;i&gt;area&lt;/i&gt;&amp;nbsp;of the blocks in a block diagram, but that leads to the wrong intuition here. &amp;nbsp;In the above figure, the 10MB run appears to be entirely dominated by the red garbage collection blocks. &amp;nbsp;Although garbage collection accounts for a hefty 65% of the execution time, the diagram suggests that the mutator makes nearly no progress, which is an incorrect conclusion. &amp;nbsp;To avoid such misinterpretation, peak diagrams are the default.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;You may like to argue that Instruments should arrange for block diagrams to use the area of blocks in such a manner that it is consistent with an intuitive interpretation. &amp;nbsp;However, this runs contrary to using wall clock time for the x-axsis and the event value for the y-axsis (that is the height of a peak or block), which in turn is important to understand overall system behaviour and to correlate multiple processes. &amp;nbsp;Let's look at a simple example, where wall clock time matters. &amp;nbsp;The following is a profile of GHC itself when compiling a small Haskell program — in fact, it is compiling the previous constraint-solver benchmark.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/gUk1o1yAI6cuKeuT7eRPVlwYVYEcBnpHfY0UArBT604mND9pEMpQfSgLrGo3/DTrace_GC_ghc_compile.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/BQOXAP5leqKv4rgtPPAuxq8V34mJ5Ehu2dyWHoKQwo6JQUwUvbKla2wCFI8W/DTrace_GC_ghc_compile.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;161&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;We notice two points: firstly, GHC spends quite a bit of time on garbage collection —45% of its runtime, to be precise— and secondly, there is a big gap in the end, where nothing appears to happen. &amp;nbsp;Indeed, we can verify that the process executing GHC is not active by adding another instrument that profiles process activity (the Instruments application comes with a whole library of pre-defined instruments).&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/QPtTqe8ScJNTMt0gyhWlOi23raWmrpqZguDuqP2asJirCrWmlf4ZKWNpqei8/DTrace_GC_ghc_compiler_cpu-usa.png&quot;&gt;&lt;img src=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/lg2jqWVFZ0m3s7CGl3IrKcPU3YWtgMuCrUjQuEsO9BXJTFgF8y4htbwWxrTU/DTrace_GC_ghc_compiler_cpu-usa.png.scaled.500.jpg&quot; width=&quot;500&quot; height=&quot;243&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;GHC invokes the system assembler and linker to produce an executable. &amp;nbsp;This obviously accounts for a large fraction of the overall execution time.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;If you like to try this for yourself, you need to&amp;nbsp;&lt;a href=&quot;http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSources&quot;&gt;build the current GHC HEAD (6.13)&lt;/a&gt;&amp;nbsp;and get this trace template for Instruments:&amp;nbsp;&lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/haskell/dtrace/GHC%20GC%20single.tracetemplate&quot;&gt;GHC GC single&lt;/a&gt;. &amp;nbsp;This trace template is designed for single-threaded programs — i.e., programs linked against the vanilla GHC runtime without the &lt;span&gt;-threaded&lt;/span&gt; link-time option. &amp;nbsp;DTrace support for GHC is currently only implemented for Mac OS X. &amp;nbsp;However, it shouldn't be hard to port to another DTrace implementation (contact me if you need advise). &amp;nbsp;I don't know whether graphical DTrace frontends are available on other platforms. &amp;nbsp;To profile GHC's garbage collection and multi-threading behaviour, you can also use&amp;nbsp;&lt;a href=&quot;http://code.haskell.org/ThreadScope/&quot;&gt;ThreadScope&lt;/a&gt;&amp;nbsp;(which I found difficult to build on Mac OS).&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/profiling-garbage-collection-in-haskell-with&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/profiling-garbage-collection-in-haskell-with#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">In Search of the Linux Laptop.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/Tech/search_laptop.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/01/07/search_laptop.atom</id>
		<updated>2010-01-07T11:14:00+00:00</updated>
		<content type="html">&lt;p&gt;
I'm shopping for a laptop to run Linux on and I'm finding it a really
frustrating process.
I would like a high end, small form factor machine like the
	&lt;a href=&quot;http://www1.ap.dell.com/au/en/business/notebooks/laptop-studio-xps-13/pd.aspx?refid=laptop-studio-xps-13&amp;s=bsd&amp;cs=aubsd1&quot;&gt;
	Dell Studio XPS 13&lt;/a&gt;.
I've seen one of these machines in the real life and held it in my hands.
It seems to be excellent quality and have the right features at a reasonable
price.
Unfortunately, on the Dell Australia web site, there is no option to purchase
this machine with Linux pre-installed.
&lt;/p&gt;

&lt;p&gt;
My current laptop is a Dell Latitude X1, and my wife has a Dell too.
At work I have a Dell Precision workstation.
All of these machine run Linux 100% of the time and for every single one
of these machines I had to pay for a Microsoft Windows license that was
never used.
As most people know, Microsoft uses a small portion of its revenue to fund
attacks on Linux and Free/Open Source Software like
	&lt;a href=&quot;http://en.wikipedia.org/wiki/SCO-Linux_controversies&quot;&gt;
	the SCO debacle&lt;/a&gt;
and
	&lt;a href=&quot;http://arstechnica.com/old/content/2008/05/ooxml-revolt-brewing-three-countries-appeal-iso-approval.ars&quot;&gt;
	the ramming of OOXML through the ISO standards process&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Considering Microsoft's malignant presence in the computer industry and the fact
that I don't use their products makes me reluctant to buy a machine with Windows
pre-installed.
I want to buy a laptop where I get my operating system of choice and just as
importantly, I know Microsoft doesn't get any part of the money I pay.
&lt;/p&gt;

&lt;p&gt;
Looking around for laptops with Linux pre-installed in Australia I
found
	&lt;a href=&quot;http://www.vgcomputing.com.au/&quot;&gt;
	VG Computing&lt;/a&gt;
who have a range of laptops which can be shipped with Linux.
Unfortunately, their
	&lt;a href=&quot;http://www.vgcomputing.com.au/nsacerTM6293-63A51.850ZE.html&quot;&gt;
	order page&lt;/a&gt;
says that they get the machines with Windows which they remove to install
Linux.
I do realise that as a small vendor, there is not much that VG can do about
this, but as far as I am concerned, thats a fail.
&lt;/p&gt;

&lt;p&gt;
Another company thats been around for ages is 
	&lt;a href=&quot;http://www.pioneercomputers.com.au/&quot;&gt;
	Pioneer Computers&lt;/a&gt;
but their machines always seemed a bit old, a bit under powered and a bit over
priced.
Looking at that site just recently I found their
	&lt;a href=&quot;http://www.pioneercomputers.com.au/products/configure.asp?c1=3&amp;c2=166&amp;id=2801&quot;&gt;
	DreamBook Light M73&lt;/a&gt;
which was close to what I was looking for.
Ordering machines from Pioneer with Windows XP costs $89 more than the same
machine with Ubuntu.
Purchased with Linux, this is genuinely a Microsoft free machine.
&lt;/p&gt;

&lt;p&gt;
Taking a trip out to Pioneer in Alexandria I was able to see one up close and I
must say I was disappointed.
Compared to the Dell XPS 13, the DreamBook felt flimsy and poorly constructed.
On top of that the DreamBook had a smaller keyboard (much like the Compaq M300
I had years ago) than than the Dell and SiS graphics whereas I was really
hoping for Nvidia.
Another machine crossed off the list.
&lt;/p&gt;

&lt;p&gt;
In the US, there are a number vendors that sell laptops with Linux.
In late November 2009 I contacted two of them,
	&lt;a href=&quot;http://system76.com/&quot;&gt;
	System 76&lt;/a&gt;
and
	&lt;a href=&quot;http://www.zareason.com/&quot;&gt;
	ZaReason Inc&lt;/a&gt;.
System 76 wasn't willing to ship to Australia for warranty reasons.
ZaReason will ship to Australia, but to take advantage of any warranty work,
I'd have to ship the machine to and from the US which would be rather
inconvenient.
&lt;/p&gt;

&lt;p&gt;
Despite the concerns over warranty, by early December 2009 I had come to the
decision to purchase a
	&lt;a href=&quot;http://www.zareason.com/shop/product.php?productid=16218&amp;cat=250&amp;page=1&quot;&gt;
	ZaReason Alto 3550&lt;/a&gt;
with a bunch of extras like faster CPU, more RAM and a bigger disk.
Unfortunately, while trying to purchase it online I ran afoul of their payment
system and by the time we'd figured that out they had run out of stock.
&lt;/p&gt;

&lt;p&gt;
I contacted them and asked about the ETA for new stock.
They said, Dec 19th, which came and went with no new stock on the website.
I contacted them again and was told another week.
A week passed with no new stock so I contacted them again when I was informed
that their distributor doesn't have any more of the Alto 3550 available.
I would go for the
	&lt;a href=&quot;http://www.zareason.com/shop/product.php?productid=16213&amp;cat=250&amp;page=1&quot;&gt;
	Alto 2550&lt;/a&gt;
but that has an Intel graphics chip whereas I was hoping for an Nvidia like
in the Alto 3550.
&lt;/p&gt;

&lt;p&gt;
So now I have to decide, do I go with the ZaReason Alto 2550 with the Intel
chip and then worry about warranty issues or do I buy the Dell locally, where
I know that the support and service will be excellent and then try to get a
refund for the Windows license I don't need or want.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Debugging Memory Leaks in a GTK+ House of Cards.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/house_of_cards.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2010/01/03/house_of_cards.atom</id>
		<updated>2010-01-03T00:38:00+00:00</updated>
		<content type="html">&lt;p&gt;
Recently I've been hacking on
	&lt;a href=&quot;http://blog.kfish.org/&quot;&gt;
	Conrad Parker&lt;/a&gt;'s
sound editing, audio mangling and DJing tool
	&lt;a href=&quot;http://www.metadecks.org/software/sweep/&quot;&gt;
	Sweep&lt;/a&gt;.
As part of my
	&lt;a href=&quot;http://trac.metadecks.org/timeline?from=01%2F01%2F10&amp;daysback=30&amp;changeset=on&quot;&gt;
	bug fixing and clean up work&lt;/a&gt;
I ran Sweep under the Linux world's favourite memory debugging tool
	&lt;a href=&quot;http://valgrind.org/&quot;&gt;
	Valgrind&lt;/a&gt;.
Even after running valgrind with the
	&lt;a href=&quot;http://live.gnome.org/Valgrind&quot;&gt;
	officially sanctioned&lt;/a&gt;
environment variables and gtk suppressions file, the resulting 
	&lt;a href=&quot;http://www.mega-nerd.com/erikd/Blog/files/sweep-valgrind.txt.gz&quot;&gt;
	500k gzipped output file&lt;/a&gt;
was a little shocking.
&lt;/p&gt;

&lt;p&gt;
Now I'm pretty sure a number of those leaks are in Sweep, but a significant
number of them seem to be in GTK+ and Glib.
Since trying to differentiate the leaks in Sweep from the leaks in GTK+ was
proving to be a very difficult and frustrating task I decided to look at the
behaviour of a simple GTK+ program under Valgrind.
The program I chose was the
	&lt;a href=&quot;http://library.gnome.org/devel/gtk-tutorial/stable/c39.html#SEC-HELLOWORLD&quot;&gt;
	helloworld&lt;/a&gt;
example from the
	&lt;a href=&quot;http://library.gnome.org/devel/gtk-tutorial/stable/&quot;&gt;
	GTK+ tutorial&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Compiling that on Ubuntu 9.10 and running it under valgrind using the following
commands:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  export G_SLICE=always-malloc
  export G_DEBUG=gc-friendly
  valgrind --tool=memcheck --leak-check=full --leak-resolution=high \
    --num-callers=50 --show-reachable=yes --suppressions=gtk.suppression \
    helloworld &gt; helloworld-vg.txt 2&gt;&amp;amp;1

&lt;/pre&gt;

&lt;p&gt;
resulted in a memcheck summary of:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  ==22566== LEAK SUMMARY:
  ==22566==    definitely lost: 1,449 bytes in 8 blocks
  ==22566==    indirectly lost: 3,716 bytes in 189 blocks
  ==22566==      possibly lost: 4,428 bytes in 107 blocks
  ==22566==    still reachable: 380,505 bytes in 7,898 blocks
  ==22566==         suppressed: 35,873 bytes in 182 blocks

&lt;/pre&gt;

&lt;p&gt;
The full memcheck report is
	&lt;a href=&quot;http://www.mega-nerd.com/erikd/Blog/files/helloworld-vg.txt.gz&quot;&gt;
	available here&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
The simplest GTK+ hello world program is 100 lines of code and results in a leak
report of over 8000 leaked blocks even when using the recommended valgrind
suppressions file and GTK+ debugging environment variables.
If someone modifies that code and adds another leak, trying to find that leak
needle in the GTK+ leak haystack is going to be a needlessly difficult task.
&lt;/p&gt;

&lt;p&gt;
Researching this some more I find that GTK+ is known to do a large number of
allocations that are done once per program run and are never released.
Furthermore the GTK+ developers seem to think this is ok and from the point of
view of a user running a GTK+ program this is true.
However for developers coding against GTK+ and hoping to use Valgrind to find
leaks in their own code, this is a royal PITA. 
Leaks in the developer's code can  easily be swamped and hidden by GTK+ leaks.
My guess is that most people don't even bother checking unless their program's
memory footprint grows over time for no good reason.
&lt;/p&gt;

&lt;p&gt;
Obviously, I'm not the first to realise how hard it is too debug memory leaks
in a program when the library it links against throws up so many warnings.
In fact, back in 2001
	&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=64096&quot;&gt;
	a bug was raised in the GTK+ bug tracker&lt;/a&gt;
requesting the addition of a call to be used only during debugging that would
release all memory so that client programs are easier to debug.
That bug has remained open and without action for over 8 years.
&lt;/p&gt;

&lt;p&gt;
As far as I am concerned, this is completely unacceptable.
&lt;del&gt;If this was my code, I would be too ashamed to put my name on it.&lt;/del&gt;
&lt;b&gt;Edit:&lt;/b&gt; Being able to valgrind GTK+ client code  is worth the effort and
cost of changing the otherwise perfectly reasonable behaviour of not accounting
for lifetime-of-the-app data structures (thanks Andrew).
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; Anyone who wishes to comment on this can do so
	&lt;a href=&quot;http://www.reddit.com/r/programming/comments/akxak/debugging_memory_leaks_in_a_gtk_house_of_cards/&quot;&gt;
	on reddit&lt;/a&gt;.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">Using DTrace to track scheduler events of GHC's runtime</title>
		<link href="http://justtesting.org/using-dtrace-to-track-scheduler-events-of-ghc"/>
		<id>http://justtesting.org/using-dtrace-to-track-scheduler-events-of-ghc</id>
		<updated>2009-12-13T06:11:27+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;I finally got around to committing my instrumentation of the GHC runtime system with DTrace probes (&lt;a href=&quot;http://www.haskell.org/pipermail/cvs-ghc/2009-December/051785.html&quot; title=&quot;patch applied (ghc): Expose all EventLog events as DTrace probes&quot; target=&quot;_blank&quot;&gt;commit message&lt;/a&gt;). &amp;nbsp;The current set of probes tracks all the events of the eventlog framework used by &lt;a href=&quot;http://code.haskell.org/ThreadScope/&quot; title=&quot;ThreadScope&quot; target=&quot;_blank&quot;&gt;ThreadScope&lt;/a&gt;. &amp;nbsp;A detailed description of the probes is on the new &lt;a href=&quot;http://hackage.haskell.org/trac/ghc/wiki/DTrace&quot; title=&quot;Using DTrace with GHC&quot; target=&quot;_blank&quot;&gt;Using DTrace with GHC&lt;/a&gt;&amp;nbsp;page of the GHC developer wiki.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/using-dtrace-to-track-scheduler-events-of-ghc&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/using-dtrace-to-track-scheduler-events-of-ghc#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #21.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-21.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/12/05/fp-syd-21.atom</id>
		<updated>2009-12-05T05:19:00+00:00</updated>
		<content type="html">&lt;p&gt;
Two weeks ago, on November 19th we held the 21st meeting of FP-Syd, the Sydney
Functional Programming group.
The meeting was held at Google's Sydney offices and we had 22 people show up
to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had repeat offender Mark Wotton give us a presentation titled
	&lt;a href=&quot;http://fp-syd.googlegroups.com/web/haskell-hubris.pdf&quot;&gt;
	&quot;Hubris : A Trojan Horse for Haskell&quot;&lt;/a&gt;
on his project called
	&lt;a href=&quot;http://hackage.haskell.org/package/hubris&quot;&gt;
	Hubris&lt;/a&gt;,
a bridge between Ruby (ie Rails) and Haskell.
The specific use case Mark has in mind for this bridge is call fast compiled
Haskell code from Ruby web code.
The code this is is available at:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  git clone git://github.com/mwotton/HaskellHubris.git
   
&lt;/pre&gt;

&lt;p&gt;
but requires the 6.12 release candidate of the GHC Haskell compiler.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was
	&lt;a href=&quot;http://www.comp.mq.edu.au/~asloane/Site/Home/Home.html&quot;&gt;
	Tony Sloane&lt;/a&gt;
who gave us an introduction to
	&lt;a href=&quot;http://groups.google.com/group/fp-syd/web/sloane-dsl-in-scala.pdf&quot;&gt;
	&quot;Embedding a Rewriting DSL in Scala&quot;&lt;/a&gt;.
Tony's DSL of interest is the
	&lt;a href=&quot;http://strategoxt.org/&quot;&gt;
	Stratego Language&lt;/a&gt;
which he is embedding in Scala using the
	&lt;a href=&quot;http://kiama.googlecode.com/&quot;&gt;
	Kiama library&lt;/a&gt;.
Tony's particular interest seems to be in program transformation; desugaring of
high level languages, evaluation by reduction rules, optimisation and source to
target translation.
&lt;/p&gt;

&lt;p&gt;
A big thanks to both our speakers and to Dan, Mark and Google for
providing the meeting venue and the light refreshments.
&lt;/p&gt;

&lt;p&gt;
FP-Syd will be having brief hiatus over the Xmas/New Year period and our next 
meeting will be in February.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Goanna 1.1 release</title>
		<link href="http://redlizards.com/blog/development/goanna-11-release/"/>
		<id>http://redlizards.com/blog/?p=382</id>
		<updated>2009-11-26T03:52:44+00:00</updated>
		<content type="html">&lt;p&gt;Goanna for Visual Studio 1.1 has been released. &lt;a href=&quot;http://redlizards.com/download.html&quot;&gt;Download&lt;/a&gt;  it now. Changes include:&lt;/p&gt;
&lt;p&gt;Fixed a constructor initialization false positive.&lt;/p&gt;
&lt;p&gt;Fixed several unused variable false positives related to complex types in C++.&lt;/p&gt;
&lt;p&gt;Include paths can now end in a backslash.&lt;/p&gt;
&lt;p&gt;Accelerator keys: Alt+F1 (run Goanna on the Solution) and Alt+F2 (Run Goanna on the active project).&lt;/p&gt;
&lt;p&gt;Several new checks, including:&lt;/p&gt;
&lt;p&gt;Comparison never holds&lt;/p&gt;
&lt;p&gt;Comparison always holds&lt;/p&gt;
&lt;p&gt;Switch case is unreachable&lt;/p&gt;
&lt;p&gt;Expanded the interval analysis.&lt;/p&gt;
&lt;p&gt;Checks are now organized by category in the settings dialog.&lt;/p&gt;
&lt;p&gt;Underlining (&amp;#8221;Squiggles&amp;#8221;) of warning-relevant code in the Visual Studio text editor.&lt;/p&gt;
&lt;p&gt;Statistics page for monitoring Goanna&amp;#8217;s progress.&lt;/p&gt;
&lt;p&gt;Analysis of assert() statements for variable bounds.&lt;/p&gt;
&lt;p&gt;Improved traces.&lt;/p&gt;
&lt;p&gt;Much more internal work has been done, laying the groundwork for inter-procedural analysis and user-defined checks. Visual Studio 2010 support is well underway.&lt;/p&gt;</content>
		<author>
			<name>Goanna</name>
			<uri>http://redlizards.com/blog</uri>
		</author>
		<source>
			<title type="html">Goanna Static Analysis by Red Lizard Software</title>
			<subtitle type="html">The Blog of the Goanna Team</subtitle>
			<link rel="self" href="http://redlizards.com/blog/feed/"/>
			<id>http://redlizards.com/blog/feed/</id>
			<updated>2010-07-30T13:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Haskell 2010</title>
		<link href="http://justtesting.org/haskell-2010"/>
		<id>http://justtesting.org/haskell-2010</id>
		<updated>2009-11-25T01:30:02+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;Four years ago the Haskell' Committee was assembled, charged with the task to produce a new revision of the Haskell language standard (aka Haskell 98). There was a lot of enthusiasm and many wild ideas in the beginning, but it turned out that it was hard to agree on the scope of changes and that it was very hard to find a person willing to shoulder the rather large editorial burden that a major revision of Haskell entails.&lt;/p&gt;
&lt;p&gt;The Committee finally decided that our only realistic chance of making progress was to break the mammoth task into smaller chunks. More concretely, we decided to evolve the language in small increments with a release every year, while rotating the committee on an annual basis to avoid burn out.[1] Whether this fine-grained evolutionary approach to language design will be successful in the long run remains to be seen. Nevertheless, the new approach helped us to make progress and to agree on a revision for this year: behold&amp;nbsp;&lt;a href=&quot;http://www.mail-archive.com/haskell@haskell.org/msg22460.html&quot; title=&quot;Announcing Haskell 2010&quot; target=&quot;_blank&quot;&gt;Haskell 2010&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;[1] Details about &lt;a href=&quot;http://hackage.haskell.org/trac/haskell-prime/wiki/Process&quot; title=&quot;The Haskell Prime Process&quot; target=&quot;_blank&quot;&gt;The Haskell Prime Process&lt;/a&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/haskell-2010&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/haskell-2010#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">DDC : Man or Boy?</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/man_or_boy.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/11/17/man_or_boy.atom</id>
		<updated>2009-11-17T11:03:00+00:00</updated>
		<content type="html">&lt;p&gt;
Computer scientist Donald Knuth came up with something he called the
	&lt;a href=&quot;http://rosettacode.org/wiki/Man_or_boy_test&quot;&gt;
	Man or Boy Test&lt;/a&gt;
as a way of evaluating implementations of the
	&lt;a href=&quot;http://en.wikipedia.org/wiki/ALGOL&quot;&gt;
	ALGOL60&lt;/a&gt;
language (standardized in 1963) to distinguish compilers that correctly
implemented &quot;recursion and non-local references&quot; from those that did not.
Knuth said:
&lt;/p&gt;

&lt;blockquote&gt;&lt;i&gt;
&quot;I have written the following simple routine, which may separate the
'man-compilers' from the 'boy-compilers'.&quot;
&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;
My first attempt at solving this problem in Disciple resulted in me raising
	&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/148&quot;&gt;
	bug #148&lt;/a&gt;
in the DDC bug tracker with the following code:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  -- Compiler needs a little help inferring the types.
  a :: Int -&gt; a -&gt; a -&gt; a -&gt; a -&gt; a -&gt; Int
  a k x1 x2 x3 x4 x5
   = do    b () = do { k := k - 1 ; a k b x1 x2 x3 x4 }
           if k = 0 then x4 () + x5 () else b ()

  fn n = \() -&gt; n

  main ()  -- Function 'a' should return -67
   = do    out = a 10 (fn 1) (fn -1) (fn -1) (fn 1) (fn 0)
           if out /= -67
               then println $ &quot;Output was &quot; % show out % &quot;. Should have been -67.&quot;
               else println &quot;Passed!&quot;

&lt;/pre&gt;

&lt;p&gt;
Fiddling around with the problem a bit, I suddenly realised that the Disciple
language has
	&lt;a href=&quot;http://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference&quot;&gt;
	call-by-reference&lt;/a&gt;
semantics by default (by way of contrast, the C programming language has
default call-by-value semantics with optional call-by-reference semantics using
pointers).
&lt;/p&gt;

&lt;p&gt;
While chatting with
	&lt;a href=&quot;http://cs.anu.edu.au/~Ben.Lippmeier/&quot;&gt;
	Ben&lt;/a&gt;
on IRC he suggested using a &lt;tt&gt;&lt;b&gt;copy&lt;/b&gt;&lt;/tt&gt; to create a local copy of
the function parameter that gets mutated so that mutation doesn't change the
value outside call frame.
&lt;/p&gt;

&lt;p&gt;
Here are two correct solutions to the Man or Boy problem:
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;

  a0 :: Int -&gt; a -&gt; a -&gt; a -&gt; a -&gt; a -&gt; Int
  a0 k x1 x2 x3 x4 x5
   = do   b () = do { k := k - 1 ; a0 (copy k) b x1 x2 x3 x4 }
          if k = 0 then x4 () + x5 () else b ()


  a1 :: Int -&gt; a -&gt; a -&gt; a -&gt; a -&gt; a -&gt; Int
  a1 k x1 x2 x3 x4 x5
   = do   m = copy k
          b () = do { m := m - 1 ; a1 m b x1 x2 x3 x4 }
          if k = 0 then x4 () + x5 () else b ()

  fn n = \() -&gt; n

  main ()
   = do   out0 = a0 10 (fn 1) (fn -1) (fn -1) (fn 1) (fn 0)
          out1 = a1 10 (fn 1) (fn -1) (fn -1) (fn 1) (fn 0)

          println &quot;All outputs below should be equal to -67.&quot;
          println $ &quot;Output 0 : &quot; % show out0
          println $ &quot;Output 1 : &quot; % show out1

&lt;/pre&gt;

&lt;p&gt;
Both of these Disciple solutions are significantly less complex than the
	&lt;a href=&quot;http://rosettacode.org/wiki/Man_or_boy_test#Haskell&quot;&gt;
	equivalent Haskell solution&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
While I have no problem with function parameters being passed by reference,
I don't think its a good idea to have those parameters being mutable by
default (ie with the values also changing in the calling function).
&lt;/p&gt;

&lt;p&gt;
I need to play with this some more.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Hacking DDC.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/hacking_ddc.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/11/15/hacking_ddc.atom</id>
		<updated>2009-11-15T10:28:00+00:00</updated>
		<content type="html">&lt;p&gt;
Over the last couple of months I've been doing a bit of hacking on an
experimental compiler called
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC&quot;&gt;
	DDC&lt;/a&gt;.
This has been some of the most interesting, gratifying and challenging hacking
I have done in years.
Having this much fun should probably be &lt;i&gt;illegal!!&lt;/i&gt;
&lt;/p&gt;

&lt;p&gt;
I was introduced to DDC at the
	&lt;a href=&quot;http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-03.html&quot;&gt;
	April 2008 meeting of FP-Syd&lt;/a&gt;
when Ben Lippmeier, its author, gave a presentation titled &quot;The Disciplined
Disciple Compiler&quot;.
The two main reasons this compiler is interesting are:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Its written in
	&lt;a href=&quot;http://www.haskell.org/&quot;&gt;
	Haskell&lt;/a&gt;
	an advanced purely functional programming language.
	&lt;/li&gt;
&lt;li&gt; The language it compiles (Disciple) has some interesting solutions to the
	problems of side effects and mutability.
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The Disciple language is very Haskell-like but has some extra features in the
type system which allows the compiler to track mutability and side effects
&lt;i&gt;in the type system&lt;/i&gt;.
The important differences between the Disciple language and the Haskell
language are listed on the
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC&quot;&gt;
	DDC&lt;/a&gt;
web page as:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strict
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/EvaluationOrder&quot;&gt;
	Evaluation Order&lt;/a&gt;
	is the default, laziness is introduced explicitly.
	&lt;/li&gt;
&lt;li&gt;Type directed
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/FieldProjections&quot;&gt;
	Field Projections&lt;/a&gt; complement type classing.
	&lt;/li&gt;
&lt;li&gt;All data objects support
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/DestructiveUpdate&quot;&gt;
	Destructive Update&lt;/a&gt;.
	&lt;/li&gt;
&lt;li&gt;The
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/EffectSystem&quot;&gt;
	Effect System&lt;/a&gt;
	tracks what computational effects are being used in a program, without the
	need for state monads.
	&lt;/li&gt;
&lt;li&gt;The
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/ClassSystem&quot;&gt;
	Class System&lt;/a&gt;
	ensures that effects and destructive update play nicely with laziness.
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/ClosureTyping&quot;&gt;
	Closure Typing&lt;/a&gt;
	is used to track data sharing, and to preserve soundness in the presence of
	&lt;a href=&quot;http://haskell.cs.yale.edu/haskellwiki/DDC/PolymorphicUpdate&quot;&gt;
	Polymorphic Update&lt;/a&gt;.
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Obviously a compiler that is doing all this really clever stuff has to be
pretty complicated, but it still only weighs in at about 50k lines of code.
&lt;/p&gt;

&lt;p&gt;
The main challenge in working on this is that i am not a very experienced
Haskell programmer.
There are also large chunks of the compiler doing some very complicated stuff
that I don't even have a hope of understanding without reading and
understanding
	&lt;a href=&quot;http://cs.anu.edu.au/~Ben.Lippmeier/&quot;&gt;
	Ben's PhD thesis&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Despite that, Ben was willing to give me commit access to the 
	&lt;a href=&quot;http://code.haskell.org/ddc/ddc-head&quot;&gt;
	Darcs repo&lt;/a&gt;
and I have been able to significantly reduce the number of bugs in the
	&lt;a href=&quot;http://trac.haskell.org/ddc/report/1?sort=ticket&amp;asc=1&quot;&gt;
	DDC bugtracker&lt;/a&gt;.
Since I was already pretty familiar with the concepts of lexing and parsing as well
as being familiar with
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/Parsec&quot;&gt;
	Parsec&lt;/a&gt;
(probably the most widely used parsing tool in the Haskell community) I started
off fixing some simple lexer and parser bugs like:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/91&quot;&gt;
	#91 : Require module imports (and exports) to be at the start of the module.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/95&quot;&gt;
	#95 : Parse error with lists.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/96&quot;&gt;
	#96 : ellipsis in list generator expressions not comprehensive enough.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/97&quot;&gt;
	#97 : Error in parsing end of {- -} comments.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/103&quot;&gt;
	#103 : Not able to parse 'a, b, c :: Type' style type signatures.&lt;/a&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I then managed to hack in 
	&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/106&quot;&gt;
	support for Int64 and Float64 (#106)&lt;/a&gt;
followed by some significant re-factoring of the Parsec parser which reduced
the usage of the &lt;b&gt;&lt;tt&gt;Parsec.try&lt;/tt&gt;&lt;/b&gt; construct allowing Parsec to
produce much better error messages.
&lt;/p&gt;

&lt;p&gt;
Once I'd done all that, I ran into a very busy time at work and didn't mess with
DDC for a couple of months.
When I finally got back to looking at DDC, I realised that nearly all of the
remaining bugs were much deeper than the bugs I had tackled so far.
Tackling these deeper bugs required a new strategy as follows:
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Scan the bug list for reports that either had test cases already or give
	enough information for me to proceed.
	&lt;/li&gt;
&lt;li&gt; Create a new darcs branch for each bug. This allowed me to work on 
	multiple different bugs at once so that if I got stuck on any one specific
	bug, I could just leave it and move on to another.
	&lt;/li&gt;
&lt;li&gt; Create a reproducible test case if one didn't exist already.
	&lt;/li&gt;
&lt;li&gt; Create a shell script in the root directory of each branch which did
	&lt;tt&gt;&lt;b&gt;make&lt;/b&gt;&lt;/tt&gt; and then ran the specific test case for this specific
	bug.
	&lt;/li&gt;
&lt;li&gt; Use Haskell's
	&lt;a href=&quot;http://cvs.haskell.org/Hugs/pages/libraries/base/Debug-Trace.html&quot;&gt;
	&lt;tt&gt;&lt;b&gt;Debug.Trace&lt;/b&gt;&lt;/tt&gt;&lt;/a&gt;
	module in conjunction with Haskell's very wonderful
	&lt;a href=&quot;http://www.haskell.org/ghc/docs/6.10.4/html/libraries/base/Prelude.html#t%3AShow&quot;&gt;
	&lt;tt&gt;&lt;b&gt;Show&lt;/b&gt;&lt;/tt&gt;&lt;/a&gt;
	Type Class to add debug statements to the code.
	&lt;/li&gt;
&lt;li&gt; Use the
	&lt;a href=&quot;http://www.testingreflections.com/node/view/7605&quot;&gt;
	Wolf Fencing&lt;/a&gt;
	debugging technique to narrow down the problem to specific area of the
	code.
	&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
Once the problem had been narrowed down to a piece of code, all that remained was
to develop a fix.
In many cases this resulted in me asking Ben how he'd like it fixed, either
in email or on IRC.
I also often came up with an ugly fix at first which was refined and cleaned up
before being applied and pushed upstream.
&lt;/p&gt;

&lt;p&gt;
With the above methodology I was able to fix a number of deeper and more
complex bugs like the following:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/33&quot;&gt;
	#33 : Check for conflicting projection functions.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/39&quot;&gt;
	#39 : Emit an error if modules are recursive.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/42&quot;&gt;
	#42 : Support unboxed CAFs&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/45&quot;&gt;
	#45 : Better error message for runtime pattern match failure.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/53&quot;&gt;
	#53 : Check for name shadowing in forall quantifiers.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/58&quot;&gt;
	#58 : Panic in type inferencer.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/71&quot;&gt;
	#71 : Better error message for unimplemented class functions.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/77&quot;&gt;
	#77 : crushProjClassT panics when there are type errors.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/78&quot;&gt;
	#78 : Renamer problems in data type defs.&lt;/a&gt;
	&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.haskell.org/ddc/ticket/144&quot;&gt;
	#144 : Need better error message when source file does not exist.&lt;/a&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I'm now getting a pretty good idea of how the compiler is put together and I'm
stretching my hacking into feature enhancements.
&lt;/p&gt;

&lt;p&gt;
My enthusiasm for DDC was recently validated by functional programming guru
	&lt;a href=&quot;http://okmij.org/ftp/&quot;&gt;
	Oleg Kiselyov&lt;/a&gt;'s
comment on the
	&lt;a href=&quot;http://haskell.org/pipermail/haskell-cafe/2009-August/065200.html&quot;&gt;
	haskell-cafe mailing list&lt;/a&gt;:
&lt;/p&gt;

&lt;blockquote&gt;&lt;i&gt;
&quot;One may view ML and Haskell as occupying two ends of the extreme. ML
assumes any computation to be effectful and every function to have
side effects. Therefore, an ML compiler cannot do optimizations like
reordering (even apply commutative laws where exists), unless it can
examine the source code and prove that computations to reorder are
effect-free.  ..... 
&lt;/i&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;i&gt;
Haskell, on the other hand, assumes every expression pure. Lots
algebraic properties become available and can be exploited, by
compilers and people. ....
&lt;/i&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;i&gt;
Hopefully a system like DDC will find the middle ground.&quot;
&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;
Anyway, back to hacking ....
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Home</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2009/2009-11-15T18_04_56.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2009/2009-11-15T18_04_56.shtml</id>
		<updated>2009-11-15T07:04:56+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.vergenet.net/~horms/gallery/hikari/&quot;&gt;
				&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5-6714.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Hikari]&quot; align=&quot;left&quot; /&gt;&lt;/a&gt;
				Hikari and Chiz came home from hospital today. It was nice and
				uneventful and everyone seems relaxed now.
				&lt;p&gt;
				To celebrate I've expanded Hikari's photo page, its
				&lt;a href=&quot;http://www.vergenet.net/~horms/gallery/hikari/&quot;&gt;here&lt;/a&gt;.
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Hikari Horman</title>
		<link href="http://www.vergenet.net/~horms/pleb_blossom/permalink/2009/2009-11-12T17_45_03.shtml"/>
		<id>http://www.vergenet.net/~horms/pleb_blossom/permalink/2009/2009-11-12T17_45_03.shtml</id>
		<updated>2009-11-12T06:45:03+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.vergenet.net/~horms/gallery/hikari/&quot;&gt;
				&lt;img src=&quot;http://www.verge.net.au/~horms/pleb_blossom/pics/5-6578.jpg&quot; width=&quot;120&quot; height=&quot;79&quot; alt=&quot;[Hikari]&quot; align=&quot;left&quot; /&gt;&lt;/a&gt;
				&lt;p&gt;
				Born at 1:47 pm on the 11th November 2009 at the Royal Hospital for Women
				in Randwick. 2.72kg healthy boy.
				&lt;p&gt;Photos &lt;a href=&quot;http://www.vergenet.net/~horms/gallery/hikari/&quot;&gt;here&lt;/a&gt;
				&lt;br clear=&quot;left&quot; /&gt;&lt;/p&gt;&lt;/p&gt;</content>
		<author>
			<name>Simon Horman</name>
			<uri>http://horms.org/</uri>
		</author>
		<source>
			<title type="html">Horms</title>
			<subtitle type="html">Themable Horms!</subtitle>
			<link rel="self" href="http://www.vergenet.net/~horms/pleb_blossom/rss.xml"/>
			<id>http://www.vergenet.net/~horms/pleb_blossom/rss.xml</id>
			<updated>2010-07-29T14:30:23+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Status Update of the Glasgow Haskell Compiler, October 2009</title>
		<link href="http://justtesting.org/status-update-of-the-glasgow-haskell-compiler"/>
		<id>http://justtesting.org/status-update-of-the-glasgow-haskell-compiler</id>
		<updated>2009-11-04T04:58:00+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;If you are interested in Haskell generally or the Glasgow Haskell Compiler (GHC) in particular, you may want to have a look at the latest issue of the biannual &lt;a href=&quot;http://hackage.haskell.org/trac/ghc/wiki/Status/Oct09&quot; title=&quot;GHC status October 2009&quot; target=&quot;_blank&quot;&gt;GHC status updates.&lt;/a&gt;&amp;nbsp;&amp;nbsp;It includes a summary of our recent progress in the Data Parallel Haskell project.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/status-update-of-the-glasgow-haskell-compiler&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/status-update-of-the-glasgow-haskell-compiler#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">First benchmark of regular, multidimensional arrays in DPH</title>
		<link href="http://justtesting.org/first-benchmark-of-regular-multidimensional-a"/>
		<id>http://justtesting.org/first-benchmark-of-regular-multidimensional-a</id>
		<updated>2009-11-04T03:47:55+00:00</updated>
		<content type="html">&lt;p&gt;
	
       &lt;div class=&quot;downloadFlyout&quot;&gt;
       &lt;div class=&quot;downloadIcon&quot;&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/WNJGczLAMSYESfaufKunJvrypOOpTkDtgDAzfEhqMCF4Dk49EUVN6UGoi9t8/delayed-regular-arrays-Sep09.pdf&quot;&gt;&lt;img src=&quot;http://posterous.com/images/filetypes/pdf.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
       &lt;div class=&quot;downloadlinkInstructions&quot;&gt;Download now or &lt;a href=&quot;http://justtesting.posterous.com/first-benchmark-of-regular-multidimensional-a&quot;&gt;preview on posterous&lt;/a&gt;&lt;/div&gt;
       &lt;b&gt;&lt;a href=&quot;http://posterous.com/getfile/files.posterous.com/justtesting/WNJGczLAMSYESfaufKunJvrypOOpTkDtgDAzfEhqMCF4Dk49EUVN6UGoi9t8/delayed-regular-arrays-Sep09.pdf&quot;&gt;delayed-regular-arrays-Sep09.pdf&lt;/a&gt;&lt;/b&gt; &lt;span class=&quot;downloadSize&quot;&gt;(417 KB)&lt;/span&gt;
       &lt;br class=&quot;clearboth&quot; /&gt;&lt;/div&gt;
      
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/first-benchmark-of-regular-multidimensional-a&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/first-benchmark-of-regular-multidimensional-a#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Finally found the ghci bug on Snow Leopard</title>
		<link href="http://justtesting.org/finally-found-the-ghci-bug-on-snow-leopard"/>
		<id>http://justtesting.org/finally-found-the-ghci-bug-on-snow-leopard</id>
		<updated>2009-10-30T04:35:05+00:00</updated>
		<content type="html">&lt;p&gt;
	After much digging through otool output and tracing Haskell code with dtrace, log messages, and gdb, I finally found the cause of the SIGBUS errors with ghci on Snow Leopard. At the end, only a tiny change was required[1]: the homegrown dynamic linker of ghci had simply ignored a relocation type that ld on Snow Leopard chose to use. &lt;p&gt;&lt;/p&gt; What this really shows again is that re-implementing parts of basic infrastructure in an ad hoc manner always comes back to bite you. Such infrastructure is usually full of low-level, platform-dependent details, which you are bound to get wrong once in a while and then it can be rather involved to find the problem. In this case, the relocation of the memory access of a bit of C code in GMP, reading a global variable, went wrong. As a result, the wrong memory location was accessed, which happened to contain a NULL pointer. Upon dereferencing the NULL, the program crashed. &lt;p&gt;&lt;/p&gt; All of this was further obscured by the fact that the homegrown linker approach of ghci implies that we have two copies of the basic libraries in memory and in use at the same time. One copy has been statically linked with the ghc executable and the second copy is dynamically loaded by ghci. The relocation in the statically linked copy was perfectly fine, but the relocation in the dynamically loaded one was broken. &lt;p&gt;&lt;/p&gt; [1] &lt;a href=&quot;http://www.haskell.org/pipermail/cvs-ghc/2009-October/050863.html&quot;&gt;http://www.haskell.org/pipermail/cvs-ghc/2009-October/050863.html&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/finally-found-the-ghci-bug-on-snow-leopard&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/finally-found-the-ghci-bug-on-snow-leopard#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Data-oriented programming and the vectorisation transformation</title>
		<link href="http://justtesting.org/data-oriented-programming-and-the-vectorisati"/>
		<id>http://justtesting.org/data-oriented-programming-and-the-vectorisati</id>
		<updated>2009-10-27T00:55:02+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;I just realised that the data layout and the resulting code organisation in&amp;nbsp;&lt;a href=&quot;http://gamedeveloper.texterity.com/gamedeveloper/200909/?folio=43#pg45&quot; title=&quot;Data-Oriented Design&quot; target=&quot;_blank&quot;&gt;data-oriented programming&lt;/a&gt;,&amp;nbsp;as proposed for games design, in many aspects resembles the data layout and code organisation favoured by the &lt;a href=&quot;http://www.cse.unsw.edu.au/~chak/papers/PLKC08.html&quot; title=&quot;Harnessing the Multicores: Nested Data Parallelism in Haskell&quot; target=&quot;_blank&quot;&gt;vectorisation transformation&lt;/a&gt;&amp;nbsp;that is at the core of &lt;a href=&quot;http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell&quot; title=&quot;Data Parallel Haskell&quot; target=&quot;_blank&quot;&gt;Data Parallel Haskell.&lt;/a&gt;&amp;nbsp;&amp;nbsp;This should not be surprising as both have similar goals, namely to maximise data throughput, to minimise stalls by utilising the memory hierarchy, and to maximise parallelism.&lt;/p&gt;
&lt;p&gt;However, the parallels are interesting given the very different origins of both approaches. &amp;nbsp;The big difference is of course that data-oriented programming is a design methodology for programmers, whereas the vectorisation transformation is a program transformation automatically applied by a compiler. &amp;nbsp;Nevertheless, we may regard the vectorisation transformation as a program transformation that turns purely functional code into code that is structured in a data-oriented manner, where the layout of bulk data shapes the organisation of the code.&lt;/p&gt;
&lt;p&gt;This raises the question of how useful nested data parallel programming and the vectorisation transformation may be to games programming.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/data-oriented-programming-and-the-vectorisati&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/data-oriented-programming-and-the-vectorisati#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #20.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-20.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/10/25/fp-syd-20.atom</id>
		<updated>2009-10-25T06:49:00+00:00</updated>
		<content type="html">&lt;p&gt;
On October 22th we held the 20th meeting of FP-Syd, the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we had about 28 people
show up to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had Roman Leshchinskiy and his presentation
	&lt;a href=&quot;http://www.cse.unsw.edu.au/~rl/talks/fp-syd-fusion.pdf&quot;&gt;
	&quot;Loop Fusion in Haskell&quot;&lt;/a&gt;,
work that is part of GHC's
	&lt;a href=&quot;http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell&quot;&gt;
	Data Parallel Haskell&lt;/a&gt;
library.
Loop fusion depends on the ability to convert operations on arrays into
operations on streams.
Then, when applying multiple stream operations, adjacent conversions to and
from streams can be dropped, allowing further inlining.
The real beauty of this approach is that stream operations and data
parallelism can be written as a library outside of the GHC compiler
and then depend on the compiler to do most of the heavy lifting.
Romain  then moved on to explain that this work was just as applicable to
general parallel computation on multicore systems as it was to clusters and
GPUs.
&lt;/p&gt;

&lt;p&gt;
Our second presenter for the evening was
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/&quot;&gt;
	Barry Jay&lt;/a&gt;
who gave us an introduction to
	&lt;a href=&quot;http://www-staff.it.uts.edu.au/~cbj/Publications/fpsyd.pdf&quot;&gt;
	&quot;Pattern Calculus&quot;&lt;/a&gt;.
Barry's work on Pattern Calculus was inspired by the fact that while lambda
calculus is able to adequately explain computation, it does not explain
operations on data well.
In particular, lambda calculus does not distinguish between variables and data
constructors while in the pattern calculus constructors are treated as a
separate class; matchable symbols.
The ideas behind Pattern Calculus are explained more fully in Barry's book:
&lt;/p&gt;
&lt;center&gt;
	&lt;a href=&quot;http://www.springer.com/computer/foundations/book/978-3-540-89184-0&quot;&gt;
	&lt;img src=&quot;http://www.springer.com/cda/content/image/cda_displayimage.jpg?SGWID=0-0-16-592487-0&quot; border=&quot;0&quot; alt=&quot;book  cover&quot; /&gt;
	&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;
A big thanks to both our speakers and to Shane Stephens and Google for
providing the meeting venue and the light refreshments.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">Fun with higher-order functions in C and Objective-C</title>
		<link href="http://justtesting.org/fun-with-higher-order-functions-in-c-and-obje"/>
		<id>http://justtesting.org/fun-with-higher-order-functions-in-c-and-obje</id>
		<updated>2009-10-20T12:48:27+00:00</updated>
		<content type="html">&lt;p&gt;
	The latest release of Mac OS X (Snow Leopard) came with an upgrade to the C and Objective-C languages, adding lambda abstractions — which they call blocks. Matt Gallagher has a nice blog post that describes some of the trickier aspects of blocks: &lt;a href=&quot;http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html&quot;&gt;http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html&lt;/a&gt; &lt;p&gt;&lt;/p&gt; Interesting is the function 'newDoubleToIntComparison' (in Section &quot;Declaring a block that returns a block&quot;), which is a curried[1] version of 'compareDoubleToInt'. Together with the explicit memory management for returned blocks and the need for involved type annotations and casts, it becomes clear why functional languages like Haskell make curried functions the default as well as support garbage collection and type inference out of the box. &lt;p&gt;&lt;/p&gt; [1] &lt;a href=&quot;http://en.wikipedia.org/wiki/Currying&quot;&gt;http://en.wikipedia.org/wiki/Currying&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/fun-with-higher-order-functions-in-c-and-obje&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/fun-with-higher-order-functions-in-c-and-obje#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">It’s always the cover up which gets you.</title>
		<link href="http://www.kablambda.org/blog/2009/10/20/its-always-the-cover-up-which-gets-you/"/>
		<id>http://www.kablambda.org/blog/?p=111</id>
		<updated>2009-10-20T11:31:55+00:00</updated>
		<content type="html">&lt;p&gt;I suppose Watergate is the archetypal example of the consequences of the cover up being worse than the original offence, but you see it all the time.&lt;/p&gt;

&lt;p&gt;The example I have in mind has less geopolitical significance, but will probably be more interesting for most readers.&lt;/p&gt;

&lt;p&gt;A company named &lt;a href=&quot;http://popcap.com&quot;&gt;PopCap Games&lt;/a&gt; publish a nice little game called &amp;#8216;Plants vs. Zombies&amp;#8217;. I played the demo for the allotted 60 minutes when it was originally released, and then forgot about it when my trial expired.&lt;/p&gt;

&lt;p&gt;About a week ago they released a free Flash version, which uses a subset of the plants and zombies from the full game, and playing that got me interested in buying the full version again.&lt;/p&gt;

&lt;p&gt;The game sells for USD20 or AUD30, which at current exchange rates is a bit rich &amp;#8212; the Australian dollar is buying 92 US cents at the moment. Just yesterday I bought another game, &lt;a href=&quot;http://machinarium.net/demo/&quot;&gt;Machinarium&lt;/a&gt; &amp;#8212; which also sells for USD20 &amp;#8212; for AUD22.32.&lt;/p&gt;

&lt;p&gt;So I sent a tweet to PopCap enquiring about their pricing:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@popcap_games why is PvZ AUD30, when USD20 is only AUD22?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To their credit, they replied quickly, but I didn&amp;#8217;t find their answer convincing:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;@tgdavies USD price displayed is pre-tax which is added in the cart. International prices include sales tax.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To get 22 to 30 you need more than 30% tax &amp;#8212; Australia&amp;#8217;s GST is only 10%, and I think paying that is my responsibility as the person &amp;#8216;importing&amp;#8217; the game.&lt;/p&gt;

&lt;p&gt;Of course, the real reason is that as recently as March the Aussie dollar was only buying 65 US cents &amp;#8212; which gives you about AUD30 for USD20. PopCap simply haven&amp;#8217;t adjusted their prices.&lt;/p&gt;

&lt;p&gt;I wish they could have said that, or just &amp;#8220;I don&amp;#8217;t know&amp;#8221;, instead of invoking some mythical tax!&lt;/p&gt;

&lt;p&gt;PopCap aren&amp;#8217;t the only company whose Australian prices are out of whack &amp;#8212; the cheapest 15&amp;#8243; MacBook Pro is AUD600 more expensive than a simple exchange rate + tax calculation would suggest.&lt;/p&gt;</content>
		<author>
			<name>Tom Davies</name>
			<uri>http://www.kablambda.org/blog</uri>
		</author>
		<source>
			<title type="html">My Diversions</title>
			<subtitle type="html">Notes on things I'm thinking and doing</subtitle>
			<link rel="self" href="http://www.kablambda.org/blog/feed/"/>
			<id>http://www.kablambda.org/blog/feed/</id>
			<updated>2010-05-20T19:36:09+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">The Stupidity of Fat Elf (was OSX Universal Binaries).</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/CodeHacking/osx_ub.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/10/20/osx_ub.atom</id>
		<updated>2009-10-20T09:53:00+00:00</updated>
		<content type="html">&lt;p&gt;
Early in 2008 I drafted a blog post about something on Mac OS X called Universal
binaries.
Now the same stupid idea is available for Linux, and planned for other ELF
systems.
Its called
	&lt;a href=&quot;http://icculus.org/fatelf/&quot;&gt;
	Fat Elf&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
The original post follows.
&lt;/p&gt;

&lt;p&gt;
As the main author and maintainer of
	&lt;a href=&quot;http://www.mega-nerd.com/libsndfile/&quot;&gt;
	libsndfile&lt;/a&gt;
I've recently been involved in a number of email exchanges along the lines of
this:
&lt;/p&gt;

&lt;pre&gt;

  OS X User : Is it possible to build a Universal Binary of libsndfile?
  Me        : No, please see &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/FAQ.html#Q018&quot;&gt;the FAQ&lt;/a&gt;.
  OS X User : Autoconf sucks!
  Me        : Even if you use Xcode, the problem of testing remains.
  OS X User : Other projects can build Universal Binaries, why can't yours?

&lt;/pre&gt;

&lt;p&gt;
to which I should probably respond &lt;i&gt;&quot;Have you stopped beating your wife/
girlfriend yet?&quot;&lt;/i&gt;.
&lt;/p&gt;

&lt;p&gt;
For those lucky enough to be blissfully unaware of the issue, Universal
Binaries are Apple's solution to the &lt;i&gt;marketing&lt;/i&gt; problem that arose from
their decision to ditch the PowerPC processors it had been using in its 
machines in favour of CPUs from Intel.
Obviously, this change of CPU would have an impact on users and Apple chose
a two pronged approach to ease the migration of its users from one CPU to
another;
	&lt;a href=&quot;http://www.apple.com/rosetta/&quot;&gt;Rosetta&lt;/a&gt;
a PowerPC emulator which allows PowerPC code to run on Intel based Macs,
and the idea of the
	&lt;a href=&quot;http://www.apple.com/universal/&quot;&gt;
	Universal Binary (UB)&lt;/a&gt;,
a way of packaging binary code for PowerPC and Intel into a single monolithic
file so that the OSX operating system can run which ever is appropriate for
the CPU it is being run on.
&lt;/p&gt;

&lt;p&gt;
Building Universal Binaries on Mac OS X using Apple's own development toolset
	&lt;a href=&quot;http://www.apple.com/macosx/features/xcode/&quot;&gt;
	Xcode&lt;/a&gt;
is apparently quite trivial.
Under the hood, Xcode uses a version of the 
	&lt;a href=&quot;http://www.gnu.org/software/gcc/&quot;&gt;
	GNU GCC&lt;/a&gt;
compiler which Apple hacked to allow it to take in a single input source
code file, pass it through both an Intel and a PowerPC back-end and then 
generate a single binary containing both Intel and PowerPC executable
code.
&lt;/p&gt;

&lt;p&gt;
Apple has obviously gone to a lot of trouble to make the process easy.
So easy, that the average OSX developer expects it to just work, without
realising exactly what it is they are doing and even more importantly, without 
realising that the process itself contains one very large flaw (which I'll get 
to shortly).
&lt;/p&gt;

&lt;p&gt;
Building Universal Binaries of FLOSS (Free/Libre/Open Source ...) software is
a whole different matter.
A large majority of FLOSS software uses things like scons or autoconf and 
its related tools to detect characteristics of the target platform so that 
the source code can be compiled correctly for the target.
&lt;/p&gt;

&lt;p&gt;
The problem is, that people who know that the Xcode version of GCC can 
generate a universal binary from one pass over a source code file expect to 
take a project like libsndfile, set the &lt;b&gt;CFLAGS&lt;/b&gt; environment variable,
run configure and build a working universal binary.
Anyone who knows autoconf can guess that this is simply not going to work.
The main output of the configure script generated by autoconf is a header
file containing definitions to handle the detected features of the CPU and
operating system.
The problem is that the configure script is only run once and the 
characteristics detected on that run are then used to compile both the Intel 
and the PowerPC version of the executable code.
&lt;/p&gt;

&lt;p&gt;
The result of the above is that people developing FLOSS like myself get emails
from OSX users complaining that their UB version of libsndfile doesn't work.
Since I first heard of Apple's Universal Binaries back in early 2006 I have
personally spent over 50-100 hours trying to come up with a solution to an issue
that only affects an operating system that I personally am not very interested
in.
Thats a bunch of hours that I could have spent in much more enjoyable pursuits.
&lt;/p&gt;

&lt;p&gt;
Now, consider how many other FLOSS project would have been hit by similar
problems.
So lets say 10 hours per project across a thousand projects.
Thats one hell of a lot of developer time that could have been spent doing
more useful things.
Why didn't Apple foresee this?
Why didn't Apple spend some of its resources trying to mitigate the effect of
UB on FLOSS projects.
Why didn't Apple devote say 500 man hours of its developer's time to help
ease the transition of FLOSS projects to UB; 500 man hours of work on
autoconf and automake would likely have gone a long way.
&lt;/p&gt;

&lt;p&gt;
The difficulty of generating UB for code using the autotools is not even the
biggest problem with UB.
What I see as the biggest problem is the huge green elephant standing in the
corner that no one wants to talk about; &lt;b&gt;testing&lt;/b&gt; (maybe that should
have a blink tag).
&lt;/p&gt;

&lt;p&gt;
For nearly a decade, testing, especially reliable, repeatable, automated testing
has been considered an important part of the process of creating reliable
software.
Now Apple is encouraging the building of Universal Binaries, but I for one am
very curious as to how these are being tested.
I can think of the following possibilities:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ad-hoc and manual testing. Obviously this is a poor substitute for
	automated testing.&lt;/li&gt;
&lt;li&gt;Automated testing relying on copying test binaries to another machine
	and running the tests for the other architecture there. This requires
	easy access to the other machine and considerable effort to make the 
	tests work.&lt;/li&gt;
&lt;li&gt;Automated testing relying on Rosetta. Like the previous option this
	requires considerable effort to make the tests work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Given that all these options are difficult it is highly likely that testing
falls by the wayside.
In short Apple is effectively encouraging the release of untested binaries 
to users.
When these untested binaries go wrong, who do users blame?
The authors of that software even when those FLOSS authors are not Mac users
and have little or no interest in Apple and its operating system.
&lt;/p&gt;

&lt;p&gt;
Furthermore, Apple is about to add another spanner to the works; quad
binaries.
Quad binaries are like Universal Binaries that contain code for both 32 bit
and 64 bit versions of PowerPC and Intel.
Quad binaries will be even more difficult to test, more difficult to get
right and still more pain for FLOSS developers.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FP-Syd #19.</title>
		<link href="http://www.mega-nerd.com/erikd/Blog/FP-Syd/fp-syd-19.html"/>
		<id>http://www.mega-nerd.com/erikd/Blog/2009/10/19/fp-syd-19.atom</id>
		<updated>2009-10-19T08:46:00+00:00</updated>
		<content type="html">&lt;p&gt;
On September 17th we held the 19th meeting of FP-Syd, the Sydney Functional
Programming group.
The meeting was held at Google's Sydney offices and we had about 18 people
show up to hear our two presenters.
&lt;/p&gt;

&lt;p&gt;
First up we had Raphael Speyer and his presentation
	&lt;a href=&quot;http://fp-syd.googlegroups.com/web/Rhino_ES5_GSoC-Raphael_Speyer.pdf&quot;&gt;
	&quot;Rhino, ES5 &amp;amp; GSoC&quot;&lt;/a&gt;.
Raphael explained how he was accepted into the Google Summer of Code project
to work on bring the Rhino, a Javascript engine that runs on the Java Virtual
machine, into line with the upcoming EcmaScript 5 standard.
&lt;/p&gt;

&lt;p&gt;
For the second presentation we had Shane Stephens one of the Google people
working on
	&lt;a href=&quot;http://wave.google.com/&quot;&gt;
	Google Wave&lt;/a&gt;
giving us an overview of Google's Operational Transform algorithm which is at
the core Google Wave.
He then walked us through a reimplementation of the algorithm in Haskell.
&lt;/p&gt;

&lt;p&gt;
A big thanks to Shane Stephens and Google for providing the meeting venue and the
light refreshments.
&lt;/p&gt;</content>
		<author>
			<name>Erik de Castro Lopo</name>
			<email>erikd@mega-nerd.com</email>
			<uri>http://www.mega-nerd.com/erikd/Blog</uri>
		</author>
		<source>
			<title type="html">m3ga blog</title>
			<subtitle type="html">An ocassional rant</subtitle>
			<link rel="self" href="http://www.mega-nerd.com/erikd/Blog/index.atom"/>
			<id>http://www.mega-nerd.com/erikd/Blog/index.atom</id>
			<updated>2010-07-27T21:30:22+00:00</updated>
			<rights type="html">Copyright 2006-2010 Erik de Castro Lopo</rights>
		</source>
	</entry>

	<entry>
		<title type="html">Multicore Haskell Now!</title>
		<link href="http://justtesting.org/multicore-haskell-now"/>
		<id>http://justtesting.org/multicore-haskell-now</id>
		<updated>2009-10-18T06:16:44+00:00</updated>
		<content type="html">&lt;p&gt;
	Don Stewart summarised the state of play of parallel programming in Haskell at &quot;ACM Reflections | Projections 2009&quot;. He covers strategies, Concurrent Haskell, STM, and Data Parallel Haskell: &lt;a href=&quot;http://donsbot.wordpress.com/2009/10/17/multicore-haskell-now-acm-reflections-projections-2009/&quot;&gt;http://donsbot.wordpress.com/2009/10/17/multicore-haskell-now-acm-reflections-projections-2009/&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://justtesting.org/multicore-haskell-now&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://justtesting.org/multicore-haskell-now#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Manuel Chakravarty</name>
			<uri>http://justtesting.org</uri>
		</author>
		<source>
			<title type="html">Just Testing</title>
			<subtitle type="html">Lambda Science</subtitle>
			<link rel="self" href="http://justtesting.org/rss"/>
			<id>http://justtesting.org/rss</id>
			<updated>2010-07-29T10:30:22+00:00</updated>
		</source>
	</entry>

</feed>
