deep geek

Back in the US again in October:)

In mid-October I'll be speaking at Strange Loop in St. Louis about Google's exciting new systems language Go and my open-source GoLightly project.

GoLightly's a library for implementing virtual machines that exploit the intinsically concurrent design Google (or more to the point Rob Pike and playmates) have adopted in Go. Having CSP-style concurrency available in a language that's aimed at a similar niche to C addresses a number of problems with modern software design - especially when targetting machines with multiple cores. There's other magic in Go that's also very well suited to what I'm trying to achieve: garbage collection; a flexible type system; and dev tools that are simple to use. Overall it feels a lot like using a dynamic language, only with the additional runtime efficiency that comes from static compilation.

Anyway at Strange Loop I'll be talking about various design techniques when implementing virtual machines (mostly to do with immitating tricks used in the design of hardware processors), how Go offers some interesting new approaches to realising them, and the longterm goal of GoLightly - namely providing a platform that's friendly to modern hardware on which to implement runtimes for Ruby and a variety of other languages which use the virtual machine metaphor.

I'm long overdue mentioning this here, in large part because it's been a busy year and my desire to blog has been at an all-time low: every waking hour is either focused on (the to date unpaid) work on GoLightly or with helping goth_twiglet keep a handle on our increasingly active and inquisitive Tom.

I could do with a bit of a concurrency upgrade myself :)
deep geek

Letter to my MP regarding the Digital Economy Bill

Dear Andrew Love,

Thank you very much for your letter dated 22nd March in response to my email enquiry concerning the Digital Economy Bill.

I understand that the Digital Economy Bill will receive its second reading in the House of Commons on April 6th following which it could well be passed without further scrutiny as part of the washing up process prior to the forthcoming General Election.

With the institution of Parliament already in such low regard amongst the electorate I'm frankly mystified that MPs are taking such a cavalier approach to legislation which appears to disproportionately favour a narrow special interest group (in particular the BPI) whilst at the same time introducing a new statutory instrument allowing future modification of copyright law without recourse to Parliament.

The major record labels have long been a joke in the digital economy, not because anyone wishes to 'steal' the content they publish but because of their inability to adapt to changing circumstances and determination to criminalise their potential customer base rather than provide the products and services which the market is overwhelmingly crying out for.

For a piece of legislation which is supposed to promote innovation in this sphere to further entrench their antiquated business models at the expense of the much greater economic benefit to be gained from embracing new technologies seems perverse in the extreme.

I have personally worked on a digital distribution project in collaboration with Virgin Media and the major record labels which would have brought customers the convenience they desire whilst at the same time protecting the intellectual property rights of the record labels. Today's illegal down-loaders would have been converted into tomorrow's loyal customers. Unfortunately that project was cancelled in February of last year.

Not I should point out because of any lack of a market or of opportunity for all concerned to profit, but because the additional protections demanded by these same record labels (which in any event would not have provided any greater technical security) made it impossible for Virgin Media to profit from running the service.

And if Virgin Media can't reach a workable deal with these dinosaurs, what hope for any smaller company?

As to the three-strikes aspect of the legislation, the lack of technical clue amongst Parliamentarians in general is just staggering.

Not only are consumer-grade wireless networks fundamentally insecure, so to is the Windows operating system which the majority of personal computers in this country utilise. Co-opting either to illegally download copyrighted media is trivial for those of appropriate disposition, as is removing any forensic trace of their having done so.

Nor for that matter can the identity of the computer or computers performing such downloads be ascertained beyond reasonable doubt or even on the balance of probability unless the latter is defined in such a manner as to presume guilt with the burden of proving innocence falling squarely on the shoulders of the accused. That hardly seems a favourable addition to English Law.

Then there's Clause 43 which effectively destroys private photographic copyright. Not only is this a priori an incredibly stupid idea, as a software developer I'm greatly concerned that a few years down the road the same rules will be extended to cover copyrighted works in other media. If this is not to be the case it also raises the question of what is so special about photographic works that their creators should be so disproportionately singled out in this manner?

Frankly this is bad legislation, rushed through Parliament with inadequate scrutiny, and it reflects poorly on MPs that the majority are not demanding their right to rectify the glaring defects in its construction.

I trust that when the Digital Economy Bill receives its second reading you will register your opposition to its proceeding further.

Yours sincerely,

Eleanor McHugh
not interested

To Dream of Real-Time Ruby?

My RubyConf 2009 proposal which alas didn't make the cut.


Ruby is a beautiful language, and because of that beauty we tend to ignore the fact that it's also highly disruptive. In recent years it's revolutionised the world of web development and changed the direction of the Java Virtual Machine, but we've only scratched the surface of what's possible. By marrying the elegance of Ruby with a knowledge of the environment in which our software will execute a whole new class of system-level applications lies open to us.

Whether your interest is in leveraging the power of multicore CPUs or creating your own distributed processing network, understanding how Ruby integrates with its environment will free you from reliance on brittle tools written in legacy languages and suggest elegant solutions in keeping with the Ruby Way.

So come on a gentle code safari with London-based hacker Ellie to see just how low-level Ruby code can go and why knowing this will not only make you a better programmer but transform the systems you build.


The title of this presentation reflects a dilemma I've been pondering for many years now: is Ruby capable of tackling low-level and realtime problems, especially of the sort found in embedded systems. When I first started playing with the language back in 2001 my commercial work revolved around embedded control systems in a mix of C and Visual Basic, and part of what attracted me to Ruby was its elegance compared to these languages.

I don't yet have a good answer to the question itself, although my gut instinct tells me that Ruby can and should be pushing into this area. Just remembering the impact Rails had on the web development space makes me positive that if Ruby can be pushed down the stack we'll see a radical change in the way that everything from the operating system upwards is coded. But how to get there?

Unfortunately this presentation won't be able to answer that, but I'm hoping that by reaching the RubyConf audience I'll be able to inspire a few others to experiment in this territory with all the benefits that'll bring.

Mostly I'll be talking about Unix as that's the platform I work with these days. Whilst I consider myself far from being an expert, I've been performing informal experiments in Ruby-Unix integration for several years now and back in the spring I started putting a public face on these with a series of conference presentations: "The Ruby Plumber's Guide to Unix". The idea behind them is to encourage Ruby developers to treat systems coding as nothing more than kernel scripting, an approach which I hope will make it seem less daunting to those who lack a background in C.

Trying to make this accessible to a broad audience is itself proving an interesting challenge and the reception to date has been mixed: hardcore coder geeks love it, especially the discovery of DL.malloc and all that flows from that, but I'm still trying to pitch to the level I really want to reach which is those who lack a hacker background and have only ever seen the machine as a black box running Rails applications. The latter group are the ones who really need this knowledge because it could significantly alter the way in which their system architectures evolve.

By the time RubyConf rolls around I hope to have completed all of the technical research I currently have planned for the "Plumber's Guide" and I'd really like to wrap the whole project up with a presentation that's less focused on the specific technical detail and more on its significance: the former will by then be more than adequately documented online.

As I'd like this to be a presentation that will encourage more developers to investigate the options open to them and spark their imaginations it's also going to be something of a departure from my usual style and, well, it may not even have much code in it... although my idea of not much code could still involve a couple of dense slides with detailed examples suited to off-line study.

In terms of format, I have ample material with which to fill several hours and so would be happy to give a tutorial if the option exists. But I can also prune this to the forty-five minute mark.

Class War - it just doesn't work in England

I get an interesting collection of daily political news snippets in my email thanks to the lovely folks at ConservativeHome and when I'm in the mood for procrastination (like I am this afternoon, stealing ten minutes on the computer whilst Tom takes a nap) much fun is had following them up.

Yesterday there was some chatter about the Channel 4 decision to broadcast a docu-drama (i.e. badly scripted fiction) about David Cameron's time in the Bullingdon Club this autumn. For those not familiar with the institution - and this primarily applies to my foreign friends - it's a dining club at Oxford University with a membership at any one time of twelve students who meet to dine, drink, and cause mayhem: the club uniform of tailcoats apparently offends the class warrior fraternity, as does the fact that membership is restricted to those from privileged backgrounds. That's Brit-speak for a family with good breeding and oodles of cash.

The Bullingdon is only one of a number of student societies where acting like a yob is an intrinsic part of the culture, albeit a more formal one than many, and its main distinguishig trait is that it offers members a chance to set aside the discipline and restrictions experienced during a public school education. Much is made of the bad behaviour of individual members, not because it is so much more extreme than the norms of British society - I dare anyone who's been out drinking on a Friday night in your average seaside town to claim such outbreaks of yobdom are rare - but because they will one day likely end up prominent in public life.

Personally I don't think that's particularly relevent. So what if the children of the upper classes are capable of being just as bestial as those of every other group in society?

Unfortunately it seems that having spent twelve years turning their backs on their core values, New Labour's catastrophic collapse in the opinion polls has them scurrying back to that Old Labour standby: Class War. Expect the Bullingdon Club to be a running issue right up to and through the next election. Because that's so much more important than the fact that a government elected on the mantra 'Education! Education! Education!' has presided over a failed education system which has left an estimated five million adults functionally illiterate.

Frankly even if Cameron &co were still regularly pillaging the restaurants of Oxford - or Nottinghill - they would still be preferable in many people's eyes to Brooding Brown and his troupe of performing political poodles.
  • Current Mood
  • Tags
get me out of here!!!!

Regulating Parliament is a direct assault on its ability to function

This government has a track record of trying to gag Parliament in one way or another, the most infamous example being their attempt to force the Legislative and Regulatory Reform Bill through a few years back. This week's Parliamentary Standards Bill is a similarly undesirable piece of legislation, even in the largely emasculated form in which it's been passed, and as with so much bad legislation prompted by public outrage it owes its origins to politicians' fear for their own jobs.

Don't get me wrong, I'm no apologiser for the financial misdeeds of our Members of Parliament. The system under which their expenses have been operated is scandalous in the very obvious sense that it was always bound to offend the electorate and result in a scandal. Those who over the years have voted in favour of its various provisions without considering their corrosive effect on the culture of Parliament have shown themselves ill-suited to the intellectual demands of their office just as surely as those who have taken calculated and misleading advantage of those provisions have demonstrated the low regard in which they hold the solemn responsibility they hold on behalf of their constituents.

We do not send representatives to Westminster to enrich themselves, we send them there to scrutinise legislation and taxation, and to hold government to account on our behalf. Whilst we're used to talking in terms of governing and opposition parties, the truth of the matter is that every MP is supposed to be an opposition MP defending our rights and our constitution against government action which otherwise becomes little more than elected dictatorship. For this reason any legislation which limits the ability of MPs to speak freely in Parliament or to carry out the research necessary to remain informed on issues affecting their constituents is objectionable.

In the case of the Parliamentary Standards Bill the original draft would have curtailed an MPs right to freedom from prosecution for statements made in the chamber of the Commons (aka Parliamentary Privilege) and this would have marked a fundamental shift in the relationship between government and governed. Thankfully this clause failed to make it into the final legislation, but amidst the outrage over that particular clause something much more invidious has been allowed to remain.

The amended Bill still sees the introduction of an Independent Parliamentary Standards Authority, a Quango which will sit in judgement on the financial actions of MPs. I understand the public mood to see Parliamentary expenses cleaned up but this is not the way to do it. Parliament has stood as an independent and sovereign power since the Glorious Revolution, the House of Commons repeatedly extending its powers over both the Lords and the Crown in recognition of the democratic mandate through which its members sit.

How therefore can any appointed body, devoid of democratic mandate, be deemed to hold a greater competence to oversee Parliament than its own elected members? This move is not only a constitutional nonsense, it's a direct assertion that the people we elect to determine the laws governing our entire nation are competent to rule on every little detail of our lives (something at which New Labour have been very busy) and yet somehow incompetent to maintain standards of probity amongst themselves. The Right Honourables are now officially without honour.

A much better solution would have been the inclusion of a recall power whereby if local constituents were unhappy with their Member of Parliament they could through a sufficiently popular petition (say 10% of the constiuency electorate) force a byelection. Or better yet, just have the police properly investigate all of the financial fiddling which has allegedly been going on and prosecute accordingly. Regardless of how they may sometimes portray themselves, Members of Parliament are not above the law and if it has in fact been breached those concerned should be held accountable through means which already exist and merely need to be applied rigorously.
  • Current Music
    Silent Treatment-The Bangles-All Over The Place
  • Tags
ratty army of darkness

ever so slightly better than average

The exit polls from GoRuCo are in, and I placed last with an averaged rating of 2.66 out of 5. Bah! Even Gordon Brown can do better than that.

To be honest I'm not surprised, so those of you who feel you have to say positive things about the video are now officially excused ;p It was the first outing of what is actually a very difficult topic to tackle without cutting some strange corners and I'm thankful to Francis and the rest of the team for taking the risk in the first place. I owe them bigtime.

The audience comments lead me to suspect that I need to use less British idiom next time I speak in the US (e.g. I had several people on the day ask me what 'blue sky research' is), and that contrary to my experience here in Europe I should have included more code. Overall it seems that those who took the time to comment were very disappointed by this omission and by the lack of a clear and explicit point to the talk. Hopefully when the slides are judged as an artefact in their own right that will be less of an issue, especially as I will be adding additional content in the coming months including more code samples.

It also seems my experiment with the format didn't work for many people: I hoped that having the slides running on auto whilst talking more generally about the topic would allow me to engage better with the audience, but clearly it creates a disconnect that breaks normal user expectations. That leaves me in a bit of a quandry as I find the slide-driven approach to presentation very restrictive and unless someone is discussing a very specific technical point that needs them for clarity, it tends to send me to sleep. That's doubly true if I'm giving the presentation myself and am really doing nothing more than parrot what's on the screen whilst playing "click the clicker".

As to there being a point, I wasn't entirely sure there was one myself until I was closing. After all, this is just stuff you can do in Ruby on a Unix box. But I guess that is the point. Unix systems' coding is mostly just scripting the kernel and Ruby is a surprisingly friendly language for doing that, ergo Ruby is a good systems' programming language.

I did say towards the end that if just one person in the audience got that message it justified the trip, so a big thanks to whomever wrote: "My favorite talk, very inspired to both write systems' programming scripts in Ruby and also to have a beer". I guess that sums up what I flew more than 3000 miles to share and I hope the anonymous author has as much fun doing both as I have over the last fifteen years. And if they see me at a conference sometime, mine's a pint of mild!
sexy cool

I'm off to Texas in August

The nice folks at Lone Star Ruby Conference accepted my proposal for a tutorial on Ruby and Unix called Things You Really Shouldn't Do With Ruby But Can. I get three hours on a Thursday afternoon to teach all kinds of weird tricks that probably aren't safe to a random assortment of Ruby lovers. The upside of that is that it follows Rich Kilmer's Hot Ruby session so I can hopefully lig my way into that and get a deeper understanding of MacRuby.

I'm kinda nervous as I've never given a three-hour tutorial before - at uni I found the occasional forty-five minute seminar bad enough - but I'm hoping that I can get everything I want to cover into an interesting format.

Still no news though on whether I'll be at Rails Underground next month in London. I'd really like to get on the bill there as it's a chance to do an updated version of the Ruby Plumber's Guide and would be yet more useful experience. Fingers crossed that happens.

Lighting talks and other silliness

Wednesday night I joined a friendly gather of dynamic language fans for an evening of lightning talks at BCS HQ in Central London. It's easy when you're part of a specific language community to lose track of the broader divisions in programming so it was interesting seeing the perspective of Perl, SmallTalk and JavaScript users on many of the issues we battle with in the Ruby community. Some of the Perl code even looked intelligible ;p

I was particularly interested in the coverage of how SmallTalk handles data persistence. Don't get me wrong, Ruby has several powerful ORMs that fulfil the basic database persistence needs of developers adequately, but to be honest I find them all hard work in one way or another. Mostly they require me to do lots of procedural stuff that really ought to be automatic and whilst I suspect the SmallTalk answers will have their own shortcomings they may spark a few ideas. Anyway that's slated for further research when I can grab some down-time, which by the look of things may not be until the autumn.

The most thought-provoking talk of the evening was on genetic algorithms in Perl, and I really wish I could remember the speaker's name as we had a long chat afterwards in the pub. I know a bit about GA from years back, but suddenly it all seems to be in much better focus. Unfortunately I now have this urge to use the technique with function calls in an AST and brew self-evolving applications. I'm not entirely sure how useful that would be, but I suspect a very deep rabbit-hole awaits sometime in the future.

The net.goth posse were pretty well represented. Kitty gave a quick rundown of P5VM, a port of Perl to the JVM, and Zefram run through some of the weird type collision that are possible with Perl's bless function. The latter talk made me glad that in Ruby we use message passing as I imagine DuckTyping in Perl must be a right pain. I'm not sure if Joel counts as one of the collective (truth be told I'm massively out of the loop on that sort of thing) but I'll include his quick rundown of ECMAScript for XML here anyway - just for the cool t-shirt.

My former colleague Tim gave an interesting overview of Shoes, a Ruby GUI I've spoken about previously at RailsConf Europe. Of course being a graphic designer originally he makes it all look incredibly easy.

I gave the five-minute version of my Goruco presentation, with an undue emphasis on writing Ruby code like you would C :) That's not what I actually do with this stuff, but it's always good for cheap laughs.

Later we all retired to the pub where much beer was consumed and then it was off the the N29 back home, arguing drunkenly with Zefram over something or other. All in all a fun evening.