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 ]

Simon (89)

AOL IM: lathosjp (Add Buddy, Send Message)

Busy Man.

Journal of Simon (89)

Wednesday June 19, 2002
10:35 AM

Great Minds Think Alike.

Today Arnar Hrafnkelsson asked my opinion on a module he'd been working on called Regexp::Open. It's neat, it's a state machine implemented in C with an XS interface to it. I took a look at it and realised the concept looked a little familiar.

He was just telling me about how he could use it to dynamically change the state machine at runtime when I pointed him at the shishi repository...

Tuesday June 18, 2002
08:10 AM

People are ingenious

On the Perl course I'm doing, I give out a lot of programming assignments. Last week, people wrote something to get five names and favourite colours from the user, stored each one into a hash, and then wrote out the hash as a colon-delimited file.

This week, I showed them about split and asked them to write something to read the hash back in, and prompt for a name, then display that user's favourite colour. One of the students - a bright girl - said "Why should I use a hash?" and came up with something like this:

use strict;
open IN, "favourites.txt" or die $!;

print "Who do you want to know about? ";
my $input = <STDIN>;
chomp $input;

while (<IN>) {
    my ($name, $colour) = split /:/;
    if ($input eq $name) {
       print "$name's favourite colour is $colour\n";

What can you say? It's decent code, it fulfils the spec, it just wasn't exactly what I had imagined. Ah, the fun of TMTOWTDI...

Monday June 17, 2002
12:57 PM


This is not a pointed question; I honestly don't know the answer.

The reason the US government publically gives for moves against Iraq and Saddam Hussain is that Iraq is trying to develop "weapons of mass destruction" - nuclear weapons. Developing nuclear weapons is obviously a big no-no, which is why Iraq had to have the UN weapons inspectors in.

If this is the real reason (which I really doubt that it is) then why didn't America send the boys in when India or Pakistan went nuclear? And what goes on in the minds of these government folk that they can simultaneous believe that developing nuclear weapons is such a venial sin that we ought to go and assassinate the President, but the fact that the US already has nuclear weapons is good and proper? Obviously it's a flimsy excuse, but why has nobody called them up on it?

03:41 AM

Semantic ambiguity

"Free to good home - Baby carrying rucksack"

Sunday June 16, 2002
04:33 PM


ActiveState are now apparently profitable; much of this can be explained by their shift towards Python support and services.

The phrase "snake oil" takes on a whole new meaning.

02:52 PM

What trouble a few careless words can cause.

I have agreed to become a children's church assistant. (Which is obviously the PC version of "Sunday school teacher".) You are free to imagine your favourite BOFH attempting humility, patience and kindness towards a bunch of screaming five-to-thirteen year olds.

Saturday June 15, 2002
02:01 AM

Synopsis 5

This didn't get much attention, so here's another mention of it.
01:58 AM

Thanks, Gisle!

LWP rocks. We all know that. But when was the last time you sat down and thought about the fact that someone actually coded it, rather than it being the gift from above it might behave like?

01:29 AM

Dream or nightmare?

You can tell it's a nightmare if it has clowns in it.

Friday June 14, 2002
06:16 AM



Call me a boring young fart, (but you knew that already, right?) but I'm still amazed how many people can copy a mildly amusing idea and still think they're being original and amusing.

So you can do source transformation. Good for you. Don't people have either better or at least more amusing things to write? I guess not.

It's getting even more tedious than quoting the Four Yorkshiremen.