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.


Tuesday, 18 March 2014

A circular history of money

Stage 0

I don't know what money is, but I'll give you this nice shiny piece of metal for that loaf of bread.

Stage 1

I know what money is: this nice shiny piece of metal is money, and it's worth exactly it's value as a piece of shiny metal.

Stage 2

I know what money is: this nice shiny piece of metal is money, and I have refined it to very high purity and stamped my mark on it. My mark is your guarantee of its very high purity, and consequently it's worth a premium over other shiny bits of metal of the same weight.

Stage 3

OK, yes, I might have adulterated the metal just a little tiny bit, but it's still got my mark on it so it's still worth a premium over other shiny bits of metal.

Stage 4

Hey, all those shiny bits of metal are heavy to carry. To save you the trouble I'll just put them all in this vault here and give you pieces of paper instead, but it's OK because those pieces of paper just represent nice shiny metal and I've even printed a promise on them saying I promise to pay the bearer on demand in nice shiny metal...

Stage 5

Well, OK, no, I don't actually have enough shiny metal to back all the pieces of paper. I seem to have printed too many. But it doesn't matter because, well, paper is money these days, isn't it? Everyone accepts it. And you know I won't ever print any more of it, so it's guaranteed to keep its value.

Stage 6

Yes, well, sorry. I lied. But it doesn't matter because... Look! Shiny!

Stage 7

All that paper's really inconvenient to print and it wears out too quickly. But hey, this number on this computer disk represents all the money we've printed, so we'll just do sums with that and everything will be fine.

Stage 8

See, there's been this economic meltdown thing - which was nobody's fault, it just happened - and somehow it's affected the computer and the number's got a bit bigger. Accidentally. But that's OK because we'll give the extra money to the very rich bankers and they'll lend it to you.

Stage 9

They kept it for themselves? Are you sure?

Stage 0

I don't know what money is, but I'll give you this nice shiny piece of metal for that loaf of bread.

Wednesday, 12 March 2014

Au tour de ma tête, more or less.

OK, so, my friend Janet got me on this blog tour thing. Thing is, I'd like to say I'm not writing these days. Much. I've got a new and demanding job, and I'm dog tired all the time. I've also got a lot of things I ought to be doing - not least, this year is Scotland's chance of independence, a chance I've been waiting for and claiming to be working for for forty years. But I'm not out on the streets campaigning, because I'm too tired.

Or so I say.

And yet, I came back to my lodgings on Monday night, sat down, and wrote three thousand words. I got up this morning at sparrow fart, and wrote another five hundred before wolfing down some breakfast and running out to work.

What am I working on?


So what (the fuck) is this all about? It's all about a novel. It's all about a novel which bit me in December, and hasn't let go. In two and a half months I've written 66,000 words - that's not far off a thousand words a day. That's (for me) fast. Unprecedentedly, startlingly fast. I mean, I've been working on one or another extended narrative piece - nominally novels - at any time in the past two decades. But typically it takes me several years to finish one, if I finish it at all - there are half a dozen unfinished train-wrecks littering my hard disk now.

This isn't a very sophisticated narrative. It has a third-party narrator - not strictly a Victorian omniscient narrator, I don't look inside the characters heads (much) - who isn't unreliable and time is more or less linear without any flashy-backies or other tricks. It plays no post-modern games. It's just a story such as people read when they're not trying to be intellectual.

I hope.

Sort of.

I'm not certain that it's any good.

So what's it about? It's about how a society moves from a tyrannical, feudal society to something a little bit more enlightened. Not very much more enlightened, it's not in the least utopian, it's not in any way presenting my view of a good society. It's a story about social process. But, people don't read stories about social process when they're not trying to be intellectual. So it's a romance - sort of, I don't know yet whether the protagonists end up as a couple and if they do they'd be a turbulent couple - set in a mildly fantasy universe. Without magic, because magic, in my opinion, tends to ruin plots, and without dwarves or elves or orcs or stuff, because what's interesting to me is how folk - ordinary human folk - work with other ordinary human folk. My folk are not all good. In fact, none of them are entirely good. That is what is interesting.

I hope.

The problem with writing a story about social process is I've got two whole chapters which are just process, and I worry that they're dull. One is a public meeting about how to organise the community, and that's essentially blocks of speech from different characters outlining different options. The other is a sort of a court of law, about the disposition of property. It's hard to make these dramatic. They aren't dramatic. They're process. Forging the new Scotland will involve a lot of process, too. Much of it will be dull. But we will have to go through it if we're to achieve a better state.

How does my work differ from others of its genre?


I don't know. Probably not much. Most people who write fantasy fiction - at least if they are writing anything more than commercial pot-boilers, are, like authors of science fiction, both commenting on the contemporary real world society in which they live, and also making some sort of a statement about what they view as a good society - whether that be reactionary and hierarchical (Tolkien, for example) or radically open (Ursula le Guin).

In my small way I'm sort of doing that, although my end state - a sort of proto-constitutional-monarchy - is a very long way from what I consider a good society. As I say, it's not about end states. It's about process.

Why do I write what I do?


$DEITY knows!

It's almost certainly pointless.

Probably no-one will read it.

The only novel I've had published (which I think is actually quite good, despite its cringe-making cover) has sold very poorly.

How does your writing process work?


Well, we're talking here (mostly) about stories. Narrative. I would say that on the whole I don't write stories. Mostly. Mostly I write polemic: writing intended to persuade. Journalism, in a loose sense. About politics, especially rural politics, about the environment, about the (mal-) distribution of wealth, of housing, of land. About how the land is used. About cycling. And about software, which is my profession but also my passion. And, because I'm mad, also about madness.

But really, writing a story and writing a polemic have a lot in common. You wake up with something you have to say, that won't let you rest until you've expressed it, expressed it in the best way you can with as much skill as you have.

That's what I do. I write because I'm driven to. Because I can't not.

Oh, how does the process work?

That's a different question. I write in a very basic text editor, chosen because it's basic. It edits text. There are no fonts or formatting or bold or italic or big or small. Formatting is all automatic, not something I think about. When you're writing, formatting is a distraction: something which just gets in the way.

When I've finished writing I run a bunch of scripts I've hacked up over the years which take my plain text and render it into something resembling a finished work. But I don't tweak: the stylesheet is the stylesheet is the stylesheet, and as it dictates so shall the text appear. Getting the stylesheet right has been, of course, a job in itself, but it's a job I've done and don't need to keep adjusting.

I store my work-in-progress in a revision control system - specifically git, because I'm used to it and like it. It means that if I change my mind about something and want to go back to an earlier version, that's easily done.

Thursday, 6 February 2014

At fifty thousand words

A week ago tonight I tweeted:

"New novel now up to 42k words in only two months - 670 words/day average - despite new job. Very surprised. Don't know where it comes from!"

Just seven days later, although I've been working hard and very weary, there are another eight thousand words written. More than that, there's a lot of incident written: the capture of a castle, a failed assassination attempt, a breaking of relationships, the development of other friendships. The overall shape of the second half of the novel is emerging. It's a strange and exciting experience.

The novel has - inevitably - taken its own life and is twisting away from my original plan, which is both frustrating and intriguing. I had thought it was a novel about the birth of a republic. I thought my central character was a merchant's son called Dalwhiel - a thoughtful, entrepreneurial, largely non-military character. But the character originally intended as his love interest - a hereditary princess, Selchae, spoiled and arrogant - has emerged as more interesting and more characterful. She has much more of an arc, much more challenge to her character and therefore much more opportunity to grow.

And, of course, that's distorting the shape of the piece and causing problems. The narrative starts - in a third person voice, indeed - but following Dalwhiel
. In the first half of the narrative, he's present in virtually every scene. In the central part of the narrative, both of the protagonists are together most of the time, so the camera, as it were, is able to track both of them.

But I'm using a variant of the old classic 'Pride and Prejudice' plot: the protagonists initially fall out, are brought back together, fall out worse, and finally come together again. There's a lot of mutual lust in what pulls them together, but there's also mutual liking. But, as I say, in the second half of the narrative they fall out badly and part, and the camera can no longer track both.

So it tracks her.

That wasn't really a conscious decision. But she's more engaging to write, and she simply has to do more stuff. Where he has driven the narrative in its early part, she now has to take over - if she didn't, she would be just another stock princess constantly having the vapours and being rescued.

But it does mean that my republic isn't going to happen. We might end up with a constitutional monarchy with a quasi-divine priest-queen. Something of the sort seems to be emerging. I'm not yet certain.

And that's why writing a narrative - as much as reading one - is an adventure.

Wednesday, 29 January 2014

Buy the ASA a helmet. They need one!

The banned advert
Oh, I am so tired of the cycle helmets issue. I wish it would just go away. Cycle helmets are designed to stop you getting concussion if you fall off your bike at low speeds. They aren't designed to help if you get hit by a car, and they won't. They're not even nearly strong enough, nor could they be made so.

Of course, most people don't know that. Most people think that wearing an inch of polystyrene will stop a ton of metal. They wouldn't believe it if they thought about it, but they don't think about it.

And some of the people who don't think about it are, sadly, in positions of power. This time it's the advertising standards authority. And what makes it worse is that they've banned, on helmet grounds, a perfectly good safety message which was not about helmets. It was about space. Helmets don't save lives. Space does. So by removing that message from people's televisions, they are actively making things worse.

Thank all the gods they have an online complaints form, because they need it. I trust that it's going to get a lot of use over the next few days: I encourage you to use it. I have, and what I've said is this:

I'm writing to complain about your recent ruling regarding Cycling Scotland's television advertisement

Your ruling was irresponsible, ill-informed, wrong both with respect to your own code and to the law of the land, and actively dangerous: it will certainly increase the number of deaths on our roads.

Contrary to your prejudice, there is no body of research to show that cycle helmets make any difference whatever to safety outcomes in accidents involving motor vehicles, and no manufacturer of cycle helmets claim that they do. Helmets are intended to mitigate cuts and bruising in simple falls, and are neither designed for nor capable of mitigating more serious impacts. So whether or not the cyclist was wearing a helmet on the road has no bearing on safety. The law of the land does not mandate helmets, for precisely this reason.

What has a bearing on safety is position on the road, and the helmetless cyclist shown in the advert is acting precisely correctly, both with regard to the law and with regard to the best available safety advice; the motorist shown in the advert also behaves perfectly correctly.

In short, your adjudication causes harm and offence under 4.1 and 4.4 of your rules, in that it is likely to encourage drivers to believe that they may ignore the highway code and pass cyclists dangerously close; and under 1.2 of your rules, in that contributing to road accidents as you are clearly doing is highly irresponsible.

I'm not inviting you to copy my text. Write your own. Lots of copies of the same text will have far less impact than lots of different, well written responses (I'm sure you can do better than me, I'm too angry about this to be persuasive).

However, having submitted it through their online form, I'd also recommend that you send them a copy by Royal Mail, because the weasels will probably claim their online form is only for advertisements, and that as their adjudication is not an advertisement they are entitled to ignore your complaint. They're not. And we mustn't let them.

I am so tired of helmet wars!

Wednesday, 18 December 2013

Modelling the ships


Yes, really I have been working on the novel today, but the actual text is not much further forward. I'm now up to 20,500 words, which is progress but not fast. However, I've been doing a lot of background research on speeds of camel caravans, speeds of iron age sailing ships, and other details; and I've been working on my calendar, to make sure all the right characters can plausibly be where I need them to be at the right dates, given the transport they have available to them.

Interestingly, this exercise has brought back to mind (and validated) my previous essay, 'The spread of knowledge in a large game world'. Because of the speed of the ships (more below) my protagonist sails from the northern city where he's spent the early summer thirty five days after his home city has been conquered - but he does not know of it, because there's no plausible way for news to reach him. On his way he visits The City at Her Gates, and there he may plausibly pick up news of the conquest of his home - but it's equally possible that he won't, since although the news could have reached there if a convenient ship has happened to make the passage, it's possible that it hasn't.

The Ship

But most importantly, I've been modelling the ship.

The plot driver for Merchant is the arrival of a disruptive technology: new ships which are seaworthy enough to circumnavigate the continent, and thus bypass the bottlenecks of the caravan road which has been the main trade route for hundreds of years. So, I need a ship. But since this world is not based on real history, it has to be an ahistoric ship: a plausible, effective type of ship which would work and could have been developed in the real world, but wasn't.

Rig

So what I've gone for is a semi-elliptical squaresail. That is to say, a fully battened sail which hoists and reefs like a Chinese junk sail, but which tacks like a square sail: it has no specific luff or leach. This actually has some advantages. A junk mast cannot effectively be stayed, because when tacking the sail sweeps through the area where useful stays would have to be. Consequently, junks have unstayed masts. With a semi-elliptical  squaresail, you would be able to have stays on the mast, provided they allowed the yards to be braced round to 45 degrees. Also, with a semi-eliptical squaresail, you can set the aerodynamic curve of the sail to a considerable extent by using curved battens (semi-elliptical battens, hence the name). So this sail would be very much more effective upwind than a conventional square-sailed ship. Also, as the sail is reefed by lowering it, it's not necessary to send men aloft to reef it.

Such a rig could only develop in a place with tall, straight trees - forest-grown conifers, probably, because although unlike junk rigs the mast can be stayed, it can only be stayed at the very top - you can't hoist the sails past the attachment point.

Of course, Shearwater would not be as effective upwind as a modern racing yacht. She could not lie closer than 45 degrees to the wind and in practice wouldn't lie closer than 50 degrees; she'd also make a certain amount of leeway, so 60 degrees off the wind is a likely most effective course. But downwind she'd be pretty good, and on a reach she would be very effective. As I'm positing a prevailing westerly coriolis airflow modified by strong convection over the steppe giving rise to reliable onshore winds all along the southern coast, a 'trade route' going east along the north coast, south along the east coast, west along the south coast and north along the west coast would involve very little if any beating to windward - for a ship which could lie a close reach, as this one could.


She has no staysails - she could have, but I'm assuming that either they haven't been invented or haven't been found advantageous - so she has no bowsprit and her bow is short and cobby. Her forecastle extends right to the stem, and is pretty broad at the front, with no front bulwark or rail. This is to make anchor handling easier (but, of course, more dangerous). She's a cargo ship, a beast of burden, and she's not slim or elegant; but on a 40 metre overall length she has a payload of at least 40 tons of cargo - possibly significantly more, her displacement will be more than twice that.

Cargo

Not only does she carry at least as much as 160 camels, she can make two round trips from north to south in the time a camel caravan can make one. This surprised me. But camel caravan speed is about 32Km/day, whereas the speed of a classical period merchant ship was about 220Km/day. much greater. So even if (as I'm assuming) the sea route round the continent is three times as long as the caravan road, the ship, with seven times the speed, makes the journey in less than half the time. That in turn means - something I hadn't seen until I worked this out - that not only could she outperform the camel caravans on the cargoes they can carry, she could carry perishable cargoes - perhaps fruit, for example - that they couldn't carry. No wonder the cities which depend on the caravan trade feel threatened!

As a cargo ship she has a cargo derrick to aid loading and unloading positioned over the main hatchway.


She has some features which are there simply because I needed them in the story; for example the shore boat I mentioned in chapter one is visible stowed on the main hatch; the stair on which Dalwhiel stands to talk to Karakhan is visible, the companionway out from the after castle is there, and even has an arched roof to add headroom.

Building the model of the ship helps me to visualise it and consequently to be able to write more confidently about it; it's the same reason I have town plans of my cities. I can even visualise her in the context of them.




Monday, 16 December 2013

In praise of LuminusWeb

Well, I've just finished my first in-anger, for-a-paying-customer, website in Clojure. Essentially it's just a very simple CRUD system; it landed on my desk last week in a rush because the agency which had been supposed to be building it had drawn some pretty pictures and then thrown their hands up in the air and said 'this is too hard'.

It wasn't a requirement it be written in Clojure; in fact, until I tacked a credits line on the bottom of the pages saying 'Powered by Clojure' I don't think the customer knew that it was. I estimated four days on a fixed price basis; I think this was fair. In fact it took six, but I worked over the weekend so the project hasn't been delayed by my overrun.

Some of the overrun was unforeseen - the agency who abandoned the job had built the forms in JotForm, and they proved to be so horrible that I had to rewrite them from scratch - the HTML was bizarrely bad, and none of the field names were meaningful. Also, the pretty pictures drawn by the agency were all fixed size - they didn't flow or scale. I admit I'm a snob, but if a website is going to be identified as my work I want it to be right. So now, it is right (well, mostly; the navigation does something ugly and not very usable if you shrink a desktop browser window too small, but I haven't yet found a workaround for that which fits with the design). Now, it uses media queries to distinguish smartphones, tablets and desktops, and serves the appropriate CSS for each. Yes, that cost me time, too, but in my opinion it's worth it.

And, of course, there was a bit of feature creep - there always is. The customer asked for several features which hadn't been in the original specification, and I've delivered them - but they all add time.

But the overrun I did foresee - learning time - was much less than I would have expected, and that was down to LuminusWeb. LuminusWeb is not really so much an integrated toolkit in its own right as a collection of tools from a range of developers. It doesn't use all the tools which, if I was selecting for myself, I would choose; for example it uses Selmer for generating dynamic content rather than the, in my opinion, much more elegant Enlive. But what LuminusWeb does provide - which makes all the difference if you're building something against a deadline - include

  • a great project template which sets up most of your scaffolding
  • a very clear tutorial, and
  • excellent documentation.

LuminusWeb's scaffolding and examples, with a little help from a couple of books


allowed me to build what I needed very quickly, and with remarkably little pain.

LuminusWeb is also very up-to-date; it uses current or near versions of all the tools it depends on.

There is one thing I'm disappointed with. I had hoped to integrate Chris Emerick's Friend authentication package to do OpenID authentication, but I struggled with the documentation (despite good example programs from both Chris himself and from Assen Kolov), and simply couldn't get this going in time. I did work out how I would have done proper database-layer authentication, but in the end I simply did application layer authentication because it was quick and easy.

Altogether, it's been a very pleasant experience and I'm kicking myself for not having done it sooner.

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