Computers: October 2005 Archives

For the Record

| | Comments (0)
That the lack of agreement between the embedded article and noun in the name "Busta Rhymes" continues to bother me to this day is not an indication that I am not hip. Those two characteristics of my personality are orthogonal. However, my use of the word "orthogonal" is another matter.

Shared Playlists

| | Comments (0)
Apple still won't learn that shared music is not evil music. iMovie and iPhoto have never worked with shared playlists in iTunes. iTunes doesn't even work properly with shared playlists: you can't get artwork from them, you can't use them with your "Party Shuffle," and so on.

And now Front Row too doesn't work with shared playlists. Because why would you want to keep your music on a central server and share it through the house, especially from a server to the computer connected to your TV?

Yes, I am well aware that I can use file sharing to load in the library, but that is lame for many reasons, most of which have to do with the fact that it is constantly more work to keep it running. The server goes down, you add new music on the server end, and so on. Multiply this by the several computers I might have connected to the server at once, and it's just not a good option.

Another problem with Front Row is that they don't show very many characters on the screen for the titles and such. I know they want to make it readable, and are considering low-res NTSC TVs, but I would use this on HD monitors. And it sucks.

My happening script, which runs in the background and sets my iChat status etc., generates neat pictures for the Mac OS X screen saver that look like this. I prefer this -- combined with IR remote control support for iTunes through Keyspan, and a Bluetooth mouse handy -- to Front Row for now.

Now Playing: Eric Clapton - Alberta
Games-Baseball-Scorecard-0.03 has been released. Download it from the CPAN or

(Note: it may take time for the release to propagate to the various download mirrors.)

0.03  Thu Oct 20 21:48:38 2005
    - Some syntax changes for play_ball
    - Add init() parsing/handling to play_ball (see example3.plx)
    - Put in some sanity-checking for outs, balls, strikes, and fouls
    - Make sure totals() can be called only once
    - Make sure that totals are properly tabulated even if a batter's
      totals cannot be printed
    - Allow pdfopen() to take a filename to open as an argument
    - Moved examples to examples/ directory, and added more

Posted using release by brian d foy.

Play or Retire

| | Comments (0)
People are making way too big a deal out of Tedy Bruschi's decision to return. He is not returning "too soon." The doctors say there is no medical reason to wait. People say he should wait, but there is literally no reason to. He has only two options: return to play, or retire.

No, he doesn't need to make that decision now, but he's made his decision: he will not retire. Since he has his decision, there is no reason to wait to implement it.

Mac-Apps-Launch-1.92 Released

| | Comments (0)
Mac-Apps-Launch-1.92 has been released. Download it from the CPAN or

(Note: it may take time for the release to propagate to the various download mirrors.)

* v1.92, Friday, October 14, 2005
   IsRunning() now returns PSN, which can be useful.
   Various functions check to make sure $Process{$psn} returns a valid
   value before trying to use it, which was causing some errors.

Posted using release by brian d foy.

Now Playing: Lost Dogs - Honeysuckle Breeze

Bruins Schedule iCal Script

| | Comments (0)
I fetched the CSV version of the Boston Bruins schedule, and then wrote this script to import it into iCal using Mac::Glue. Hooray.

Update: The CSV file has incorrect dates for when the time is past midnight, so it has games going from 10 p.m. on the 4th to 1 a.m. on the 4th. Oops. Also added quick DST calculation.

### first make empty "Bruins" calendar in iCal!
use strict;
use warnings;
use Date::Parse;
use Mac::Glue ':all';
my $ical = new Mac::Glue 'iCal';
my $bcal = $ical->obj(calendar => whose(title => equals => 'Bruins'));
my $bloc = location(end => $bcal);
my($dsts) = str2time('April 2 2006');
my($dste) = str2time('October 30 2005');
while (<DATA>) {
    next unless m{^(Boston Bruins (at|vs\.) ([^,]+)),((\d+)/(\d+)/(\d+),(\d+):(\d+):00 ([AP]M)),((\d+)/(\d+)/(\d+),(\d+):(\d+):00 ([AP]M)),};
    my($summ, $start, $end) = ($1, $4, $11);
    $start = str2time($start);
    $end   = str2time($end);
    $end += 86400 if $start > $end;
    my $adj = 3600 * ( ($start < $dsts && $start > $dste) ? 4 : 3 );
    $_ -= $adj for ($start, $end);
#    printf "%d : %s : %s : %s\n", $adj, $summ, scalar(localtime $start), scalar(localtime $end);
#    next;
        new => 'event',
        at  => $bloc,
        with_properties => {
            summary    => $summ,
            start_date => $start,
            end_date   => $end,
#Subject,StartDate,StartTime,EndDate,EndT ime,Alldayevent,Reminderonoff,ReminderDate,Reminde rTime,Description,Location,Priority,Private,Sensit ivity,Showtimeas
Boston Bruins vs. Montreal,10/5/2005,7:00:00 PM,10/5/2005,10:00:00 PM,FALSE,TRUE,10/5/2005,12:00:00 PM,,TD Banknorth Garden,Normal,TRUE,Normal,0
Boston Bruins at Buffalo,10/7/2005,8:00:00 PM,10/7/2005,11:00:00 PM,FALSE,TRUE,10/7/2005,4:00:00 PM,,Away,Normal,TRUE,Normal,0


| | Comments (0)
For years we've had these things called "formkeys" in Slash, which are small tokens that sit in a form and make sure you can't submit a form without getting one first. It's tied to your account or IP address, and you can't use a form without one.

Also, formkeys allowed us to easily make sure you have not used a form more than $n times, or more often than $x times in $y seconds, and so on. It helped us curb lots of different sorts of abuse.

Well, formkeys have lots of problems, including that they were hard to use (and so often were not used), could be abused by exploiting lack of atomicity, were hard to add new checks to, and so on.

So enter reskeys. A reimplementation of the same basic idea.

You have a resource (say, journal) and that resource has certain requirements: you must be a registered user, with seclev greater than 0; you cannot use more than 30 forms in four hours; you cannot submit more than one journal every 30 seconds; and so on. Each of these checks is implemented by a class, and a table in the database keeps track of which classes to check in order to create reskey (get a new form), touch a reskey (preview the journal), or use a reskey (save the journal entry). And a bunch of variables are defined in another table, which are used by the classes.

So to use reskeys in the code, you just add those rows to the database tables, then call my $rkey =$reskey->key("journal") in your code, then call $rkey->create (or touch, or use) as appropriate. Call [% PROCESS reskey_tag %] in your form. And if there's an error (because the call to create/touch/use returned false), call $rkey->errstr to get the error string to show to the user.

Simple and neat. So now Zoo and Journal are ported to Slash::ResKey. If this journal entry gets posted, it means SOAP is working with it, too. And if you get any problems about invalid resources etc., do let me know.

Stupid Words

| | Comments (0)
I hate the word "blog." But really, it's no worse than "movie." That's probably one of the dumbest words in the English language, and it's not going anywhere.

MLB Should Drop Fox

| | Comments (0)
<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Archive

This page is a archive of entries in the Computers category from October 2005.

Computers: September 2005 is the previous archive.

Computers: November 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.