Sunday, 28 September 2014

More on modelling rivers

I've been writing a lot about politics recently - and with reason. But now it's time to be getting back to writing about software, and, specifically, about river flows again.

Computed river map. Ignore the vegetation, it's run only a few generations and does not yet show natural patterns.
I wrote almost a year ago that I had had the first glimmer of success with modelling river flows. Well, some success was right, but not enough success. I didn't have a software framework in which I could model other things I wanted to model in my world, nor one with which I could play flexibly. I also - because I was working with maps of my fictional world, and not the real world - couldn't assess how well my algorithms were working, particularly as I had persistent diagonal artefacts.

So I decided to restart working in Clojure, using a cellular automaton, and with maps of Britain - maps I'm familiar with. I've written about that, too. From the point of view of modelling settlement, it's working well enough to be promising. So now I'm back to river flows, and once again I'm having 'the first glimmerings of success', and once again, frustrations. The picture above shows where I'm up to.

As you can see, I'm still using the 8Km granularity map. I can now actually compute water flows on the 1Km granularity map, but I haven't yet even tried to render them - it's a massive amount of data. But the 8Km map shows both that my algorithm partly works, and that it really does not work anything like well enough.

What works and what doesn't

What works? You can see the River Clyde from about Biggar down to the Falls of Clyde - but there, it disappears. Bits of the mouth of the Clyde are there, but not joined up. The lower Ayr is not only there, but identified as navigable. All of that is promising. I am getting some bits of some rivers showing up, and in the right place.

What doesn't work? Well, 8Km is a horribly wrong scale for doing this sort of thing. Even 1Km granularity is much too coarse, but attempting to map rivers on an 8Km scale... very few of our rivers have enough flow of water to show up. But worse, I haven't implemented 'laking' (as I did in the earlier, Java implementation). When a river arrives at a local low spot, it cannot flow up hill, so it just vanishes. At this coarse a granularity such local low spots are bound to exist. Actually, they will at any granularity - landscapes are fractal. So I need to rewrite my algorithm to deal with local lowspots - fill them up with water until it spills over and follows the rest of the valley down.
Visualisation of the problem. Numbers represent altitude, intensity of blue represents water flow.

This explains why my map of Britain shows so few rivers. The Spey is clearly visible from Aberlour down to Fochabers; the Tweed is a feature in Peebleshire; the Cree and the Esk are visible and recognised as potentially navigable. In England, the Tyne is entirely missing but the Tees is present and marked as navigable; a bit of the Ribble is recognisable as is a bit of the Mersey; tiny bits of the Thames show up around Oxford; and there's a river running north-south, west of London, that might be the Chess or the Misbourne. The Exe and the Tamar are also present. But several of the major rivers of Britain are not present at all, and many of those that are, are, like the Clyde, present only for parts of their course.

The Algorithm

So what is my algorithm? I had hoped, by this time, to publish all my source code so that you can see it. Unfortunately, when I went through the polite step of running this past my present employers, I hit a snag. Although this is - quite obviously - of no relevance to their business and of no interest to them, they claim that it is their secret, proprietary code. Which means that I and my present employers will part; but in the meantime (and possibly afterwards) I cannot publish this code.

I'm damned if I see why I should not publish a description of the algorithm, though.

Firstly, rainfall. I'm not (yet) trying to model the variability of rainfall. I could; last autumn's algorithm recognised that in middle latitudes the wind is primarily a coriolis wind, from the west. It carries damp air from the ocean to the west, and precipitates that rain as it cools - which it does as it rises over higher ground. So west facing slopes recieve more of the potential rainfall than east facing, highlands than low lands, western areas than eastern. We can verify those statements by looking at actual rainfall maps, and they're fairly easy to model. I have not done that yet; my present code just dumps one unit of rain on every cell of the map.

Then, from each cell, I compute the amount of rain which flows through that cell recursively by summing the flows through each of its neighbours which have a greater altitude. This is the simple-minded observation that water flows down hill. And, of course, it does. Obviously, again, the flow value at which I decide a river exists is arbitrary; for this map, I've shown a river where the flow through the cell is thirty units or above - which is to say, where the cell has collected the rainfall from at least thirty upstream cells.

There are two problems with this algorithm as it exists at present. When water in the real world hits a low point then - disregarding the amount lost to evaporation, which in Britain we can do, although in my fictional world I can't entirely - it builds up in a lake until it overflows the lip of the local hollow and continues. I had hoped that river valleys would show up sufficiently strongly that I could get away without laking, but sadly they don't. At the point the Tweed peters out on my map, the altitude of the last cell in which it is visible is 49 (arbitrary units - a monochrome heightmap gives me only 256 gradations of altitude, and sea level is 10). The altitude of the next cell down valley is 50. Given these are average elevations over an 8Km square, it's not in the least impossible that that's correct, but it stops the flow.

Worse still, the last recognised cell of the Ribble is at elevation 28. The next cell down valley - to which the river should flow - is also 28. The Clyde peters out at elevation 35, and the next cell down valley is also 35. It's inevitably the case that long rivers have sections in which they don't fall 5 metres in 8 kilometres, even disregarding the coarse granularity of my elevation data. But again, my present algorithm doesn't cope.

Parallelism and mutable data

There's a second problem, though. This one is not a modelling problem, it's a software framework problem. I'm working, now, in Clojure, and on the whole I find that extremely comfortable; it's a lovely language in which to write exploratory code. And I've been working with a framework which allows me to map a function across a two dimensional array, passing the function two arguments: the whole array, and the cell on which it's to operate. It returns a new copy of that cell, and the mapping operation constructs a new array from all the new cells. This has served me very well during my exploration of modelling environmental change and human settlement, because this process inherently allows great parallelism. On my eight core desktop machine, I can see 5 cores simultaneously maxed out processing a map.

But, the parallelism works because in Clojure data is immutable. In order to process the flow for each cell, I have to process, recursively, the flow in each cell upstream of it. But because the map is immutable, I can't cache those results on the map, so I can only return the one cell I was considering; all those partial results upstream are lost and must be recomputed when those cells are themselves considered. That's obviously wasteful, wasting all, and more, of the time I saved by paralellism. I haven't yet, however, worked out a practical way to pass those partial results round so that they don't need to be recomputed. That's an issue; it's part of the tradeoff of using immutable data, and also, possibly, part of the matter of learning better to use functional languages. But it isn't a blocker. While running this on a one kilometre resolution map is costly in time, it does run.

Laking

'Laking' can't easily be hacked onto my present algorithm. If you allow the algorithm to peak over hilltops as it works upstream, you have a halting problem. What is needed is a second pass which finds low spots where there is a flow of greater-than-river-flow value, and reworks from there.

One possible algorithm which I shall explore would then find the lowest adjoining cell and propagate the flow to that cell and so downstream. That isn't strictly laking, that's a  minimal-uphill algorithm; but it would, I believe, more or less accurately model the river flows.

A slight variation on the minimal-uphill algorithm would be to lower the lowest adjoining cell until it is lower than the cell in which the flow has stopped; that's a slightly more natural solution, with a possible risk of creating gorges where there are no gorges. Again, that's something to explore.

The final workaround is true laking. Let the water level rise - in all cells with the same altitude - until a way out is found. What I worry about laking on my relatively coarse models is that I will construct enormous lakes in unlikely places. It's also likely to turn the whole of East Anglia and Lincolnshire into essentially one lake - but if one interprets these large areas of water on flat land as fen rather than lake, that's more or less right..

Progress is being - very slowly - made.

Mind you, if it takes me two years to work out how to map rivers, this huge game world - which I really know I'll never finish in my lifetime - looks even further out of reach.

Saturday, 20 September 2014

Parliamentary Questions

On 19th July 2004, Sir Thomas Dalyell Loch, the Eton and Cambridge educated 11th Baronet of the Binns, voted at Westminster to raise the university tuition fee cap to £3,000 per year - for university students in England, only.

Sir Thomas sat then for the constituency of Linlithgow, in West Lothian, in Scotland; his constituents' education was - then as now - governed by the Scottish Parliament at Holyrood. And thus he answered his own West Lothian Question, which has dogged the British constitutional settlement ever since it was first asked, and which has an added frisson in the aftermath of Scotland's failed velvet revolution.

What is being proposed now by David Cameron, is a parliament - the Westminster parliament - which will continue to debate both bills affecting the whole United Kingdom and also bills affecting England only; but with the quirk that Welsh, Northern Irish and Scots MPs will be unable to vote on the English-only bills. This looks, on the face of it, sensible.

It will not work.

Suppose - just suppose - Ed Miliband wins the next Westminster election, but without a majority of English seats. Who then is the English Secretary of State for Health? For Education? For the Environment? for Transport? for Rural Affairs? Fully half of the current UK cabinet have portfolios which cover only England. If Miliband wins a majority in the UK but not in England, he will find himself on the horns of a dilemma.

Either he appoints Labour members to head the English departments, in which case they will none of them have a majority in the chamber to pass any legislation; or else he appoints Tories to his cabinet, in which case fully half of his cabinet are from the opposition. In either scenario, England is quite ungovernable.

You think that's bad? It gets worse.

Baron Smith of Kelvin, Knight of the Most Ancient and Most Noble Order of the Thistle - no, seriously, if I was trying to make this up I would write something less unbelievable - is the unelected grandee parachuted in by Cameron to oversee an enhancement of democracy in Scotland. He's a Lord, you might have guessed from the title. As such he's a member of the Westminster parliament - like most members of the Westminster parliament, wholly unelected by any constituency.

Up until now, of course, that hasn't mattered. But, is he a Scots Lord or an English one? He was born in Glasgow, and his titular demesne is Kelvin. He even owns a Scottish island - Inchmarnock, off Bute. On this basis, you may say he's Scots. But like many other lads o' pairts, he's spent a great deal of his career furth of Scotland. As such, he's one of very many who have debatable peerages.

Should he be able to vote on English-only bills?

Well, should he?

It will not work, will it?

If only English unelected members should be able to vote on English-only legislation, should Scots unelected members be able to vote on Scots legislation?

Aye, right! The other one has bells on it.

Or should unelected members not vote on any national legislation, but only on union legislation? That too would stick in Scotland's democratic, presbyterian craw. A man is, after all, a man for aa that - even if some prince has made him a beltit knight, a marquis, duke or aa that. We are all Jock Tamson's bairns.

The union parliament cannot be the same institution as the English parliament, for the reasons I've given above. The English parliament must be a separate institution. Whether it's still elected by the unsatisfactory first-past-the-post system, whether it should include an unelected upper house - those are questions for the English. It's not something we Scots should intrude on. Whether the English parliament or the union parliament should inhabit Pugin's gothic extravagance on the bank of the Thames is a decision we can all put off until 2020, since the building is going to be closed for renovation anyway.

But that still leaves two uncomfortable, unanswered questions.

First: are we, in the twenty-first century, still going to tolerate unelected members in the union parliament?

Think about it.


  • They're there because some distant ancestor was a ruthless mercenary; or
  • They're there because they had once been elected, but the electorate had kicked them out; or
  • They're there because they hold office in the English state superstition; or
  • They're there because they paid some political party an awful lot of money.


Is that tolerable in today's world?

But second: how do you make a confederation work when one confederate has five times the size and five times the votes of all the others put together?

Of course, this has always been the problem with the United Kingdom, since its inception. Scotland, Wales and Northern Ireland will always - on every vote - be outvoted.  This isn't like the EU or the USA, where smaller states can form coalitions of common interest against the larger ones. England's interests will always prevail. We might just as well not bother to turn up.

Is that tolerable in today's world?

Well, is it?



[Some parts of this essay previously appeared in my essay The West Lothian Question, take two]

Friday, 19 September 2014

Jock Tamson's Bairns


So, we lost.

The important thing to remember is that we all lost, every one of us in Scotland. All Jock Tamsons's bairns, those who voted 'no' just as much as we who voted 'yes'. All of our futures are dimmed, all of our hopes of comfort and prosperity diminished, all of our security eroded. And we are luckier than they. Not for us the slow dawning realisation of how dreadfully, how catastrophically they have erred.

When the value of their homes collapses and they are in negative equity, they will know - for they knew that the United Kingdom government was promoting yet another unsustainable housing bubble - they will know they voted for that.

When they cannot afford to pay for their child's cancer treatment, they will know - for they knew that the United Kingdom government was determined to privatise healthcare - they will know that they brought that, too, upon their heads.

When their salaries will no longer pay for adequate food and the shelves at Maryhill are empty, they will know - for they knew the United Kingdom was building a low wage, low skill economy - they will know that that was their choice.

When the terrorist's bomb rips through their train, they will know - for they knew the United Kingdom has made itself, justly, the second most hated nation on Earth - they will know that they chose to step aside from the path of peace.

When there are no jobs in Scotland and their children emigrate in search of work, they will know - for they knew the United Kingdom concentrated all investment within the circle of the M25 - they will know that their action last night made it inevitable.

And when the security state arrests them and holds them without charge, they will know - because they knew the United Kingdom was progressively tearing up human rights - they will know that they have been architects of their own misfortune.

These things will come. The sky to windward is dark.

So we must swallow our anger. Master our grief. Cast away resentment and schadenfreude.

When these things happen - and they will - we must all stand together in solidarity, 'yes' voters with 'no' voters, hope with fear, the brave with the cautious. For we are all - still all, all of us together - Jock Tamson's bairns.

Father, forgive them, for they know not what they do.

A Bill anent Wrongfully Enclosed Common Lands

Right, we've lost the referendum, we won't get independence. It's time to move on. 

As Lesley Riddoch pointed out before this whole campaign began, we can do a great deal to change Scotland for the better with the powers we already have. Up until now, the SNP government have been adopting bland and uncontroversial policies in order not to scare the horses in advance of the vote. I grudgingly accepted that was a reasonable policy - then.

It won't wash now. It's time to make maximal, radical use of our powers, to change Scotland, to redistribute power and wealth from the elite to the people. There are plenty of things we can do, but here is, it seems to me, one particularly low hanging fruit: wrongfully enclosed common lands. And so I present a draft bill. Feel free to improve upon it.

1: Wrongfully Enclosed Common Land

(i) A great deal of land in Scotland which was, historically, held as common, is now held as though it were private property.

(ii) Land is wrongfully enclosed common land if
(a) at some time in the past it was held as common;
(b) rights of common were extinguished without fully and adequately compensating all persons who had rights of common over that land.

(iii) Where it cannot be proven one way or the other whether all persons with rights of common were fully and adequately compensated, it shall be presumed that they were not.

2: Managing agent of Common Lands

(i) Where no other historical arrangements exist for the management of common lands, the managing agent of the common lands shall be
(a) The community council(s) in whose area(s) the lands occur, or
(b) where a community council does not exist, or declares itself unable, for whatever cause, to manage common lands, those lands shall be managed by a common lands factor appointed by the Scottish Government who shall take a management fee of at most [percentage] out of the proceeds and use the remainder for the common good of the people of that area.

(ii) Management of common lands shall be subject to the limitations that
(a) The managing agent may not sell any common land;
(b) The managing agent may not lease out any common land for a term exceeding [period: 20 years?];
(c) The managing agent  may not lease out any common land for a rental less than the fair rental determined by the District Valuer.

(iii) Rental, wayleaves, and other monies levied for use of common land shall be payable to the managing agent and be used by the managing agent for the common good of the people of the area.

3: Voluntary restoration of Common Lands

Where common land has been wrongfully enclosed, but that land has been restored as common land with management passed to the community council(s) in whose area(s) it occurs not later than the date on which this act comes into force, the provisions of sections 4 and 5 of this act shall not apply.

4: Arrangements for smaller holdings

Where greater than 10% of a holding of fewer than 250 hectares in extent is found to be wrongfully enclosed common land,

(i) if no beneficial holder(s) being natural persons can be identified - for example if the land is held by an offshore trust or by a company one or more of whose beneficial shareholders is such a trust - then that part of the holding found to be wrongfully enclosed common land shall be restored as common land, managed as set out in section 2 of this act,
(a) when this act comes into force, or
(b) immediately the land is found to be wrongfully enclosed common land
whichever is the later.
(ii) otherwise, a rent free lease of the wrongfully enclosed common land shall be granted to the natural persons who are beneficial holders
(a) when this act comes into force, or
(b) immediately the land is found to be wrongfully enclosed common land
whichever is the later.
for the period of their lifetimes, after which management shall pass to the managers set out in section 2 of this act.

5: General arrangements

(i) For areas of wrongfully enclosed common lands not covered by sections 3 or 4 of this act, a rental shall be levied at compound interest for the entire period during which such common lands have been wrongfully enclosed.
(ii) The rate of interest shall be 5%.
(iii) The district valuer shall assess a fair rent for the unimproved lands
(a) at the time of the wrongful enclosure and
(b) at twenty-five year intervals thereafter.
(iv) Of this rental
(a) 2.5% shall be payable to the district valuer to cover costs;
(b) 5% shall be payable to the person or agency bringing forward evidence that the lands have been wrongfully enclosed;
(c) The remainder shall be payable to the managing agent for the lands as defined in section 2 of this act.
(iv) This rental shall be payable by the current holder of the lands.
(iv) Management of the lands shall pass to the managing agent for the lands as defined in section 2 of this act
(a) when this act comes into force, or
(b) immediately the land is found to be wrongfully enclosed common land
whichever is the later.

Tuesday, 9 September 2014

Is a currency union with fUK worth £126 Billion?

Bear with me folks, I'm just thinking aloud. Address it as such.

UK debt is £1.4Tn; the cost of servicing that is £50Bn per year.

Scotland's population share of the debt - if we do the deal that seems to be proposed, of a population share of debt in return for a population share of assets, with the pound Sterling explicitly counted as an asset - is £126Bn. So if we got the same interest rate as the UK gets now, our servicing cost would be £4.5Bn per year, but we'd probably get less good terms so it would be a bit higher - say £5Bn.

Suppose we don't do the deal. Suppose we walk away from the debt. Everyone says we can't do that because the international banks wouldn't lend to us. But, actually, do we need them to?

Scotland's share of the deficit is quoted as £8Bn. Less debt servicing - which we wouldn't have to do because we wouldn't have debt - it's £3Bn. Less the cost of Trident (our share is £2Bn per year), it's £1Bn. Less the cost of overseas military adventures... I don't think Scotland would actually have much of a deficit at all.

So: suppose Scotland actually has no deficit, we don't need to borrow anything from the international banks, so what interest rate they would charge us is purely academic. And suppose in twenty-five years we did need to borrow, by that time we'd have a reasonably good credit rating.

But suppose Scotland does still have a small deficit - say £2Bn a year. Suppose also that the banks charge us four times as much as they currently charge the UK. Then it would take us until 2031 before our deficit hit the £8Bn, which, if we did have an agreement, it would be from day one. And in that time we'd have saved £75Bn.

Suppose we'd made no useful investments, received no interest payments on that saved money, and nothing else had changed, and everything continued as before, it would be 2039 before that £75Bn cushion was exhausted. And if we'd serviced a debt successfully for twenty-three years, we would, inevitably, have earned a reasonable credit rating - perhaps not AAA, but not none. So our interest payments would slacken off.

I'm not saying we should do this. But I honestly don't see that exchanging a currency union for a population share of debt is a good deal for Scotland. Sooner or later we will need a new currency anyway, firstly because Sterling will collapse when the fUK leaves the EU, and secondly because our economy is systematically different from the fUK economy - we are net exporters of food, power and hydrocarbons, they are net importers of all three - so a currency managed for their benefit isn't going to suit us for long. Sooner or later, we need out own currency. And in the short term, no-one denies that Sterlingisation will work.

So I think that we should be robust in our negotiations with fUK, because actually I believe that walking away from the debt is not such a big deal as it's being presented.

Remember: the debt is not Scotland's debt, Scotland is not the nation that contracted it and the nation that did contract it will still exist. If we have clearly and publicly volunteered to take on a fair share of that debt in return for a fair share of assets (including the currency, which is an asset), and that share of assets has been refused, walking away from the debt is not defaulting. The banks may be a bit sniffy about it; we may get our credit rating marked down a bit. But we won't be junk status.

Tuesday, 26 August 2014

Modelling settlement with a cellular automaton

I've written about modelling settlement patterns before; several times, actually:


I had hoped to have the algorithm for Populating a Game World written by now, but I've been ill most of this summer and it hasn't happened. Instead, I've revived a rule-driven cellular automaton which I first wrote back in the 1980s; I've reimplemented it in Clojure, and used it to experiment with settlement. The results have been mixed.

What works

Irish Sea basin after 84 generations
Firstly, it's remarkable how simple it is to model a landscape on a coarse granularity with very few rules. Establishing a basic biosphere with birch/oak succession woodland on lower ground, growing to climax forest in more favoured areas, and fading to birch scrub and then to heath in uplands, takes just sixteen rules.  Adding human settlement, up to the point of establishing permanent markets and urban centres, takes just thirty more. And when you run this on a map of Britain, unsurprisingly urban centres end up in just the sort of place you'd expect to see them - for example, in the map shown, there's an urban centre near Lancaster and another at Derry, with settlement around Belfact Lough, Dublin, and in Wigtownshire - all places where we know, historically, there were important early towns.

Lancaster was an urban settlement from Roman times. Rerigonium, in west Wigtownshire, was one of the only British towns important enough to make it onto Ptolemey's pre-Roman map. Derry was the site of a monastery in the 6th century, and probably an urban centre earlier. There's a settlement on Ptolemy's map called Eblana which may possibly be Dublin, but is at least close to it. Belfast has the oldest claim - it has a five thousand year old henge (although there's also a neolithic monument complex at Dunragit, one of the possible sites of Rerigonium).

So this very simple model of settlement patterns works quite well - at a coarse scale.

What doesn't work

While the results are reasonably good, the cellular automaton isn't fast. The scale shown in the picture uses cells about five miles (eight kilometres) square. At this scale, generating a map of Britain and Ireland on my (very powerful) desktop PC takes about a minute per generation, although optimisation is certainly possible. Settlement patterns don't really start to emerge until after one hundred generations, and I'd really like to run for at least two hundred and fifty to get the patterns stable. But five-mile granularity is nothing like good enough to model settlement. I think what I need is hectare granularity. It's obvious that (optimisation aside), for a given ruleset the time to compute a map scales with the area of the map.

I have a map of Great Britain and Ireland at about one kilometer granularity, but I haven't yet even tried to run the ruleset on it yet. It's sixty-four times the area of the map I'm currently using, and one would anticipate it would take about one hour per generation to compute. But, as I've said, even kilometer granularity doesn't seem enough, and a hectare granularity map would take six thousand four hundred times as long to compute (assuming the memory requirement could be handled, which I believe it could), so about four days per generation or about one hundred generations per year of continuous computation.

Now, that isn't in itself impossible. If one sees this as a one-off pre-computation of the settlement pattern of a game-world, it's a not unreasonable investment. But this mechanism doesn't really support ongoing evolution of settlement patterns while the game is in progress.

Also, the rules I have so far are unsophisticated. I don't have a rule which represents the strategic value of a port, or the strategic value of a river crossing. And to produce rules which would model the development of a hierarchical system of territorial aristocracy - a feudal system - would require much more computationally expensive rules than I have now.

Finally, this map is a grid, and as a grid it inevitably will have visual artefacts in the world. That can be mitigated by the rendering algorithm, but it's bound to show. So I don't think this is an avenue which in its pure form I'll pursue much further; but it is a promising start. A hybrid system based partly on a cellular automaton, partly based on actors (as in Populating a game world) is probably the line I shall follow next.

Addendum: the rules

I hope to be able to publish the full source code for the cellular automaton shortly, but it depends on authorisation from my employers - at present all code I produce, even in my spare time, is their copyright. In the meantime, however, here's a high-level statement of the rules used to model settlement.

# Human settlement

;; This rule set attempts to model human settlement in a landscape. It models
;; western European pre-history moderately well. Settlement first occurs as
;; nomadic camps on coastal promentaries (cells with four or more neighbours
;; that are water). This represents 'kitchen-midden' mesolithic settlement.
;;
;; As grassland becomes available near camps, pastoralists appear, and will
;; follow their herds inland. When pastoralists have available fertile land,
;; they will till the soil and plant crops, and in doing so will establish
;; permanent settlements; this is approximately a neolithic stage.
;;
;; Where soil is fertile, settlements will cluster, and markets will appear.
;; where there is sufficient settlement, the markets become permanent, and you
;; have the appearance of towns. This takes us roughly into the bronze age.
;;
;; This is quite a complex ruleset, and runs quite slowly. However, it does
;; model some significant things. Soil gains in fertility under woodland; deep
;; loams and podzols build up over substantial time. Agriculture depletes
;; fertility. So if forest has become well established before human settlement
;; begins, a higher population (more crops) will eventually be sustainable,
;; whereas if human population starts early the deep fertile soils will not
;; establish and you will have more pastoralism, supporting fewer permanent
;; settlements.

;; hack to speed up processing on the 'great britain and ireland' map
if state is water then state should be water

;; nomads make their first significant camp near water because of fish and
;; shellfish (kitchen-midden people)
if state is in grassland or heath and more than 3 neighbours are water and generation is more than 20 then state should be camp

;; sooner or later nomads learn to keep flocks
if state is in grassland or heath and some neighbours are camp then 1 chance in 2 state should be pasture

;; and more herds support more people
if state is in grassland or heath and more than 2 neighbours are pasture then 1 chance in 3 state should be camp
if state is pasture and more than 3 neighbours are pasture and fewer than 1 neighbours are camp and fewer than 1 neighbours within 2 are house then state should be camp

;; the idea of agriculture spreads
if state is in grassland or heath and some neighbours within 2 are house then state should be pasture

;; nomads don't move on while the have crops growing. That would be silly!
if state is camp and some neighbours are ploughland then state should be camp

;; Impoverished pasture can't be grazed permanently
if state is pasture and fertility is less than 2 then 1 chance in 3 state should be heath

;; nomads move on
if state is camp then 1 chance in 5 state should be waste

;; pasture that's too far from a house or camp will be abandoned
if state is pasture and fewer than 1 neighbours within 3 are house and fewer than 1 neighbours within 2 are camp then state should be heath

;; markets spring up near settlements
if state is in grassland or pasture and more than 1 neighbours are house then 1 chance in 10 state should be market

;; good fertile pasture close to settlement will be ploughed for crops
if state is pasture and fertility is more than 10 and altitude is less than 100 and some neighbours are camp or some neighbours are house then state should be ploughland

if state is ploughland then state should be crop

;; after the crop is harvested, the land is allowed to lie fallow. But cropping
;; depletes fertility.
if state is crop then state should be grassland and fertility should be fertility - 1

;; if there's reliable food available, nomads build permanent settlements
if state is in camp or abandoned and some neighbours are crop then state should be house
if state is abandoned and some neighbours are pasture then state should be house
;; people camp near to markets
if state is in waste or grassland and some neighbours are market then state should be camp

;; a market in a settlement survives
if state is market and some neighbours are inn then state should be market
if state is market then state should be grassland

;; a house near a market in a settlement will become an inn
if state is house and some neighbours are market and more than 1 neighbours are house then 1 chance in 5 state should be inn
;; but it will need some local custom to survive
if state is inn and fewer than 3 neighbours are house then state should be house

;; if there aren't enough resources houses should be abandoned
;; resources from fishing
if state is house and more than 2 neighbours are water then state should be house
;; from farming
if state is house and some neighbours are pasture then state should be house
if state is house and some neighbours are ploughland then state should be house
if state is house and some neighbours are crop then state should be house
;; from the market
if state is house and some neighbours are market then state should be house
if state is house then 1 chance in 2 state should be abandoned
if state is abandoned then 1 chance in 5 state should be waste 


## Vegetation rules
;; rules which populate the world with plants

;; Occasionally, passing birds plant tree seeds into grassland

if state is grassland then 1 chance in 10 state should be heath

;; heath below the treeline grows gradually into forest

if state is heath and altitude is less than 120 then state should be scrub
if state is scrub then 1 chance in 5 state should be forest

;; Forest on fertile land grows to climax

if state is forest and fertility is more than 5 and altitude is less than 70 then state should be climax  
   
;; Climax forest occasionally catches fire (e.g. lightning strikes)

if state is climax then 1 chance in 500 state should be fire

;; Forest neighbouring fires is likely to catch fire. So are buildings.
if state is in forest or climax or camp or house or inn and some neighbours are fire then 1 chance in 3 state should be fire

;; Climax forest near to settlement may be cleared for timber
if state is in climax and more than 3 neighbours within 2 are house then state should be scrub

;; After fire we get waste

if state is fire then state should be waste

;; waste near settlement that is fertile becomes ploughland
if state is waste and fertility is more than 10 and some neighbours are house or some neighbours are camp then state should be ploughland

;; And after waste we get pioneer species; if there's a woodland seed
;; source, it's going to be heath, otherwise grassland.

if state is waste and some neighbours are scrub then state should be heath
if state is waste and some neighbours are forest then state should be heath
if state is waste and some neighbours are climax then state should be heath
if state is waste then state should be grassland


## Potential blockers

;; Forest increases soil fertility.
if state is in forest or climax then fertility should be fertility + 1

## Initialisation rules

;; Rules which deal with state 'new' will waste less time if they're near the
;; end of the file

;; below the waterline we have water.

if state is new and altitude is less than 10 then state should be water

;; above the snowline we have snow.
if state is new and altitude is more than 200 then state should be snow

;; otherwise, we have grassland.
if state is new then state should be grassland

Wednesday, 20 August 2014

The West Lothian Question, take two

Tam Dalyell. Photograph: The Hootsmon
Back in 1977 that famous old-Etonian, Sir Thomas Dalyell Loch, 11th Baronet of the Binns, famously asked a question which has troubled his party ever since.

The question, in his own words, was this:
For how long will English constituencies and English Honourable members tolerate ... at least 119 Honourable Members from Scotland, Wales and Northern Ireland exercising an important, and probably often decisive, effect on English politics while they themselves have no say in the same matters in Scotland, Wales and Northern Ireland?
Those 'honourable' members - better known here in Scotland as the 'feeble fifty' - have indeed had a decisive effect on English politics. It was with their votes that Tony Blair imposed tuition fees on English university students, foundation hospitals on the English NHS. I believe that it is true that Labour did not have a majority of English MPs on either of those votes - which affected only England.

This is, as Tam pointed out, an untenable anomaly: frankly, a corrupt practice. And the answer to his question seems to be 'not much longer'.

So, what's the corollary to the West Lothian Question?

Well, suppose the present government were to enact - as it's entirely reasonable that they should - that Scottish MPs may no longer vote on English matters. And suppose - I know it's unlikely - that Scotland votes 'no' in a month's time. And suppose - just suppose - Ed Miliband wins the next Westminster election, but without a majority of English seats.

Who then is the English Secretary of State for Health? For Education? For the Environment? for Transport? for Rural Affairs?

Fully half of the current UK cabinet have portfolios which cover only England. If Miliband wins a majority in the UK but not in England, he will find himself on the horns of a dilemma.

Either he appoints Labour members to head the English departments, in which case they will none of them have a majority in the chamber to pass any legislation; or else he appoints Tories to his cabinet, in which case fully half of his cabinet are from the opposition. In either scenario, England is quite ungovernable.

If Scotland bottles this referendum, the Labour party have not won. They've lost - and lost badly.


A footnote: how did Tam vote on tuition fees and on foundation hospitals? The answer is, I don't know. But it would be interesting to find out!

Sunday, 17 August 2014

Syria and Galloway

Tombstone of Barathes of Palmyra in Syria, found at Corstopitum
In these days when we're all listening on the news to the developments in Syria and Iraq, the emergence of the Islamic State, the conflict between Sunni and Shia, the plight of fleeing Yazidis and of the Syrian Christians, I was struck by this powerful essay by Robin Yassin-Kassab, exploring the historic links between Syria and Galloway.

Yes, of course there were Syrians (and also Nubians - people from what is now Libya and Morocco) on the wall. I've mentioned them before on this blog. And we know that at the end of their service, they were not sent home: instead, they were given grants of land locally to where they were stationed at the end of their service. So there were certainly Syrians and Nubians settled on what is now Northumberland and Cumbria, and their descendants are almost certainly still there.

Closer to home, the Romans established a harbour in Orchardton Bay, and a road - most of which is still used today - from there, through what is now Gelston and Threave, to their fort at Glenlochar. The fort at Glenlochar was not garrisoned for very long - from  81 AD, but probably for only about twenty years - and as far as I know we don't know which legions garrisoned it. So I don't know whether there were Syrian archers at Glenlochar, but it's by no means impossible.

Furthermore, if the flag-maker and merchant Barathes mentioned in Robin's essay was trading from Corstopitum, he was probably trading across the wall; in which case it's quite likely that he visited the Kelton Hill Fair, which was an important trading fair from the Bronze Age until the enclosures of the eighteenth century. So Barathes very likely knew the landscapes we're familiar with - with Screel, with Bengairn, with the road up past Taliesin.

But the very name 'Cumbria' - land of the Comry, the people, in modern terms the Welsh - reflects what happened after the legions were recalled in AD 383. The Brythonic kingdom of Rheged, whose caput was at Dunragit in Wigtownshire (shown on Ptolemy's map as Rerigonium), expanded south to include lands at least as far south as Penrith. So at that point, the settled legionaries became citizens of the same state that contained what is now Castle Douglas.

Rheged was heavily defeated at the Battle of Catraeth (what is now Catterick, in Yorkshire. where the Syrian Goddesses you mention were found) in about AD 600 - at more or less the same time as Muhammad started to pray in his cave on Mount Hira - and Northumbrian Angles spread into what is now Galloway, establishing their own villages of Kelton and Gelston close to the long-established Brythonic village of Threave. Through that turbulent period, isn't it likely that some of the descendents of people from south of wall moved north of it, either with the retreating people of Rheged or with the advancing Northumbrians?

Populations have been mixing - and people have been trading - since the first mesolithic settlers arrived here. Galloway was on the trading route which was already well established when Pytheas of Massalia - what is now Marseilles in France, but then a Greek colony - followed it around 325 BCE. The quest for a single, authentic ethnicity for the people either of Galloway or of Scotland has always been a false one. There are Gallovidians of Scots ancestry; yes. But it's also worth remembering that there are Gallovidians of Brythonic, and, let's remember it, also almost certainly Iberian and Syrian and Libyan ancestry, who were here before the Scots; and Anglians who were here at the same time. Ethnicity does not define who we are. What we do, and how we relate to the world, defines who we are.

Saturday, 26 July 2014

Gaza: towards an ethical foreign policy for the new Scotland

Graphic by Tawfik Gebreel, Gaza
Jean Urquhart MSP, one of our excellent crop of independents, has tabled a motion in the Scottish Parliament calling for sanctions against Israel in response to the current crisis in Gaza. In considering how to persuade my constituency MSP, Alex Fergusson, who is that most old fashioned and endangered species, an honourable Tory, to add his name to it, I thought about how I envisage - hope to see - the foreign policy of our reborn nation develop; how it can establish its place and distinctive voice in the world.

I thought about the history of the Palestine issue, and the United Kingdom's sorry role in it. Appealing to Mr Fergusson, I thought, over the current plight of the Palestinians was unlikely to succeed; presenting that appeal in the context of our responsibility for the construction of the problem and our consequent responsibility to aid in its resolution might do so. Of course, it's highly unlikely I'll succeed in also persuading him to turn from unionism to internationalism, but - with this issue particularly in mind - I think it's worth a try.

Scotland - our Scotland - really does have a chance to make the whole world a better place.


Dear Alex Fergusson

As Scotland moves towards independence next year, it's time we started taking up our responsibilities on the world stage, and establishing our reputation as one of those smaller, more enlightened nations, like our neighbours in Scandinavia, which have the luxury of being able to act not as the world's policemen, but as its peace builders.

The situation in Gaza now is a crying shame to the whole globe. It's a situation for which the British state cannot evade responsibility. By failing properly to discharge our responsibilities under the Palestinian mandate, by offering to resettle Jewish refugees on lands which were already inhabited, by then permitting Zionist terrorists to carry out ethnic cleansing in territory for which we were nominally responsible, we created the conditions for this cancer. Scotland, of course, inherits a share of the responsibilities for the failings of the United Kingdom. But, by this time next year, Scotland will not be the United Kingdom. We can take up these responsibilities with fresh hands, with fresh eyes.

The situation in Gaza must stop. The progressive illegal theft of territory in the West Bank - Israel's policy of Lebensraum in the East - must stop. The bulldozing of homes and of olive groves must stop. These are not anti-Jewish statements: they're not even anti-Israeli statements. Israel must find a path to peace as much for Israel's sake as for the sake of the Palestinians. The corruption of this dreadful conflict has brought the government of Israel down to the level of the states of old Europe - yes, including Scotland - which oppressed the Jews over the past seventeen hundred years. There is no moral distinction, now, between Gaza and the Warsaw Ghetto.

But just as Germany has, over the past seventy years, been able to step back from the dreadful moral hazard in which it stood in the early 1940s, so Israel can, too. But before they can, they must be brought to see the enormity of what they are now doing.

None of this is to say the Palestinians are innocent. Hamas are not innocent. Firing rockets at civilians - whoever does it - is a war crime, and should be. But no more were the heroes of the Warsaw Ghetto, whom Hamas so closely resemble, innocent. They were people driven to desperation, as the world - the Allies - stood back and allowed their people, their families, their homes - to be obliterated. Just as we are doing now, with Gaza.

Scotland cannot walk by on the other side. Scotland, like the good Samaritan, is an inheritor of what the Palestinian people must rightly see as an old enemy. We must step in and stand decisively with Palestine - not because the Palestinians are innocent, but because unless they have people who will stand with them, who will give them confidence to know they are not friendless in the world, who can offer them places away from the front line where the different Palestinian factions can meet, discuss and plan their approach to their necessary and inevitable negotiations with Israel, who will have their backs in those negotiations and who can help them to remain reasonable, flexible and unmastered by anger through them, they will not be able to find a path to peace.

In saying this I'm not suggesting that Scotland should usurp Norway's role as the primary peace-broker in this conflict. I'm seeing Scotland's potential contribution as different, but part of the whole process of building peace. This is something we small, unimportant, unthreatening nations - unburdened by imperial ambition, by weapons of mass destruction, by seats on security councils - can do, must do, that the ancient leviathans cannot.

So I urge you today to sign Jean Urquhart's motion, S4M-10638, calling for sanctions against Israel. But I also urge you, strongly, to listen to your conscience and vote Yes on September the 18th: not just for Scotland's sake, not even for Britain's, but for the world's.

Scotland has responsibilities. We must show we are prepared to take them up and acquit ourselves well of them.

Sincerely

Simon Brooke

The wheelchair users of the Internet

I know I've banged on about not posting text-as-graphics to the Internet often enough. I know all my friends are bored of me doing it. But this picture, which I've seen for the first time today, makes the point far better than anything I could write could.

For those of you who can't see the image, it's a visual joke: what is called a sight gag. It shows a very expensively built, obviously architect designed, building. All across the front is a flight of steps, leading up to the plinth on which the building stands. And the joke is this: the building is emblazoned with the words 'Wheelchair Foundation'. We take in the dissonance between the sign, and the steps which clearly make it impossible for a wheelchair user to access the building, and we laugh.

Computers have made a wonderfully accessible space for people who cannot see. Screen-reader software intercepts the stream of characters as the computer prints them on the screen, and reads them aloud. No longer do books and newspapers have to be painstakingly transcribed into Braille. Someone who cannot see, can still have access to everything that is available as text to their computer.

The Internet, then, is for those who cannot see, like a beautifully laid out, modern, level town centre with wheelchair ramps into every building is for a wheelchair user. It's a space in which they have sudden, unexpected freedom to interact with others on an equal basis, on a level playing field...

Until some unthinking person needlessly builds steps across the wheelchair ramps. You wouldn't do that, would you? You wouldn't needlessly prevent a wheelchair user from a building they otherwise could use. You'd see that as an impolite, a disrespectful, a boorish thing to do.

Well, that's what you do when you post text-as-graphics to the Internet. You're planting bollards in the middle of the wheelchair ramps. It's impolite, disrespectful, boorish - and almost never necessary. Don't do it.

Sunday, 13 July 2014

Dear Feeble Fifty: an epistle anent 'emergency' legislation on communications data

As the Feeble Fifty go, Russell Brown is actually a fairly decent man; he takes an interest in mental health and in rural poverty, and is a 'good constituency MP', which is to say a hard working advocate for individual constituents who have problems with the state. As a legislator, though, he's a total waste of space. He has never once voted independently of his party. We seriously would be as well sending a clockwork monkey to Westminster.



Dear Russell Brown,

I know that you have never voted against a Labour Party whip, and I think it's highly unlikely that you will now change the habits of a lifetime and vote to for the interests of the people against the interests of the state. However, I feel that, given that this is 'an emergency', it is my duty to try at least to persuade you.

Angela Merkel, now Chancellor of Germany, grew up under the Stasi, a regime which viewed the state's right to snoop on its citizen's private data as sacrosanct. Needless to say, she still considers it offensive that her phone should be monitored, that who she talks to should be recorded; and so the post of intelligence chief in the United States' Berlin embassy is now vacant.

The Deutsche Demokratische Republik is not often held up as a model of how to run a liberal democracy, yet the Stasi would have given their eye teeth (or possibly the eye teeth of their 'guests') for the powers that your party proposes to nod through parliament in support of your Conservative and 'Liberal Democratic' allies.

To a degree, of course, we know that this is all theatre; that GCHQ will continue - with the complaisance of Westminster - to bug our communications anyway, just as the British security state co-operated with the establishment and operation of the US torture centre on Diego Garcia whilst Tony Blair, Jack Straw and David Milliband blandly denied its existence in Parliament, because Westminster is either not able, or else not willing, to hold the security apparatus to account.

However, Article 8 of the European Convention on Human Rights guarantees each of us the right to a private life, a right which cannot be squared with the pervasive snooping proposed by the current 'emergency' bill. Like its predecessor, it will undoubtedly fall foul of that convention and consequently of the European Court of Human Rights. More importantly, though, it will enhance the European view of the UK as an increasingly undemocratic, uncommunitaire, pariah state, which will in turn influence the negotiations as David Cameron prepares for his referendum on the UK's continued membership of the EC.

Which brings us on to your own narrow self-interest, because before that referendum we have another, closer to home, which is likely, it seems, either to be narrowly won, or else narrowly lost. If won, of course, your comfortable Westminster job will evaporate. But if lost, do you think the Left in Scotland will easily forgive a Labour party which sided with the Tories against their own people? If ever there was a time for the Feeble Fifty to demonstrate that you are not merely drones entirely controlled by your party apparatus, it is now. You need to demonstrate to us, your electors, that you have spine, cojones and independence of mind, and that you will defend the public interest even in defiance of the whips; that, or seek a new career.

Yours sincerely,

Simon Brooke

Monday, 9 June 2014

Who bagged Scotland's missing millions?

Excellent post on missing Common Good lands on the Not Just Sheep and Rugby blog: Who bagged Scotland's missing millions? Strongly recommended for anyone interested in land reform.

Saturday, 31 May 2014

Not in our name

Dear Shirley Williams

You clearly wanted to speak about the Scottish independence referendum on Radio 4 this morning, and you made it clear that the principal reason you don't want us to choose independence is that it would rob the UK of it's place at the world's top table.

For many of us in Scotland, that is precisely the point. We don't want illegal weapons of mass destruction parked anywhere on our soil, let alone in the purlieus of our largest city. We also don't want the rusting contaminated hulks of nuclear submarines lying just across the firth from our capital city, but that might be negotiable. We don't want illegal foreign adventurism in our name. We don't want to be part of a nation justly hated all over the world for its centuries-old history of exporting warfare and weapons across the globe.

We know that it is the small countries of Europe that achieve positive change on the world stage. We saw the role of Iceland in easing the tensions of the cold war. We saw the role of Norway in bringing Israel and Palestine to the negotiating table - before the US sabotaged all the progress made. We've seen the role of Austria in providing a venue for the de-escalation of the tension over Iran's nuclear ambitions. We've seen again and again the role of Switzerland in providing a neutral venue for talks between warring nations. All these nations are trusted because they do not try to 'punch above their weight'. They are trusted because they don't seek to be the world's policeman. They are trusted because they don't have imperialist ambition.

Scotland will join this honourable company. We've always been an outward-looking, an internationalist nation; we will continue so to be. But instead of using our influence, as Britain has, to promote and foment war, Scotland will be in a position (which Britain, with its tainted record, can never be) to become a venue for building peace.

If you want Scotland to remain in the UK, the answers simple: disarm, unilaterally, dismantling all weapons of mass destruction and cutting defence spending as a proportion of GDP to at most no more than the European average. Adopt a written constitution which prevents Britain from going to war at all unless either invaded or requested to do so by a resolution of the General Assembly of the United Nations. Voluntarily resign Britain's permanent seat on the Security Council. Send Tony Blair to the Hague to face indictment on war crimes charges.

If the government were to do all these things before September 18th, I think you might still achieve a 'no' vote. For sufficient Scots, this is the key issue: you may not hold illegal weapons, or illegally invade foreign countries, or trade arms across the world, in our name. Never again. But promises to do these things are not enough. Everyone knows what the promises of the British state are worth. I appreciate that it would be impossible to dismantle all the nuclear weapons in just three months, but a start could be made. All the other things could be done quickly.

We don't hate the English (or the Welsh). We don't want to see England dragged through more years of Tory government, whether propped up by the Liberal Democrats or by UKIP. We would like you still to have an NHS as good as ours, and a benefits system as good as we aspire to. But we want to hold our heads up in the world, to be able to say honestly and clearly that we are not warmongers, meddlers, arms traders, imperialists.

Will you do this for us? Or is, ultimately, that 'seat at the top table', that delusion of power, of greater value to you than the Union?

Yours sincerely

Simon Brooke

Thursday, 8 May 2014

Say something positive

If you think I'm not always a great essayist, I'm even less good as a graphic artist. Consider this animated GIF an idea, a prototype, which those with better skills (and better tools) can take, copy, adapt, improve, and pass on.

Like everything else on this blog, it's published under creative commons attribution/share alike license - but if you do use it in any way at all, I'd appreciate it if you drop me a link.

Enjoy!

Tuesday, 6 May 2014

Eco WHAT!?

I started to write a while ago about the Grauniad's 'eco-homes' competition, and then shelved it because it felt too negative; and, in any case, the competition had passed (needless to say, the worst house - from an ecological point of view - won). However, people are still blogging about these houses, and it needs to be said: they are not good enough. If this is the standard British housing aspires to, we're in even deeper trouble than I thought.

Let's start out by saying this. I don't claim to be a pioneer or an ideologue or a sage. The Winter Palace is - by the Grauniad's standards at least - a fairly extreme eco-home, and I was thinking to some extent about its impact on the landscape when I built it. But I didn't use straw and clay and softwood primarily for ideological reasons. I built of straw and clay and softwood because I needed a comfortable home, and I was broke. That's why my insulation is (recycled) glass wool, not the sheepswool I would have preferred - it's less 'green', but it was cheaper. Similarly, an earth closet does have lower environmental impact than a septic tank, but it's also - much - cheaper. Mind you, I would have had an earth closet anyway, for ecological reasons, but... What I'm saying is that deep economy, not deep ecology, drove my build. Mine is more an economic house than an ecological one.

So what has this to do with the Grauniad's competition for 'the best eco-home'? Well, the Grauniad's competition, being a competition in the prestigious end of the public press, attracted mainly architects who wanted to show off their grand designs in order to attract new customers. And these are, primarily, 'grand designs', worthy of that appalling Channel 4 programme: a third of them are bloated plutocratic mansions of the hyper-rich, tinted with a very thin coat of greenwash. A third are somewhat more modest versions of the same thing. And a third, by my standards, sort-of qualify.

Three with brazen knobs thereon affixed


Let's start with 'Underhill' in Gloucestershire. Mr Baggins would not recognise this Underhill. It's no modest, finely crafted dwelling. It's huge. But, like Mr Baggins' home, it is - mildly - earth sheltered
(although not underground) - and to achieve that, the builders have dug or blasted out half a hillside. It's then fronted entirely with glass (full disclosure, so's mine - but it's a lot less glass). The structure of the house is 'entirely concrete'.

Sorry, you cannot call this an 'eco-home' in any sense at all. Digging that hole, making that concrete, wiped out any energy savings that the building may deliver over its lifetime. And building a house on that scale for one family - spending half a million pounds on a house for one family is not in any sense sustainable. The architect said of it, "We want to bring the Italian catwalk to eco houses." She's failed. She may have brought the Italian catwalk to the Cotswolds, but 'eco'? Nonsense.

The Blackheath Pavillion is again a plutocratic monstrosity - again, built by an architect for himself, this time at a cost of a million pounds (less change). The soi-disant eco greenwash is here even thinner. My contempt for this sort of cognitive dissonance is unutterable.

Plummerswood in the Borders is similar. Yes, it's built primarily of softwood - prefabricated in Austria from timber grown who knows where. The food miles involved are extraordinary. And, again, 1.25 million pounds to house one family: you could build one hundred and eighty homes like mine for that money (or, more practically, 90 homes each twice the size of mine and housing a family).

Three wannabes

On a more modest scale, the 'Zero Carbon House' (yes, seriously!) recyles some of the same nonsense. Again, it's an architect building for himself, at least partly as self-promotion. This one cost only a third of a million pounds, or twenty-five houses worth - but that is, I think, not counting the pre-existing house onto which it was built. As for zero carbon, it incorporates a lot of sheet glass, bathroom fittings of either enamelled steel or ceramic (the pictures aren't clear enough to distinguish), glass kitchen counters, and thirty five square metres of solar panels. Low carbon it may be, but zero carbon it is not.

But it does have genuinely good features, including newspaper insulation, and a lot of reclaimed materials. It's not a dead loss. Give it two out of ten, for trying.

Slip House, in London? Look at that glass.

Let's be clear about this, transparency is a good thing. Before I had the Winter Palace, I lived six months on a platform in a tree. So long as the daytime temperature stayed above ten degrees celsius, it was actually quite nice, but when the daytime temperature fell below that - as in Scotland it often does, even in summer - it was pretty miserable. And allowing the breeze to waft through your living space may be pleasant on a warm summer day, but being unable to exclude it when it's driving a thin cold condensing mist is much less pleasant. I think that we many of us go too far in excluding the weather from our lives, but... My house has glass. Currently it has about five and a half square metres of glass; when I finally get round to glazing the front gable it will have about nine square metres.

I do keep thinking about alternative ways to gain the transparency of glass without its embodied energy, and so far I haven't found one. Friends have built their homes around reclaimed window units, and that's obviously more ecological than having new glass specially cut; but I want my house to have a formal grace, and that's not easy to achieve with odds and ends of repurposed glass. Japanese paper is not transparent but does admit light; it's a possibility for my next serious build. I'm not an absolutist about glass.

But the use of glass at Slip House is on another scale altogether. Even walls which are of solid opaque material are clad on the outside with glass, and that glass rises a metre above the roof. Where it is transparent, that glass is triple thickness - which undoubtedly has a significant insulation benefit. At what point does that insulation benefit cancel out the energy cost of the extra glass? To my shame I don't know. My instinct is that this much glass just isn't sustainable. The cost isn't sustainable, either - this fairly modest house cost two thirds of a million pounds.

Marsh House in Nottingham falls into the same category. A little cheaper - a mere half million, here - and a little better. Not a lot better, it's built substantially of brick, and it doesn't look like reclaimed brick. Like me they do use a composting toilet - which in a city is brave - and do without a fridge. It's an interesting house with some good ideas, and it's certainly better than most modern houses. But an eco house? Really?

Three to respect

Lilac Cohousing is in Leeds. The houses were prefabricated in Bristol, out of timber and straw from god-knows-where; and then transported to their site by road, and craned into place. And you do have to ask, what the holy god damned fuck?

Straw has a lot of benefits for building - I should know, I live in a straw house. But part of the point of a straw house is that straw bales are more or less like LEGO bricks. Each bale can be lifted by hand, placed by hand, if need be trimmed to size by hand; and a team of half a dozen completely unskilled people can build the walls of a house in a day. Bales are incredibly cheap: if you can't make your own from your own land, they cost about two pounds fifty each on the open market; and a couple of hundred of them will build a family home.

But, an assembled straw wall isn't easy to move. To hold them together during transport, ModCell, the builders of the straw modules used at Lilac Cohousing, build extremely sturdy wooden casements. These wooden casements then form the load-bearing framework for the houses, and to be completely fair about it, I would not have confidence to build a load bearing straw structure more than two stories high, so the wooden casements are probably not more expensive of timber than any other multi-story straw structure. And, again, the ModCell modules are fair inside and out, like a proper concrete home and lacking the somewhat rustic unevenness of my own walls. So there are some benefits.

But you lose. You lose community effort. You lose comradeship. You lose empowering people, letting people have the experience of building for themselves. You spend a lot of money on factory manufacture, on transport, on cranage, on specialist labour. And for what?

The other thing which slightly bothers me is cost. It's elided in the Grauniad puff-piece. Each resident, we're told 'pays... 35% of their net income rather than taking on individual mortgages'. Woah, that's a LOT! 35% of income after tax? For how long?

Again, for comparison, my house cost what I currently earn, after tax, in two months. OK, I was mad at the time, and consequently not able to earn, and consequently broke, but... So if I paid it off at 35% of my income I would have it paid off in six months. Because, after all, building in straw is cheap. So how long will the Lilac residents be paying for, exactly?

So I don't know. This isn't dreadful. I'd like to visit some day and have a look, talk to the folk. Five out of ten, maybe?

Edited to add: it seems I was too harsh on the Lilac scheme. Apparently (so they say on Twitter in reply to my post) their modules were actually built on a farm eight miles from site, partly with residents labour, using bales from straw grown there. So not nearly as ridiculous as I had thought. And Lilac does look like 'normal' social housing - perhaps even too much like 'normal' social housing - which will appeal to the innate conservatism of lots of British people.

The Hemp Cottage has wool insulation. I'm interested immediately. That's something I wanted to do and somewhat regret I did not do. Its walls are not straw, but a hempcrete mix made with lime; a sort of technically advanced cob. The proponents of hempcrete claim that it is carbon negative, which is clearly baloney seeing the lime must be kilned. But the render on my walls would be more durable if I had used lime, and I may yet re-render with lime. One cannot be purist. This is, all in all, a pretty nice build. Six out of ten.

Lammas feels very like home; like the Standingstone conspiracy, they are eight households. Like us, they've bought their land together. They're obviously much more right on than us, with their deliberately and consciously unsquare dwellings built with higglety-pigglety roundwood frames. Their structures have their own aesthetic, and I can admire it very much, although it isn't mine. But these people are doing it for real. They're building themselves, together, out of (mostly) the natural materials of the land on which they live. And their houses cost very much in line with mine - 'None cost more than £14,000 to complete.'

In short, this is the real deal. I hope to go there, and to learn from them. They provide one vision of what an eco-house looks like - a slightly rackety, post-punk, post-apocalyptic vision, but an authentic vision nevertheless. You don't have to live in a house like this to be eco. Eco houses are also available in square, and can even have pitched roofs. The windows don't have to be funky-shaped. The timber doesn't have to be round wood (although there's some fuel saved in not sawmilling it). But Lammas is probably as close as you'll get to ecohousing in Britain today, whether your eco is economy or ecology (and, let's face it, the two are closely related). Nine out of ten, and respect.

And one odd ball

100 Princedale Road is sort of an odd one out in this set. It's a traditional terrace, retrofitted with a lot of insulation. That has, obviously, reduced internal volume. It's also greatly reduced ventilation. A lot of modern 'eco-house' thinking seems to be about excluding nasty uncontrolled nature; I'm far from persuaded this is a good thing. And this process of reducing the space in the house has cost £180,000 (on top of its original purchase cost), or the cost of nine good family homes.

As a technology demonstrator for efficient insulation I'm sure it's a wonderful building, but this doesn't scale. We can't afford to do this to every terrace house in the country, and it seems highly doubtful to me that this degree of insulation will pay for itself either in money terms or in energy terms in the lifetime of the build.

Three out of ten, to be generous.

Tuesday, 22 April 2014

Making oor ane Merk

This week two old friends have written to me in apparent distress, concerned about the consequences for Scotland of George Osborne's latest temper tantrum; and so I've had to compose a response to their anxieties.

The real facts are that if 'the United Kingdom' is the 'continuing state', then in international law it is clearly, simply and unequivocally responsible for all the debts - every last penny of them. That's the law as it's been through the independence of Ireland, of the breakup of the British Empire, of Czechoslovakia, right down to Sudan last year.

If there's a 'continuing state', and Westminster has made it very clear it wishes to be a continuing state, then that state takes the debt. That isn't, of course, Scotland's bargaining position. We are willing to take on a population share of debt - but only if we also get a population share of assets, and there's no doubt the Pound Sterling is an asset.

If the rump 'United Kingdom' wants to keep that asset to itself, I would expect that to be negotiable - but it's a big asset, so they must expect to pay heavily. But if they won't negotiate, then the law is it's their debt, not our debt, and we cannot default on it. That's very well understood, long established international law.

I actually agree that in the long term monetary union won't work; our economies are going to diverge pretty sharply. But it's very much in England's interest to allow Scotland to come to that decision in it's own time, rather than have to pay heavily now to bribe us to change.

I really don't see this as being a hard negotiation. It is so manifestly in everyone's best interest to maintain friendly relations. What we're seeing just now is frightened men having tantrums and throwing their toys out of the pram; after the vote, when they actually have to deal with the issues, they'll be much more pragmatic and reasonable.

It's right that the rUK can refuse to set up a currency union, or allow Scotland to share the Bank of England. It's right, too, that sharing the Pound, with or without rUK's agreement, would mean that Scotland would be effectively forced to keep its economy in lockstep with one rapidly heading down a neoliberal cul-de-sac which leads only to extreme social dislocation and the third world. In other words, while easing the transition to independence by keeping the pound in the short term may be a good thing, keeping it in the long term would probably not be.

On the other hand, the Pound Sterling and the Bank of England are both pretty substantial assets, of which Scotland by rights owns a roughly 10% share. If rUK want to keep that asset for themselves, what are they prepared to pay for it?

In the long term it seems to me highly likely that Scotland - like Norway, Sweden, Iceland, Switzerland - will have its own currency. It seems to me that in the long term we'll more or less have to.

But that in turn raises another question: what is the long term future of the pound sterling, floating off into the mid-Atlantic sans Europe, sans industry, sans education, sans oil, sans friends? The rUK really needs to think about what it's doing, here. It does not have a God-given right to the share of the planet's wealth it currently enjoys. This is a time to be building good relationships, not wrecking them.

Thursday, 10 April 2014

On Clojure as a multi-user environment

Today, not having really enough to do at work, I was reading a Guy Steele and Richard Gabriel's (highly partisan) paper 'The Evolution of Lisp', and thinking about Post Scarcity Computing and about Clojure.

Lisp has failed to get traction too many times because people insisted on their own idea of what constituted a pure Lisp. Let's be clear about it, if I were designing my perfect Lisp it would be different from Clojure in a number of significant ways. Nevertheless, Clojure is more or less the best Lisp we have now, and furthermore it has traction. Furthermore, it has a number of most excellent features which, had I not been exposed to Clojure, I would not have thought of myself. So if you're going to build a post-scarcity computing environment now, Clojure is not a bad place to start.

But let's think about how Clojure impacts on the ideas I put forward in Post Scarcity Computing. Firstly and most importantly, in Clojure data is (with some special case exceptions which we'll come to) immutable. That has a number of interesting consequences, and one of them is that an older data cannot ever point to newer data.

How does that impact on a multi-user environment? Well, probably no-one's ever thought about that in the context of Clojure, because probably no-one's ever thought about having several people connected into the same Clojure session. But, suppose you connect to a base Clojure environment, and run some computation, and then I connect to the same base environment. I cannot see anything that's going on in your computation, because all the partial results of your computation are newer than the base environment.

You can try this yourself. There's probably simpler ways to do this, but here's mine: first, install emacs 24, and cider. Next, open three terminals, and run

lein repl :headless

in one of them. This starts a headless nrepl, and prints out the port number it's running on:

simon@fletcher:~$ lein repl :headless
nREPL server started on port 48705 on host 127.0.0.1

In the other two, start headless emacs sessions:

simon@fletcher:~$ emacs -nw

In each emacs session, type

escape-X cider

You'll be prompted for a host, with a default of 127.0.0.1 (localhost). Accept this. You're then prompted for a port; type in the port number that the nrepl server printed.

Now, you have two terminals both connected to the same Clojure session. In one, evaluate something:

user> (list 'a 'b)
(a b)

In the other, type *1 to look at the result of the last evaluation:

user> *1
nil

But in the first window, the one where you evaluated something, *1 returns the value you'd expect:

user> *1
(a b)

So, as I said above, two separate sessions whose computations and local environment are invisible to one another. How can they be made visible? It's as easy as defining a var:

user> (def shared (list 'a 'b))
#'user/shared

Now, in your other emacs terminal, the value of shared is what was set in the first:

user> shared
(a b)

So, by default, everything a user does is private. It can be made public by simply defining a variable, in the default (user) package. Again in one terminal:

user> (ns foo (:use clojure.core))
nil
foo> (def hidden (list 'p 'q))
#'foo/hidden

In the other:

user> (ns bar (:use clojure.core))
nil
bar> hidden
CompilerException java.lang.RuntimeException: Unable to resolve symbol: hidden \
in this context, compiling:(/tmp/form-init3330134955068707486.clj:1:691)        

Unless the other user can guess the package name you're working in, they can't see the variables you bind. Of course, in Clojure as it exists now, if you do know the name of the package another user is using, you can see their variable bindings, because Clojure as it exists now isn't designed as a multi-user environment. And security by obscurity isn't really security at all.

But nevertheless you can see that Clojure could easily be made an effective multi-user environment. You can see that it would be easy to write an 'executive' function, which provided its own read-eval-print loop in an environment in which it had a (mutable) Java HashMap bound to a local variable, and could intercept a particular input pattern to store 'user-private' variables into that hashmap.

It's not hard, in fact, to see how a multi-user system could be built on a persistent Clojure session. I'll return to this soon, in further blog posts.


Creative Commons Licence
The fool on the hill by Simon Brooke is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License