Friday, 9 May 2008

Why People Are Passionate About Perl

brian d foy asks why people are passionate about Perl. So, brian, here are a pumpking's answers to your questions.

The person who introduced me to Perl showed me that I could throw away all those fragile sed and awk scripts and get the job done much quickier. So that gets us to the second question:

I first starting using Perl to process very large data files. Or at least they were considered very large at the time: less than 2 Go, I think. But I quickly grasped the thing and began to wrote small scripts to automate various things on my computer (and others').

I kept using Perl because it was fun. And it still is.

I can't stop thinking about Perl because... they won't let me! If I stop thinking about Perl, I know they're out there to get me, lurking in the dark corners of the intarweb, with their bug reports, their suggestions and their patches.

I'm still using Perl because, well, basically, because I'm paid for it. But on the other hand, I chose a job where I was getting paid to use Perl. I could have chosen a Java, a C, or (my goodness) a PHP job. But with a proper Perl job you have the CPAN at hand, ready to be used. So you can concentrate with the problem solving and the business side of your applications, because almost all the libraries you'll need are already there.

I get other people to use Perl by hitting them on the head with a -- no wait. Actually that's the most interesting question. I get other people to use Perl by trying to make Perl a less annoying language, in my own scale.

I also program in C, but mostly when I have to patch perl itself -- the only place where you can't use Perl.

Tuesday, 25 March 2008

IRC thought of the day

On freenode, every IRC channel is the zoo of another one.

La maison des girafes

Thursday, 20 March 2008

Google charts on Flickr

Looks like the Google Chart API now does maps. I like maps.

I figured that I could map some of my flickr tags to a map, just to see where I've taken my photos. Here are some of my location-related tags, and the current number of photos tagged with:

amsterdam40
birmingham19
brussels9
venice79
nice70
paris274
lyon60
(total for France tags)404

It's then almost trivial to come up with an image URL from google:

Neat, huh?

But where to go from there? Obviously, it would be a good idea to tag photos with the two-letter ISO country name, maybe as "country:FR" or "country:NL" (not sure what a good convention would be); then, the associated number of photos could be retrieved effortlessly via the Flickr API. Alternatively, if one wants to construct a nice mashup, having a DB full of city names or/and using geotags would be a nice idea too. Tuits anyone?

Wednesday, 19 March 2008

CPAN reports colors

search.cpan.org has, on each distribution page, a link to CPAN testers reports, and, thanks to Slaven Rezic, to matrices that neatly summarize the report statuses per distribution or per author (here's an example for Safe 2.15).

Unfortunately, the default color scheme isn't really readable for color-blind people. However, Slaven used a less known feature of CSS to provide an alternate colouring scheme. In Firefox, when viewing the matrix page, select View > Page Style > High Contrast to get the alternate CSS, et voilà, the colours are now accessible. Thanks Slaven!

Tuesday, 18 March 2008

Harry Connick Jr, the pianist

Keyboard, stripes I recently discovered the pianist side of Harry Connick Jr, who is best known as a crooner. The influence of Thelonious Monk is remarkably high. Broken rhythms, weird block chords, minimalist improvisations: we are in presence of one of the only disciples of The Sphere. He even grabs full codas from Monk. For evidence, listen to One Last Pitch, a trio recording.

And what's remarkable, is that it seems that this influence has been completely overlooked by everybody. Connick is a much, much better pianist than singer. And his piano style is certainly not what you'd expect from a white crooner with the look of an Hollywood playboy.

Well, I guess that it's just another confirmation of the old saying, all jazz musicians are underestimated.

Monday, 21 January 2008

vim and Perl 5.10

If you use vim and want it to highlight correctly the new keywords in Perl 5.10, you can just drop the following syntax plugin script as ~/.vim/syntax/perl.vim :

so $VIMRUNTIME/syntax/perl.vim
syn keyword perlStatementStorage state
syn keyword perlStatementFiledesc say
if exists("perl_fold") && exists("perl_fold_blocks")
syn match perlConditional "\<given\>"
syn match perlConditional "\<when\>"
syn match perlConditional "\<default\>"
syn match perlRepeat "\<break\>"
else
syn keyword perlConditional given when default
syn keyword perlRepeat break
endif
if exists("perl_fold")
syn match perlControl "\<BEGIN\|CHECK\|INIT\|END\|UNITCHECK\>" contained
else
syn keyword perlControl BEGIN END CHECK INIT UNITCHECK
endif

An extension, not implemented here, could be to add a new highlight class for the new regexp verbs (MARK, SKIP, COMMIT, etc.)

Wednesday, 16 January 2008

Disk usage graphical presentation

I found out by accident about this GNOME tool, the "Disk Usage Analyzer". It has a surprisingly good UI, displaying subdirectories as concentric circular arcs. It makes visually obvious the spots where all the place is wasted. Or spent.

As an illustration, here's a screenshot of it displaying the disk usage taken by a fresh checkout of Perl 5's sources.


I wouldn't have thought that Encode was taking so much space. (This is, of course, due to all the files that describes the various encodings recognized by this module.)

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!