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';.

2013/10/03

This is what the big boys call uptime.

~ (fil@billy:)$ uptime
 16:07:57 up 1064 days, 16:08,  1 user,  load average: 0.02, 0.06, 0.08
Close to 3 years !

2013/09/19

Taxes and programming.

Just a short and silly note to point out that Canada no longer has piggy-backed sales taxes. PEI and Québec used to calculate provincial sales taxes on the sub-total of sale + the GST (hence the term piggy-back). This led to annoying special code. Well, annoying to programmers at least.

But Québec moved to PST+GST on the January 1st 2013, and PEI moved to HST on April 1st, 2013.

2013/07/01

World's smallest chat

I was goofing around and someone set up a Linux VM and invited everyone to log in over ssh. I think his goal was to make a bullet-proof Linux setup. Something that would withstand users deliberately trying to bring the computer down.

BTW, the world's smallest formbomb is

:(){ :|:& };:
But you protect against it by putting soft and hard limits on the number of processes via limits.conf.

Anyway, back to the fun and games. The admin had removed wall (for obvious reasons) and didn't have a talkd. This meant we couldn't talk to each other. So I cooked up the World's Smallest Chat.

In one window, you start the chat with

echo "First line of chat" >/tmp/chat
chmod og+rw /tmp/chat

Then in another window:

tail -F /tmp/chat

Everyone can post to the chat with

echo I don't think so >/tmp/chat

However, anyone can DOS the chat with

yes >>/tmp/chat

But given how this is a chat in 4 lines of code, I don't see that as being a problem.

2013/05/22

Breaking news

The new CPU means that Corey is now fast enough to play CBC.ca/sports HD hockey stream full screen, at 27 inches. This is a huge change from the postage stamps I had when I first started watching streaming hockey.

To bad Ottawa is being blown away by Pittsburg.