All posts by scruss

Why Scotland should leave the UK

A Saturday morning queue for emigration ID photos on the Kirkintilloch High Street made me realise that Scotland wasn’t meeting the employment needs of its people. People in line were happily swapping stories of what they’d do after they’d had their photo taken, and departed for Canada, New Zealand, Australia or the USA. Although I was one of the happy band, it made me realize that Scotland was a country that people were lining up to leave. If the country you’re born in can’t offer you the best opportunities, it’s just not being run properly.

Scotland is part of the United Kingdom, not really by design, but by the coincidence of geography and 300+ year old expediency. Having provided England with a source of reliably non-Catholic monarchs the century before, Scotland of the early eighteenth century was dirt-poor from an ill-advised foray into Central American colonialism. Of course a union made sense in that time of empire building. It worked as a union for at least a couple of centuries, but like any marriage where the parties grow apart, grow unequal, or grow contemptuous, it’s a union that clearly has a time limit.

Part of the problem of being a minority partner in any endeavour is representation. Even though the union is one of nominal equals, when one is only 10% of the whole there can be little chance of the smaller party’s needs being met. In my technical sphere, 10% is typically considered rounding error; you can conventionally ignore that small part and still assume the whole of the system is included in your results. With different social priorities than the rest of the union, Scotland – sometimes a great nation in terms of its aspirations – can’t meet the needs of the people who live there without local control and responsibility. No-one wishes to spend their life as rounding error.

Viewing the independence discussion from afar is an odd situation for me. Abstracted from the daily local squabbles, I can appear to be detached. I must also guard against having an overly fierce opinion of something that isn’t going to greatly affect my life in Canada, while those in Scotland will have to live through it. What is clear, however, is the strange imbalance in the campaigns: Yes is all fired up, with positivity and community support by the truckload. No seems curiously muted; no grassroots, all cold reason and no heart. To see the energy even in National Collective‘s online presence reminds me of Barrie’s rather sly compliment to his countryfolk: “There are few more impressive sights in the world than a Scot[...] on the make.

Old JMB might have had less altruistic intentions with his words, but there is a great beauty in the energy of the pro-independence creatives making the idea of a new country. I just hope they’re backed with enough practical nous to get voters to the polls on the day, for that’s all that counts in a referendum.

The No arguments are leaden in comparison: Vote No Because That Bloke on the Telly Says So (remember, actors say the lines that people pay them to say); Vote No Because We [the UK] Love You, Please Stay (apart from sounding a bit creepy, haven’t they ever heard of “if you love someone, set them free” …?); Vote No Because You Won’t Get Access to London’s Lovely Jobs if You Leave (um, this appears not even to be a thing for all the Canadians who live and work in the US – a border is not a barrier). There just doesn’t seem to be a positive way of saying No.

Not all of the Yes proposals are entirely advisable, though. The issue of oil is a huge distraction. It may turn out to be of more value to leave it there unexploited, as a source of long-term carbon store revenue. Many people also bridle at Alex Salmond’s bluff facility, and of his standing as a statesman, I’m not a fan. Where he does shine, however, in his ability to be a canny negotiator. Scotland’s going to need a ferocious advocate to fight its corner in any independence talks, and Salmond is just the right kind of bastard to lead this. I would not be too keen if he stuck around as El Presidente for any great time afterwards, though.

To say No seems to me to defer the inevitable, at a time when the ruling party of the Divided Queendom could turn vindictive if Scotland sticks around. A referendum would come around again and again, each time the arguments becoming increasingly more abject. Best to do it now, and not defer the hard work of taking responsibility for Scotland’s future. Would you prefer to shirk as if you’re stuck in the latter days of a bitter nation, or rather take on the role of building the country you want?

Toast (Trad., Scot.) feat. Maynard K
Toast (Trad., Scot.) feat. Maynard K

Stephen still a novice glove puppeteer, confirms Laureen Harper

(image lifted from Prime Minister Stephen Harper takes another northern tour – Politics – CBC News)

Man, those Sean Kilpatrick/Canadian Press pictures from last year just keep giving! It’s a shame that the Sharky hand-puppet didn’t catch on (via fFOIA request: “… a tool to embed Capitalist values into younger children. Catchphrase: ‘It's okay to take, kids! …”) but he didn’t test well with the pre-school crowd.

Screamingly fast HWRNG on Arduino Due

Well, look at this:

$ stty -F /dev/ttyACM0 speed 115200 raw cs8
$ rngtest -t 6 < /dev/ttyACM0
  … much snippage …
rngtest: bits received from input: 312368864
rngtest: FIPS 140-2 successes: 15602
rngtest: FIPS 140-2 failures: 16
rngtest: FIPS 140-2(2001-10-10) Monobit: 2
rngtest: FIPS 140-2(2001-10-10) Poker: 2
rngtest: FIPS 140-2(2001-10-10) Runs: 8
rngtest: FIPS 140-2(2001-10-10) Long run: 4
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=837.317; avg=1168.033; max=1948.060)Kibits/s
rngtest: FIPS tests speed: (min=16.834; avg=27.779; max=77.221)Mibits/s
rngtest: Program run time: 271917796 microseconds

Over a megabit/second of decent quality random data. This is from an Arduino Due, which has an Atmel SAM3X8E ARM Cortex-M3 microcontroller on board. I hadn’t found much use for this board previously, as it fell between a regular 8-bit Arduino and my (many!) Raspberry Pis.

This changed when I found out about Walter Anderson’s Entropy library, which uses µc timer jitter as a source of entropy. Originally designed as a slow but true source of random integers on the Atmel AVR chips, it’s been extended to use the SAM3X8E‘s built-in hardware RNG. Since the Due has a native USB port, you’re not limited to standard baud rates.

Here’s the code, trivially modified from one of Walter’s examples:

// Generate_Random_Bytes_Due - speedy demo of Arduino Due's HWRNG
// based on Generate_Random_Bytes, for Entropy, an Arduino library.
// Copyright 2012 by Walter Anderson
//  modified - scruss - 2014-08-13
// remember to reconnect to native USB port

#include <Entropy.h>

void setup() {
  while (!SerialUSB) {
    ; // wait for serial port to connect.

void loop() {
  uint16_t r = Entropy.random();

It’s a minor pain to have to reconnect the USB cable to the other port on the Arduino Due after programming, but it’s worth it just to see an 84 MHz µc belting out random bytes 37½% faster than an 800 MHz Raspberry Pi