Categories
Programming

High Integrity Compilation

The book High Integrity Compilation is keeping my brain engaged as I munch my lunchtime sandwiches. The basic plot concerns writing a bug-free compiler, and the cast consists of the semantics of the high-level language being compiled and the semantics of the target assembly language. Happily, it’s really quite easy going. My previous encounters with formal semantics have generally left me feeling out of my depth. In contrast, this book deals with source/target languages which are just complex enough to show interesting properties but simple enough to pick up immediately.

I’ll try to give an example of why this book makes things easier. The “meaning” of a computer language is usually formally defined by a mapping from “programs” to some kind of mathematical object, like a set. This is useful because we can then leverage all of our mathematics knowledge to learn stuff about behaviour of the program. Now, most books on semantics start with a paragraph like “we’d like to use boring old primary-school sets as our mathematical objects, but they’re not powerful enough”. And before you know it, they’ve starting using domain theory and fixed-points as if they were as common as making a cup of tea. Around this point, I usually head over to slashdot and never return. However, the “High Integrity Compilation” book happily doesn’t disappear down this road. It stays safely up in the land of simple maths and easy state machines. The languages under consideration are simple imperative ones, and so there’s not the same focus on recursive functions that you get with ML-like languages and so you’re not immediately hit by a wall of complexity on page four of the book.

This book also dutifully walks through useful examples, working up from simple three-liners into multi-page walkthroughs. There’s a refreshing lack of the words “obviously”, “clearly” and “trivially” and instead plenty of concrete worked examples.

Of course, this means that the resulting compiler isn’t going to really change the world. The source and target languages are chosen for pedagogical reasons rather than real-world usefulness. But this means that, for someone like me learning on their own, you can quickly get a good grounding in semantics without having to deal with a whole load of picky little uninteresting details.

Categories
General

Subway [done]

Woo, the Subway gig was a huge success. I want to write about it, but I don’t really know where to start. When I go and see a band, “the gig” consists of the fourty or so minutes during which the band are playing. But when you’re playing the gig, it really lasts for weeks – from the moment you book it until the moment you walk off stage. I love the whole thing from start to finish. I love the nervous energy you get during the weeks beforehand from knowing you’ve committed yourself to doing the gig. I love the process of figuring out what you’re going to play, arranging and rehearsing it until you could play it in your sleep (and, in fact, you sometimes end up playing it in your sleep). I love the tech side of things – setting up all the gear, soundchecking, nervously checking and rechecking stuff, applying duct tape to everything in sight. And I love when you’re actually up there playing, when the music is flowing out.

Without getting too waffly, I think “performance” as an abstract thing is a magical thing. It’s something which is very real. It is here and now, transitory. It connects you into a tradition which goes back throughout history. Standing up on front of your peers and putting your whole energy and soul into what you are doing is just an amazing thing. This is why I love going to see small bands live. There’s an energy, a danger to it all which you don’t get from slick big bands or TV shows.

Back to the night itself, Tiny Monkey played a great set. Maybe I’m biased because I play bass too, but I think Keith’s confident bass playing really drives some of their songs, locking in with Doug’s ferocious pounding of the drums. They were a lot more relaxed than their previous Outhouse gig. Plus, I enjoyed messing around post-soundcheck playing drums while some of Tiny Monkey did guitars.

And then it was our turn. We set off with Slasherflick, a high-paced opener that lets us get warmed up, settled down and locked together. Later in the set, our “love song”, Only Wrote, came out really well. Our newest song, Days Like These, got its first public airing and I have to say, it’s a lot of fun to play live. The Rock Show got the Pie treatment (fell in love with the girl from the pie shop, she said “hey, do you want your pie heated up”). We finished on a specially extended anthemic Tigershaped, after which I was ready to collapse, but still got Foxy Muffin Man as an encore. I could’ve done with an IV drip after we came off stage, but instead made do with cider+black (classy, huh?) from Opium afterwards.

On stage, you’re kinda in a bubble. You can’t really see out to the crowd, because the stage lights are shining in your eyes. A lot of your attention goes towards listening to your bandmates, staying tight with them. And for me, I’m playing bass without being able to look down at the frets, singing and trying to remember all the words in time. So my brain kinda splits into multiple bits and a lot of it happens on autopilot, and it all flies past too quickly. But it’s great to peer out into the crowd to see friendly faces and people bouncing around. Thanks to everyone for coming along!

So, our plans for the near future. Iain is doing his finals (he had an exam the day after the gig, crazy man that he is), and then I think we’ll have a stint of producing some new material before hooking up with some other bands and doing some more gigs around Edinburgh/Glasgow area. We’re going to put the whole of the Tigershaped EP up on the web too.

One last thing: I didn’t have a camera, so if anyone has photos from the gig, I’d be really grateful if you can send me them. Michelle’s photos are great.

Categories
Edinburgh

Maps + Gigs

I now have very useful maps of Edinburgh City Centre from the 1930’s, scanned by the National Library for me. I’ve georeferenced them, so I’m now looking at the best way to extract the information for routefinding.

Of course, this all takes a back seat over the next 24 hours, because of The Gig on Thursday. Yesterday, my bass guitar had a minor falling-to-bits event … it has been duely wood-filler’d back into shape. Glad it happened yesterday and not tomorrow.

Categories
General

PROXY and TINY MONKEY

Following the escape of the “Tigershaped” CD, a caffeine fueled PROXY will be gigging at the Subway (Cowgate) on Thursday 28th April, along with Edinburgh’s finest guitar-wielding primates, TINY MONKEY.

It’s an early gig. Doors open at 7.30pm, and the first band will be on around 8.30pm. The Scrubway is under George IV Bridge, entry is 3UKP.

See you there!

Categories
General

Lessig @ Edinburgh Science Festival

Larry Lessig did his “30 minute intro to Creative Commons” at the Edinburgh Science Festival this Saturday as part of a panel discussion on “who owns ideas in the digital age”. I haven’t read any of his books before, so it was nice to hear the story straight from the man himself. To be honest, the talk left me with more questions than answers – though given the complex and multifaceted topic, this probably represents a successful mindshare victory by Lessig.

Lessig stressed something which I think needs to be stated more often: breaking the law by stealing people’s copyrighted material is wrong. His argument is in favour of reform of the copyright system, not the abolition of the concept of copyright. Copyright is a fine idea. A world with a (good) copyright system is much preferable to a copyright-free world. Continually restating this might be dull, but it’s a good pre-emptive defence against the straw-man argument used by those in favour of the status-quo: “these people are anti-IP” or “there people are pirates”.

There are two arguments which Lessig puts forward in his talk, which aren’t clearly distinguished. Firstly, there is the “WHERE DID ALL OUR FREEDOM GO?” argument. Lessig tells us that the copyright laws which (in days gone by) let us legally produce derived or “remixed” works have, in the digital age, been reinterpreted in such a way to remove these rights almost entirely. Secondly, there is “LET THE PEOPLE CHOOSE TO SHARE” argument. In most countries today, whenever you produce a creative work you automatically get a heavyweight “all rights reserved” copyright on the work. Until recently, unless you were a legal whiz, your choices were limited to accepting this heavyweight copyright or putting your work in the public domain – a binary choice. The Creative Commons licenses make it easy for people to choose (woo, cartoons!) a less restrictive set of terms for their works, as suits their own preferences.

Now, I see Lessig with two hats on. With his “WHERE DID ALL OUR FREEDOM GO?” hat, he is alerting the world to this change in interpretation of copyright laws, and lobbying for a restoration of our age-old rights. Copyright has got broken, so lets fix it.

But then Lessig puts on his “LET THE PEOPLE CHOOSE TO SHARE” hat. The Creative Commons licenses allow people to easily choose to put their own works under a less restrictive license. It’s like an opt-out clause from the the brokeness of the default copyright situation.

But Creative Commons doesn’t directly address the fact that the “default” copyright has been broken by the digital era, and needs fixing.

To be fair, Rome wasn’t built in a day, and the Creative Commons MIGHT be a stepping stone towards properly fixing copyright. I am walking a similar path with my open map making project. I would like the UK government to produce map data (centrally funded) and make it freely available (like the USA does). At the moment, the Ordnance Survey receive taxpayers money, but jealously guard their “Intellectual Property” and will charge you lots of money for access to the raw data. I don’t expect that immediately lobbying my MP would lead to much movement on this issue. Instead, myself and others around the country are involved in a grassroots effort to produce our own free map data. This first step may provide extra leverage in our argument for change at the Ordnance Survey. Creative Commons and OpenStreetmap are making small ripples in their respective arenas, but always with an eye on the end goal.

However, this stepping stone notion might be flawed. Bill Thompson put forward the point that “LET THE PEOPLE CHOOSE TO SHARE” might hurt the effort to fix the “WHERE DID ALL OUR FREEDOM GO” problem. MGM and Disney will argue that today’s copyright law is working just fine (for them) and doesn’t need fixed and, hey, if you really care there’s this dandy Creative Commons thing to keep them hippies happy. Taking a local analogy, some people have observed in Scotland that devolution, far from being a stepping stone towards independence, has made independence much less likely. You hit a local maximum and stick there.

This intertwining of the two themes is my main gripe (albeit a minor one) with Lessig’s presentation. The discussion skips from one to the other and back again without much delination.

Another thing I don’t understand yet (which came up in discussion with Anthony afterwards) is why Creative Commons licenses need to be “localized” into various legal juristictions whilst the GPL doesn’t. If I was an Evil Lawyer arguing against the GPL, I’d be asking the jury to consider why the incredibly good lawyers behind Creative Commons have taken the care to localize the licenses, whilst the GPL has not been localized. Does this mean that if I use the GPL and I live in the UK it’s weaker?

Having said all that, I really enjoyed the talk, although the pace was pretty fast and it took me a while afterwards to detangle it in my head. I wish there was more time for questions and discussion afterwards (and fewer people taking up time asking weird questions). Beforehand my level of knowledge on the subject was pretty much “everything I know I learned from the slashdot summary”. Now I feel informed. Yay for living in a city where they do lectures like this. Tomorrow evening is a talk about nanotech.