SpeedSnail! Where are you?

I got a fish tank a year or so ago. It’s one of those Back to the Roots garden tanks that support a betta and three plant buckets. We had an alge problem, so we added a snail. He gets around a lot, so we call him the SpeedSnail.

(The fish is Fish Stick. It’s what was for dinner the night we brought him home.)

Yesterday, I noticed that the tank walls were getting a little brown. I decided today was the day to clear the counters and do some maintenance on the tank. The first part of that maintenance is to take out the plant pots.

So, I take out the middle pot. The roots are a little long, but not bad. Take out the far left pot. That one is ew and I may need to invest in new growth rocks. Then comes the one with the spider plant in it. This was an experimental plant. I look in the pot and notice one of the rocks looks strangely smooth. And round.

We collect shells. I have several snail shells from various beaches and our yard. So the obvious first thought is, “who put one of the shells in there?”

Then I look at the tank, and all the alge. I look at the tiger-striped shell in my pot. And SpeedSnail took a quick trip back into the tank.

He must have climbed up the feeding tube, gotten across the rocks, and discovered there was no water up there. He sealed himself up, and waited for the water to come back.

I watched him for a while before I left to meet Quinn for lunch, and spotted him sneaking a peak from inside his shell. When I got back to the house, he was busy hoovering up alge as fast as he could.

So, the snail had an adventure. The tank will get nice and clean again. FishStick can make aggressive moves against a tank-mate that can’t care less about what he’s doing.

All is well.

I Mustache You a Question

Sergeant Rasmus Madsen Løvik
Sergeant Rasmus Madsen Løvik, police constable in Bergen, Norway 1843

A project elided

After a few too many close calls, I approached the town about making our street and another into one-way lanes.  A counter-clockwise, 1.7 mile loop around the lake.

SilverLake, Wilmington MA
Silver Lake, bounded by Main, Lake, and Grove

The town said “no” for some very good reasons.  I knew they would, but I had to give it a try.  They paid the courtesy of taking it seriously, giving me a meeting with various officials, and explaining the reasons.

I had put an actual proposal together in case this went further.  I include it here for posterity.  Read it here: Better Traffic Around Silver Lake

Anchors Aweigh!

Living where we do, with a high water table, houses are obligated to have a large hole in the floor of the basement called a “sump“.  For those lucky enough to not know, a sump’s job is to collect groundwater before it seeps up through the floor of the basement.  You then evacuate the water with a pump, colloquially (and quite logically) known as a “sump pump”.

A sump pump is a replaceable part.  The typical lifetime is supposed to be around ten years, give or take.

We last replaced our pump in 2014.  I purchased a replacement unit from “Watchdog” that proclaimed it’s longevity, speed, and reliability.  This is that same unit, a mere five years later:

decrapitated watchdog sump pump
Notice the hole in the side of the housing. It was not there when I purchased and installed the unit.

The unit continued to work in some condition, until it didn’t.  It completely failed during a heavy December rainstorm this weekend.  I came into the basement early Saturday morning to find ankle-deep water on the floor.

Woe unto the person who does not have a water alarm or redundant standby sump pump.  That person would be me.

The pump is now replaced with a unit from a different manufacturer.  Hopefully this one stands up to the elements a little better.  We’re working on a water alarm as well.

She’s the boss

At least most of the time. You’ll notice the bed (its posturepedic), the two blankets, and how they are artfully arranged.

This is the only way she’ll sleep if we’re home.

Dog cuddled on a dogbed, covered by two blankets, with her tongue sticking out.
She’s derping, too.

Winter, New England Style

Ah, winter in New England. Go home, winter, you’re already drunk and it’s barely December.

Last week we had a snowstorm and we were home-bound for three days.  School was cancelled on Monday and Tuesday.  I worked from home both days and slowly dug out in the afternoons.

Snow on the back deck
We finally leveled out with over a foot of snow

A week later, temperatures reached 60° F.  I was walking around in shorts and flip-flops.  (I might be weird, but you have to admit that it wasn’t weather-inappropriate.)  The clouds dropped two inches of water on us.  With nowhere for the water to go, there are puddles and ponds everywhere.

Last night, the temperature rapidly dropped, the rain turned to snow, and we got a couple or more inches.  At least the end of the day cleared up with some sun.  The snowmelt, which became treacherous as night fell, was downright beautiful for a while.

Ice caught in mid-freeze
This water on the back of my car hadn’t finished freezing when I walked by.

Tonight, as I left the house to take the dog for an icy, slippery walk, I saw signs that we had some visitors during the day.  A hawk snatched a meal from our front yard.  Meghan left our Thanksgiving bundle of corn out for the birds and squirrels; it seems that we’re feeding the whole neighborhood instead.

Imprint of hawk wing in snow
Some small animal and a hawk came to our front yard expecting a meal. Only one of them was disappointed.

By this weekend we’re expecting to be back in the 50s with more rain.  The rollercoaster that is our local weather continues.  Whee!

Its been a while

I haven’t been posting much lately. Lets see what I’ve bee up to:

  • I’ve repaired 6 Chromebooks this week. There will be more tomorrow.
  • Apple is replacing a damaged iPad because I am wicked polite and prepared with documentation.
  • I’m not going up the 20′ ladder. Just no.
  • I’ve finished yet another stocking, except for the name. I’m putting it off because I’m not sure about placement. Probably, I should make it easy to remove and change if they want to.
  • Accidentally ruined my favorite hiking boots.
  • Took some pictures.
  • Knit a hat.
  • Bought Christmas cards. I’ll start filling them out as soon as I’m done with the stocking.

All in all, life has been pretty good!

Perl: Spaces in a function or method name

I accidentally stumbled over an interesting ability/quirk in Perl: a subroutine / function / method name may contain spaces. Since I couldn’t find any info about it in the perlsub man page or on Google I decided to write it down.

It should be obvious that you can’t create such a subroutine by defining it the traditional way, but in case it isn’t: you can’t. Perl will consider the first word to be your subroutine identifier, and the following word(s) to be invalid keywords.

use strict;

sub name With Spaces
{
    print "works!\n"; # liar, doesn't work
}
Illegal declaration of subroutine main::name line 4.

NOTE: the following examples were tested in Perl versions 5.8.8 (circa 2006), 5.14.2 (circa 2011), and 5.28.2 (circa 2019).

To create a method name with a space, you have to manipulate the symbol table directly. (Indeed, I figured it out by accident thanks to an AUTOLOADed method that did that.)

sub AUTOLOAD
{
    my $self = shift;

    ( my $method = $AUTOLOAD ) =~ s{.*::}{};

    if ( exists $self->{_attr}->{ $method } ) {
        my $accessor = sub { return shift->{_attr}->{ $method } };

        {
            no strict 'refs';
            *$AUTOLOAD = $accessor;
        }

        unshift @_ => $self;
        goto &$AUTOLOAD;
    }

    return;
}

Stated more simply:

my $name = "name With Space";
*$name = sub { "works!" }; # insert directly to symbol table

Utilities like Test::Deep “just work” if there’s a space:

cmp_methods( $obj,
             [ 'name With Space' => 'value' ], # not a peep!
             'Basic methods'
            );
ok 1 - Basic Methods

The obvious question, though, is how to access it directly?

You can access a method using a variable, which is a pretty common thing to do on it’s own. (In my experience, anyway, YMMV).

my $name = 'name With Space';
my $value = $obj->$name; # works!

You can also create a reference to a string and immediately deference it.

my $value = $obj->${ \'name With Space' }; # works!

The second example works with regular function calls as well. Here’s a stand-alone example:

use strict;

{
    no strict "refs";
    my $name = "name With Space";
    *$name = sub { "works!" };
}

print ${ \"name With Space" }, "\n";' # prints "works!"

I can’t recommend creating subroutines with spaces in the name as good style, but it’s helpful to know that it can happen and how to work with it when it does.

Highlight of the Day

Meghan and I just heard an MBTA commuter train sound out “shave-and-a-haircut” on it’s airhorn.