2013/12/16

Non-exhaustive checklist of signs you have failed your Christmas decorations

If you meet any of the following conditions, you have failed:

Your lights are all one colour

You might think that uniform colours look really IN and DESIGN. I think uniformity is contemptable and that designers need to relearn their colour charts. Seriously, guys, there are more colours out there then white, grey and black.

You have blue lights

The blue lights that came out a few years ago are the colour of death. Where Christmas lights are normally gay fun things, the blue lights suck fun out of your hearts, leaving only sorrow and loneliness.

You only have blue lights

What are you, a 16 year old goth girl who thinks all life is suffering and misery? Did you hire a Dementor to do your decorations?

Your lights are flashing

I could go with an epilepsy joke here but it isn't fit. What I hate about flashing lights is that they aren't random. They have a steady duty cycle, but each controler has a different duty cycle. This means every once 4-5 minutes or so they all sync up and this distracts me to no end.

Your lights imitate icicles

Not only because they are probably all white, but also because real icicles are an annoying sign your roof insulation needs to be fixed.

You don't have enough lights

A half-assed effort looks half-assed. Is half a Christmas going to be fun? Half a Christmas tree? Half of the plum pudding? Half the bottle of rum? OK, so that last one would be fun. At least until the next morning.

You have far to many lights

Even if having your front lawn as bright lit as a prison yard pleases you, please think of our telescopes, vital to the national interest and how light pollution is rendering them useless.

2013/12/13

Fun with perl

Want to help me out? Run the following code:
#!/usr/bin/perl

use strict;
use warnings;

use Data::Dump qw( ddx );
BEGIN { ddx "DIE=", $SIG{__DIE__}; };
use Test::More tests => 1;
BEGIN { ddx "DIE=", $SIG{__DIE__}; };

diag "Perl: ", sprintf "%vd", $^V;
diag "Test::More: $Test::More::VERSION";
pass "one test";

What do you expect $SIG{__DIE__} to contain? Acceptable answers are undef, "" and "DEFAULT". And the answer varies according to what version of perl and what version of Test::More you are running.

Example output:

# DIE=""
1..1
# DIE=sub { "???" }
# Perl: 5.004_05
# Test::More: 0.47
ok 1 - one test
# die:7: ("DIE=", undef)
1..1
# die:9: ("DIE=", "")
# Perl: 5.8.8
# Test::More: 1.001002
ok 1 - one test
# die:7: ("DIE=", undef)
1..1
# die:9: ("DIE=", undef)
# Perl: 5.10.1
# Test::More: 1.001002
ok 1 - one test
1..1
# -:9: ("DIE=", undef)
# Perl: 5.16.2
# Test::More: 1.001002
ok 1 - one test

And yes, I know 5.004 dates from the previous century.

No fun

Trying to get Percona Server 5.6 to work with SphinxSE 2.1.2 was no fun. First off, it used to be that SphinxSE would create a load of .so .la, .a files. Now it just needs ha_sphinx.so. Second off, you have to execute INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'; This requires grant tables to be on (I generally have them off because it's less trouble and I have networking turned off in MySQL anyway, unless I have replication going). At least this is saved into mysql.plugin so I don't have to do it each time I restart mysqld.

And then, when I get it all set up, I get the following error

ERROR 1429 (HY000): Unable to connect to foreign data source: failed to resolve searchd host (name=localhost)

I'm WTFing just about as hard as I can right now. localhost is in /etc/hosts. It is also in my DNS server. Has MySQL gone insane? Percona? I'll blame Oracle, because they are just mean.

The solution, of course, is ALTER TABLE sphinx CONNECTION='sphinx://127.0.0.1:9312/YCUR';.