<rss version="2.0"><channel><title>Well Quite</title><link>http://www.wellquite.org/</link><description>No Description Possible</description><docs>http://www.rssboard.org/rss-specification</docs><language>en-us</language><copyright>Matthew Sackman</copyright><ttl>360</ttl><lastBuildDate>Thu, 26 Jun 2008 06:27:49 UTC</lastBuildDate><item><title>TiC 2008</title><link>http://www.wellquite.org/tic2008.html</link><pubDate>Thu, 26 Jun 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;I'm currently attending &lt;a&#10;href=&quot;http://web.mac.com/vitekj/TiC/Welcome.html&quot;&gt;Trends in&#10;Concurrency&lt;/a&gt; in Prague which is a summer school, targeting&#10;researchers working on concurrency issues. Mainly we've had quite a&#10;large number of language tours which are not uninteresting, and each&#10;have their own quirks and niceties.&lt;/p&gt;&#10;&#10;&lt;p&gt;One of the most amusing things I find is how extensive Haskell's&#10;influence is now. Fortress and Scala really do seem to have been&#10;influenced heavily by Haskell and this seems to work to a greater or&#10;lesser extent in each language. Scala does actually support Monads so&#10;you can live in that world if you want, and it also has an effective&#10;equivalence to Type Classes (though certainly not with functional&#10;dependencies, associated types or any of the other magic; in fact I'm&#10;not sure whether they're even multi-parameter type classes). Fortress&#10;also has clearly been influenced by Haskell, and some of the talk on&#10;Monoids over trees reminded me distinctly (though the work is not&#10;directly related) of Hinze and Patterson's &lt;em&gt;Finger trees: a simple&#10;general-purpose data structure&lt;/em&gt; paper and the subsequent&#10;presentation Ross Patterson gave at the &lt;a&#10;href=&quot;http://londonhug.net/&quot;&gt;London HUG&lt;/a&gt;.&lt;/p&gt;&#10;&#10;&lt;p&gt;However, Fortress is still a statement oriented language, and&#10;whilst Scala claims to be expression oriented, it's very much like&#10;Erlang in this respect, a list of expressions which are guaranteed to&#10;be executed in order. In neither language are you required to live&#10;under a Monad in order to express a given ordering (yes, I know that's&#10;not really what Monads are about, but let this one slide please...)&#10;and so they all just feel just a &lt;em&gt;little&lt;/em&gt; bit broken. Neither&#10;are lazy by default, though Fortress has a means to make expressions&#10;lazy (and it also has an effect type system to work out where IO&#10;happens - is there some fear of making users actually use and/or&#10;understand Monads here?) and Scala allows the type &lt;code&gt;( =&gt;&#10;T)&lt;/code&gt; to capture a function which is due to emit a value of type&#10;&lt;code&gt;T&lt;/code&gt; without actually calling the function: in effect&#10;allowing you to control laziness.&lt;/p&gt;&#10;&#10;&lt;p&gt;We also had talks on X10 and a child project (not at IBM) called&#10;Habenero which have some neat synchronisation barrier ideas in them&#10;called &lt;em&gt;phasers&lt;/em&gt;. These allow a barrier to be shared between a&#10;dynamically chosen set of threads and for each thread to specify its&#10;relationship with the barrier: for example a wait (where the thread&#10;will block until the barrier is past), a signal (where the barrier&#10;won't be past until the thread sends the signal) or sig-wait (where&#10;the thread both has to signal the barrier and wait for the barrier -&#10;i.e. a full barrier from openMP). X10 does not seem to be Haskell&#10;influenced at all, but two out of three isn't bad. Also, I'm not&#10;actually the only one in the audience of just over 50 that's a&#10;Haskeller. There are several others here and a good percentage at&#10;least claim some functional knowledge. These are clearly not the&#10;hoards of unwashed Object-Oriented and Imperative&#10;programmers. Overall, really very interesting.&lt;/p&gt;&#10;</description></item><item><title>Derelict Sky</title><link>http://www.wellquite.org/derelict_sky.html</link><pubDate>Mon, 26 May 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;&#10;Derelict sky of fallen clouds, opaque&lt;br&gt;&#10;and egg-white blue.&lt;br&gt;&#10;Looking straight at me, myself&lt;br&gt;&#10;planted in this vision, seeing&lt;br&gt;&#10;nothing, embossed in shadow and dust.&#10;&lt;/p&gt;&#10;&#10;&lt;p&gt;&#10;Daylight fading and in the freedom&lt;br&gt;&#10;of darkness I dare to gaze;&lt;br&gt;&#10;the ground beneath me, spreading in.&lt;br&gt;&#10;Gently I tread, then faster I pelt away&lt;br&gt;&#10;from haze, until&#10;&lt;/p&gt;&#10;&#10;&lt;p&gt;&#10;I stumble and stagger, fallen&lt;br&gt;&#10;into the mist, resting up&lt;br&gt;&#10;against the walls of the cage&lt;br&gt;&#10;I have furnished.&#10;&lt;/p&gt;&#10;&#10;&lt;p&gt;&#10;So I get in a rage and I&lt;br&gt;&#10;get in a stupor and I&lt;br&gt;&#10;throw up the chairs and the sofa and table&lt;br&gt;&#10;'til eventually, with the sun behind&lt;br&gt;&#10;and in front and above,&lt;br&gt;&#10;the clouds in the sky,&lt;br&gt;&#10;looking straight at me&#10;&lt;/p&gt;&#10;&#10;&lt;p&gt;&#10;Myself.&#10;&lt;/p&gt;&#10;</description></item><item><title>Tutorials on Session Types</title><link>http://www.wellquite.org/session_tutorials.html</link><pubDate>Tue, 25 Mar 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;Recently I've been making much progress on my implementation of&#10;Session Types in Haskell and so due to popular demand I've written a&#10;&lt;a href=&quot;/sessions/tutorial_1.html&quot;&gt;series of tutorials&lt;/a&gt; on how to&#10;use my library.&#10;&lt;/p&gt;&#10;</description></item><item><title>About a Horn, Part 2</title><link>http://www.wellquite.org/about_a_horn_2.html</link><pubDate>Tue, 29 Jan 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;I started playing the Horn in September 1991, on an Anborg Como&#10;Single F. A few years later, though I'm not quite sure exactly when, I&#10;moved up to a Boosey and Hawkes 400 Compensating F/B-flat (yes,&#10;&lt;i&gt;that&lt;/i&gt; Horn that &lt;i&gt;everyone&lt;/i&gt; had). A few years after that I&#10;moved to a &lt;a&#10;href=&quot;http://www.gleblanc.com/instruments/product.php?item=H178&quot;&gt;Holton&#10;178&lt;/a&gt; (full double F/B-flat), which remains my Horn to the&#10;day. Again, I'm not totally sure when I got it, but I reckon I must&#10;have been playing it for about eight years.&lt;/p&gt;&#10;&#10;&lt;p&gt;I'm tempted at this point to write about how Holtons are typically&#10;used by students and aren't really seen being played by pros, but&#10;really that's completely irrelevant. Plus it may well not be true -&#10;Holton, like &lt;a href=&quot;http://www.cgconn.com/&quot;&gt;Conn&lt;/a&gt;, are an&#10;American manufacturer and may be more widely used across the&#10;pond. Plus I'm not a pro, nor will ever be.&lt;/p&gt;&#10;&#10;&lt;p&gt;Anyway, over the eight years that I've been playing her, Henrietta&#10;and I have made some nice noises and played some memorable&#10;concerts. We've also cocked a few things up from time to time, though&#10;she swears it's my fault... I have however increasingly noticed&#10;differences in sound between Henrietta and all the &lt;a&#10;href=&quot;http://paxman.co.uk/&quot;&gt;Paxmans&lt;/a&gt; that are so dominant in London&#10;and certain deficiencies in Henrietta: particular passages that&#10;&lt;i&gt;I&lt;/i&gt; have to work at overly hard which I really don't think I&#10;should have to. For example, the Mozart Rondo in E-flat KV 371, the&#10;phrase starting at the end of bars 24 and 141. Here, the slurring down&#10;to the G in each set is remarkably easy to miss. Also, Mozart, KV 495&#10;(the &quot;fourth&quot; concerto), the runs up to top C (bars 52, 70, 185) are&#10;really difficult to make speak cleanly on Henrietta. Also, certain&#10;notes are just &quot;bad&quot;, a high A, for example does not speak cleanly,&#10;and is very wide, where as the B-flat above it is really nice. The&#10;same is true of third-space C which is wide and difficult to centre,&#10;whilst the D above it is very nice and predictable. I suspect that&#10;inconsistencies such as these have caused a number of issues over the&#10;years!&lt;/p&gt;&#10;&#10;&lt;p&gt;So I hatched a plan. At the end of October 2007, the &lt;a&#10;href=&quot;http://www.british-horn.org/&quot;&gt;British Horn Society&lt;/a&gt; held&#10;their annual &quot;Horn Day&quot; and this year it was at the &lt;a&#10;href=&quot;http://www.ram.ac.uk/default.htm&quot;&gt;Royal Academy of&#10;Music&lt;/a&gt;. Now, I've been to these things before, though some time&#10;ago, and regional ones. The main national one always has a number of&#10;Horn manufacturers there and so I went along and grabbed some Horns&#10;and tried them out. And I didn't really like any of them. I'd&#10;forgotten to take any music with me so I picked them up, played a few&#10;notes and came to the conclusion that they were French Horns. That was&#10;about all I could conclude.&lt;/p&gt;&#10;&#10;&lt;p&gt;I was then really too busy to entertain any further ideas until the&#10;new year (2008). However, just before Christmas, I spent a couple of&#10;hours in Paxman's, playing some of their Horns. I took music with me,&#10;and eventually came to the conclusion that they were Horns and that I&#10;didn't like their gold brass &lt;a&#10;href=&quot;http://paxman.co.uk/pages/catalogue/model20horn.html&quot;&gt;25&lt;/a&gt;. However,&#10;I was starting to realise that this testing and comparing Horns was&#10;much harder than I'd thought it would be. 2008 arrived and with it&#10;came a second hand &lt;a&#10;href=&quot;http://www.corno.de/schmid/deu-eng/valvehorns.htm&quot;&gt;Engelbert&#10;Schmid&lt;/a&gt;, in gold brass with &lt;a&#10;href=&quot;http://www.corno.de/schmid/deu-eng/bells.htm&quot;&gt;three bells&lt;/a&gt; to&#10;choose between - a plain yellow, a plain gold, and a gold with&#10;garland. I have had this Horn for nearly four weeks now and I've&#10;rather grown to like it. I also went back to Paxman's and got a yellow&#10;brass 20M on approval which is about to go back.&lt;/p&gt;&#10;&#10;&lt;p&gt;Obviously, the following is totally my own opinion. People are&#10;physically built differently and have different strengths and&#10;weaknesses. Personally, I find the Paxman very uncomfortable to hold&#10;(I have very large hands and find the finger hook both several inches&#10;in the wrong place and very painful), I dislike how far away the&#10;spatulas are and I dislike the length of travel of the valve levers. I&#10;also find the resistance of the Horn inconsistent - adding length&#10;seems to affect the Horn more than with the Schmid. Further, whilst&#10;the high end is nice, the low end I find significantly less focussed&#10;than the Schmid. Now, once again, this is my own opinion. There are&#10;many professional Horn players playing on Paxman 20s and so you could&#10;easily wonder what the hell I'm moaning about. Also you actually have&#10;to take into account what is available &quot;now&quot;. There are waiting lists&#10;for new Paxmans. People have suggested that I try a Paxman 25 and I&#10;did before Christmas, but there are none available now. Second hand&#10;Schmids are even rarer: what if I wait for a Paxman 25 to turn up and&#10;then find I don't like it as much as the Schmid but by that point the&#10;Schmid has gone? Such issues make making a perfect comparison very&#10;difficult.&lt;/p&gt;&#10;&#10;&lt;p&gt;The Schmid is very light. Staggeringly so. Even just comparing the&#10;bells from the Paxman and the Schmid (and the Schmid bell is taller -&#10;it joins on to the Horn further up the Horn, if you see what I mean),&#10;the Schmid bell is much lighter. This is, I believe, a consequence of&#10;the fact that the Schmid bell is entirely hand hammered, and only&#10;machine spun at the last minute. My understanding is that the Paxman&#10;bells are entirely machine spun. The Schmid uses thinner metal and is&#10;thus lighter. Now one of the best consequences of this is how much&#10;feedback you get from the Horn - you can really feel the Horn vibrate&#10;underneath you - the Schmid is vastly more alive than Henrietta my&#10;Holton and more alive than the Paxman too. The obvious analogy would&#10;be between a Formula One car where every single unnecessary gram has&#10;been removed and normal Sports car which has enough boot space to take&#10;a set of golf clubs. On the other hand, I've never driven either and,&#10;coming from a computing background, I'm rather aware of how bad most&#10;analogies really are.&lt;/p&gt;&#10;&#10;&lt;p&gt;A lot of people seem to rave about the valves on Schmids. They&#10;certainly have very little travel and are fast and light, but in my&#10;experience, if you oil daily almost any valve, it goes quickly. I've&#10;certainly kept the valves on Henrietta running faster than many of my&#10;friends who play Paxmans, and I'm sure that's completely down to&#10;regular oiling. No, for me, the most staggering difference is how&#10;alive the instrument feels. In comparison to Henrietta, the resistance&#10;of the instrument is both much less and more predictable. The bass end&#10;has much more tone and the notes are much better centred. Plus,&#10;Henrietta is in yellow brass and the Schmid is in gold brass. I find,&#10;as many do, that the gold brass gives a much warmer tone whilst&#10;playing quietly, and when pushed resists going razzy much much longer&#10;than the yellow brass. Plus, I can play about twice as loud as I can&#10;with Henrietta: almost to the point where I can hurt my right ear.&lt;/p&gt;&#10;&#10;&lt;p&gt;So I've also learnt some things about testing Horns. Firstly, your&#10;opinion on day one is almost worthless. You're probably used to&#10;playing in a certain room with a certain acoustic. Going into a shop&#10;and trying to make comparisons is not going to work out well; too much&#10;has changed. (On the other hand, the UK Schmid distributer came up and&#10;spent an hour with me in my usual practise room and thus we were able&#10;to discard many of the bell options quickly and accurately.) Secondly,&#10;and this really took me about a week to figure out, comparing Horns&#10;does not mean practising. When playing, or practising, I certainly&#10;just concentrate on the notes, the dots and everything else on the&#10;page, to the extent that I'm not actually really listening to myself&#10;particularly critically. I'll be very aware of splits and tuning and&#10;dynamics, but I'll be less aware of really how the Horn is feeling or&#10;what it's doing under me. So I've found that playing things that I&#10;know &lt;i&gt;really&lt;/i&gt; well, to the point of boredom, where you can stop&#10;thinking about the notes and think about the Horns instead is&#10;best. Also, if you're trying to test certain parts of the Horns, work&#10;in short phrases. For example, studies like Kopprash 13, Derek&#10;Bourgeois 4, or things like Cooke Rondo in B-flat, or Franz Strauss&#10;Nocturno work well when you pull them apart and just do single phrases&#10;on each Horn, for testing speed of response, centring of notes, high&#10;and low range, dynamic response etc etc. Just playing a few pieces&#10;over on each Horn really never gave me enough feedback - I'd get to&#10;the end of a piece and think &quot;Hmm, that went okay, but there were bits&#10;that went better on the other Horn and bits that went better on this&#10;Horn&quot;. Useful.&lt;/p&gt;&#10;&#10;&lt;p&gt;I found recording myself revealing, though I have very little&#10;equipment and so it was limited to quieter passages. Nevertheless, it&#10;gave me a different point of view and allowed me to hear things in my&#10;playing that I don't normally hear at all. I also persuaded a friend&#10;to come and listen blind to me playing. The ease with which he could&#10;identify when I was playing Henrietta was quite startling, and he made&#10;me think about aspects of tone colour more than I would have&#10;otherwise, mainly as he decided he preferred the gold brass with&#10;garland bell - rather throwing a spanner in the works!&lt;/p&gt;&#10;&#10;&lt;p&gt;So in conclusion, it's been fun. Turning up at a rehearsal with 3&#10;Horns and 5 bells is always a laugh and it's interesting how there is&#10;no Horn which is perfect: they're all a series of tradeoffs. It's also&#10;been very hard to be objective, to really concentrate on what the Horn&#10;is actually doing beneath me and to try to work out why I prefer one&#10;thing to another. I'm still not totally decided on which bell for the&#10;Schmid, though it's looking like the plain gold bell is the most&#10;flexible and versatile. Now I just need to rob a few banks, and come&#10;up with a name...&lt;/p&gt;&#10;</description></item><item><title>About a Horn, Part 1</title><link>http://www.wellquite.org/about_a_horn_1.html</link><pubDate>Fri, 18 Jan 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;This is really not the post I wanted to write. But this is&#10;necessary information to understand the upcoming posts.&lt;/p&gt;&#10;&#10;&lt;p&gt;As many of you will know, and should be evident by other posts on&#10;here, I play the French Horn. The French Horn really is a family of&#10;instruments and is really quite unique in this respect, I believe. So&#10;some brief history is needed, along with an explanation of some of the&#10;standard types of Horns available.&lt;/p&gt;&#10;&#10;&lt;p&gt;The French Horn was originally a hunting Horn: an instrument which&#10;was worn around the body of a horseman. It had no valves and this&#10;meant that it could only play notes on the natural harmonic series&#10;dictated by the length of the instrument. The actual truth is a little&#10;more complex, and I'm not totally confident in my own understanding so&#10;I'll leave that out. Because the Horn can only play notes within a&#10;particular harmonic series, when it was used in a non-hunting context,&#10;the composer would indicate how long the instrument should be so that&#10;the player could create the right notes. This is why music throughout&#10;the Baroque and Classical periods will indicate &quot;Horn in C&quot;, &quot;Horn in&#10;E-flat&quot;, &quot;Horn in &lt;i&gt;Something&lt;/i&gt;&quot; where &lt;i&gt;Something&lt;/i&gt; is a&#10;key. As a piece modulates, the composer will often ask the player to&#10;change key, during the piece. This often takes some time - removing&#10;certain tubing and replacing it with different lengths. This all but&#10;eliminates the possibility of asking the Horn player to play any&#10;chromatic passage.&lt;/p&gt;&#10;&#10;&lt;p&gt;Around the start of the 19th century, some clever sod invented&#10;valves. This allows the player to change the length of the Horn very&#10;very quickly, without doing any plumbing at all. Slowly, people&#10;settled on a &quot;Horn in F&quot; - basically, 12-ft long with three valves&#10;which can be used in combination to adjust the length of the Horn from&#10;&quot;Horn in F&quot; right down to &quot;Horn in B-natural&quot; - about 15-ft long, in&#10;semi-tone steps. You may be wondering about the missing keys - F-sharp&#10;up to B-flat - these overlap with notes available from the accessible&#10;keys and so you can in fact play all the notes - except in extremis:&#10;right at the lower end of the Horn there are gaps which can not easily&#10;be sounded. Fortunately, it's very seldom that a player is required to&#10;play that low.&lt;/p&gt;&#10;&#10;&lt;p&gt;Now the idea was that composers should stop thinking about the&#10;harmonic series and should just write chromatically for &quot;Horn in&#10;F&quot;. Leave it up to the Horn player to work out which fingering / which&#10;valves are actually needed for a particular note. For example, if the&#10;composer wanted the Horn to sound a G, below middle C, they should&#10;just write D (having adjusted by a fifth for the &quot;Horn in F&quot; bit) and&#10;then the Horn player will see that D and depress the first valve,&#10;lowering the Horn from &quot;Horn in F&quot; to &quot;Horn in E-flat&quot; which contains,&#10;in its harmonic series, the desired G (though the Horn player doesn't&#10;consciously think this. They just think, &quot;it's a D&quot;).&lt;/p&gt;&#10;&#10;&lt;p&gt;However, some composers didn't get the message, and in some cases&#10;continued thinking for the Horn player, asking them to change to &quot;Horn&#10;in E-flat&quot; and then writing an E (following from the above&#10;example). It achieves the same effect, but in increasingly requires&#10;the Horn player to mentally rewrite the piece to &quot;Horn in F&quot; and then&#10;using the correct fingering. In fact, even in the 20th century, you&#10;had composers such as Richard Strauss writing his second Horn Concerto&#10;(1943) for &quot;Horn in E-flat&quot;. I doubt anyone has ever played in on a&#10;&quot;Horn in E-flat&quot;: almost without doubt, everyone playing it will be&#10;using a standard &quot;Horn in F&quot; and performing the necessary mental&#10;transposition to select the correct fingering and make the right notes&#10;sound.&lt;/p&gt;&#10;&#10;&lt;p&gt;So back to my original point about the family of instruments that&#10;are known as French Horns. The following are all modern French Horns:&#10;&lt;ul&gt;&#10;&#10;&lt;li&gt;Single Horn in F. This is what I described above: the basic length&#10;is around 12-ft, and it has three valves that allow it to achieve the&#10;harmonic series in the keys, F, E, E-flat, D, D-flat, C and B. This is&#10;the standard starter instrument and is what I first learnt on. A good&#10;&quot;Single F&quot; can often be only a few hundred pounds and the instrument&#10;is reasonably light.&lt;/li&gt;&#10;&#10;&lt;li&gt;Single Horn in B-flat. Because as you try and play higher, the&#10;harmonics get closer and closer together, it becomes much easier to&#10;miss the desired note and instead play a nearby harmonic. You will&#10;immediately know when this happens and it's very annoying. If you&#10;shorten the Horn then you widen the gap between the harmonics again,&#10;making it harder to hit the wrong note; the Horn feels more secure. A&#10;Horn in B-flat is 9-ft long: literally twice the length of a standard&#10;Trumpet in B-flat, and a 4th higher than the standard Horn in&#10;F. Again, it will have 3 valves which will allow it to achieve 7 keys&#10;in total, descending in semitones from B-flat through to E.&lt;/li&gt;&#10;&#10;&lt;li&gt;Double Horn in F/B-flat. This is the standard Horn and what the&#10;vast majority of players will use. The instrument is a combination of&#10;both the Single Horn in F and the Single Horn in B-flat. It has one&#10;bell and one mouthpipe, but a fourth valve allows the player to select&#10;whether the B-flat side or the F side of the instrument is in&#10;use. Typically, the player will use the B-flat side almost exclusively&#10;for higher notes and the F side for lower notes, though depending on&#10;almost anything, virtually anything is possible. Almost every note&#10;will have at least two different fingerings - some of which will offer&#10;a more in-tune note or a note which is harder to miss or a fingering&#10;pattern which is easier to achieve in a fast passage.&lt;/li&gt;&#10;&#10;&lt;li&gt;Alto Horn in B-flat/F. If the player is going to be playing a lot&#10;of very high notes, the security of the B-flat side is often not&#10;enough. So therefore halve the F-side to a 6-ft F-side which is now&#10;shorter than the B-flat side, making the really high notes much more&#10;secure. Note that I say secure. I do not mean easier. The source of&#10;all sound on a brass instruments in the player's lips. Regardless of&#10;the length of the instrument, the player must still make the&#10;vibrations in the lips at the correct pitch. A shorter instrument&#10;simply places the harmonics available further apart, reducing the risk&#10;that you mistakenly, given slight inaccuracies in the vibrations&#10;coming from the player's lips, play the wrong harmonic. Other than the&#10;halved F-side, the Alto is the same setup as the Double. With the&#10;decreasing length of the Horn, the ability to play low notes well&#10;deteriorates dramatically. This is really why the Alto is not that&#10;common: there are just too many pieces that demand the Horn player&#10;play reasonably low notes which are not in tune or sound pleasant on&#10;an Alto.&lt;/li&gt;&#10;&#10;&lt;li&gt;Triple Horn in F/B-flat/F-alto. Yes, you saw it coming. All three&#10;instruments offering a tremendous range. It'll have at least 5, if not&#10;6 valves and normally 5 valve levers - two of which will be operated&#10;by the thumb. Um, yeah. There are a number of problems with&#10;triples. Firstly, you have a lot of tubing, which makes them very&#10;heavy. Secondly, you really don't want the bore of the tubing&#10;(i.e. its diameter) to be the same for all three instruments: the&#10;F-alto side really should be a smaller bore in order to offer a&#10;similar resistance to the player across all three sides of the&#10;instrument. This often ends up forcing a valve very close to the&#10;mouth-piece end of the mouthpipe, which then often demands that the&#10;main tuning adjustment is directly after the mouthpiece. This then&#10;means that as you tune your Horn, the Horn moves further away or&#10;closer to the player. Oh, and they're very expensive too, simply&#10;because they demand both more material and much more labour than a&#10;standard Double.&lt;/li&gt;&#10;&#10;&lt;li&gt;Double Descant in F/B-flat. Even higher. 6-ft F-side and 4.5-ft&#10;B-flat side. I.e. the B-flat side is actually the same as a Trumpet. I&#10;don't think I've ever seen one of these in the flesh. They will only&#10;be used in very certain circumstances, for example Baroque music was&#10;often written for much shorter Horns and is in fact often played on&#10;Trumpets these days as it's so screamingly high.&lt;/li&gt;&#10;&#10;&lt;li&gt;There are other possibilites available too (I've not mentioned&#10;anything about &quot;compensating&quot; Horns). All in all, there are probably&#10;about a dozen different &quot;standard&quot; French Horns.&lt;/li&gt;&#10;&#10;&lt;/ul&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;But, and this is finally my point, the composer doesn't care what&#10;the player is actually playing on, and, to a certain extent, neither&#10;does the player: the player will (almost) always think in terms of a&#10;standard Horn in F. The player will know, given a Horn in F part, how&#10;they should play any given note. The composer will write for a Horn in&#10;F. The player may be using a Single B-flat, but the player will think&#10;in terms of Horn in F, and will read the part without applying any&#10;mental transposition, but will make the correct vibrations and use the&#10;correct fingering such that the desired note will sound through some&#10;combination of achieved length and harmonic within that length.&lt;/p&gt;&#10;&#10;&lt;p&gt;Contrast this with Trumpets, where the composer will still, today&#10;write for Trumpet in B-flat, or C or D or whatever. Clarinets in&#10;B-flat or A or E-flat (or sometimes C). Flutes, Alto Flutes, Bass&#10;Flutes, Piccolo. Even Trombones will be explicitly written for Bass,&#10;Tenor and Alto Trombone. Thus the Horn is unique in the number of&#10;instruments that are available that are still called French Horns and&#10;the fact that the composer has long since given up caring (or in most&#10;cases understanding) about what particular type of Horn the player is&#10;using.&lt;/p&gt;&#10;&#10;</description></item><item><title>Konzertst&amp;uuml;ck for four Horns and Orchestra</title><link>http://www.wellquite.org/konzertstueck.html</link><pubDate>Wed, 28 Nov 2007 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;As some of you will know, I play the French Horn. It is a fine&#10;instrument capable of soaring highs and shattering depths, but there&#10;isn't really much concerto repertoire out there for the Horn. Unlike&#10;the Piano or Violin, there aren't hundreds or thousands of&#10;concertos. There are about seven which are well known and you might&#10;get up to 50 if you count &lt;i&gt;everything&lt;/i&gt; regardless of quality.&lt;/p&gt;&#10;&#10;&lt;p&gt;Even, seemingly, wackier than a concerto for Horn is a concerto for&#10;four Horns. But Schumann was &quot;up for it&quot;. So there's this concerto&#10;with four solo parts for four horns and then the usual orchestral&#10;parts as well. &lt;b&gt;And I'm playing the second solo part!&lt;/b&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;The &lt;a href=&quot;http://www.union.ic.ac.uk/arts/sinfonietta/&quot;&gt;Imperial&#10;Sinfonietta orchestra&lt;/a&gt; are giving their concert on &lt;b&gt;Friday, 7th&#10;December at 8pm in the Great Hall at Imperial, South&#10;Kensington&lt;/b&gt;. The &lt;a&#10;href=&quot;http://www.union.ic.ac.uk/arts/sinfonietta/&quot;&gt;programme&lt;/a&gt;&#10;includes the Konzertst&amp;uuml;ck as the second piece in the first half&#10;with Shostakovich's mighty and very popular 5th Symphony as the second&#10;half.&lt;/p&gt;&#10;&#10;&lt;p&gt;If you're not otherwise busy, engaged or determined to cause harm&#10;to your liver, please come along. Tickets should be available on the&#10;door except if we've managed to pre-sellout the concert, which is&#10;unlikely. This a fairly rare piece, seldom performed but providing&#10;vastly more entertainment than Rach's 2nd Piano Conc., or Bruch's&#10;Violin Conc... Be there!&lt;/p&gt;&#10;</description></item><item><title>Shared Mutable Memory Must Die</title><link>http://www.wellquite.org/shared_mutable_memory_must_die.html</link><pubDate>Sat, 17 Nov 2007 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;On Friday I had the opportunity to meet &lt;a&#10;href=&quot;http://armstrongonsoftware.blogspot.com/&quot;&gt;Joe Armstrong&lt;/a&gt; who&#10;created the &lt;a href=&quot;http://www.erlang.org&quot;&gt;Erlang&lt;/a&gt; programming&#10;language. He was visiting London and popped into &lt;a&#10;href=&quot;http://www.lshift.net/&quot;&gt;LShift&lt;/a&gt; to give a talk. It was only&#10;meant to be a 15 minuted talk but ended up at a couple of hours; all&#10;the better for us! Now I'm pretty big fan of Erlang, though I prefer&#10;statically strongly typed languages like Haskell. It is true that you&#10;can do things in dynamically strongly typed languages like Erlang that&#10;you can't do in statically strongly typed languages but personally I&#10;don't think these are necessarily good things and I think the&#10;advantages of statically typed languages vastly outweigh any loss of&#10;expression. But that's not what I really want to write about now.&lt;/p&gt;&#10;&#10;&lt;p&gt;I have heard tales of the strangeness of the Grand Old Men of&#10;Computing. I guess Joe's probably still a bit young to fit in to that&#10;category, but the eccentricities are certainly there for all to see,&#10;making for an amusing if at times bemusing talk and general&#10;discussion. What I was most happy about is that he reinforced many of&#10;my own beliefs about where we're heading, beliefs for which I've&#10;received sod all support from those around me at Imperial. Because&#10;Joe's out there actually working on these problems day in, day out, he&#10;speaks from an experienced and authoritative position which again,&#10;makes me feel much better about my own convictions.&lt;/p&gt;&#10;&#10;&lt;p&gt;The fundamental problem is that most programmers believe in a model&#10;of a computer which is just not accurate any more. Languages like C&#10;and C++ reinforce this belief in a broken model of computing and the&#10;hardware manufacturers have hardly helped as they've really just been&#10;throwing more transistors and silicon at the problem like a bandage,&#10;trying to patch up the problems and maintain the illusion.&lt;/p&gt;&#10;&#10;&lt;p&gt;The illusion comes from the idea that multiple CPUs or Cores on a&#10;CPU can share data simply by reading and writing values to the same&#10;address. This requires a single unified address space (i.e. address&#10;&lt;em&gt;x&lt;/em&gt; means the same location in memory from the perspective of&#10;all CPU cores (yes, ignore page tables and virtual address spaces for&#10;the moment please)). Originally, this may not have seemed such a crazy&#10;idea: memory used to be very fast with respect to CPU speeds, whereas&#10;now it's much much slower. Because it's been getting slower and&#10;slower, manufacturers have added caches all over the place. We have&#10;caches on hard disks, several on CPUs themselves, various caches that&#10;are shared between cores, and some which are private to each core. We&#10;have separate caches for instructions and for data. In some cases we&#10;even have caches for instructions after they've been decoded by the&#10;CPU. There are many caches. And therein lies part of the problem: if&#10;you only have one copy of a given piece of data, it might be possible&#10;to come to some kind of global consensus about its current value. But&#10;as soon as you start duplicating the data into several caches, working&#10;out who &lt;em&gt;owns&lt;/em&gt; a particular value and how modified values&#10;should be combined in order to update the main memory becomes much&#10;much harder. So we have &lt;em&gt;Cache Coherency Protocols&lt;/em&gt; which try&#10;to intercept memory accesses and make sure that multiple caches can't&#10;contain updated values for any given address. Sort of.&lt;/p&gt;&#10;&#10;&lt;p&gt;By not exposing the cache to the programmer, and by trying to&#10;maintain this shared mutable memory concept, programmers are forced to&#10;resort to locking and similar techniques in order to try to ensure&#10;that concurrent modifications to shared data simply don't&#10;happen. Modifications to the same set of addresses must not happen&#10;concurrently, but sequentially so that the data is mutated in a&#10;predictable, safe and intended way.  Using locks is, as we all know,&#10;inherently dangerous: deadlocks can occur very easily and it's&#10;difficult to get the balance right between coarse grained locking&#10;which is easier to debug and reason about but may reduce performance&#10;by unnecessary locking, and fine grained locking which may allow&#10;better performance, but the number of locks makes it much harder to&#10;reason about and have and kind of confidence in the correctness of the&#10;locking and freedom of deadlocks. In fact, it's simply unwise to ever&#10;believe that any non-trivial multi-threaded application is deadlock&#10;free. It's really quite unlikely. Furthermore, deadlocks are only one&#10;issue arising from the general race conditions inherent in the&#10;shared-mutable-state world. Thread scheduling, timing and other issues&#10;can all combine with or without locks to result in unintended&#10;consequences which are often difficult to track down, repeat, debug&#10;and fix.&lt;/p&gt;&#10;&#10;&lt;p&gt;Perhaps the more significant problem is scalability. If you&#10;designed a computer system for a million CPUs and then scaled that&#10;design down to one CPU you have the knowledge that as your needs grow,&#10;your design will scale up and will work correctly. If you design for&#10;one CPU and then try to scale up, you're going to need a lot of&#10;bandages and a big sewing kit to sew up all the gaps. The reason why&#10;this is perhaps the more significant problem is the direction in which&#10;CPU manufacturers are heading. Now AMD and Intel are both thinking&#10;that somewhere between 2 and 8 cores would be fine for most desktop&#10;users. But for servers, it still seems to be a case of the more, the&#10;merrier. So actually considering how you would work with a million&#10;CPUs or cores isn't the far-fetched an idea. It's certainly&#10;unbelievably short-sighted to think that you can get away with only&#10;considering the case for a single core or two. If you design for a&#10;million CPUs, you also come to some significant conclusions early on&#10;in the process. For example, you realise that it's a very silly idea&#10;to pretend that all memory should be equally available to all CPUs at&#10;the same time. If you try to do that, then you'll end up with a memory&#10;system that is phenomenally slow for all CPUs and fast for none&#10;because the memory system will have to have enormous bandwidth to&#10;process all the requests from a million CPUs and will potentially&#10;suffer horrible performance problems when trying to regulate access to&#10;the shared mutable memory.&lt;/p&gt;&#10;&#10;&lt;p&gt;To expand on this a bit further, Joe pointed out what actually has&#10;to happen when you &quot;take a lock&quot;. A lock obviously has to be&#10;&lt;em&gt;safe&lt;/em&gt; by which I mean that if two threads on two different&#10;CPUs try to take the same lock at the same time then only one can&#10;succeed. Furthermore, a lock is usually just a particular value at a&#10;particular location in memory. So if two threads wish to take the same&#10;lock, they both have to try to read the value of the lock and update&#10;it &lt;em&gt;atomically&lt;/em&gt;. CPU instruction sets normally provide a&#10;dedicated instruction to do this, but it affects the memory system and&#10;often causes lots of work for the cache coherency protocol to deal&#10;with. If you have a million CPUs all trying to access the same value,&#10;you have something of a problem as all million CPUs will try to issue&#10;the instruction to test and set the lock and that will cause the&#10;memory system to send the value of the lock to all CPUs and track&#10;which CPU got there first (agh, &lt;em&gt;first&lt;/em&gt;. That means we've got&#10;to place these requests in order somehow. So they actually become&#10;sequential, not parallel, and that means that the millionth CPU may be&#10;waiting a long time before its request gets serviced) and thus has the&#10;right to write back to the lock whilst the others cannot. And when&#10;that value is written, the lock is taken, the new updated value will&#10;then have to be sent out to the remaining million minus one CPUs so&#10;that they can then see that they cannot take the lock. So all but one&#10;of the CPUs have stalled waiting for the memory system. If there's&#10;much contention for the same addresses, this can get pretty&#10;expensive.&lt;/p&gt;&#10;&#10;&lt;p&gt;If you instead build a memory system where the memory is&#10;distributed, local to each CPU, then you can get very very fast access&#10;to the local memory. At this point you might consider whether it's&#10;worth your while trying to maintain the illusion of a single address&#10;space. Whilst there's lots of pressure from software vendors to ensure&#10;the single address space remains, there are lots of reasons why I&#10;think it will eventually die. Firstly, memory access now becomes&#10;irregular: if your thread is running on a given CPU and the addresses&#10;it is accessing are local to that CPU then memory access will be very&#10;fast. But if it's accessing addresses which are not local to that CPU&#10;then memory performance is going to be very slow. When you have only a&#10;few &lt;em&gt;hops&lt;/em&gt; to get to the desired memory banks, it might be&#10;manageable: aggressive caching and pre-fetching might just hold you&#10;together. But with a million CPUs, the average number of hops is going&#10;to go up a long way. And that's &lt;em&gt;really&lt;/em&gt; going to hurt&#10;performance.&lt;/p&gt;&#10;&#10;&lt;p&gt;So what happens if you throw out the single address space? Well&#10;firstly, you can make memory accesses go even faster. You can throw&#10;out all the cache coherency silicon and you can throw out regulating&#10;memory access. And what do you have? Well, if you squint a bit, you&#10;have a million CPUs, each with their own, very big addressable&#10;cache. And then if you squint a bit more, you suddenly realise this is&#10;quite similar to what we already have with, e.g. the &lt;a&#10;href=&quot;http://en.wikipedia.org/wiki/Cell_microprocessor&quot;&gt;Cell CPU&lt;/a&gt;&#10;and &lt;a href=&quot;http://www.tilera.com/products/processors.php&quot;&gt;Tilera&lt;/a&gt;.&lt;/p&gt;&#10;&#10;&lt;p&gt;So people then turn around and ask how you can communicate between&#10;threads? - it's really quite an essential feature. Well, you have&#10;networks, just like in large distributed systems that we have today. A&#10;network is &lt;em&gt;sort of&lt;/em&gt; in the direction of shared mutable state,&#10;but it's vastly safer and more predictable. And so this is why Erlang,&#10;and its message-passing concurrency is so obviously the correct&#10;solution. Two CPUs can actually send a message to the same destination&#10;at the same time and have the messages arrive in some order that does&#10;not result in one message being lost. Not true with shared mutable&#10;state. Whilst you can use shared mutable state to implement message&#10;passing and whilst if you do, you will still need locks (in fact, the&#10;normal implementation of Erlang does this on typical consumer&#10;computers), firstly, the sections of code which need to be analysed&#10;and carefully thought out from a deadlocking-avoidance perspective can&#10;be made very small, and secondly, the use of shared mutable state is&#10;really only a stop-gap measure. Also, please note that I'm not&#10;pretending you can't deadlock in message-passing systems. You can. But&#10;it tends to be harder.&lt;/p&gt;&#10;&#10;&lt;p&gt;If you think about how you'd implement message passing in such a&#10;million CPU system, you'd send messages from CPU to CPU directly. You&#10;wouldn't go out to some shared mutable memory bank as that would be&#10;dog slow. If you look at the design of the Cell or Tilera64, it's easy&#10;to see how targeting the various cores directly as the destination of&#10;the message would be much much faster. Now at this point you might&#10;raise a hand and say, &lt;em&gt;well, if this is all in hardware, you're&#10;going to have finite message buffers and other annoying limitations&#10;like that&lt;/em&gt;. True, you will. There are a couple of things I'd like&#10;to point out in return though. Firstly, ethernet has dealt with this&#10;issue for a long time. CSMA/CD (ensuring multiple hosts don't try and&#10;send on the same wire at the same time), and TCP/IP ensures that&#10;messages don't get lost, get buffered and are resent when&#10;necessary. And sure, there are still limitations in buffer size - hey,&#10;this is the Real Physical World after all, limitations of size will&#10;always exist. But the buffers just have to be big &lt;em&gt;enough&lt;/em&gt; so&#10;that they don't cause issues most of the time. It's an engineering&#10;tradeoff. The other point is that you could, if you still have some&#10;general shared mutable memory, use that as a larger area to send&#10;messages to if the intended target is otherwise swamped with work to&#10;do.&lt;/p&gt;&#10;&#10;&lt;p&gt;And this really puts the final part of the picture in&#10;place. Currently, if your computer runs out of memory, it will start&#10;using the hard disc to store areas of memory that it thinks haven't&#10;been accessed recently - swapping or paging out to disk. This works&#10;very well. So if you consider something like the Tilera64, you could&#10;imagine that you do the same, but one level up: when your own&#10;core-local memory fills up, you evict parts of it out to the general&#10;memory. Of course, since the values you've sent out to general memory&#10;will only be recalled by you, you &lt;em&gt;still&lt;/em&gt; don't need to provide&#10;for shared mutable memory: the memory is certainly shared between many&#10;CPU cores, but any given address is only ever accessed by a single&#10;core.&lt;/p&gt;&#10;&#10;&lt;p&gt;As ever, the problem here is legacy code. The fact that more&#10;interesting CPU designs are starting to appear should be an indication&#10;that in the not too distant future, things are going to change. What's&#10;likely is that eventually we get a hybrid design where you can put&#10;your CPU into different modes: fundamentally whether the CPU-local&#10;cache appears as a separate addressable memory space or whether it's&#10;the same old transparent caching layer we're used to. Networks on a&#10;chip are already here and won't be going. Hopefully, if this trend&#10;continues, we shall find that certain warts of the computing industry,&#10;such as C, disappear from general use, appearing only in the most&#10;specific and suitable corners. Maybe even C++ and Object Orientation&#10;in general all but disappear as the assumptions of computing on which&#10;they are built become ever slower and unwieldy to maintain.&lt;/p&gt;&#10;&#10;</description></item><item><title>New Site (followup)</title><link>http://www.wellquite.org/new_site_2.html</link><pubDate>Sun, 04 Nov 2007 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;I guess even a few months ago, I would not have attempted to write&#10;scripts for generating a website in Haskell. I would have succumbed to&#10;old habits, reasoning that Perl is the correct language in which to do&#10;text manipulation and to just bite the bullet and get on with it. In&#10;hindsight, I'm very glad I did attempt to do it in Haskell. I'm left&#10;with just three programs, one which takes articles and generates JSON&#10;from them, one that takes JSON and generates HTML from them, and one&#10;that takes JSON and generates RSS from them. All three are either just&#10;under or just over 100 lines of code, and sure, I used as many&#10;libraries as I could, but I fail to see how I could have done the same&#10;work in less code in Perl.&lt;/p&gt;&#10;&#10;&lt;p&gt;So a little bit about the structure of this site then. I write text&#10;files, where the file name is the &lt;em&gt;computer&lt;/em&gt; name of the&#10;article, the first line of the file is the &lt;em&gt;human&lt;/em&gt; name of the&#10;article, and the rest is raw HTML. I maintain a set of files that&#10;point at the &lt;em&gt;head&lt;/em&gt; of each chain - the blog is a chain as are&#10;the other pages linked from the left. Each plain text file is&#10;converted to JSON and inserted into the list - it's a double linked&#10;list. Time is also added at this point.&lt;/p&gt;&#10;&#10;&lt;p&gt;The JSON version is then used to generate the full perma-link&#10;version by combining with a template, using the &lt;a&#10;href=&quot;/chunks/&quot;&gt;Text.HTML.Chunks&lt;/a&gt; module I wrote a while ago. Then&#10;you just point the RSS builder at the pointers to the head of the&#10;chain and it generates RSS for the last ten entries. Pretty simple&#10;really. There's a JSON module that I'm very familiar with, and I&#10;grabbed an RSS module from &lt;a&#10;href=&quot;http://hackage.haskell.org/&quot;&gt;hackage&lt;/a&gt; which I then edited so&#10;that it uses &lt;code&gt;Data.Time&lt;/code&gt; rather than the old and broken&#10;&lt;code&gt;System.Time&lt;/code&gt; module.&lt;/p&gt;&#10;&#10;&lt;p&gt;To take just an example of the power that becomes available: The&#10;JSON files store the date in a human form. This is probably a mistake,&#10;but if I did a proper timestamp, I'd then have to deal with that in&#10;Javascript which probably wouldn't be pleasant. So, in order to build&#10;the RSS, the RSS module I need wants the &lt;code&gt;PubDate&lt;/code&gt; as a&#10;proper time format, not just a String. So I have to parse it. The&#10;problem is that none of the time formatting codes include the English&#10;number suffixes: e.g. the &lt;em&gt;nd&lt;/em&gt; in 2nd. So, in a &lt;em&gt;normal&lt;/em&gt;&#10;language, I'd have to write some horrible nested &lt;em&gt;if&lt;/em&gt; statement&#10;to test for &lt;code&gt;%e&lt;/code&gt;&lt;em&gt;st&lt;/em&gt;, &lt;code&gt;%e&lt;/code&gt;&lt;em&gt;nd&lt;/em&gt;,&#10;&lt;code&gt;%e&lt;/code&gt;&lt;em&gt;rd&lt;/em&gt; or &lt;code&gt;%e&lt;/code&gt;&lt;em&gt;th&lt;/em&gt;&#10;(&lt;code&gt;%e&lt;/code&gt; is the &lt;em&gt;day of month, space padded&lt;/em&gt;). But in&#10;Haskell, parsing is well known as an action that can fail, so it's&#10;wrapped in &lt;code&gt;Maybe&lt;/code&gt;. &lt;code&gt;Maybe&lt;/code&gt;'s also in&#10;&lt;code&gt;MonadPlus&lt;/code&gt;, so I can simply write:&lt;/p&gt;&#10;&#10;&lt;code&gt;&lt;pre&gt;&#10;rebuildDate :: String -&gt; Maybe UTCTime&#10;rebuildDate dateStr&#10;    = msum . map (flip (parseTime dtl) dateStr) $ parsers&#10;    where&#10;      dtl = defaultTimeLocale&#10;      parsers = [ &quot;%A, %B %est, %Y&quot;&#10;                , &quot;%A, %B %end, %Y&quot;&#10;                , &quot;%A, %B %erd, %Y&quot;&#10;                , &quot;%A, %B %eth, %Y&quot;&#10;                ]&#10;&lt;/pre&gt;&lt;/code&gt;&#10;&#10;&lt;p&gt;Now that is rather beautiful. The first one to succeed will be the&#10;one who's result will be returned - that's what &lt;code&gt;msum&lt;/code&gt; and&#10;&lt;code&gt;MonadPlus&lt;/code&gt; gets us. Ok, so if you're not used to Haskell,&#10;it might not strike you as being that clear, but let's consider the&#10;alternatives.&lt;/p&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;Haskell, but without the &lt;code&gt;msum&lt;/code&gt;:&#10;&#10;&lt;code&gt;&lt;pre&gt;&#10;rebuildDate :: String -&gt; Maybe UTCTime&#10;rebuildDate dateStr&#10;    = case parseTime dtl &quot;%A, %B %est, %Y&quot; dateStr of&#10;        (Just date) -&gt; return date&#10;        Nothing -&gt; case parseTime dtl &quot;%A, %B %end, %Y&quot; dateStr of&#10;                     (Just date) -&gt; return date&#10;                     Nothing -&gt; case parseTime dtl &quot;%A, %B %erd, %Y&quot; of&#10;                                  (Just date) -&gt; return date&#10;                                  Nothing -&gt; parseTime dtl &quot;%A, %B %eth, %Y&quot;&#10;    where&#10;      dtl = defaultTimeLocale&#10;&lt;/pre&gt;&lt;/code&gt;&#10;&#10;&lt;p&gt;Yep, that's &lt;em&gt;really&lt;/em&gt; nice. We've got much more code there&#10;and the horrible nested control flow. Let's consider expanding that to&#10;twenty different date formats. In fact, this is going to be the same&#10;pattern for all &lt;em&gt;normal&lt;/em&gt; languages so I won't bother repeating&#10;them here. The only difference is that most languages won't force you&#10;to deal with the error case, so your code will probably be buggy.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&#10;&lt;li&gt;Regular Expressions. The problem with this approach is dealing&#10;with everything else in the format string - you don't want to start&#10;putting the days of the week (&lt;code&gt;%A&lt;/code&gt;) or the full name of the&#10;month (&lt;code&gt;%B&lt;/code&gt;) in the regular expression. In fact, you don't&#10;want to use &lt;code&gt;\d+&lt;/code&gt; for the day of the month either. Nor will&#10;&lt;code&gt;\d{,2}&lt;/code&gt; do either - both allow values for the day (number)&#10;of the month that &lt;code&gt;%e&lt;/code&gt; does not (e.g. 99). So the best you&#10;could do would be to parse using a date library the &lt;code&gt;&quot;%A, %B&#10;%e&quot;&lt;/code&gt; and then, if all's okay, drop the next 4 chars and then&#10;parse the &lt;code&gt;&quot;%Y&quot;&lt;/code&gt;. But that accepts strings that should be&#10;rejected, so use the regular expression to match on&#10;&lt;code&gt;&quot;(st|nd|rd|th), &quot;&lt;/code&gt;. And then grab the &lt;code&gt;&quot;%Y&quot;&lt;/code&gt;.&lt;/li&gt;&#10;&#10;&lt;/ul&gt;&#10;&#10;&lt;p&gt;My point is that lots of people seem to think firstly that Haskell&#10;isn't suitable for &lt;em&gt;real world&lt;/em&gt; tasks, and secondly, that the&#10;things Haskell makes you deal with just get in the way. Hopefully,&#10;this has illustrated that the things Haskell makes you deal with are&#10;useful things, like errors, and failures, and it actually has rather&#10;wonderful machinery to prevent you from forgetting about these things&#10;which other languages don't. Any what's more, you can use such stuff&#10;to your advantage to write small amounts of very reliable code.&lt;/p&gt;&#10;&#10;&lt;p&gt;I don't really think that Haskell makes it easier to write simple&#10;programs. But it does make it quite a lot harder to write faulty&#10;programs.&lt;/p&gt;&#10;</description></item><item><title>New Site</title><link>http://www.wellquite.org/new_site.html</link><pubDate>Sat, 03 Nov 2007 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;Once again, this site has changed. Some things may not yet be working&#10;- RSS feeds for example, and some links may be broken too. I got fed&#10;up with WordPress, mainly due to the amount of comment spam that was&#10;going on. So there are now no comments. If you actually want to&#10;comment on something, I'm fairly sure you'll be able to work out how&#10;to do that.&lt;/p&gt;&#10;&#10;&lt;p&gt;Also, I decided that I dislike the amount of computation that goes&#10;into producing a single page with WordPress. It strikes me that if you&#10;think about the energy use, or just the CPU cycles, regenerating every&#10;page without a caching layer for each page request is going to be&#10;quite a lot of work. So this one, hand written, is entirely static. I&#10;have some programs that I've written (in &lt;a&#10;href=&quot;http://www.haskell.org/&quot;&gt;Haskell&lt;/a&gt;, obviously!) that help me&#10;generate the HTML from templates (they do a few other things too) but&#10;other than that, it's all static. And by using XML HTTP Request (err,&#10;AJAX in other words), I cut down further on the volume of data&#10;transferred. Yes folks, that's my excuse for gratuitous use of&#10;AJAX!&lt;/p&gt;&#10;&#10;&lt;p&gt;Permalinks are there - just click on the title of each entry. I've&#10;made sure this degrades nicely in less feature-rich browsers and I've&#10;even tested it in Internet Explorer. Enjoy!&lt;/p&gt;&#10;</description></item><item><title>Anything but an iPhone</title><link>http://www.wellquite.org/anything_but_an_iphone.html</link><pubDate>Tue, 03 Jul 2007 00:00:00 UTC</pubDate><description>&#10;&#10;&lt;p&gt;There are an increasingly large number of people who hate the iPod. Pretty much anyone who really cares about audio quality, or even value for money, or who feel that it's a public duty to inform the world that Apple aren't the only company to make MP3 players fall into this camp. And, the nice thing about being in this camp is that there really are devices out there that are significantly better than the iPod, in terms of features and value for money. One good example is the &lt;a href=&quot;http://www.iriver.eu.com/multifunction_player.html?p_id=757&quot;&gt;iRiver Clix 2&lt;/a&gt; (&lt;a href=&quot;http://www.pocketables.net/2007/04/review_iriver_c.html&quot;&gt;review&lt;/a&gt;): no need to use iTunes, a sporting chance of making it work on Linux, decent FM radio, high quality audio output, support for Ogg Vorbis up to Q10, really amazing AMOLED display, arguably a more intuitive interface than the iPod, support for video up to 2Mbps etc etc.&lt;/p&gt;&#10;&#10;&lt;p&gt;In short, owning such a device gives you the smug feeling that you're somehow better than the brainwashed masses who think that the peak of mobile audio is a black shadow dancing to distorted crap coming out of some of the world's worst earphones (go buy yourself some &lt;a href=&quot;http://www.headphone.com/guide/by-headphone-type/in-ear-monitor-type/&quot;&gt;Ear Canal 'phones&lt;/a&gt; instead). On the other hand, there do seem to be people who think that Apple are the only people to make MP3 players; whilst humans are pretty stupid, you have to admire Apple for being able to make people think this: Apple were neither first nor are the best, but, there was a point at which they were the best. Now they're just cashing in.&lt;/p&gt;&#10;&#10;&lt;p&gt;The iPhone is at a similar point. Having just slugged all the way through &lt;a href=&quot;http://anandtech.com/gadgets/showdoc.aspx?i=3027&amp;amp;p=1&quot;&gt;Anand's review of the thing&lt;/a&gt;, it's pretty clear that there are areas in which this device truly is the best thing out there. It's also pretty obvious that there are a host of missing features and other fairly minor annoyances, such as its tendency to melt your ear when making a phone call (what?! People still use mobile phones to make phone calls?!). I actually find it pretty surprising that other companies haven't preempted the iPhone given they are aware of Apple's history, the religious cult of Job-worshippers, and that there is nothing new that the iPhone does - it's the combination of features, packaging and technologies that makes it work well. Maybe this is just better evidence of how little real thought goes into designing a new consumer device and thus why companies like Apple really are a good thing. Some examples:&lt;/p&gt;&#10;&#10;&lt;ol&gt;&#10;&#10;&lt;li&gt;Overdoing unused features. The iPhone only has two profiles: noisy and silent. These have a minimum of options, but because there are only two, you can put it on a slider switch on the outside of the device and make it damn easy to switch between the two. How many people actually use more than two? My PEBL has about 6, and the only two I've bothered configuring and hence use are &quot;silent&quot; and &quot;vibrate+ring&quot;. Clearly, actually paying attention to the features that people use pays off here as a better interface is achieved.&lt;/li&gt;&#10;&#10;&lt;li&gt;Refusing to see the relationship between different applications on PC platform and mobile. Apple, and the iPhone, have made SMS seem like IM. This is a very good thing, only takes a few moments to realise why and significantly improves the usability of the device. Effectively, we finally have threading for SMS, based on sender/receiver. Now that it's been done once, I can't believe any mobile won't do this - it's such a no-brainer.&lt;/li&gt;&#10;&#10;&lt;/ol&gt;&#10;&#10;&lt;p&gt;So, how long before we actually get something that's better? Dunno. Will there be stuff coming out that's better. Definitely. On the other hand, given that the network operators have a big say in what phones are supported, it will require more effort than beating the iPod. I would really love to see the &lt;a href=&quot;http://www.openmoko.org/&quot;&gt;openmoko&lt;/a&gt; guys produce iPhone beaters, but it's more likely that bigger manufacturers will have to do it. The other factor is that, I would guess, developing and releasing an MP3 player is a lot cheaper and easier than developing a whole phone.&lt;/p&gt;&#10;&#10;</description></item></channel></rss>