Colin's Journal: A place for thoughts about politics, software, and daily life.

Colin's Journal in February 2003

Thursday, 27 February 2003

11:42 PM - Chicago

I finally saw Chicago tonight, after looking forward to seeing it for some time.  It's an entertaining, fun movie with some good dance numbers and a nice flow.  It's also a little disappointing.

I was hoping for something on a par with Moulin Rouge, and while Chicago is a good watch, it isn't that good.  I think part of the problem for me was having no sympathy for the main characters.  I wanted to know how it ended, but didn't really care one way or the other.

Catherine Zeta-Jones is superb, a great performance and a good presence on the screen, but Renée Zellweger was disappointing.  The rest of the cast did a fairly good job.  It's possible that a second viewing, where the story would distract less from the musical elements, may improve my rating of the film.

Wednesday, 26 February 2003

10:59 PM - Closer and closer to the METAL

I'm nearly done with METAL.  It's all working, but I need to package it up, maybe write a few more tests, and certainly update the documentation on how to use it.  I might even put together an example or something!

Overall then it's going to be later this week, maybe Friday or weekend before it gets released to the world.

Monday, 24 February 2003

11:18 PM - An example of why copyright should expire

I'm starting this post with a diversion: take the name of the BBCs book reading activity "Book Group".  It can't be a "Book Club" because the good name of book clubs is now tied too closely to those horrendous enterprises where you sign up to buy overpriced books, for the rest of your natural life.

Neatly passing the diversion onto the main topic, this years candidates for the BBCs Book Group are all old enough to be out of copyright, and available for free off Project Gutenberg.  This is a good example of why copyright should expire after an adequate amount of time has elapsed to allow an author to benefit from their labours.  I may even make time to read the chosen book, although I really should finish off the other three I'm half way through first (two are collections of short stories, and so shouldn't really count).

Saturday, 22 February 2003

9:50 PM - The future of SimpleTAL

On a slightly less political note than my last post, work is once again underway on SimpleTAL.  This time it's thanks to an enquiry by Kevin Smith regarding support for METAL in SimpleTAL.  METAL is a macro language that can co-exist with TAL, and which provides a way of copying parts of a document tree into a template and customising the part that was copied.

I've got an initial implementation working, but there is much to do before it is ready for release.  I need to make sure that SimpleTAL implements the Zope behaviour for METAL, and that the existing TAL functionality integrates well with it.  If all goes to plan however, I should have METAL support released within a few days.

8:55 PM - The future of NATO

There's an interesting article in the FT by the prime minister of Belgium, Guy Verhofstadt.  In it he tackles two different, but interrelated subjects: the current transatlantic gap and the future of NATO.  The opinion provided on the first subject is not a surprise, and essentially comes down to lack of evidence to justify a war:

As long as we Europeans feel threatened, the use of war and weapons can more or less be justified. However, without this sentiment, a transatlantic gulf has opened up.

The second part of the article is more interesting however, it tries to explain how a European defence force would help rather than hurt NATO.  The argument seems to come down to the current lack of balance in NATO: one country with a huge armed forces, and 18 with small ineffective armed forces.  This certainly distorts decision making in the organisation, and reduces the effectiveness of NATO as a mutual defence organisation.

That the armed forces of Europe and north America should be able to work together, and that they should be made available to each other in times of crisis seems like a self evident good.  The defence of Europe should, however, be in the hands of Europeans.  It simply doesn't make sense for Europe, a group of countries that can easily afford the required armed forces, to be dependent on a single other country for it's defence.  The development of a European defence force should not lead to any less co-operation between Europe and north America, our mutual security is still of paramount importance to both peoples.  It will however make NATO more effective in that the forces provided by Europe would be properly equipped and trained, something that is certainly lacking today.

There have been tentative steps toward a European defence force, and with the recent agreement by Blair and Chirac, it's possible that we may even see a mutual defence clause in the EU constitution.  Despite the difficult politics of the situation I'm hopeful that over time we will continue to see further moves in this direction.

Thursday, 20 February 2003

10:40 PM - A more serious approach to surviving nuclear blasts

An update to my last post: someone has put together a more serious and useful guide to surviving nuclear blasts.  In fact they have good, practical advise on all of the least-likely to happen types of attacks a country could suffer from.  Two of my favourites:

If deadly radiation knocks on your door, do not answer.

Don't get so preoccupied with biological weapons that you forget to put on deodorant.

(via Electrolite)

9:16 PM - Notes from around the web

It looks like Live Journal is having some difficulties with a distributed denial of service attack.  We can't hit any of the LJ servers, except the status page which explains what is going on.

Now for something completely different (I couldn't think of a better way of introducing this):  How to survive a nuclear blast.  I'm not entirely sure how anyone could have put up this site and kept a straight face while doing it.  It even looks like it really is a genuine US government website, so some poor sod takes this seriously.

For the click impaired, here's a quick summary:

  • Hide behind a door
  • Don't be next to the bomb when it goes off
  • Don't hang around the nuclear blast site for long

(via Matthew Yglesias)

Wednesday, 19 February 2003

11:34 PM - Upgrade/downgrade

There is now a back-port of Gnome 2.2 for Woody.  The first challenge of this post is going to be explaining the first sentence, before going on to describe my experience of using this back-port.

Gnome is my desktop of choice for Linux, simply because my experience with KDE was long ago when KDE crashed rather more than I cared for.  Woody is the name of the current stable release of Debian, a completely free distribution of Linux.  For Debian stable tends to mean no new features, and there only tends to be a stable release once every decade (OK so more like every 2 years, but it feels like it's a decade if you're waiting for the next release).  To help people who would like to run the stable version of Debian, with all the security updates that go with it, but would also like to use a more updated version of the Gnome desktop, a back-port from an unstable version of Debian has been produced.

I went ahead and installed it, following the instructions for once.  The result was that when I tried to bring the desktop back to life, it failed with GDM presenting me with a perpetually blinking dialogue box.  I found that there were lots of packages waiting to be upgraded that hadn't been, so I tried running "apt-get upgrade" a few times, which downloaded and installed a load more stuff.  Still the blinking dialogue box though.  I tried installing extra packages that are included in the back-port, but which are not strictly required, and still the blinking dialogue.  Having read the background "how the port was done" notes I tried a hunch - maybe I needed a newer version of X?

So I added the back-port of XFree86 4.2.1 to my sources and upgraded X.  The first attempt only upgraded the server its self and the fonts, not the supporting libraries.  A round of "apt-get install" on the held back packages brought in the rest of the libraries, and suddenly the blinking dialogue blinked no more!  I'm still not entirely convinced that it was the version of X that was the problem, but I can't think of what else I changed that would have resolved the problem like that.

A word of warning to anyone trying to move to Gnome 2 for the first time from 1.4: it's very different.  Expect to loose all your favourite panel applets, all your cunning key combos, and some tear off menus.  When first logging in you will be offered the option of discarding your existing configuration, or trying to convert it.  Just discard it, there is so little kept that it's not worth the effort.  If you do try and convert your configuration expect everything to be screwed up and much fiddling to have to be done.

11:13 PM - Where does this stuff come from?

Apparently the "Lords of the Rhymes" has been around for a few months, but it's only recently that they've added a video.  To give you an idea of just what you're letting yourself in for if you follow the links, I quote:

The video, directed by famed hip-hop director Curufin the Crafty (aka Morgan Barnard) features a bevy of Middle-Earthian characters, including hobbits, dwarves, ents, elves, Nazgul, and even a cameo appearance by the Dark Lord Sauron himself.

" There was no half-steppin' on this one," said Quickbeam in a statement released yesterday, " We knew we had to turn it out large and we did."

I have to thank, once again, Why Do They Call Me Mr Happy for this one.  I've no idea where Iain finds this stuff, but it's truly a wonderful way to waist a few moments of the day.

Tuesday, 18 February 2003

10:40 PM - Bits and bobs

So everyone (or a fairly close approximation to that number) knows that Google bought Pyra, the makers of blogger.  On numerous different weblogs you can read educated, and otherwise, guesses as to what the future holds and why Google though it was a good idea.  You can even read the initial reaction, in a weblog of course, of the guy who started the company and sealed the deal.

Despite all this however, no one seems to have yet commented on the fact that the news made the front page of the BBC this morning (EST morning that is).  Consider that:

  1. The BBC doesn't tend to put companies buying each other out on the front page
  2. Pyra only employed 6 people

Surely this should warrant some kind of record.  The challenge now must be for someone to get a company news worthy enough it gets (however briefly) the front page, but with only 5 employees.

9:51 PM - The new look to BBC News

The BBC news site is my main source of mainstream news, and I happened to be trying (and failing) to locate a page on it during the roll-out of their new look.  It's nice and clean looking, with plenty of white space around things.

Of course the " [an error occurred while processing this directive] " message on most of the pages spoils the effect, but I'm sure that's a temporary glitch...

9:00 PM - Tweaks to the site

Robin suggested that I should add the archives link section to each of the monthly archive pages, so making the task of reading through all the posts that much easier.  It's an easy change, so I've done it.  I've also tweaked the CSS sheets, as I thought I might have to, so that the archive link section should now render in IE reasonably well.  The gods of syndication are obviously smiling on me this week, because the LJ feed didn't screw up as I had feared it might when changing the number of articles in the RSS feed.

Monday, 17 February 2003

9:28 PM - Weblog changes

I've implemented a few changes to my weblog, if anyone has any opinions on them the feedback would be helpful.  I've extended the main index, and the RSS feed, to have 7 days worth of posts rather than 5.  LiveJournal seems to be using a particularly brain-dead RSS aggregator, so I'm sure this change, like all others I've done, will screw-up the friends pages again.  There's nothing I can do about it execpt hope that they've made some changes, like really parsing the XML and keeping hashes of the posts to work out which entries are new.

The other major change I've made is to make monthly archives of the weblog available.  I've always had perma-links to the individual days worth of posts, but no way of getting to them beyond the index page.  My initial plan was to have the archive pages contain just the title of each post, along with an excerpt, and then links to the perma-link page.  Instead I've made the archive pages hold the full post, with perma-links available in the same way as the index page.  The layout may change as I re-think my templates, and I need to check to see whether any of the new pages work in IE.

As you can see from the links, my posting over the years has been somewhat sporadic.  It's only with November 2002 that I've really been posting anything worth reading (at least IMHO), but I'm keeping the old stuff around, at least for now.

6:51 PM - A small bug fix

It's that time of week again, Monday, so it must be time for yet another release of SimpleTAL!  I've just uploaded release 2.3 which, this time, addresses just a single defect.

In previous releases there was a problem with using 'tal:repeat' over empty lists, namely an exception would be thrown during template expansion.  I've changed it so that if the list is empty, it will behave in the same way as Zope, and tal:repeat will treat the expression as though it had evaluated to nothing.

Thanks to Barry Pederson for finding and reporting this.

Thursday, 13 February 2003

10:26 PM - On the differences between libertarianism and liberalism

Matthew Yglesias has an excellent post on why liberals should not use libertarian arguments, and so helps, at least for me, to define the differences between them.  The example subject he chooses is that of government policy discouraging homosexuality, and how libertarians think that the state should not be attempting to influence peoples sexuality, whereas liberals would argue that there is nothing wrong with homosexuality.

The argument that liberals should not use the libertarian position is for me difficult.  The problem is that I agree with both positions, so supporting the libertarian view is not in anyway a dilution of my liberal views.  I imagine that a large number of people, who would describe themselves as liberal, would also tend to agree that it's not the governments place to regulate relationships in this way.  While politics inevitably ends up dealing with issues of morality, it should be clear by now, that there is no place for legislation on the nature of relationships between consenting adults. 

The social issue of reducing, and it could be hoped eliminating, discrimination on the grounds of sexual orientation is not harmed by stating that it is not the governments role to regulate adult relationships.  Legislation that criminalise such discrimination can be supported by those that argue against the government trying to regulate relationships, on the basis that the legislation is extending that argument of non-interference into the world of work.  A company discriminating in hiring, is in effect, the same as a government discouraging homosexuality through legislation, in that both acts create a society that is intolerant and harmful to gays.  The scale of the effect is certainly different, with the government legislation being far more damaging, but it's essentially the same question of imposing a particular moralistic view of relationships on others.

Wednesday, 12 February 2003

12:00 AM - Frozen hair & radio stations

It was rather cold this morning.  So cold in fact that, within the short time it takes me to walk down the road, any dampness that might have been at room temperature before would freeze.  It is a strange feeling to find sharp, crispy, strands of hair upon your head while waiting for a street car, although thankfully no damage seems to have resulted...

A couple of recommendations for anyone looking for radio stations to listen to on-line.  Advert free and good listening:

Monday, 10 February 2003

9:49 PM - The long road to valid HTML

On the seventh day he rested, for what he created seemed OK, at least as far as he could tell.  The next day was a work day however, so it wasn't until he got home and updated his weblog software to produce validating HTML that he was reminded, once again, of the perils of releasing software.

Despite my confident pronouncements that version 2.1 of SimpleTAL would output valid HTML, I had, I'm sorry to admit, made an omission.  You see for HTML to be valid it requires a document type declaration, and version 2.1 of SimpleTAL, like all those before it, would swallow any document type declaration present in the template.

The good news is that the fix was trivial, and so I also took the opportunity to fix a few other oversights, like comments in HTML, and processing instructions in XML.  The new release, version 2.2, does now definitely outputs valid HTML; I'm using it for this very weblog, and this weblog now validates.

Sunday, 9 February 2003

7:11 PM - Bug fix release of SimpleTAL

I've just uploaded a new release, version 2.1, of SimpleTAL.  This release fixes a defect in the HTML compilation that meant that some HTML templates could never be valid HTML, and that the output of those templates would never be valid HTML.

The problem was that, prior to this release, all open tags that had TAL attributes had to always have a corresponding close tag.  In HTML 4.01 there are several elements (e.g. img) that are forbidden to have close tags, and so the choice was either use invalid HTML that contained close tags, or not use TAL in those elements.

In SimpleTAL version 2.1, HTML templates can now have TAL attributes on open tags, for elements that are forbidden to have close tags, that have no corresponding close tags.  Additionally HTML elements that are not allowed to have close tags will have them removed from the template output.  More details can be found in the notes, and the new version obtained from the download page.

Saturday, 8 February 2003

12:34 PM - Flaming marshmallow balrogs

I saw this on the Why Do They Call Me Mr Happy weblog, and thought no more of it.  Last night I mentioned in passing, and no-one else had seen it.  So, as a service to all sugar coated balrog fans, here's the competition you wish you had entered.

Friday, 7 February 2003

12:00 AM - Attempt to fix display problems in IE 5.5

I've updated my XSLT templates to now include <pre> tags around code samples.  This should make the code examples mentioned throughout the SimpleTAL pages render correctly in IE 5.5, and possibly other browsers that don't implement style sheets fully.

Wednesday, 5 February 2003

9:51 PM - EU Tax harmonisation explained

Every few months the issue of harmonising taxation across the EU crops up, and when ever it does it usually gets denounced pretty quickly from most sides.  It's one of those subjects that no-one seems to be in favour of, and yet it still keeps coming back.

I've finally found someone putting forward a good reason as to why tax harmonisation may be a good thing, and it has nothing to do with the usual reason given, that of unfair tax competition.  Written by the Edward Troup, the head of tax strategy at Simmons & Simmons, this article in the FT explains the problems with the current situation.

Although there is freedom of movement across the EU most people end up a resident of one country, and if they move to another country they become residents there, and so pay income tax there.  Most people don't change residency from one country to another very often, and there are rules in place in each country that determine when you class as a resident for tax purposes.  If you are a company however it's very common to have different parts of you in different EU countries on a permanent basis.  It's also not clear, especially if your customers are also in multiple EU states, where you earn the profit that countries wish to tax.  The EU has a common market, so in theory it shouldn't matter where you are in the EU, you can conduct business everywhere.  The European Court has the task of ensuring that this fundamental right of access to the free market is upheld, and so (borrowing from the article) when Germany says that you can not pay interest owed on loans in an another country out of earnings from Germany, it acts and limits this ruling to only countries outside the EU.

I'm a strong supporter of the common market.  It is an important part of securing the peaceful future of Europe.  It gives us more choices, in things to purchase, places to work and live, and brings a greater variety to life.  So when the issue of tax harmonisation comes up again I'm going try and find out exactly what kind of tax harmonisation is being proposed, because it might turn out that I don't appose it after all.

9:45 PM - More SimpleTAL news

It's been at the back of my mind to change how local variables are implemented in SimpleTAL/ES for a while now.  The implementation used in 2.0 goes back to my first ever version of SimpleTAL, and was a bit of a hack.  I've changed it to work the way it should have done from the beginning, and I'm now seeing a 5% improvement on the basic performance test and 10% on the deeply nested test.

I'll included this in the next release, whenever that turns out to be.

Tuesday, 4 February 2003

8:43 PM - Version 2.0 of SimpleTAL released

I've just upload the new version of SimpleTAL.  This is the version that brings with it significant performance improvements thanks to the refactoring.  It also brings some changes to the API, so if you are using an earlier version please take a look at the notes on migrating from an older version.  Feedback, as always, is much appreciated.

For anyone reading this and wondering just what SimpleTAL is, here's a quick description.  SimpleTAL is a Python library that provides an easy to use template language for HTML (and XML) documents.  By using SimpleTAL it becomes easy to separate the look and feel of a page from it's content, which makes it very useful for powering interactive web pages.  SimpleTAL is a standalone piece of software, so you can use it to produce HTML or XML content from any Python program.

This weblog is produced using SimpleTAL, and is also the reason that I wrote it in first place.

12:29 AM - A public service announcement

There's a wonderful little restaurant near us called Citron, which for those living in Toronto who haven't found it yet, is at 813 Queen Street West.  We were there last night (Pear Salad, Coconut Pumpkin Stew, and Melted Chocolate Truffle Cake now that you ask) and discovered that it is going to be temporarily closing for renovation.

The good news is that they will only be closed for a couple of weeks starting shortly after Valentines day, and of course we'll have to go back to see what the new decor is like...

Sunday, 2 February 2003

11:25 PM - European weblogs

There's a small debate on the use of English on the continent going on thanks to Bjørn Stærk, with Tobias Schwarz providing some dialogue.  It's hard as a native English speaker, who knows no other languages, to comment on this issue with any level of authority.  One aspect I feel I can comment on is mentioned by Tobias, and that's the use of English as the language between people who speak two different languages (in this case Germans and the French using English as a common language).

The important aspect to this is not it's evident benefit to the likes of me, but that it pushes forward the ideal of a Europe that can identify with it's self.  A Europe that can speak a common language, along with it's common currency, is a Europe full of people more likely to get along with one another.  In this sense any common choice of language would be fine, that it's English just brings the bonus of being able to communicate with large chunks of the rest of the world.

I can definitely agree with Bjørn in welcoming the opportunity to read the views of Continentals in English.  I've tried to track down European weblogs that are written in English, and I've not had much luck.  The most promising list I found does not break up the weblogs by language, and seems to feature many broken links.  Maybe I should start a list myself...

12:38 AM - First posting using beta version of SimpleTAL 2.0

I'm nearly done with the refactoring of SimpleTAL for version 2.0.  All of the unit test cases that I have now pass, both for HTML and XML templates, and I've even added a few more to cover some commands that were not tested before.  As part of final testing I updated my weblog software to use the new version, and found some interesting relics.

This weblog has archives going back to my first ever post, back long before my current weblog software was written.  I started out with a few python scripts that would grab HTML files and merge them together looking for special tags in a template file; it was very crude but it mostly worked.  The current system stores all my posts as XML, has TAL templates, and some cunning logic in between.  When I moved to this new system I had to port over all the old posts to the new format if I wanted to keep a consistent history.  The cut-over didn't happen cleanly however, and there were a small number of posts which had strange XML source files.

The files had the content body of the posting encapsulated in a CDATA section, and were also escaped using entity references.  In SimpleTAL 1.x the posting body would be sent through an SGML parser prior to inclusion in the template, and that parser would expand the entity references back into normal characters.  In SimpleTAL 2.0 content structure is not sent through a parser (if you need to use TAL in the structure then you can create a compiled template before placing it into the context), and so the entity references would be included as literal text.  A few search-and-replace commands have sorted those postings out, and it looks like the new version of SimpleTAL works reasonably well with my weblog system.

I have some documentation and clean-up work to do prior to releasing SimpleTAL 2.0, but it shouldn't take me long to do.  The performance of the new engine is pretty good, anywhere between 1.5X and 7X faster than the current version (depending on the type of template).  The top performance is a little lower (~70 templates/sec) than I achieved with my prototype version, but I had expected that there would be some sort of drop once the character encoding conversion and other must have features were added.

%nbsp;

Last Modified: Thu, 25 Mar 2004 04:19:44 GMT

Made with PubTal 3.2.0

Copyright 2008 Colin Stewart

Email: colin at owlfish.com