Friday May 02, 2008
01:13 PM
Cell Phone Lunacy
T-Mobile is my cell phone provider. I "upgraded" my old Nokia 6600 (four years old now, at least) to a Nokia 6263 for free. But when I got it, I found that -- with the exact same SIM card, same account, same network -- it would not run downloaded network apps like Google Maps.
This makes it subuseful.
So I call them up, and they would apparently rather have me return my phones and cancel my service altogether than give me a working phone. Oh they say they can give me a Blackberry, but it will cost more, and I don't want a Blackberry. And I would rather go phoneless than use a Windows phone.
So I need to either get this phone uncrippled, or find a new cell phone provider. Suggestions welcome.
Thursday March 20, 2008
02:20 PM
Oooo Sexy: Inline Comments
Comment replies in Slash, on use Perl and soon on Slashdot, if you have "D2"/"Dynamic Discussions" enabled, will now be inline, on the same page. Ajaxy goodness. Never leave the page to reply to an article or journal or comment. Click Reply, box loads in, type your reply, hit preview, then see preview, then hit submit, then new comment magically appears on the page.
Tuesday March 11, 2008
03:06 PM
Finding Lost Cell Phone
While travelling last week I had my cell phone out, and I set it down and couldn't find it when it came time to board. I looked all over and thought it was just lost. I couldn't pull all my bags apart, as I didn't have time while boarding, so it was still possible I had it. I figured, however, I would not give it up entirely until I tried one more thing to find it.
I had been using my Bluetooth headset thingy, and I knew it had plenty of battery, so chances are if it was in the bag, the Bluetooth was still on. So when I got into my next destination, I pulled out my laptop and did a Bluetooth device scan. Sure enough, there it was. Either it was in my bag, or the person who stole it was still nearby.
It was buried in my bag.
Cross-posted on <pudge/*>.
03:01 PM
Air Guitars and Rock Band
I got a message via YouTube last week from a friend of mine from high school. He apparently saw a video of mine up there and dropped me a note. I Googled him and it turns out he was the
2006 U.S. Air Guitar champion: Craig "Hot Lixx Hulahan" Billmeier.
So on Friday night I went out to play Rock Band (for Xbox 360) for the first time, and since it is similar to air guitar I mention it to him, and he lets me know he also worked on Rock Band. He did
motion capture (I am guessing he got the gig as a result of winning the Air Guitar championship).
He has a great picture someone took of us for the school paper, when we played together during lunch one time. We were playing a song, and I was singing, and me, Craig, and our friend Bryan Gray (from
The Blamed) are each playing a different chord at the same time. From such inauspicious beginnings, we've all gone on to do music in various capacities (all of them inauspicious in their own right). He said he'll try to get me a copy of the picture.
Cross-posted on <pudge/*>.
02:40 PM
Longest Intermission Evar Ends
I'm back! I hope you enjoyed the first intermission.
To commemorate the last episode of "The Wire," here's
my rendition of the theme song, which was written and originally performed by Tom Waits, though my song is sortof a cross between his version and Steve Earle's version with some vintage Randy Stonehill tossed in.
This is the Longest Concert Evar, starring Pudge. Send requests to concertrequest@pudge.net, or post them here.
Tuesday March 04, 2008
06:28 PM
Stupid File Size Calculations
I back up my PS3 to a USB drive, which has a FAT32 partition. The archive folder reported only 3.2GB, but there was about 7.2GB in use.
The Finder and
du both reported 3.2GB. I finally tracked it down to a file that is 4GB, but reports as 0. Most of the time. Note that even
ls -s gets it wrong, but
ls -l gets it right.
$ du archive2_00.dat
0 archive2_00.dat
$ ls -s archive2_00.dat
0 archive2_00.dat
$ ls -l archive2_00.dat
-rwxrwxrwx 1 pudge pudge 4294966784 Feb 21 22:21 archive2_00.dat
The Finder was
similarly confused.
Cross-posted on
<pudge/*>.
Thursday February 28, 2008
05:29 PM
*Really* Stupid Mac::Glue Tricks
I keep all my music in lossless format (unless acquired compressed, such as through iTunes Music Store), so I am guaranteed it will sound perfect on my home systems, and so if I ever want to re-encode, I have the originals: no need to re-rip.
I have a pair of Perl scripts that convert those lossless files to 128 kbps AAC for use on the iPods. The first script will mount the drive of the iPod computer over the network, and compress any lossless file (using Mac::Glue/iTunes) that does not exist on the remote drive, or if it does exist, if it was last modified since the modification date of the lossless file. It will also straight copy any non-lossless file, and then write out text file representations of my playlists.
On the remote computer, the original computer's drive is mounted, and the first thing it does is look to make sure that every file in its directories exists on the original drive. If not, it deletes the file. Then it goes through iTunes (again, with Mac::Glue) and removes any library tracks whose file is missing from the filesystem. Then it adds any files from the filesystem missing in the library, and finally, recreates the playlists.
So last weekend I ran the first program, then the second. I came back to find the entire iPod library gone. What had happened is that the mount failed somehow, but the directory for it was there, so it was looking for the original files in an empty directory, and deleting files that didn't match, which was all of them.
Oops.
So now I am recreating the whole library, which is a simple -- but very slow -- matter of re-running the first program, then the second. I estimate it will take about 3-4 days, running nonstop (it's a G4/867 doing the main encoding job), for about 8500 files, with maybe 6000 or so of those needing encoding.
Of course, I patched the second program to make sure that the mount point really is there. A simple matter of looking for the existence of a directory or file that will absolutely be there if the mount is correct, and will not be created by the program -- so should not exist -- if it is not.
I run the first program again. Everything is basically fine
... until my local hard drive fills up.
Same problem again, on the other side: the mount failed, and so it is copying files TO the wrong place: the local drive.
At least I didn't lose much time: I move those files out of the way, mount the remote drive, and copy them into place. Then I patch the second program in the same basic way, and run it again.
Hopefully it all works this time. I've run these programs many times over the last few years, and then two failures of the same type on different machines in the same week. Weird.
Cross-posted on <pudge/*>.
Friday February 01, 2008
08:20 PM
My Super Bowl Pick
When
last I made a Super Bowl Pick, I nailed it exactly.
My rationale at the time was basically that every Tom Brady playoff game to that point had been won, and by three points, except games against Indy and Pittsburgh; that the Pats had won every NFL game ever held in February; and that it wouldn't be very high scoring, but each team would get their knocks in.
A lot has changed since then. Brady has still never lost a Super Bowl, but he has since lost both a divisional playoff and conference championship game. They've won games against non-Colts and non-Steelers teams by more than 3 points. And they haven't lost in over a year, while racking up the most points ever scored in a season.
The first two Patriots games this season were won 38-14. Their average points for/against is 37/17 (36/17 including playoffs). While they have not been doing as well lately, having more problems than at the beginning of the season, I think the team is poised to break out the stomping boots. They'll generally control the Giants, who will have a few successful drives, but the day will belong to the Pats, 34-17.
Cross-posted on <pudge/*>.
Thursday January 03, 2008
08:32 PM
Net::Jabber (really, XML::Stream) Hates My Server
So I tried connecting our Jabber bot to our new Jabber server (OpenFire). It wasn't happy.
At first I thought it might be SSL, and after wrestling with that and many other things, I finally decided to randomly comment out things I didn't understand. Well, not randomly: one of the errors I kept seeing when I was pretty sure I had everything right was:
Can't use an undefined value as a HASH reference at /usr/local/lib/perl5/site_perl/5.10.0/XML/Stream.pm line 1165.But I don't know what the heck is going on in there. Poking around though, I see that
$self->GetRoot($sid) is returning undef, and right above that, there's a call to
delete($self->{SIDS}->{$currsid}). And
GetRoot($sid), in fact, accesses
$self->{SIDS}->{$sid}.
So I add in some print statements and see that, in fact,
$sid and
$currsid are the same.
So, I says to myself, comment out the delete call. And so I do. And so it works.
I don't know why that was necessary. And I should send this to the XML::Stream author. Tomorrow.
Cross-posted on <pudge/*>.
Sunday December 30, 2007
02:31 AM
Perl and Apache Upgrades for Intel Mac (Pain)
I have been using a MacBook Pro for several months, and I finally got around to upgrading Perl on it. I figured 5.10's release, and Christmas vacation, was a decent opportunity.
I ran into a lot of problems.
- First, note that my existing Perl/Apache installs were PPC. And this is an Intel Mac. And because some systems are not very careful about what they use to do things, I had to make sure I basically hid all the PPC things in my path. For example, a PPC perl in my path was used for part of the mod_perl build process, even though I used an Intel perl for the Makefile.PL, which caused some symbols to go missing.
- Similarly, the Apache config kept picking up a random library I had in /usr/local/lib, and throwing errors. So I finally figured I should just move all of /usr/local/bin and /usr/local/lib out of the way until I got everything built. I selectively brought things back later.
- But this was not my only problem with Apache. Oh, no. Apparently mod_perl 1.30 and perl 5.10 simply do not get along. I kept getting errors about bad file descriptors every time I tried to start Apache. I finally found discussion from p5p about it, from a few weeks ago, and used Andreas Koenig's patch for mod_perl, taken from Steve Hay's fix slated for mod_perl 1.31. This fixed the problem, apparently.
- However, apparently this patch only works for fixing non-threaded perl. So I then had to rebuild perl to be non-threaded. I had wanted to keep my perl config as close to the default Mac OS X build as possible, for binary compatiblity reasons, but it's not that important, I suppose, since 5.8 and 5.10 are not binary compatible anyway, and Mac OS X 10.6 (the first likely to use 5.10.x) won't be out for a long time. So, I don't need threads, and therefore, non-threaded it is.
- And then there was libapreq. I don't know how to properly solve this problem, but I kept getting errors about my_perl being undeclared in two functions, hooks for uploading files. As I don't use that functionality, I simply commented out the body of the functions. It was getting late.
- Most of the other modules were pretty smooth though. DBD::mysql kept looking for the mysql libraries in /usr/local/mysql/lib/mysql instead of /usr/local/mysql/lib. I couldn't see an obvious reason why, so I just added a symlink. Shrug.
- Also, Mac::Carbon had some errors in the tests. Those should be fixed, but I have a lot of other fixes to make before uploading a new version. More on that some other time. The broken test was for Mac::AppleEvents, and I even have a comment in there about how the tests were very likely to be broken. I was right!
- Mac::Glue posed a problem: the glue files are not byte-order independent. Maybe they should be, but that won't help me now. So I needed to rebuild all my glue files, which isn't a big deal.
- Also not byte-order independent: the "friends" field in the Slash database. Like the glue files, it uses Storable. I know there are ways to make it work, but I did not use those ways previously, so now I am stuck. For Slash, I just wrapped the thaw() call in an eval for now, but I'll pull that later, after I call the rebuild task.
- Speaking of modules, what got all this started was that I was trying to build XML::LibXML for my MacBook Pro so I could use XML::Atom to make posts from BBEdit to <pudge/*>. But building a PPC binary for an Intel machine ON an Intel machine turned out to be just too much for me. So I figured it was time to just start over.
- The CPAN autobundle worked pretty well, although after installing Bundle::CPAN and Bundle::Slash, I then took my autobundle and wrote a quick script around it to basically call perl -M$module -e1 and note any errors, and that way I could skip most of the bundle, since I am still using the pure perl version of many modules, that I already had installed, and I don't necessarily want to install every upgrade to every module, since some of them can break (cf. XML::RSS). Then I scanned the uninstalled/broken module results and installed any I wanted by hand.
- I make note here that Data::JavaScript::Anon is "still broken." Version 0.9 is broken, version 1.00 works, but CPAN still gives me version 0.9 unless I ask for 1.00 specifically, and so when I installed Bundle::Slash, I got the wrong one. But that has nothing to do with this, it's just Something Else.
Bottom line is that now I have Slash running on my Intel Mac with
native Apache 1.39, mod_perl 1.30 (with patch), and perl 5.10 (without threads), and the only brokenness -- that I know of -- that remains is missing functionality in Apache::Request that I don't use, and lack of thread-capable perl for mod_perl.
It was a long day making all that work, too. Dang it was long. Lots of futzing around. But I also now apparently have almost no more PPC apps running on a regular basis on my Mac: just Eudora. Which sucks. But not as much as every other mail app. I dunno, maybe I
should give Thunderbird another go. I hate that it is not a native Mac UI, but it's not like Eudora has a great UI either. Maybe I'll try Mail.app again.
Cross-posted on <pudge/*>.