Computers: May 2003 Archives

All Over Again

| | Comments (0)
Today, the head of SCO, Rael^WDarl McBride, said that they have several examples of cloned babies^W^Wthe Linux source code that were directly copied from other people^W^WSCO Unix. He promised to bring in expert doctors^Wprogrammers under NDAs to verify the accuracy of the claims, saying that the information cannot be released publicly, as this would violate the subject's privacy^W^W^W^Wharm their intellectual property^W^W^W^Wshow their claims to be completely baseless.

Now Playing: Our Lives - Phil Keaggy (Town To Town / Ph'lip Side / Play Thru Me)

use.perl.org
"Rendezvous music sharing...has been used by some in ways that have surprised and disappointed us," Apple said. "We designed it to allow friends and family to easily stream (not copy) their music between computers at home or in a small group setting, and it does this well. But some people are taking advantage of it to stream music over the Internet to people they do not even know."

So says Apple. I say, to anyone developing or managing this product who really is surprised by this, you lack understanding of your users and should be fired. That is a ridiculous statement to make.

Of course people are going to use it to stream to whomever. It's a no-brainer. What Apple, and any company would really cares to work in this "new age," needs to do is stop blaming the people who abuse the technology -- not that they are not deserving of blame, but it is unproductive to -- and come up with better ways to give freedom to users.

iTMS and the sharing in iTunes 4 are a good start, but if Apple thinks it is OK to take away freedoms because they may be abused, or to compromise on freedoms, they will end up regretting it. They can't solve the problem of widespread Internet sharing by taking away the ability of friends to share music. They can't solve the problem of copying by disallowing users to copy via iTunes. These things in the long run will make people use other systems that do allow more freedom. slashdot.org

iTunes Cleaner

| | Comments (0)
iTunes has a tendency to retain entries in the library to nonexistent files. Here is a little script to tell you which entries in your library are orphans (similar to the duplicate script I posted earlier, but a bit simpler, and on one line because that is how I did it). It optionally deletes them.

perl -MMac::Glue -le '$d = 0; $i = new Mac::Glue "iTunes"; for $t ($i->obj(tracks => library_playlist => 1)->get) { if ($t->prop("location")->get eq "msng") { print join " - ", map { $t->prop($_)->get } qw(name artist album); $t->delete if $d }}'

OK, here it is more readable:

use Mac::Glue;
 
$d = 0;
$i = new Mac::Glue "iTunes";
 
for $t ($i->obj(tracks => library_playlist => 1)->get) {
    if ($t->prop("location")->get eq "msng") {  # 'missing value'
        print join " - ", map { $t->prop($_)->get } qw(name artist album);
        $t->delete if $d
    }
}

It found three tracks off Primus' Sailing the Seas of Cheese album were disappeared. The files are not there. I have no idea why.

Now Playing: Tommy The Cat - Primus (Sailing The Seas Of Cheese)

use.perl.org

Hints

| | Comments (0)
I hate it when an online system requires me to use a "hint," in case I forget my password. First, I don't need a hint. I know all my passwords. I do not lose my passwords. Second, if I did lose my passwords, you can be damned sure I would lose my hint too, because: Third, if I make my hint easy enough for me to remember without storing it somewhere, it would be far too easy for someone else to find out the answer. And if I am going to store it somewhere, why not just store the password instead? use.perl.org

Mac-Carbon-0.52 Released

| | Comments (0)
Mac-Carbon-0.52 has been released. Download it from the CPAN or SF.net.

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

* v0.52, 22 May 2003
 
   Make Mac::AppleEvents return actual value, not pretty-printed value,
   as last resort (if you want a pretty-printed value, get it yourself
   with AEPrint, but we'll assume you want to do something useful with
   the data)
 
   Fix some memory leaks, sizes, and return values in Mac::Resources
   stuff from 0.50
 
   Overload NewAliasMinimalFromFullPath for Mac OS X, first converting
   the path to an HFS path (that is all that NewAliasMinimalFromFullPath
   knows)
 
   Add app creator type/signature to Processes/eg/Processes.plx output

Posted using release by brian d foy. use.perl.org

Mac-Glue-1.11 Released

| | Comments (0)
Mac-Glue-1.11 has been released. Download it from the CPAN or SF.net.

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

* v1.11, May 22, 2003
 
   Add super-cool feature for calling event methods on object
   specifier record objects (like $track->play).  See
   "Shortcuts for object specifier records" in the docs for
   more information.
 
   Updated some of the examples to use this new feature.
 
   Read-only flag in PODs was reversed.  It is recommended to re-create
   all your glues, or just realize that "read-only" means it is writable,
   and no note means it is read-only, in your old docs.  Or change them
   all by hand.
 
   Fix minor paths bug in call to Mac::Path::Util.  Require
   more recent version of said module.
 
   Added t/pod.t.

Posted using release by brian d foy. use.perl.org
Mac-AppleEvents-Simple-1.05 has been released. Download it from the CPAN or SF.net.

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

* v1.05, Thursday, May 22, 2003
 
   Add typeLongDateTime to AE_GET.
 
   Use Mac::Errors for internal errors.
 
   Added t/pod.t.

Posted using release by brian d foy. use.perl.org

Time-Epoch-0.02 Released

| | Comments (0)
Time-Epoch-0.02 has been released. Download it from the CPAN or SF.net.

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

* v0.02, May 21, 2003
 
   Forgot to add Test::More to PREREQ_PM.

Posted using release by brian d foy. use.perl.org
Devel-FindGlobals-0.02 has been released. Download it from the CPAN or SF.net.

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

* v0.02, May 21, 2003
 
   Forgot to add Test::More to PREREQ_PM.

Posted using release by brian d foy. use.perl.org
Devel-FindGlobals-0.01 has been released. Download it from the CPAN or SF.net.

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

* v0.01, May 20, 2003
 
   First release.

Posted using release by brian d foy. use.perl.org

Time-Epoch-0.01 Released

| | Comments (0)
Time-Epoch-0.01 has been released. Download it from the CPAN or SF.net.

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

* v0.01, May 20, 2003
 
   First release, about three years after writing it ...

Posted using release by brian d foy. use.perl.org
I love it when you can do something that just makes sense. All I did was make an AUTOLOAD for AEObjDesc objects so that it would use that object as the direct object of the parent glue's method of the same name, and it works so well in ways I hadn't even considered. I think that's a sign that it this is indeed a good idea.

The latest example -- setting the subject of a Eudora mail document -- is that this:

$eudora->set( $e->obj(field => 'Subject:', $mail), to => 'Alert!' );

is now this:

$mail->obj(field => 'Subject:')->set(to => 'Alert');

$mail is the direct object of the obj() method, and the Subject field of $mail (returned by obj()) is the direct object of the set() method.

Another example, moving word 8 of an AppleWorks document to after word 9:

$appleworks->move(
    $appleworks->obj(word => 8 => $text),
    to => location(after => $appleworks->obj(word => 9 => $text))
);

is now this:

$text->obj(word => 8)->move(
    to => location( after => $text->obj(word => 9) )
);

use.perl.org

Mac::Glue Syntax Revisited

| | Comments (0)
It hit me in the car today ... I had simplified this:

$itunes->get( $itunes->prop(location => $track) )

to this:

$itunes->get( $track->prop('location') )

But $track->prop('location') also returns an object just like $track (an Apple event object descriptor object, in the class Mac::AEObjDesc), so I can simplify it further to:

$track->prop('location')->get

That is so cool. I've always hated wrapping obj and prop calls in $glue->get(). I just have to think of a reason why this would be a bad idea, but it looks good to me, and works dandily. use.perl.org
I've been re-encoding MP3s to higher bitrates, and sometimes when I do, iTunes ends up with duplicates: separate entries in the Library that point to the same file on disk. Weird. So, I wrote a little script to find the duplicates.

    #!/usr/bin/perl
    use strict;
    use warnings;
 
    use Mac::Glue ':all';
 
    my $itunes  = new Mac::Glue 'iTunes';
    my $library = $itunes->obj(library_playlist => 1);
    my $tracks  = $itunes->obj(tracks => $library);
 
    my %tracks;
    for my $track ( $itunes->get($tracks) ) {
        my $path = $itunes->get( $itunes->prop(location => $track) );
 
        print $path, "\n" if $tracks{$path}++;
    }

Also, I keep looking for ways to make Mac::Glue syntax a little nicer, and so I also made a change this morning (I need to play with it a lot more before releasing it):

$itunes->get($tracks)

becomes:

$tracks->get

and:

$itunes->prop(location => $track)

becomes:

$track->prop('location')

That is, $tracks and $track both know their "parent" object, so with some AUTOLOAD magic, we can just use the parent's methods on the "child" objects. You can also do obvious things like $track->play instead of $itunes->play($track). w00p!

I just need to think on this more, though; for the prop method, $track becomes the last parameter to the method when $itunes->prop is called. But for $itunes->play, it would be the first parameter. For now, I am just making it so for obj and prop it goes last, else it goes first, but I might also be able to do some trickier things, if necessary, like looking up the class of $track and seeing which paramter of play accepts that class for its value. Must investigate. use.perl.org

Features

| | Comments (0)
I do not want new operating system or application features. I want the existing features to work properly. People talk about all the cool stuff in Mac OS X 10.3, and I just don't care, when iTunes is still breaking MP3s, my computer is still crashing if I forget to unmount a network volume before disconnecting the network, passwords with "@" in them don't work for remote Apple events, and the Finder is still slow and buggy all over ...

Great, so I will be able to have more transparent graphics. Yippee. I just don't care. use.perl.org

Mmmmm oon

| | Comments (0)
Tonight's lunar eclipse. Taken from Massachusetts with a Nikon Coolpix 995 from 10:10 p.m. to 11:12 p.m. Exposures at f/5.6 from 1/2000 sec. to 8 sec. It got a little fuzzy at the end, as the clouds began to roll back in. use.perl.org

Tapes

| | Comments (0)
I have a bunch of cassette tapes I'd like in my digital music collection; I need a way to streamline the process. I'll need to record them to AIFF, chop them into smaller songs, then convert them to MP3 and tag them. The slowest parts are chopping and tagging. I may be able to use a script freeside wrote (in the MP3::Info distribution) to tag some of the albums using the CDDB database. But I don't know what I am going to do about chopping the songs up. I guess get a sound editor and do it by hand. use.perl.org

Food Stamps For Thought

| | Comments (0)
I am of the firm opinion that the federal government should be a lot smaller, and that the federal government acts illegally every day when it does a lot of the "general welfare" things that the Tenth Amendment prohibits. People in favor of the status quo point to the "general welfare" clause of Article I, Section 8 of the Constitution, saying that this allows the federal government to do anything in regard to the general welfare. But that must be understood in light of the context, of the intent.

James Madison wrote in Federalist 45:

The powers delegated by the proposed Constitution to the Federal Government, are few and defined. Those which are to remain in the State Governments are numerous and indefinite. The former will be exercised principally on external objects, as war, peace, negociation, and foreign commerce; with which last the power of taxation will for the most part be connected. The powers reserved to the several States will extend to all the objects, which, in the ordinary course of affairs, concern the lives, liberties and properties of the people; and the internal order, improvement, and prosperity of the State.

The operations of the Federal Government will be most extensive and important in times of war and danger; those of the State Governments, in times of peace and security. As the former periods will probably bear a small proportion to the latter, the State Governments will here enjoy another advantage over the Federal Government.


If that is not enough -- some people still try to claim that regardless of what Madison said the purpose of the Constitution was, it does not nullify the blanket language of "general welfare" -- some dozen years later, in the The Virgina Report, he wrote:

In the "articles of confederation," the phrases are used as follows, in Art. VIII. "All charges of war, and all other expenses that shall be incurred for the common defence and general welfare, and allowed by the United States in Congress assembled, shall be defrayed out of a common treasury, which shall be supplied by the several states, in proportion to the value of all land within each state, granted to, or surveyed for any person, as such land and the buildings and improvements thereon shall be estimated, according to such mode as the United States in Congress assembled shall from time to time direct and appoint."

In the existing Constitution, they make the following part of Sec. 8, "The Congress shall have power to lay and collect taxes, duties, imposts, and excises, to pay the debts, and to provide for the common defence and general welfare of the United States."

This similarity in the use of these phrases in the two great federal charters, might well be considered, as rendering their meaning less liable to be misconstrued in the latter; because it will scarcely be said, that in the former they were ever understood to be either a general grant of power, or to authorize the requisition or application of money by the old Congress to the common defence and general welfare, except in the cases afterwards enumerated, which explained and limited their meaning; and if such was the limited meaning attached to these phrases in the very instrument revised and remodelled by the present Constitution, it can never be supposed that when copied into this Constitution, a different meaning ought to be attached to them.


I weep over the part about "rendering their meaning less liable to be misconstrued." use.perl.org

Mac-Glue-1.10 Released

| | Comments (0)
Mac-Glue-1.10 has been released. Download it from the CPAN or SF.net.

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

* v1.10, May 13, 2003
 
   Major update for Mac OS X support.
 
   Added various path handling/coercion for Mac OS X.
 
   Added support for making glues on Mac OS X, with bundles and apps
   without creator IDs.
 
   Added support for targetting apps without creator IDs (they are
   launched, then targetted by PSN).
 
   Use $MacError instead of $^E ($^E still works in MacPerl scripts).
 
   Added APPNAME key to glue objects, with name of the application.
 
   Added fun debugging junk with "_print_aes" object hash key.
 
   Refactored some code for scripts, moved out to Mac::Glue::Common.
 
   Command-line-ized the "droplets" in scripts/.
 
   Renamed and reorganized example scripts in ex/.

Posted using release by brian d foy. use.perl.org
Mac-AppleEvents-Simple-1.04 has been released. Download it from the CPAN or SF.net.

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

* v1.03, Monday, May 12, 2003
 
   Fix a test, update Makefile.PL.

Posted using release by brian d foy. use.perl.org

FBI Director

| | Comments (0)
Some of my moving boxes say "PESACANE - FBI DIRECTOR" on them. This is curious, and a bit ph33r-y. Could these boxes have graced the office of some former high-up government official, or assistant? Are listening devices embedded in the cardboard?

A Google search for those three words turns up nothing, but offers "pisacane" as an alternative spelling, which tells us about Catherine Pisacane, FBI (Fun Beyond Imagination) Director for Dover-Sherborn Regional Schools.

I don't know what is scarier: the prospect of having a box from the Federal Bureau of Investigation, or that the previous owner of this box can be found so easily. Or that someone thought it was a good idea to name an afterschool program "Fun Beyond Imagination" (and it is too late to get your application in; it was due May 2).

Now Playing: Brothers Under The Bridges - Bruce Springsteen (Tracks)

use.perl.org

Apple Stuff

| | Comments (0)
My PowerBook is broken yet again. The new one that I got a few months ago, replacing the one Apple broke. I put CDs/DVDs in it, and they are ejected after a few seconds, regardless of the OS I am using (even on boot). Sigh.

Sometimes I feel like a Microsoft user, that I am locked in to one vendor with no real options. At this point I would look elsewhere for a laptop if I possibly could. I can't, not without using what would be IMO a significantly inferior operating system. So I keep coming back for more abuse.

I am sure I wouldn't sound so bitter had my last experience with Apple repair not been so horrible. But now I am moving, and I was going to take my PowerBook on the drive across the country, but now I will probably have to send in the PowerBook for repairs at that time, since I can't really afford to send it in while I am working. I am seriously considering trying to send it in sooner though. It's just that the prospect of sending it in at all is so distressing, since I was without my computer for well over a month the last time.

And yet, here I am, still coming back for more: I ordered a 15GB iPod yesterday. Apple, please please please don't make me regret it. use.perl.org
I was playing with Mac::Glue tonight, working on getting it ready for release, and I tried to create a glue for iPhoto.

gluemac /Applications/iPhoto.app

iPhoto was not happy with this, and quit on me. The crash log said something about bad symbols in dyld. I eventually traced this to DYLD_LIBRARY_PATH, which I have set for OpenOffice.org and some other things; not in the GUI, only in the shell, so iPhoto starts fine from clicking on its icon, but not from opening from the command line etc.

It turns out that this path is used before dyld looks at the program's paths. I don't want that. I changed my .bash_profile to use DYLD_FALLBACK_LIBRARY_PATH instead, and it works fine now. use.perl.org

Lookup iTunes Cover Art

| | Comments (0)
Save this as a compiled script and put it in ~/Library/iTunes/Scripts/ and it will appear in your Script menu in iTunes (or call it outside of iTunes if you prefer).

tell application "iTunes"
    set currart to artist of current track
    set curralb to album of current track
end tell
tell application "Finder"
    open location "http://www.walmart.com/catalog/search-ng.gsp?sear ch_constraint=4104&search_query=" & currart & " " & curralb
end tell

Now Playing: Can't Stand Losing You - The Police (Every Breath You Take: The Singles)

use.perl.org
In Playlist Sharing, you don't get some of the information for a song, like the disc number, or the artwork. The playlist sharing window doesn't have disc number as an option for the information you can see in View Options. If you click Get Info you can see it. Weird. But worse is that if you stream the file, you don't get the artwork. It's right there embedded in the file, before the actual music; you'd think iTunes would/could pull it out.

Now Playing: Narcolepsy - Ben Folds Five (The Unauthorized Biography Of Reinhold Messner)

use.perl.org

More iTunes: itms

| | Comments (0)
If you install iTunes 4, it adds several new schemes to your list in Internet Config.

[pudge@bourque pudge]$ perl -MMac::InternetConfig -le 'print join "|", GetICHelper($_) for qw(itms itmss daap)'
hook|iTunes
hook|iTunes
hook|iTunes

(hook is the creator ID of iTunes.)

itms stands for "iTunes Music Store" and allows for links like the ones you see below. Click on the song title and iTunes opens to that song in the store; click on the artist or album and get that. Of course, small spelling differences can mess things up, and many songs/albums/artists are not in the store, but that's life in the big city.

I imagine that itmss is for secure transactions. daap is used for playlist sharing. Both itms and daap are being reverse-engineered; itmss is more difficult since you can't just peek at the TCP/IP traffic, seeing as how it is, you know, encrypted.

Now Playing: At The Zoo - Simon & Garfunkel (Old Friends)

use.perl.org
<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 May 2003.

Computers: April 2003 is the previous archive.

Computers: June 2003 is the next archive.

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