To celebrate 30 years of "Pac Man", at this year's RetromaÃ±ï½Âa (University of Zaragoza, 8th - 12th November) there's a Pacman programming contest (with prizes!). Information about the contest and rules can be found here:
There's two categories - one for games programmed beforehand (so that people who can't go to RetromaÃ±ï½Âa can put in an entry) and for those programmed during the event.
I'll myself be off to RetromaÃ±ï½Âa, not for anything to do with the Pac man coding contest, but to demonstrate and explain the ethernet hardware that I've made for the ZX Spectrum (itself coming close to its 30th anniversary). Indeed that entire week is going to be an orgy of retro geekyness, the weekend leading up to it is R3PLAY in Blackpool (retrogaming event), then I'm off to Zaragoza for RetromaÃ±ï½Âa, and then on the way back I go via Madrid for a small gathering of retroafficionados in a bar somewhere in Madrid. Three events in less than 10 days.
Well, fame at last for my Spectrum +3, Spectranet and Twitter client, it's the only photo on the BBC's article about the Vintage Computing Festival
So the VCF finished yesterday afternoon.
It lived up to and exceeded my expectations, what a fantastic event. Unfortunately, I didn't really get to see all of what was going on since I was manning my own stand a lot of the time (four Ethernet-networked Sinclair Spectrums, with a MicroVAX fileserver - all of this connected to the internet! - plus a Vectrex since people seem to really like them). My stand and Chris Smith's were next to each other (he reverse engineered the Spectrum ULA for a book he's writing, which charts the history of Ferranti's ULA technology and Sinclair's use of it) - we were hoping to get his Harlequin (100% accurate Spectrum implementation consisting of 74HC logic ICs) onto the network too but his stand was so busy he spent all his time talking to visitors!
The Spectrum twitter client went down very well. I think there were about 8 pages of tweets from the Speccy by the end of Saturday. I really ought to have put a counter in the client to give a definitive count of how many tweets had been made.
I picked up a double density disc drive for my BBC Micro while I was there, and also fixed one of my 128K "toastrack" Spectrums (all it had was a bad transistor in the power section and a dodgy keyboard membrane). Unfortunately I forgot my USB lead for the camera so no pictures till I get home.
Probably the highlight of the show was the talk by Sophie Wilson (designer of the BBC Micro and the ARM CPU, that last bit being very highly significant). If I had the choice of seeing Sophie Wilson or Bill Gates at a computer show, it would be Sophie Wilson every time. She may not be 0.1% as famous as Bill Gates, but I think she is actually a lot more important and significant than Bill Gates. Nearly anyone could have been a Bill Gates, he got where he was due to luck and sticking his neck out a bit (at no real risk to himself, he was already backed by a very rich familly) - if Compaq hadn't cloned the PC, and if IBM had been more closed about the PC specification, Bill Gates and Microsoft may have been just another footnote, remembered only for their truly dreadful BASIC on the Commodore 64; once PC cloning happened, for Microsoft to make money off DOS was about as difficult as falling of a log. But on the other hand, ARM only came about through lots of real intelligence and thought and grit and determination - and today ARM ships 1.25 *billion* units per *quarter*, more than every other microprocessor architecture put together. When the ARM was designed, Hermann Houser jokes "we gave the ARM team exactly what they needed, no resources and no money"
And without the microprocessor designers, where would software people be?
It's the UK's first Vintage Computing Festival next weekend, so I've been getting some stuff together for my Speccy exhibit. Of course I've been working on the Spectrum ethernet card, and while things like the network filesystem it provides are handy, I thought I needed something that VCF attendees could appreciate.
A while ago we did a "hack" of a Twitter client (over a pint of beer, in a pub in Oxford - while getting strange looks from all the "normals") but it was just that - a hack - with the tweet and the login details hard coded into a short asm program. This time I've written a proper http library, and some user interface. Most of the work is done by the HTTP library (parsing headers, putting headers into the request etc), and it's all written in C.
If you can't get to the VCF, you can at least watch a video here:
Thanks to a friend via Facebook, I discovered a good food ideas site, called "Cooking for Friends" - or at least, "Cocinar para los amigos" (it was from a Spanish friend). I saw a recipe go past the other day that I thought looked awesome, so I made it last night - just for myself, I like to test recipes out on myself before I try them out on other people
And it is indeed awesome. For the benefit of those who don't know Spanish I'll repeat it here. The original is here:
Mushrooms in a white wine sauce
It's a very easy recipe to make. All it needs is garlic, a glass of white wine, some grated bread (to thicken the sauce) and parsley. The recipe as made also includes a small amount of chili (I didn't have the little ones that he shows in the video of the recipe, so I just used a small amount of fresh chili I had in the cupboard. I think it needs just a *small* amount, it's not supposed to set your mouth on fire...) I also made half the quantity that the recipe demands, on the grounds that I was trying it out on myself, not trying to do a starter or a side for four people.
500 grams (1lb) mushrooms
4 cloves of garlic
a little olive oil
a small heap of breadcrumbs (basically, enough to fill a wooden spoon heaped up)
a branch of fresh parsley, chopped finely
a little chili (I've not seen the tiny chilis that were shown in the video anywhere near me, so I used a small amount of sliced chili)
Put some olive oil in a pan, enough to start cooking the garlic and put on the heat, drop in the garlic. Once the temperature has come up and you've got typical "starting to fry" sounds, add the mushrooms. After 2 minutes, add the glass of wine. Give it a stir and allow to simmer for about 10 minutes with a lid on the pan. After 10 minutes, add a little water, the breadcrumbs and the chili. Let simmer for about 20 more minutes with the lid on - the sauce should be thickening nicely from the grated bread and the evaporation of some of the liquids. Then add most of the parsely and stir for a couple of minutes.
Then serve, sprinkle the remaining parsley on top.
This will make a great starter - I'm going to cook it next time I have friends or family over for dinner.
This is the very problem with broad legislation like the Terrorism Act. Not only cases like this, but these days it is an offence to have "information that may be useful to a terrorist" (and the onus is on the defendant to prove that it's not, which reverses the principle of the accusers bearing the burden of proof). A recipe for a bread roll is, after all, information that may be useful to a terrorist, a terrorist has to eat after all.
A couple of weeks back I went to an Italian restaurant with some friends from work. I had a salmon dish (since I don't speak Italian, I can't exactly remember what it was called) - basically, salmon fillet baked with lemon. The side was spaghetti and spaghetti sauce. Two thoughts struck me: (1) the food is incredible and (2) it can't be at all difficult to make at home.
So I made it. What makes it really is the contrast between the lemoned salmon's tartness and texture, and the sweetness of the spaghetti and sauce. I just guessed at what to do with the salmon and it turned out good. The spaghetti sauce - I had a look at various recipes on the internet, and in the tradition of open sauce (yes, go on, groan now) I decided to use ideas from several to come up with sauce code (yes, groan again) that I thought I'd like best. And in those traditions of Free Sauceware, I'll share what I did...
The salmon is easy, each salmon fillet (adjust quantities to taste, but I reckon this is a good starting point)
* 1 salmon fillet
* About a tablespoon of olive oil
* A thin slice of lemon
* About 2 tsp of lemon juice
* Just a pinch of sea salt
Wrap in foil and put in the oven for 20 mins at 180 celsius (if you have a fan oven). I found it was good to prepare the lemon and salmon in the morning and let it sit and marinade until the evening.
The spaghetti sauce (enough for 4 people, or two very hungry people):
* 500g small (cherry) tomatoes
* 1 tube (about 150g) tomato puree (if in your locality it's called tomato paste, make sure it contains nothing but tomato)
* 2 tsp brown sugar
* 1 tablespoon basil
* 2 tablespoons rosemary
* 5 cloves of garlic (or to taste), finely chopped
* 4 tablespoons of olive oil
* 1/2 teaspoon sea salt
* 1 onion
Chop the tomatoes (into quarters I think is best), slice and dice the onion into small bits, and chop the garlic finely. (I have a device with a handle on that you wind for mashing garlic rapidly into small bits, I don't know what it's called - I inherited it from my grandfather and it's at least 40 years old but it's so insanely useful I'm sure they are still available today) and put in a bowl and add the rest of the ingredients. Then give it a good stir. Once again, I found it was best to prepare it in the morning and allow it to fester in its own juices until dinner time.
To cook, put in a pan and stir on a medium heat until it's ready. Generally it should take less time than the actual spaghetti.
The way the Italian restaurant served this was to leave the salmon in its foil, sitting in the lemon juice and olive oil and serve the spaghetti and sauce as a side. I think that works very well.
Well, this morning I found my mail server had died. Postfix was up just fine, but the logs showed that it was failing while passing messages via clamav.
ClamAV was complaining about a bad daily.clv file, and looking at clamav's website... oops, the version of ClamAV in debian-stable has been *disabled* deliberately by ClamAV! (The issue: that version uses too much bandwidth when updating its AV database and ClamAV can no longer tolerate the bandwidth usage).
Oops. Any Debian mail server that passes mail through ClamAV is currently down, unless the admin already knew of this and compiled a new ClamAV or uses Debian unstable.
Looking at sendbug, Debian have been informed... I don't see any information about when we'll get a new ClamAV package, so it's time to compile the latest from source.
A couple of things recently really highlighted why machine translation is going to be awkward and clumsy for years to come, and why even human translation is so damned difficult when you get into colloquialisms and jokes.
A couple of weeks ago, I was with a friend in Wichita and we were at a Mexican restaurant. He mentioned he'd seen a Mexican movie (ÂY tu mamÃ tambiÃ©n?) - a movie subtitled in English, and that some of the audience was getting a laugh out of *something*. He wondered why - was it just a bad translation? Probably not, I answered. Probably a play on words or a double meaning that just doesn't translate to English, or perhaps something cultural (for instance, there are jokes that are funny in Britain but would leave Americans thinking "uh?" due to cultural differences, and vice versa - despite the shared language).
Today I came across one of these. There's this geek comic strip made in Spain called TiraEcol. It's translated into many languages (and I don't know how the attempts to translate it worked in others) - but the English translation just didn't work, and I can't think of any way of actually translating the play on words so it works in English. The original Spanish is here:
And the English here.
The last frame will leave the English speaker thinking "Uh?"
But in Spanish, you say your computer crashed by saying it's hung. Furthermore, in Spanish, the personal pronoun is almost always dropped - so it could be "it hung", "he hung" or "she hung". In Spanish, if you want to say "It crashed", you say "Se ha colgado". If you want to say "she hung herself", you say "Se ha colgado". So you have the double meaning for the joke in Spanish, but which is lost in the English translation - Nano responds "What, the program or the girl?" which doesn't really work for "Uh oh, crash".
Indeed, the dropping of pronouns means that machine translation from Spanish to English generally results in something ugly. A human being knows whether someone's talking about "he", "she" or "it" from context, and with the verb conjugation in Spanish, a human doesn't need the pronoun to understand what's going on, because we already grasp the context from what happened earlier. But this is highly problematical for a computer, and quite often the machine translation will guess completely wrong whether the thing in the sentence is a "he, she or it". Also the pronoun for the indirect object is the same for "him, her and it", and again, machine translation frequently picks the wrong one when translating to English. (I can only imagine how tough it will be for languages which come from cultural bases significantly different from ours, such as Japanese or Chinese). Translations have been getting better, especially for things written formally, such as news or technical items, but they will continue to suck for a very great deal of time for informal writing or speech.
So don't use the excuse "oh, we'll have good machine translation soon" as an excuse for not learning a language, at least not for the next three or four decades
And now for something completely different.
For years, just like pretty much anyone else who writes software, I've been using imperative languages. All the days from ZX BASIC, BBC BASIC, Z80 assembler, 6502 asm, C, C++, Perl, php and Java. (And even some COBOL, but I don't like admitting to that). Most recently, most of what I do is in Perl, or shell script, or Java.
That's a long time habit of doing things like "i++".
At times, out of disaster comes opportunity, Recently, our largest customer went into administration (for US readers, I'm not sure how this maps to Chapter 11 or Chapter 7, but basically it means the company is insolvent, and its management has been taken on by a third party who will try to sell what's left). This has left me with quite a lot of time to spare because a project I would have been working on right now is currently on hold until the situation with our customer is resolved (and the outcome looks like it should be favourable).
I've heard bits and pieces about functional programming, and Haskell, and Erlang - but never really had looked into it. My memory was jogged on Erlang when I was reading an article about telephone exchanges, somewhat coincident with the above catastrophe with our customer. Erlang was initially developed for telecommunications, where five 9s are simply not good enough, and I'm always interested in something that can help me make more reliable systems. I'd rather be developing than cleaning up after a system crash. So the time was ripe to start on Erlang.
What makes me interested in this language is that it is a tool that's designed for making reliable, concurrent systems. It has good features for that such as extremely light weight processes, the VM supports upgrading software *WITHOUT* having to shut down the program - you can upgrade/fix a service that's running and NOT shut it down to load the changes. It is also a functional language. And functional languages to me are (at least until last week) an alien concept.
The journey has only just begun. I started with "Learn You Some Erlang for Great Good" (it's titled in Engrish, but written in English) - http://learnyousomeerlang.com/ . I now also have the O'Reilly Erlang book, which I'm just about half way through reading and working through the examples.
The striking thing is you have to think a bit differently for a functional language like Erlang. You don't so much as describe how a task should be completed, but declare What The Truth Is - in a way that is very similar to how you write functions in mathematics (indeed, one of the first examples in Learn You Some... is a function that returns the factorial of a number, and the Erlang has a direct correspondence with the way a mathematician would write a factorial function). The way lists can be manipulated (list comprehensions) is straight out of mathematics set theory. Although the language looks strange and impenetrable and ugly at first, soon you see a mathematical beauty emerging. The other striking thing is that variables aren't. (I'd have called them "invariants" - calling them variables isn't all that accurate since they can't be varied once assigned). But you don't need variable variables in a functional language.
The other striking thing is how you must think differently with Erlang if you're making a concurrent system. The O'Reilly book points out that they've encountered time and time again, when people from an imperative background start using Erlang, they do it wrong - they write the system like they would in, say, Java, so with a minimal level of concurrency. But processes in Erlang are really, really cheap so you've got to get rid of all those ideas on how to write a large system. For example, the book cites how one group had set out to make an IM proxy in Erlang. They had one process handling the sockets from clients, another process doing some work on the data, and a final process emitting the data to the downstream servers. They ran into trouble with more than half a dozen concurrent messages. But how they should have designed it is to create a new process for every single packet - processes are *that* lightweight that you can make tens of thousands of them quickly and without huge memory overhead - and their proxy could handle orders of magnitude more simultaneous messages. Interprocess communication is also very lightweight, and lacks the shared memory drawbacks of traditional threads. Essentially, in Java or C++ or C# you think like the Protoss - a few heavy weight warriors. If you write Erlang, you have to think like the Zerg. A veritable swarm of lightweight processes, and zergling rush your problems
This neatly segues onto something I did many moons ago in university. We learned a design methodology, written by a man called Michael Jackson (not the dead singer, the still alive computer scientist). JSD (Jackson Structured Development) and JSP (Jackson Structured Programming) were methodologies developed in the 60s and 70s, and today are largely forgotten, in fact in the 90s when we were learning this stuff there was much grousing about it being "obsolete"... but one thing that keeps coming back was when analyzing your problem, you analyzed it as if you had the perfect concurrent system and so you modelled every small problem as a completely new process. In those days you'd eventually flatten it down to effectively a single thread. I remember remarking to a classmate at the time that there seemed to be an elegance of starting your model as if you had the ideal concurrent system because it made it clear - and that perhaps one day we would have a system in which you could take the design and implement it as a concurrent system, just as you had drawn it. Perhaps it's time that JSD was revisited, because in Erlang you DO make every single little process that happens in your inherently concurrent world an actual Erlang process, just like Jackson suggested you model it! JSP, which we used in COBOL at the time, and COBOL itself was the source of much grousing - (JSP is specifically good at program design when you have an input, you transform it, and make an output. The stuff of many COBOL programs. If you model your inputs and outputs correctly, the resulting program structure makes programming a simple mechanical task and you get no logical errors in your code) - it strikes me that JSP fits amazingly perfectly with XSLT. Indeed, JSP models everything as a tree. Now what's XML? Basically, your program structure is exactly how XSLT is structured - a tree. So is your input and output.
So perhaps Michael Jackson really is a genius, too.
(As an aside, I just made this same blog entry at barrapunto.com - which is a Spanish language Slashdot sister site - barrapunto translates literally as "slashdot". Interestingly, journals seem much more important on that site than on Slashdot - there's actually a "latest journals" on the front page by default. I guess with the size of the English Slashdot, sadly that'd probably be impossible here).
A few weeks ago, some graffiti written by unknown persons appeared on various walls around the island. Things like "Somalia 1960" and "Zambia 1964" were written. The countries are ones that have gained independence from the UK, and the years are (as you may guess) the year in which they gained independence.
Manx independence movements aren't anything new. It's just that recently the complaints about the UK have had cause to be reignited - some adjustments to the VAT sharing rules strongly in the UK's favour and the unilateral abolishment of the reciprocal health care agreement by the UK have left people here feeling a bit sore (especially given that there are countries ending in -stan that still have reciprocal health care agreements with the UK, but from March 1st, the Isle of Man won't - that's to say we will have to pay if we get ill in the UK, which the residents of the countries ending in -stan won't). For those who don't know, the state of the Isle of Man is that it is *not* part of the UK nor part of the European Union, but it is a British territory - similar to the Falkland Islands and the Channel Islands.
To be honest independence for the island is not something that I think of as important. We already have our own passports, our own government, our own laws, our own tax policies, our own currency. We already have all the trappings of a sovereign state except for sovereignty itself. In fact, I think if the island did become a sovereign state, things would get a little bit complicated - I expect we would then have to have a visa to travel to the USA, Manx born people would probably lose the freedom to work without a work permit in European countries etc. I think ultimately, an independent Isle of Man would have to join the European Union to maintain access to EU markets (currently, the island gains access via a common agreement over customs/VAT with the UK). The currency would probably still have to remain linked to the UK pound.
It turns out that the son of the landlord of the pub in which my dad and I have a few beers every Sunday is one of those implicated in the graffiti writing (and will be up before "the beak" to be prosecuted for vandalism).
In any case, it occurred to me when I first saw this graffiti that the independendistas had shot themselves in the foot making several very stupid errors. They had written countries like "Somalia" and "Zimbabwe" - the latter, a brutal dictatorship known for hyperinflation and a totally failed economy directly due to the idiotic policies of its president, the former famous for being a failed state, full of violence and a source for piracy (real piracy, not copying films, but violent attacks on international shipping) and of course "Blackhawk Down". Even though what I know about marketing can be written comfortably on the head of a pin, I know that you don't promote independence by citing Zimbabwe or Somalia . Anyone reading this graffiti would think "I don't want to end up like Somalia or Zimbabwe - we ought to stick with the UK". And indeed, remaining with the UK has its usefulness - aside from meaning Manx people are British citizens and get to travel most of the world visa-free, and get access to European markets - there's a level of underlying corruption here, and what prevents it from growing into something serious and dangerous is the ever present fear amongst those who otherwise may take advantage is that the UK government would impose direct rule if there were too much corruption - and the UK government has done just that with the Turks and Caicos Islands last August due to the growing corruption in its government. (Three or four years ago, our Chief Minister had to resign after it became clear that he was heavily implicated in corruption - the others probably forced him out rather than swept it under the carpet because they knew the likely outcome if they didn't).
 It's not just Manx independence people who don't seem to know the first thing about PR. What about the idiots who decided it'd be a great idea for Tony Blair to be an envoy to the Middle East? That's a bit like having General Galtieri as the envoy to the Falkland Islands)
I see there is a new journal editor window. Pity it doesn't stay resized when you resize it...
Anyhow, back to the subject (with a nod to Twoflower, of Terry Pratchett's book "Interesting Times" which I'm re-reading again for the nth time...
Back in July last year I went to RetroEuskal in Bilbao, Spain (mainly to do a talk on my Spectrum ethernet card, but also just to have a bit of fun with retro machines). One of the events was a giant stop motion game of Galaxians. Well, RetroacciÃn now have made the stop motion video of the event, and you can see it here:
"For the second consecutive year we've held the "Gigantic Retrogame" event. This time, the game we chose was the classic "Galaxians" by Namco-Bandai. The company has sponsored the event and offered many prizes for the players"
(Don't panic, they titled it in English). It was very cool to be there
The worst week of my working life is now over.
Next week can go either of two ways: the second worst week of my working life. Or it could be even worse than this week. Fortunately, it's not something that's my fault, I'm just involved in the recovery and developing the safeguards that have to come from this. (My part in all of this is development of back end systems and DB administration, none of which was involved in the monumental cockup). One of the things we do is process order forms for our biggest customer. We process around 120,000 forms per week (of which about 20% are order forms). Due to a conjunction of circumstances, some 6000 forms were processed incorrectly, and 6000 incorrect customer orders went out. Part of the problem is the form processing software has a highly unexpected behaviour when processing double sided forms - it does NOT treat the two images from the duplex scanner as an "inseparable unit". It tries to smartly link them by recognising the form, and if it gets it wrong it can associate the wrong front of the form (which has the order) and someone else's back of the form (with the customer details). A conjunction of this unexpected behaviour, a lack of adequate user training, too much comfort over the process, and human error resulted in things going tits up.
If we finish the recovery next week, then it'll only be the second worst working week I've ever had.
If the customer also fires us, it'll be by far the worst - a catastrophe. It's cold comfort thinking how I'm not to blame while seeing 30 fellow employees getting laid off just before Christmas. I was only half joking when talking to my boss about buying a one-way ticket to South America and never coming back.
Here's something that's been bugging me for ages.
Why do rich people and financial types write million as MM, for example, $1MM?
Someone told me once "well, the Roman numeral for thousand is M, so MM is a thousand thousand". That explanation, however, is not right. MM in Roman numerals means 2000. Million, in Roman numerals, is a single M with a bar on top. It also doesn't make sense to use the Arabic 1 plus the Roman numerals for a number.
As far as I can tell, when people write $1MM instead of $1M, it basically means "and I know lots about money and have a lot of it".
Feel disillusioned? I've got some great new illusions, right here!