Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of rafael (2125)

Friday August 04, 2006
09:51 AM

Without strict, it's lighter

Found in some build script:

perl -pi -e 's/^use strict/#use strict/g'

You know, guys, removing "strict" from your code before deployment is a bit like removing the safety belt from your car, thinking that without those few dozen grams, it's going to be faster.

Wednesday August 02, 2006
09:24 AM

Axaxaxas mlo

Since everyone speaks about the kingdom of Nouns, I'd like to point my readers to that short story by Borges, Tlôn, Uqbar, Orbis Tertius , which describes a kingdom of verbs.

Here's an excerpt:

There are no nouns in Tlön's conjectural Ursprache, from which the "present" languages and the dialects are derived: there are impersonal verbs, modified by monosyllabic suffixes (or prefixes) with an adverbial value. For example: there is no word corresponding to the word "moon,", but there is a verb which in English would be "to moon" or "to moonate." "The moon rose above the river" is hlor u fang axaxaxas mlo, or literally: "upward behind the onstreaming it mooned."

02:48 AM

No piano for you

I have distorted my right thumb, by carrying heavy stuff. Now I have to train my hands to type on the space bar with my left thumb... and it's awfully difficult.
Monday July 24, 2006
01:42 AM

Extraordinary gentlemen

So, I have seen this movie, the league of extraordinary gentlemen. I hated it. No characters, merely puppets. Barely a plot. CGI and action scenes for action's sake. In one word, void.

That said, I liked very much all Alan Moore comics I've read -- the Watchmen, V for Vendetta, From Hell. So, tell me that the comic book is worth it and better than the movie. Please :)

Thursday July 06, 2006
01:12 AM

Propaganda for the people, by the people

People are getting good at manipulation of images. Here's two recent examples, thanks to the Internet.

First, a video made out of Bush speeches, remixed into a speedy version of Sunday Bloody Sunday. Secondly, a Liberty holding a cross.

Both are effective, shocking, memorable. Both work on the same principle: putting "opposites" together -- Bush and a pacifist song, Christianism and a symbol of civil liberties. But both have the same problem. They suppress any possibility of dialogue and argumentation, because they suppress that interval between "opposites": and I put "opposites" between quotes because Bush is much more complex than an anti-pacifist, and Christianism is much more complex than an anti-liberty ideology. Actually, reducing Bush to an anti-pacifist and Christians to supporters of theocracy is so caricatural is becomes ridiculous and plain false.

So those images are also manipulations. Effective and well-done manipulations, but not so far from propaganda. With the context, you can tell that the song is anti-Bush, and that the statue is pro-Christian. But put the very same statue in some museum of modern art and it becomes anti-Christian. Quoting 1984 again, war is peace, slavery is freedom: when the opposites are joined there is not place left for thought.

And that's why in the end I don't like those images.

Wednesday May 03, 2006
05:15 PM

New tuits

After some hard times (work related, mainly), I happy to announce I seem to have got some tuits back. Here's what I did this evening, implementing a new keyword, state, which is a Perl 6 thing and that appears in the latest perltodo manpage.

$ bleadperl -Mfeature=state -wle 'sub f { state $x = 42; print $x++ } f; f; f'

This, of course, brand new and subject to change; more about that in David Landgren's next wonderful P5P summary!

Monday February 13, 2006
05:06 AM

Indentation constraints and Python design

Interesting quote by Guido about the language design principles that guide python's evolution :

I find any solution unacceptable that embeds an indentation-based block in the middle of an expression. Since I find alternative syntax for statement grouping (e.g. braces or begin/end keywords) equally unacceptable, this pretty much makes a multi-line lambda an unsolvable puzzle. -- Language Design Is Not Just Solving Puzzles

(via LtU)

So, choice of basic grammar rules has an influence on language features -- nothing really new here. Perl 5 and Perl 6 have complex, expressive syntax, where blocks in expressions are familiar, because easy to do. That doesn't mean they're necessarily superior at every point of view. But that shows they're optimized for versatility; while Python's grammar is constantly changing, sometimes without ensuring backwards compatibility. In Perl 5 you can have idioms, or new programming paradigms (look at how Catalyst uses attributes for example), while being able to run Perl 4 scripts. That would be another advocacy point. Get the new cool stuff without throwing away the old one.

Thursday January 26, 2006
08:45 AM

Today's vim trick

Drop this in file ~/.vim/ftplugin/pod_podchecker.vim :

set makeprg=podchecker\ -warnings\ %\ 2>&1\\\|sed\ 's,at.line,:&,'
set errorformat=%m:at\ line\ %l\ in\ file\ %f

Then, when editing a .pod file, you can :make it; and then the command :cope will open a nice little window with all pod errors and warnings, correctly recognized, so you can jump on the corresponding lines in the pod source file only by selecting them.

Friday January 13, 2006
01:09 PM

Today's disgusted moment

Sometimes, language programming constructs are just objectively ugly. (Or do I do too much C programming ? No. I don't want to believe that.)
Monday November 07, 2005
12:01 PM


Ever wanted a man-to-POD converter? Such a thing exists, and apparently does a good job at guessing formats, from my first tests. It's called PolyglotMan. It can also convert man pages to html, latex, rtf, and other formats.

Funnily, on my Mandriva system, it comes as part of the xorg-x11 package :

$ rman --version
PolyglotMan v3.0.8+X.Org