Wednesday 19 December 2007

Perl 5.10.0 is out

The news is beginning to propagate on the internet... perl 5.10.0 is out. My informal announcement was posted to perl5-porters yesterday, and it summarizes my views on the subject. Or, more concisely: I'm happy!

I think I deserve a small vacation, and I'll be away in Nice for one week (the week of Christmas).

Friday 7 December 2007

Let's go scripting

The latest article by Larry Wall is out, and it has the highest density of memorable quotes I ever observed in the wild. Go read it now!

Tuesday 27 November 2007

The elevator dream

Light ascending I made one of those strange dreams tonight. My job was to write software for elevators. I had just read a (fictional) article by MJD on how bad is most software for elevators, and written by incompetent programmers. Full of those thoughts, feeling somewhat insecure about my ability to write good elevator software, I begin my work day by, you know, taking an elevator, to go to my office. At this exact moment, a bunch of Japanese girls show up and take the elevator with me. Somehow they know what I do for a living, so they start asking questions: "Hey, I'm vegan. Can't you design elevators for vegans? -- I'm Christian, and there are no good Bible-friendly elevators. -- ..." and so on ad libitum. When I said, "Bloody Hell", (for once, I dreamt in English), "Bloody Hell, why can't you just all take the same bloody elevator", I woke up.

Next time, I'll take the stairs.

Saturday 24 November 2007

Dolphy's last words

Here are the last recorded words of Eric Dolphy, one of the most talented alto saxophonists of the jazz avant-garde of the early sixties (and one of the true continuators of Charlie Parker):

When you hear music, after it's over, it's gone, in the air; you can never capture it again.
Never capture it again? Those idealists, they would kill the music industry in the name of art! Hopefully, the music industry has now understood that music much too serious a matter to entrust to musicians.
(The quotation above can be heard at the end of Miss Ann, on his album Last Date, recorded in 1964. Not Dolphy's best recording, but a masterpiece anyway.)

Monday 19 November 2007

Back from FPW2007

Iron windows I'm back from the French Perl Workshop 2007, in Lyon. That was a great conference. I took some pictures and made two presentations and one lightning talk.

The slides of the first presentation, Un Panorama de Perl 5.10, are available on-line. The second one didn't had any slides, since I just walked through the code of my module encoding::source, explaining what it does.

Finally, the lightning talk was the live upload on stage of perl 5.10.0 Release Candidate One. Download and test!

Monday 12 November 2007

Flaubert's elephants

The Carthaginians did use elephants in their army, but those beasts were difficult to handle. Here's what Livy says about their drivers:

More elephants were killed by their drivers than by the enemy. They had a carpenter's chisel and a mallet, and when the maddened beasts rushed among their own side the driver placed the chisel between the ears just where the head is joined to the neck and drove it home with all his might. This was the quickest method that had been discovered of putting these huge animals to death when there was no hope of controlling them, and Hasdrubal was the first to introduce it. -- Livy, XXVII, 49

Also, in Salammbô, we read:
He [Hamilcar] organised a phalanx of seventy-two elephants with those which had returned from Utica, and others which were private property, and rendered them formidable. He armed their drivers with mallet and chisel to enable them to split their skulls in the fight if they ran away. -- Flaubert, Salammbô, VIII

Hasdrubal is the son of Hamilcar, and the brother of Hannibal. Flaubert's novel takes place during the Mercenary War (circa 240, Hasdrubal was probably not yet born), and the Livy quotation refers to the Second Punic War, more precisely to the Battle of the Metaurus (207) -- that is, afterwards.

In other words, Flaubert is guilty of anachronism. But he was certainly aware of that, and favored the literary effect over the historical accuracy.

Saturday 3 November 2007

Hannibal and the vinegar

How Hannibal Barca and his army crossed the Alps to go in Italy to fight against Rome:

At last, when men and beasts alike were worn out by their fruitless exertions, a camp was formed on the summit, after the place had been cleared with immense difficulty owing to the quantity of snow that had to be removed. The next thing was to level the rock through which alone a road was practicable. The soldiers were told off to cut through it. They built up against it an enormous pile of tall trees which they had felled and lopped, and when the wind was strong enough to blow up the fire they set light to the pile. When the rock was red hot they poured vinegar upon it to disintegrate it. After thus treating it by fire they opened a way through it with their tools, and eased the steep slope by winding tracks of moderate gradient, so that not only the baggage animals but even the elephants could be led down.
-- Titus Livius, XXI, 37

Yes, vinegar. I'm full of admiration for this legendary hack.

Tuesday 30 October 2007

Ubuntu, Dell laptop and hard disk power management

There has been some talk those days on laptop hard disk lifespan. See, for example, what Pascal says about it.

So, after some investigation, I saw that on my laptop (Dell Latitude D420) the BIOS doesn't handle an APM value of 255. By default the startup scripts execute hdparm -B 255 /dev/sda (or other devices) and that actually sets the APM value to 128 (as given by hdparm -I /dev/sda | grep Advanced). (I'm using Ubuntu 7.10 -- the script I'm talking about is /etc/acpi/power.sh.)

On the other hand, using -B 254 seems to disable APM. So here's a way to do it, by default, on every boot:

  • Add those lines to /etc/hdparm.conf:
    /dev/sda {
    apm = 254
    }

  • Make /etc/init.d/hdparm run at startup:
    ln -s /etc/init.d/hdparm /etc/rcS.d/S07hdparm

And now the load cycle count reported by SMART remains stable. Which means that hopefully my hard disk will live longer.

Addendum: if you don't use SMART, you should. Install the smartmontools package, enable SMART on your disks with smartctl -s on, and read the smartctl(8) manpage. Optionally, enable the smartd monitoring daemon (via /etc/default/smartmontools).

Wednesday 24 October 2007

urxvt + perl

I'm playing with urxvt (a.k.a. rxvt-unicode), a fully Unicode-aware terminal forked off the popular rxvt.

One of the good things with it is that it's fully scriptable in Perl. Here's my first attempt, a small plugin that adds an item in the popup menu (given by the standard Perl plugin selection-popup) to draw in bold font whatever matches the selection. It's not extremely useful, but that's a start.

our $selection_hilight_qr;

sub on_start {
my ($self) = @_;
$self->{term}{selection_popup_hook} ||= [];
push @{ $self->{term}{selection_popup_hook} },
sub { hilight => sub { $selection_hilight_qr = qr/\Q$_/ } },
sub { 'remove hilight' => sub { undef $selection_hilight_qr } };
();
}

sub on_line_update {
if (defined $selection_hilight_qr) {
my ($self, $row) = @_;
my $line = $self->line($row);
my $text = $line->t;
while ($text =~ /$selection_hilight_qr/g) {
my $rend = $line->r;
for (@{$rend}[$-[0] .. $+[0] - 1]) {
$_ |= urxvt::RS_Bold;
}
$line->r($rend);
}
}
();
}


As you can see, this code is pretty small (although not very readable maybe -- I dislike using @+ and @-, but my urxvt isn't compiled against a Perl 5.10 :).

Well, I'm now looking for ideas. What would be cool for a terminal to do for you (and that urxvt doesn't already provide?)

Monday 8 October 2007

New camera

I just got a new camera, a brand new Canon PowerShot A720 IS. Very nice compact camera. Great optical zoom (6x). Possibility of manual settings. Nice UI (so far). There's no detailed user manual, though -- I still need to learn how to program my modes, etc.

I spent my sunday playing with it. I've uploaded a couple of shots to flickr -- more, of course, are to follow.

Thursday 6 September 2007

French Perl Workshop 2007

I signed up for the French Perl Workshop 2007 in Lyon, and I proposed two talks: one on the new shiny stuff in Perl 5.10, and a smaller one on encoding::source, one of my scary modules. (I had this last idea while giving an impromptu presentation of encoding::source at the latest Amsterdam.pm meeting last Tuesday.) By popular demand, my presentations will be in French. See you there.

(Now I have to write slides...)

Wednesday 5 September 2007

Blue versus Pink

Baignade autorisée Found via slashdot, an article on Bad Science criticizing a research in evolutionary psychology about why boys prefer blue, and girls pink. The author says, and rightly:

The “girls preferring pink” thing is not set in stone, and in fact there are good reasons to suspect it is culturally determined.

And then he gives examples. But if I may add another remark to his rant: it turns out that the categories of blue and pink are also culturally determined. Actually, the colour blue didn't even exist as a separate entity before the Middle Ages. Ancient Greek, for example, does not have a word for blue, and Homer speaks about the wine-coloured sea.

I think that the study of colours and their perception is more a subject for historians than for biologists or physicists. On this subject, one of the best books I've read is Blue, the History of a Color, by Michel Pastoureau, in which the last chapter briefly talks about the very recent (and very occidental) association of blue and pink to boys and girls, respectively.

Tuesday 28 August 2007

On Gravitas

Gravitas is a novel by S. Christopher, centered around a character named Ben, and his evolution at the edge of his thirties. In a few words, Ben lives in a medium-sized American city (that could be Portland, for instance); he's a senior programmer in a small software company; he has a geeky housemate.

The novel has no other real purpose than to depict Ben's life and mind. That has shaped the narrative style, which proceeds by an accumulation of scenes, not necessarily in chronological order, rather than by a well-formed, developing plot. Ben is, by many criteria, successful, but by other traits, he's not strictly in tune with his environment: sometimes he appears to shift by a half-tone, maybe more, leading him to be a spectator of himself (and others). The love (and pain) that a girl will inflict on him will force him out of his shell, at least for a period, and he will live this event as a small, strange trauma, maybe the first of his life, not counting his own birth.

Minor themes are recurrent through the book, indicating that it's better constructed than it would be obvious at a first glance.

One of those themes is the disappearance -- of days, people, words, that seem to slip through Ben's memory, as if reality wouldn't let itself be captured easily as a mind representation, by someone who is reluctant to engage in it fully.

Another theme might be abstraction. I don't find a better word for that capacity -- or defect -- that some people have, to perceive things through an emotionless prism, like one would look at a piece of software, including oneself.

The author uses a dense, rich form of English, full of images. This prolixity suits well the introspective nature of the book.

I enjoyed Gravitas. On an ideal shelf, it would be between P.K.Dick's non-sci-fi novels and Meredith's Egoist.

Monday 6 August 2007

mysql command-line tricks

I use the MySQL shell a lot. A couple of tricks can make it more usable:

First, prompt customisation. I work with lots of different databases on different hosts. So, I customised my prompt via an environment variable:

export MYSQL_PS1="\\d@\\h> "

This makes mysql display the database name and the hostname instead of the fixed string "mysql":
$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 143955 to server version: 5.0.27-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

test@counterfly>

Secondly, readline configuration. When editing long SQL statements, I prefer to use vi-like keybindings. That can be selected by adding the following lines to your ~/.inputrc file:
$if Mysql
set keymap vi
set editing-mode vi
$endif

You can then navigate history and edit like like you would do (almost) in vi. See your readline manual for more details.

Friday 13 July 2007

$* replacement

So, the special variable $* has been removed from perl 5.10, after having been deprecated for years. For those who don't remember Perl4-style programming, $* was used to enable multi-line matching in regular expressions. In Perl 5, the preferred way to do it is to use the more flexible regexp flag /m.

I removed that poor old variable not because I like removing old things, but because it was standing in the way of a bug I wanted to fix (bug #22354). Anyway. Apparently there is still out there some old Perl code that fears not using $*. And notably ghc's evil mangler, which broke with perl 5.9.5.

But Audrey Tang (who else?) found an elegant way to emulate $* = 1, in a characteristic perl-zen manner. Here's how: the current evil mangler contains this simple line of code, in a BEGIN block:

require overload; overload::constant( qr => sub { "(?m:$_[1])" } );

Wednesday 11 July 2007

Saving GNOME settings

Here's a small tip I got from GNOME expert Pascal Terjan, and that I'm copying here because I don't trust my memory:

Want to inspect the settings of some GNOME application? Use gconf-editor.

Want to copy the settings of some GNOME app (like, say, metacity) from one desktop to another? Use the command-line tool gconftool, specifically the options --dump and --load. (The paths you need to feed to gconftool can be retrieved via gconf-editor.)

Tuesday 10 July 2007

Munin plugin for ping response time

My ADSL router (a freebox) shows a recent tendency to desynchronize itself. That's annoying, even it that only lasts a few minutes from time to time. Maybe a cable needs to be replaced (advice?). So, I quickly hacked this plugin for Munin, an excellent system monitoring package:


#!/usr/bin/perl -wT

use strict;

our @HOSTS = qw(free.fr);
if (@ARGV && $ARGV[0] eq 'config') {
print <<CONFIG;
graph_title Ping response time
graph_vlabel time (ms)
graph_args --base 1000 -l 0
graph_scale no
graph_category network
CONFIG
for my $host (@HOSTS) {
my $name = $host;
$name =~ tr/./_/;
print "$name.label $host\n";
}
}
else {
@ENV{qw(PATH)} = qw(/bin);
for my $host (@HOSTS) {
my $name = $host;
$name =~ tr/./_/;
my @ping = qx(/bin/ping -nc1 $host 2>/dev/null);
my $times = $ping[-1];
my $val = '';
if ($times =~ m{^rtt min/avg/max/mdev = ([\d.]+)}) {
$val = $1;
}
print "$name.value $val\n";
}
}

Feel free to adapt/improve. This code is of course released under whatever license Munin is released under (I didn't bother to check.)

Monday 9 July 2007

Perl 5.9.5

I've released Perl 5.9.5 on saturday. Get it while it's hot. Get the official announcement as well.

Wednesday 4 July 2007

Sub::Current

I've released another new heavily magic Perl module on CPAN, this time scratching an itch of Yves Orton. It's called Sub::Current and allows you to get a reference to the currently executing subroutine.

At first I wanted to use a tied scalar instead of a function to get this reference; however, due to the way parameter passing is implemented in Perl, that's not easily possible: the tied variable (let's call it ${^ROUTINE}) is FETCHed at the innermost scope, so this won't work:


sub foo {
# here ${^ROUTINE} points to bar(), not to foo() !
bar( ${^ROUTINE} );
}

I think that could be done by tweaking some of the ck_ functions that are used to optimize Perl's internal optree during the compilation phase. I know that some people are not afraid to do this, but I feel that this would be a rather fragile solution, for only a little bit of syntactic sugar.

Monday 25 June 2007

Do you dream in colour?

Squares
Do you dream in color? asks Mark-Jason Dominus. Interesting question, on which I've already some thoughts.

I'm colour-blind. I see some colours, but the words that are used to describe colours are for me largely arbitrary. Why use two different words, like, green and orange, for the same colour? A consequence of that is a difficulty to verbalize colours, which in turn makes it difficult for me to remember the colour of an object, if nobody told me what word to use to describe it. Without a proper vocabulary to classify them in my brain, I can't remember or percieve fully the colours.

So it shouldn't be a surprise that I dream "in black and white": or, more accurately, that I can't name and remember the colours of the objects that appear in my mind during dreams. Colours are an irrelevant part of my Weltanschauüng.

However, from time to time, I make a dream about a colour. Those are in general very simple dreams, focused on a single object; nothing happens; sometimes I only dream about a colour without an object. (Robert Louis Stevenson, in A Chapter on Dreams, says that he sometimes dreams about a particularly horrible and uncanny hue of brown.) And usually that colour is mauve, or the idea I have about what mauve should look like: a mix between red and blue, which does not exist for me in the real world.

I'm not sure how to explain this. Probably my brain is playing tricks to iself (that is, to me): my eyes are not able to send the signal mauve to the brain, but the brain circuitry is intact and is able to perceive mauve once the eyes are out of the loop. However, that new colour is so strange that it soon overrides all other aspects of the dream it appeared in. I don't have any other explanation (short of the Platonician thesis, that learning is remembering.)

Wednesday 20 June 2007

encoding::source

I'm happy to announce to the unsuspecting world that I've released to the CPAN a new Perl module, encoding::source. Like I say in the docs, this is like the encoding pragma, but done right. In other words, it allows you to change, on a per-file or per-block basis, the encoding of the string literals in your programs.

That's probably some of the scariest Perl code I've written. Note that it won't run on any released perl. You'll nead bleadperl (or the upcoming 5.9.5) for that. That's because it uses the new support for user-defined lexical pragmas.

Monday 18 June 2007

Best Doctor quote ever

We're at the end of the universe, right at the edge of knowledge itself, and you're busy... blogging!

The Doctor, in Utopia

Thursday 14 June 2007

On Olympia




Edouard Manet, while young, once copied Titian's Venus of Urbino, for practice. Later, when he produced one of his most famous and avant-garde paintings, Olympia, he was reminiscent of the old Venetian master: for he based his programmatic female nude on Titian's classical Renaissance Venus, but carefully inverted all the details.

The pose of the nude woman, lying on a bed, looking at the spectator, is the same on the two paintings. However, the Venus has a crouching puppy at her feet, while Olympia has there a cat standing up. Titian's scene has an open, bright background; Manet closed it with a dark curtain. Maidservants are seen on both paintings: Venus has two pale-skinned servants, seen in the background, from behind; the servant of Olympia is dark-skinned, faces the spectator, and is placed in the foreground. The Venus holds flowers; Olympia is about to receive flowers held by her servant. The Venus is in a diurn haze that suits the goddesses; Olympia is in a crude light, evoking a closed place rather than the openness of a Venetian palace.

As I see it, all those inversions are signs employed by Manet to indicate the subject of his painting: down with gods and goddesses, paint the reality. But they also indicate that Manet was seeing himself as part of the tradition, and that he wanted his works to be inserted in a dialogue with the masterpieces of the past. I'd rather be careful not to say too many things about Olympia, since the interpretation of this complex painting is quite difficult, that I will probably change my mind about it a few dozen times in the future, and that I haven't even seen it for real, although I live near the Orsay Museum. Anyway, those inversions are worth being noted.

(On a side note, I remember that Giorgio Vasari reports, in his Lives of Artists, that Michelangelo told him that Titian was a great painter, but that he couldn't draw. The same reproach was made, until late, to Manet...)

Monday 11 June 2007

On Greek myths



I've read a couple of books on ancient Greeks lately. The first one was a book of Plutarch on the oracles of the Pythia of Delphi. Plutarch, best known as an historian for his Parallel Lives, was also for some time a priest of Apollo, so he gives there some first-hand informations.

The second book was a very interesting essay by Paul Veyne, a contemporary French archaeologist and historian, titled Les Grecs ont-ils cru à leurs mythes? (Have Greeks believed their myths?). It begins by general considerations on the ancient Greek religion, and the place of mythology herein; then it takes a more philosophical turn, in the steps of Michel Foucault, and discusses what the notion of truth means.

One of the things that can be noted about the Greek religion, and that is much apparent through those two books, is that Greeks, like many ancient civilisations, did not have a concept of "faith", which we now in the modern western world tend to consider as a common ground for religions -- probably because we're mostly only familiar with the two big monotheisms, Christianity and Islam. No faith: nobody, in the home country of philosophy, would have considered virtuous or honourable to hold a mandated belief, not meant to be discussed or to be subject to inquiry. Incidentally, nobody was scandalised by the numerous philosophers who were arguing about the trustfulness of the oracles or the existence of the gods.

However, while many Greeks simply did not believe in the gods, and even less in their adventures as told by Homer, Hesiod and all the mythography, it appears that they couldn't imagine that those myths were completely invented, and they tried to explain their existence by several theories: for example, that gods were great kings of the past, later divinised, or that the myths were hiding ancient doctrines hidden under allegories.

So what role did myths play in the Greeks' everyday lives? I think that they were part of the tradition, in the noblest sense of the term: the tradition as the foundation for a culture (and that's why they ought to be respected). The myths, the gods and the heroes were common figures, models for good or bad behaviour, a common language of stories and situations that everyone could refer to. Probably, this profusion of the mythical language, and the freedom with which it was treated, created the ideal ground for all the inventions that were made in Greece: mathematics, geometry, theatre, democracy, philosophy, history, and so on.

Thursday 31 May 2007

Accessibility bookmarklet

Here's a small bookmarklet to underline hyperlinks. I've added it to my Firefox bookmark bar under the simple name "_". It is very handy when some poorly designed sites have a CSS where links are both (1) not underlined, and (2) in a colour quite close to the colour of the regular text. That happens quite often (esp. to colour-blind web users...)

Wednesday 30 May 2007

Venice!

I've finished uploading to Flickr the pictures of my honeymoon in Venice. How can you make bad pictures in Venice? As Bird used to say: in the silly hope you do enjoy...

Ponte de la malvasia veghia

Tuesday 29 May 2007

Intertextuality, as they say

I've just finished reading The Name of the Rose, by Umberto Eco. Long ago, I thought this was just another crime novel. Then, I got a bit more familiar with Eco's essays, and thought it might be another kind of book after all. I was right: it's not only a crime novel. It's full of references to a load of other minor or major works of literature (and I'm sure I've not even caught 10% of them). The double level of lecture makes it fun to read, if you pay attention.

For example, in the very first page, I could spot an allusion to the opening of Don Quixote. Later, multiple allusions to Dante, including a direct interpolation of a verse of the Divine Comedy into the text. The character Jorge de Burgos, the blind man, guardian of a labyrinth-library, is evidently a nightmarish version of the Argentinian writer Jorge Luis Borges. The delirious dream of Adso, towards the end of the book, is treated like James Joyce could have done. And, last but not least, the hero, Guillaume of Baskerville, is evidently a clone of Sherlock Holmes, with who he shares many physical and moral features (including a predilection for drugs).

Monday 28 May 2007

Vanity projects

These days the correct vanity project is yet another useless ORM.
-- Matt S. Trout on the london.pm mailing list

Vanity projects used to be templating systems, remember? That was the obligatory small project a beginner ought to write for himself. Seems that we move on to higher abstractions.

However, I still think that there's room for a good open source OODBMS. That would be an interesting project. Maybe an interesting vanity project, even!

Thursday 24 May 2007

MySQL annoyance

Got bitten by a bit of insanity in MySQL 5.0.26. Imagine you have a bogus query, SELECT poo FROM SomeTable, that looks correct, except that there is no "poo" column in the said table. (You mispelled "foo". So much for your brain.) MySQL will correctly return an error, Unknown column or somesuch, when you try to run it.

Except in a subquery. Like, for example, in:

DELETE FROM SomeOtherTable WHERE id IN (SELECT poo FROM SomeTable)
which will be then exactly equivalent to a simple, unadorned DELETE FROM SomeOtherTable. And you loose your data.

Friday 11 May 2007

"Irina Palm" colours

I'm seeing in the streets posters for a new movie, Irina Palm. The posters look like this:


It probably looks fine to most readers, and I must say that it's almost readable for me and my colour-blind eyes. But the paper posters are completely monochromatic to me, even when I'm close, and I had to ask another person to know what was written. That sucks. Conclusion... Don't use color combinations that cause problems for people with color blindness in its various forms. (That's from the W3C HTML 4.01 Specification, section 6.5.1).

Wednesday 9 May 2007

Old brass band video

A friend found a video of me, playing in a brass band at the Sables d'Olonne, for the Edhec nautic race, circa 1994. I'm not getting younger, am I. And he put it on youtube (sorry, bad quality, old recording technologies.)



I'm the tall guy with a cornet, behind, in the middle. Yes, that's on a boat.
(Given the way we play here, we must have been dead drunk! but less than the guy trying to mimic a conductor just in front of us.)

Tuesday 8 May 2007

Birthplaces of Presidents

Out of idleness, and to try the new google maps functionalities, I created a map of the birthplaces of the presidents of the French republics. Two were born abroad; five in Paris; most of the others in the geographical center of France.

Monday 7 May 2007

The origins of Creationism

One of the delusions of the creationists is about their own origins. They like to think that they're the guardians of an old truth, that has been under attack since only one or two centuries. But creationism is itself a recent invention, and that should not be forgotten.

Nietzsche said that myths were beginning to die when people started believing in them. (He was more specifically speaking about Greek myths, if I remember correctly, but that's besides the point.) The story of Adam and Eve was, during thousands of years, a vivid myth that was innerving the mystery of the origins of mankind, and which was used as the center for the theological or esoteric meditations of the learned classes. It is important to see that, for Christians and Jews, the Genesis was naturally open to multiple interpretations, which weren't mutually exclusive: as the Bible was supposed to be given by a being whose intelligence was infinite, it was only logical to seek in it other meanings than the pure literal one.

That's what the Jews made, for example, with the compilation of the Talmud, after the desctruction of the Second Temple, and later, with the Kabbalah. For the Rabbis, the story of Adam describes the drama of the incarnation of the soul, of divine nature, in flesh ("unto Adam also and to his wife did the Lord God make coats of skins, and clothed them" -- Genesis 3:21 : meaning that before the Fall, before the birth in this world, souls are immaterial).

In the Christian world, Saint Augustine wrote a short book on the literal interpretation of the Genesis, where he explains that the purpose of the Bible is not to be a book about natural history, but about salvation, that the alleged six days of the creation must be seen as a metaphor, and that what reason and intelligence allow the men to discover must not be shadowed by too much respect to the letter of Scriptures. This view, shared by many other Fathers, is still today the official view of the Catholic Church.

So, why and how did creationism appear ? I blame the Puritans. When this fringe of Protestantism decided that they didn't need professional priests, or specialists in theology and in exegesis, and that they didn't want any mediation between them and the Scripture, they closed their minds to three thousand years of wisdom. That was only the translation in the spiritual field of the austerity they imposed to themselves in their lives: a people of merchants, of bankers, obsessed by usefulness and thrift, scared by anything that could be related to pleasure, scared then by the pleasure of learning for learning's sake, of the joy given by the speculation of a bondless mind, with no sight of practical applications. Creationism is the product of a strong hatred for freedom of thought, itself the product of a strong hatred for idleness, for culture, and for anything that has no practical uses. And that's why it's so dangerous, and why it must be fought at all costs, not only by atheists, but also by all partisans of a religion from where spirituality is not absent.

Friday 4 May 2007

Musings on diff -u

diff(1) and patch(1) are wonderful tools, but there might be still room for improvement. As someone who deals with a large number of patches, I find that patches that just move code around contain too much redundant information, and are thus difficult to read.

I'd like an addition to the unified diff format. Instead of showing a large chunk being deleted and added again later, it would factorize it, for example like this:


non modified text
-first line of moved text
[-... block number #1 ...-]
-last line of moved text
continuing...
+first line of moved text
[+... block number #1 ... +]
+last line of moved text
rest of the context goes here

For extra points, that should work across files. That could be first implemented as a post-processor to diff(1).

For extra extra bonus points, some clever version control system would use this for an enhanced version of the annotate/blame/praise command, so it could show history even for code that was moved around.

Wednesday 2 May 2007

A postcard from Jeanne d'Arc

The far-right movements in Europe have now consistently adopted a strategy of having two visages, for two different audiences.

The first visage, nice and smiling, is aimed at the general public: the electors who are not yet won to the cause, and who need to be seduced. Denying all accusations of racism or fascism (or other un-nice words), that side likes to talk about how the traditional political parties want to reduce it to silence: because its novel and bright ideas to save the country scare the People in Power. Paradoxically, at the same time, it likes to point out that the far-right ideas appear in the discourses of mainline politicians, who copy them because they're right, without giving credit. However, that shallow rhetoric isn't sufficient to mask the complete lack of political insight, which is usually limited to blaming immigrants or the EU for everything, and posing as a victim the rest of the time.

The second visage is usually shown only to the inner party. It's much scarier. But sometimes you can have a glance at it.

After many weeks of electoral campaign in France, where we were exposed daily to the carefully sugared discourses of Le Pen (not mentioning the election posters everywhere in the streets), the French far-right finally revealed itself tel qu'en lui-même, yesterday May 1st, day of Jeanne d'Arc, traditionally an annual convention of the core supporters of Le Pen. I found a nice photoset on Flickr about that the 2007 Jeanne d'Arc celebration. Some pictures are really scary.

Take, for example, this one, and look at the details of the postcards:



One of them depicts Philippe Pétain with nostalgia -- Pétain was Hitler's strawman during the occupation of France in World War II. Another postcard features a guy making the fascist salute. A third one shows Hitler greeting Simone Veil (author of the French law that legalized abortion) among a club of mass murderers, including also Stalin an Mao -- a scene which insults not only the memory of the Holocaust victims, but also Veil herself, since she survived Auschwitz.

Tuesday 1 May 2007

Mr. Thorow

I'm reading Hawthorne's Notebooks. During september 1842, Hawthorne meets a strange little man, Mr. "Thorow", from who he buys a canoe that Thorow build himself. After a few pages, I began to realize that the little man was actually Henry David Thoreau, and the wikipedia entry, quoting Hawthorne, confirmed that.

Another neighbour of Hawthorne during those years was Ralph Waldo Emerson; the notebooks contains lots of little amusing facts about him, and Hawthorne befriended him (although he had little sympathy for Emerson's unitarian beliefs).

Monday 30 April 2007

Favourite Doctor Who episodes

My new favourite Doctor Who episode is now City of Death. Not only is it shot in Paris, in lots of familiar places; also, this is a 4th Doctor episode, and I like the 4th Doctor; it includes a villain which is very ugly; and as a bonus, we have John Cleese in some typical John Cleese appearance.