<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>Sun, 20 Jul 2008 17:30:20 UTC</lastBuildDate><item><title>What is the point?</title><link>http://www.wellquite.org/what_is_the_point.html</link><pubDate>Sun, 20 Jul 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;Yesterday, I got a &lt;a href=&quot;/non-blog/sessions.pdf&quot;&gt;paper&lt;/a&gt;&#10;rejected from the &lt;a&#10;href=&quot;http://www.haskell.org/haskell-symposium/2008/&quot;&gt;Haskell&#10;Symposium 2008&lt;/a&gt;, and I'm going to talk about the reviews I got. I&#10;realise this is highly unprofessional, but at this stage I really&#10;don't care, especially as in my opinion, the behaviour of some of the&#10;reviewers is also highly unprofessional. Also, this is the &quot;calm&quot;&#10;version of this rant: fortunately a friend came over yesterday and we&#10;went out for a drink or two which stopped me writing this&#10;yesterday. Finally, I'm not trying to take anything away from the&#10;authors who did get papers accepted, or the work they have done. My&#10;complaints are very specifically about the process that takes place&#10;though, perhaps unsurprisingly, I don't really have many ideas about&#10;how it can be improved.&lt;/p&gt;&#10;&#10;&lt;p&gt;To every system, every activity, there is a game to play, and to&#10;succeed, you must learn to play the game. The British Education system&#10;is an excellent example of this: to succeed you don't have to be&#10;bright, you don't have to put in any effort, you just have to learn to&#10;regurgitate facts as the exams will never actually require you to&#10;think. The same can be said for almost all exams I've taken at&#10;university. The problem that I increasingly see with the academic game&#10;of &quot;getting papers published&quot; is that the rules change far too&#10;frequently and actually hinder research and progress.&lt;/p&gt;&#10;&#10;&lt;p&gt;My understanding of how a conference or workshop or symposium are&#10;run is as follows:&#10;&lt;ol&gt;&#10;&#10;&lt;li&gt;A programme committee is formed of, maybe a dozen people. These&#10;should collectively have an interest spanning pretty much everything&#10;that the conference aims to cover.&lt;/li&gt;&#10;&#10;&lt;li&gt;Papers are submitted.&lt;/li&gt;&#10;&#10;&lt;li&gt;Each member of the committee selects which papers they wish to&#10;review. They must declare conflicts of interest and each paper&#10;typically gets about three reviewers. But, there will often be a load&#10;of papers left over that too few committee members are interested&#10;in. For whatever reason, the authors thought it was appropriate to&#10;submit the paper to this particular conference, but there would seem&#10;to be not enough on the committee who are interested in reviewing&#10;these papers. It's basically up to the programme chair to get these&#10;papers sufficiently reviewed by someone.&lt;/li&gt;&#10;&#10;&lt;li&gt;The reviewers may well do the reviews. They may farm the reviews&#10;out to PhD students or research assistants if they're think that the&#10;student or assistant actually has a better current knowledge of the&#10;area about which the paper is written than they do.&lt;/li&gt;&#10;&#10;&lt;li&gt;Reviewers then submit their reviews. These normally have a &quot;score&quot;&#10;indicating what the reviewer thought of the paper, and a &quot;confidence&quot;&#10;which indicates how seriously the reviewer thinks their review should&#10;be taken. Here, the papers left on the pile which no one wanted to&#10;review could well end up with three reviews, all done by people who&#10;readily accept they are not confident of their own knowledge of this&#10;particular area.&lt;/li&gt;&#10;&#10;&lt;li&gt;Then the programme committee meet. Papers which were slammed by&#10;everyone typically don't get discussed and get rejected. Papers which&#10;were raved about by everyone don't get discussed, and get&#10;accepted. The papers remaining get discussed and somehow some get&#10;accepted, up to a limit of how many papers can be presented in the&#10;time allowed at the conference.&lt;/li&gt;&#10;&#10;&lt;li&gt;The reviews get sent back to the authors. These reviews are&#10;anonymous and sometimes the &quot;scores&quot; and &quot;confidences&quot; get sent back&#10;and sometimes they don't.&lt;/li&gt;&#10;&#10;&lt;/ol&gt;&#10;&#10;There are variations on this, and I've never actually been involved in&#10;this process other than being an author. However, I'm lead to believe&#10;that this is basically what happens.&#10;&lt;/p&gt;&#10;&#10;&lt;p&gt;So, what does this process mean for authors? Well, there are&#10;several things to consider. Firstly, no one actually wants to do&#10;reviews. They take time away from your own research and people are&#10;just doing them to remain, or become, well known. It's also good&#10;publicity for the conference if the programme committee is full of&#10;distinguished and well known academics. Programme chairs often choose&#10;to organise conferences because they want a promotion and have to&#10;demonstrate that they have run conferences and are an international&#10;figure. Sure, I'm being cynical and probably unfair in many cases. But&#10;this is undeniably sometimes the case. Secondly, reviews can get left&#10;to the last minute. If a reviewer has to produce reviews of 10 papers&#10;by tomorrow then these reviews will be done quickly. They will often&#10;be farmed out to PhD students and RAs who will also be under pressure&#10;to get the review done quickly. Furthermore, if your paper is in the&#10;pile that no one really wanted to review then the review will&#10;certainly be a rush job.&lt;/p&gt;&#10;&#10;&lt;p&gt;So the ideal situation is to have your paper reviewed by people who&#10;are really interested in your area and who are organised and will put&#10;the time in to do a decent job. Fortunately for the reviewers, even if&#10;they do a really shoddy job, they won't be found out because the&#10;reviews go back to the authors anonymously.&lt;/p&gt;&#10;&#10;&lt;p&gt;Now let's say that your paper is on the pile which no one really&#10;wants to review. Your best bet here is to produce a trivial paper -&#10;something with almost no content. The reason is that if you start&#10;producing anything even vaguely complicated, the resulting rushed and&#10;uninterested reviewer will hate you because they will realise that to&#10;do a decent job of reviewing the paper will take time and effort that&#10;they really can't be arsed to expend. Whereas, if you produce&#10;something trivial then they will understand it easily, it won't&#10;produce any surprises for them, hopefully they won't have to read&#10;anything you cited and they'll be able to top and tail the paper&#10;quickly, with a minimum of effort and fuss and still have a decent&#10;knowledge of what you were trying to say.&lt;/p&gt;&#10;&#10;&lt;p&gt;Thus to win this game, plan in advance, for as far in the future as&#10;you possibly can. Work out which conferences you are going to submit&#10;to and look at their programme committees. Then look at what the&#10;members of the programme committees are researching and completely&#10;abandon any hope that you can do research on what you want to do,&#10;especially if it doesn't correlate perfectly with the interests of the&#10;programme committee. Oh and make sure that your topic doesn't suddenly&#10;go out of fashion, otherwise you will never get any subsequent&#10;publications. It helps if your supervisor or co-authors are widely&#10;respected members of whichever community you're working in.&lt;/p&gt;&#10;&#10;&lt;p&gt;Now I got three reviews back, anonymously, without scores. They&#10;paint a very telling story. The first review is excellent. I have&#10;never received such a review nor have I ever expected to. The guy has&#10;obviously thoroughly read the paper. He has also been to my website&#10;and read the tutorials. He has downloaded the software, installed it&#10;and used it. By my reckoning, he must have spent at least six hours&#10;doing this. It is incredible - as I say, I would never expect anyone&#10;to put that much effort in. What I surmise from this is that he wanted&#10;to review the paper: he clearly is interested in it and picked it and&#10;put a huge amount of effort in. Sadly for me, he then admits that he's&#10;sceptical about the value of Session Types in the first place (so it's&#10;difficult to see this as being an objective unbiased review, though&#10;given the effort he's gone to, he's clearly tried very hard) and then&#10;he repeats issues which I have discussed myself in the evaluation,&#10;about how error messages are huge and very difficult to make sense of&#10;as criticism of the work. And indeed it is - it significantly makes it&#10;harder to use the library given this issue. However, he basically does&#10;end up admitting that, given the way I have written the library, this&#10;is unavoidable and actually demands programmatic control of the errors&#10;coming back from GHC, rather than a series of modifications to the&#10;library. He suggests that this work could be published as motivation&#10;for making such changes to GHC. So he doesn't really like the work,&#10;he's sceptical of the value Session Types add and he quite justifiably&#10;questions the usability of the library (though oddly not commenting on&#10;any of the proposals I make in the paper for solving the error message&#10;problem). Overall though, I simply can't have anything but awe for the&#10;amount of work and time he has invested in the review. I have&#10;absolutely no issue with being endlessly rejected if reviewers go to&#10;this much effort. It is simply unfortunate that his default position&#10;on Session Types is one of scepticism.&lt;/p&gt;&#10;&#10;&lt;p&gt;The second review, by comparison is a complete joke. I don't&#10;believe the reviewer read past page 4, with the possible exception of&#10;additionally reading the conclusion. I question whether this guy knows&#10;anything about Haskell at all or left himself more than 5 minutes in&#10;which to review the paper. Typically when you do a review, you start&#10;by giving a description of what the paper is about, in order to&#10;demonstrate that you read the paper. In this review, even this&#10;description is wrong:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;The paper presents a library that implements session types as&#10;a Haskell DSL.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;Wrong. A DSL embedded within Haskell is used. And it is used to&#10;&lt;em&gt;define&lt;/em&gt; a session type. The rest of the library which allows&#10;you to implement a given session type has nothing further to do with&#10;the DSL. The second paragraph is equally brilliant:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;Unfortunately, I find the paper practically impossible to&#10;follow. For the most part, this is because it uses a large number of&#10;combinators which are never really introduced and explained. In&#10;particular, although the paper is about types it doesn't provide any&#10;type signatures. This makes it impossible to understand if and how the&#10;goal of type-safe communication is achieved. Here are just some of the&#10;questions that the paper doesn't seem to answer...&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;So in the first sentence he admits he certainly hasn't understood&#10;and probably hasn't read the paper. He is very correct in the third&#10;sentence: I don't have any type signatures in the paper. This is&#10;because they are huge, absolutely enormous. If I put the type&#10;signatures in then I would have about 3 of the 12 pages permitted left&#10;to describe the work. Thus sentence 4 is ridiculous: there is simply&#10;no way that adding type signatures would make it easier to&#10;understand. Go look up the type signatures for doing subtraction on&#10;numbers in the type system, it's not trivial; &lt;em&gt;and that's a simple&#10;case for my library: the type signatures in my library are&#10;&lt;strong&gt;typically&lt;/strong&gt; over ten lines long&lt;/em&gt;. And the use of&#10;&lt;em&gt;seem&lt;/em&gt; in sentence 5 further reinforces the notion that he&#10;hasn't read the paper. He then goes on and raises six questions, all&#10;of which come from work discussed before page 4, and all of which are&#10;addressed within the paper. Some of them are only fleetingly covered&#10;(due to space constraints), but they are all covered. I particularly&#10;love his first question: &lt;q&gt;Is a channel associated with a session&#10;type?&lt;/q&gt; Looking at page 2 of the paper, I write:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;Having specified a session type, that session type can then&#10;be used to parameterise the type of a communication channel, which&#10;restricts operations involving that communication channel to those&#10;specified by the session type.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;So he gave up before page 2. Good job. &lt;em&gt;At no point does he&#10;refer to anything that comes after page 4.&lt;/em&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;Let's take the first two sentences of his second paragraph and&#10;contrast them with the first review. The first reviewer raised no such&#10;objections. Not only did the first reviewer read the paper and my&#10;tutorial and raise no such objection, but they also used the software&#10;to the extent that they demonstrated knowledge of it in their&#10;review. This sits a little oddly with the notion that the paper is&#10;&lt;q&gt;practically impossible to follow&lt;/q&gt;. This is amateur hour at its&#10;very peak. Maybe the reviewers should actually compare notes before&#10;submitting their reviews because frankly, this is pathetic. The first&#10;reviewer has effectively demolished every criticism the second&#10;reviewer makes, and demonstrates that the second reviewer didn't care&#10;and didn't put any effort into the review. It is utterly obvious that&#10;the second reviewer did not pick to review this paper, but rather the&#10;paper was left on the pile with not enough volunteered reviewers and&#10;so was pushed to the second reviewer. But it's okay, because the&#10;reviews are anonymous. So even though I know exactly what happened,&#10;and surely the reviewers likewise realise that I will be able to work&#10;it out, they have no problem with making these reviews because I can't&#10;identify anyone. I would be perfectly happy receiving one review from&#10;someone who knows what they're talking about, like the first review,&#10;than this shit. And the reason should be obvious: when it comes to the&#10;programme committee meeting, the second review is wrong from top to&#10;bottom, I can't defend myself against it, but it will completely&#10;destroy my chances of being published.&lt;/p&gt;&#10;&#10;&lt;p&gt;The third review is okay: it's more along the lines of what I've&#10;come to expect. It's clearly not the super-human effort that the first&#10;review is, but I believe they've read the whole paper and understood&#10;it. Sadly, the specific issues they raise with regard to the operation&#10;of the library are on the whole addressed in the paper. For example,&#10;they query the &lt;q&gt;rather difficult to read notation for session&#10;types&lt;/q&gt;. Yeah I agree, but I have explained that I can't use&#10;&lt;em&gt;do&lt;/em&gt;-notation in the paper. They also raise the issue of a&#10;&lt;q&gt;lack of compelling example&lt;/q&gt;. Now wait a minute! The paper uses&#10;an &lt;em&gt;n-queens&lt;/em&gt; checker as a running example. This is&#10;deliberately trivial in order to keep the code fragments short. It's&#10;pretty unlikely that the reviewer would want to be presented with&#10;multiple pages of code. I repeatedly state in the paper sentiments&#10;such as:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;As mentioned in section 2, the bulk of the code of this&#10;example is concerned with the communication and very little is&#10;actually doing the work of checking for collisions: the&#10;detectCollision function is trivial. However, the communication&#10;patterns involved here are entirely non-trivial and demonstrate how&#10;our Session Type library can be used to tackle such&#10;patterns.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;In fact, once again, this charge is voided by the first review:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;The running example is an implementation of the n-queens&#10;check, with one process per queen, which communicate to check that no&#10;queen threatens another. It's a trivial example, but the communication&#10;pattern is dynamic and fairly complex.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;Again, from the paper:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;This example problem demonstrates how our library can be used&#10;for a much broader class of problems where work is not only farmed out&#10;to a number of workers (the queens, in this case) but how the workers&#10;must also communicate between themselves in order to complete their&#10;work before sending results back to the root process. Note that our&#10;example works for any number of workers: the number of queens is not&#10;known statically and so this shows how session types can work in the&#10;most general case.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;What do you want? You want me to enumerate every possible situation&#10;where such a pattern is of use? Not to mention all the other&#10;communication patterns that can be covered by this library. And&#10;finally, in the third review, we get to the nub of the matter:&lt;/p&gt;&#10;&#10;&lt;p&gt;&lt;cite&gt;Much of the code is too intricate to easily read and&#10;understand.&lt;/cite&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;Ahh, the displeasure of the reviewer, again, I believe, having the&#10;paper foisted upon them and wanting to do a quick job of it. But don't&#10;get me wrong, the third review is by no means in the same league of&#10;incompetence as defined by the second review. The third reviewer is&#10;wrong though: I don't believe there is a code example in the paper&#10;which is not explained in English.&lt;/p&gt;&#10;&#10;&lt;p&gt;All three reviews say that the paper is dense and at least in&#10;places hard to follow and I agree with that entirely. But the library&#10;is very featureful and is a complex beast, and I only have 12 sides in&#10;which to describe it. I give as high a level description of it (in&#10;particular, its implementation) as I possibly can without making the&#10;whole thing superficial. It's very tricky to write a paper about&#10;something this complex and bleeding edge (I really haven't come across&#10;anything else that does as much within the type system as I do) and&#10;keep it readable. So basically, the conclusion is that this work is&#10;simply unpublishable: if I try and give anything other than a totally&#10;superficial explanation of it then it becomes too dense and complex,&#10;and if I make it lighter and more readable then surely the reviews&#10;would come back demanding a more thorough and detailed covering of the&#10;work. &lt;em&gt;How can I ever win?&lt;/em&gt;&lt;/p&gt;&#10;&#10;&lt;p&gt;What makes me so angry is that the months of work that went into&#10;writing the library, and the weeks of work that went into writing and&#10;rewriting the paper can be so easily dismissed by reviewers who really&#10;can't be bothered or are just uninterested in the work and rely on the&#10;cloak of anonymity or, perhaps more frustratingly, by the fact that&#10;the conference which is most suitable for the work and should be the&#10;ideal location for this work has a programme committee which is simply&#10;the wrong audience for this work.&lt;/p&gt;&#10;</description></item><item><title>Anglo Haskell 2008</title><link>http://www.wellquite.org/anglo_haskell_2008.html</link><pubDate>Mon, 07 Jul 2008 00:00:00 UTC</pubDate><description>&#10;&lt;p&gt;Anglo Haskell is a gathering of all people Haskell-related from&#10;beginners, to seasoned hackers to academic giants. All and more are&#10;welcomed by large fuzzy green lambdas.&lt;/p&gt;&#10;&#10;&lt;p&gt;Anglo Haskell has happened for the last two years and we see no&#10;reason why it should not happen again this year. For the last two&#10;years they've tended to have talks on Fridays and then Other Things on&#10;the Saturday (including Punting and Group Hacking, some or more of&#10;which may have happened in Pubs). We're proposing the same general&#10;format this year.&lt;/p&gt;&#10;&#10;&lt;p&gt;In contrast to the last two years which have been held at MSR&#10;Cambridge (UK), we're this year going to hold the event at Imperial&#10;College, London. London is probably easier to get to and from (though&#10;more tedious to get across) than Cambridge and we hope this will&#10;attract people who previously have not been able to get out to&#10;Cambridge.&lt;/p&gt;&#10;&#10;&lt;p&gt;The proposed dates are &lt;b&gt;Friday the 8th and Saturday the 9th of&#10;August&lt;/b&gt;.&lt;/p&gt;&#10;&#10;&lt;p&gt;More details are available on the &lt;a&#10;href=&quot;http://www.haskell.org/haskellwiki/AngloHaskell/2008&quot;&gt;wikipage&lt;/a&gt;,&#10;including travel directions and all important details about wifi&#10;access and so forth. Please feel free to add to this page.&lt;/p&gt;&#10;&#10;&lt;p&gt;If you're at all interested in coming along then please add your&#10;name to the wikipage. If you're interested in giving a talk - on&#10;literally anything Haskell related: this is not a solely theory day or&#10;solely a practical day; anything goes which is Haskell related - then&#10;similarly add yourself to the list of speakers.&lt;/p&gt;&#10;&#10;&lt;p&gt;Some people have signed up on the wiki page, please add your name&#10;if you are able to come or are considering coming along. Also please&#10;make use of the wiki page and #anglohaskell irc (freenode.net) channel&#10;to arrange where to stay overnight if necessary.&lt;/p&gt;&#10;&#10;&lt;p&gt;Finally, once again, if you'd like to give a talk then please add&#10;your name to the list on the wiki page. We really do need both&#10;attendees and speakers to make this event a success.&lt;/p&gt;&#10;</description></item><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></channel></rss>