Finding my computer

A couple of days ago I replaced my computer at work with a new one. This morning, working from home, when I tried to log in, it didn't respond.

I realized promptly that I had forgotten to ask the sys admin to update the MAC address on the DHCP server and so it just got some random IP from the pool.

Perl 5, Perl 6, Perl 7, Perl 2013, whatever

It seems people outside our community sees Perl as an stalled language because we have not released a new mayor version for so many years. We have to do something to show them they are wrong, right?

Well, no, maybe the problem is ours, unable to see what we don't want to see: They are right. Perl 5 is stalled.

Stevan Little has already described the situation quite well on Perl is not dead, it is a dead end. The funny thing is that it is mostly the ="…

Solving Carl Mäsak's "Counting t4 configurations" problem... in pure Perl 5

The problem: Counting t4 configurations

The solution:

$ time perl 
total: 4783154184978

real    0m0.185s
user    0m0.176s
sys     0m0.004s

The code:


use strict;
use warnings;

my $tab = <<EOT;

my $vertical = index $tab, "\n";
my $diagonal = $vertical + 1;

my $acu = { $tab => 1 };

for my $ix (0 .. length($tab) - 1) {
    my %next;
    while (my ($k, $c) = each %$acu) {
        my $s = substr($k, 0, 1, '');
        $next{$k} += $c;
        if ($s eq '-') {
            my $k1 = $k;
            if ($k1 =~ s/^-/x/) { # horizontal xx
                $next{$k1} += $c;
                if ($k1 =~ s/^x-/xx/) { # horizontal xxx
                    $next{$k1} += $c;
            $k1 = $k;
            if ($k1 =~ s/^(.{$vertical})-/${1}x/os) { # vertical xx
                $next{$k1} += $c;
                if ($k1 =~ s/^(.{$vertical}x.{$vertical})-/${1}x/os) {  # vertical xxx
                    $next{$k1} += $c;
            $k1 = $k;
            if ($k1 =~  s/^(.{$diagonal})-/${1}x/os) { # diagonal xx
                $next{$k1} += $c;
                if ($k1 =~ s/^(.{$diagonal}x.{$diagonal})-/${1}x/os) {  # diagonal xxx
                    $next{$k1} += $c;
   $acu = \%next;

my ($k, $c) = each %$acu;
print "total: $c\n";

My English stinks, thank you for patching it!

As a non native English speaker, writing good documentation is a hard task for me and often grammatical and spelling errors slip into my modules pod causing me great embarrassment.

I could use the spell checker more often*, but writing documentation is already a time consuming task, no fun, and well, I am lazy. In any case, that would not solve the grammatical errors.

The thing is that from time to time somebody sends me a patch correcting some of these errors and I want to say publicly how much I appreciate that kind of contribution.

A special mention goes to the Deb…

Yahoo is dropping my emails

It seems that over the last days, around 20% of the mails I have sent from my account did not reached their destinations, didn't I get any notification about the failure.

If you were expecting a reply to some particular mail from me and didn't got anything, you are probably one of the "lucky winners". Just ask for your reply and I will resend it!