Computers: May 2002 Archives

Well, it's been a long week, but almost all the tests for MacPerl 5.8 -- thanks in large part to Jarkko Hietaniemi, Michael Schwern, Thomas Wegner, my three Heroes of Perl for the past two years -- are working now, including all of ext/ and lib/. ExtUtils tests are mostly failing (but can and will be ported) and there's a problem with Time::HiRes that I didn't get a chance to track down; but aside from a few long-standing bugs in MacPerl ($? values being useless, and a few other smaller problems), it's all set.

So this weekend I hope to get a release of MacPerl 5.8.0a1 out, on the heels of the 5.8.0 RC 1 forthcoming from Jarkko. This is an exciting time; perl 5.8 is really shaping up to be an excellent release -- perhaps the best .0 release in perl 5's history -- and it's the first perl release to have full support for MacPerl, as well as the first to have full support for Mac OS X (5.6.1 has support for Mac OS X, though there are a few problems with it).

So why are these men my heroes? Jarkko for his work on perl 5.8 in general, but specifically for the care he gives to "little" things other people might not care about, such as MacPerl support, and the manner in which he puts patches into the core (patch first, fix later (as long as the patch seems like a good idea)) which in my opinion really pushed things forward. He encourages people to participate in many subtle ways, and it's a good thing.

Schwern is my hero because of the extensive and good work he puts in on various projects, like MakeMaker, but especially the test suite.

Thomas is my hero because his help to me in porting MacPerl is invaluable. MacPerl would not be nearly as far along without his help. use.perl.org

Hockey

| | Comments (0)
I skated for the first time in six months last night. It wasn't as bad as I thought it would be. I thought I would be flopping all over the court, but I was actually effective and only got burned a few times, all because of the expected fatigue (which also wasn't as bad as I thought it would be).

We still lost, though. use.perl.org

Perl Conferences

| | Comments (0)
I am not going to be at TPC this year. I've been to every Perl Conference and North American YAPC thus far. It'll be kinda weird to not be there.

But not all that weird, since I'll be home with my family. :-)

Speaking of which, I do need to work on my YAPC slides tomorrow. use.perl.org

Encode

| | Comments (0)
Encode seems like a really cool module in many ways -- most of which I fully don't understand -- but it had a few problems on Mac OS. It made some assumptions about various Makefile things that didn't work, mostly, although its sheer size was also problematic. I fixed a few bugs in ExtUtils::MM_MacOS and special-cased a few lines in Encode's Makefile.PLs to work around idiosyncracies in MM_MacOS, and had to make it a dynamic library just for its size (so no Encode in 68K builds), but it is working now, and passes all tests.

Now all extensions in perl 5.8 -- those that can, anyway -- build on Mac OS. There's still tests to run on almost all of lib/ and ext/, and hopefully that will come this week (as I am also trying to do my slides for YAPC).

perl 5.8.0 RC 1 is due late this week, and I want to try to get MacPerl 5.8.0a1 out at the same time.

Update: Oh, and I forgot to mention, there was also a bug -- in both the Metrowerks and Apple compilers -- that would disallow declare-first-then-use-then-define variable declarations, so this construct -- used often in Encode -- bombed:

static int foo;
static int foo = 4;

Matthias suggested changing the first s/static/extern/ which works. *shrug* use.perl.org

Trees

| | Comments (0)
A landscaper is fixing our front hill at our house, finally. We are getting trees! We have a ton of trees, as our house borders the forest, but the developer ripped out the ones in front of the house etc. So we get a couple back.

We also had Invisible Fence installed for our dogs; they're learning how to use it now. Our oldest dog, Banjo, is having problems. He hates it, and gets confused easily. The middle dog is very smart and is getting it well. The youngest dog is stupid, but it's amazing what those shocks can do to make you "get it." :-) This summer we'll have a much nicer yard to enjoy, with the dogs essentially free to roam, and a nice-looking hill. use.perl.org

Work

| | Comments (0)
Sometimes I just can't work. It's like in that discussion on gnat journal where we discussed how to start writing. The problem is not exclusive to writing for me, but to most things. I have a lot I need to do, but can't get myself to do it.
As with writing, the key is to pick something and just do it. use.perl.org

MacPerl 5.7.3d1

| | Comments (0)
Come and get it! use.perl.org

Stupid Mac OS X AppleScript

| | Comments (0)
I moved all my MP3 serving to my Mac OS X box instead of the Linux box, set up Apache::MP3, etc. One thing I had left to figure out was how to update pudge.net with whatever I was listening to at the time. I wrote a subclass for Apache::MP3 called Apache::MP3::Log some time ago, which would catch the request, log it on my home page, and then handle the request as normal. But since I have my MP3s local now, I don't bother with Apache::MP3, I just use the Library in iTunes (which, despite iTunes' UI problems, is very fast and easy to use, once you get the hang of it).

So I went back to my old method of using a cron job. Write an AppleScript that spits out the info I need, write a Perl script that calls the AppleScript with osascript (command-line tool), parses it out, pushes it to the web server. Easy. Except that osascript -- as well as some other command-line tools -- doesn't like to talk to iTunes when called from something other than the current session. So cron, or telnet/ssh sessions, etc. can't do it.

I figured I would try talking to iTunes via AppleScript over the network, then. Instead of:

tell application "iTunes"

I have:

tell application "iTunes" of machine "eppc://127.0.0.1"

That should work, but it doesn't. It works from Mac OS 9, but not from Mac OS X. I try everything, to no avail. Finally, I find a "blog" entry through a Google search where someone had a similar problem. He did the same thing as me, though, except that he used eppc://user:password@127.0.0.1; I had been relying on the Keychain. This is where the light went on: I can't use this syntax directly, because my password has an @ in it. I try that syntax, using %40 in place of the @; still no love. So I change my password to something else. Ka-ching! It works. Bah! So now I can't have a certain password?

This is clearly a bug in Mac OS X somewhere (I suspect the AppleScript library, or somesuch, since it does work in Mac OS 9). Anyway, so I created a new user, set a more simple password, used eppc://pudge2@127.0.0.1, and when prompted for the password, I typed it in, and told the Keychain to save it for future use. Finally, it works. The cron job might still fail if I am not logged in, so the Keychain is inaccessible, but I am always logged in on this machine sitting on my desk, so no worries.

Update Darnit. The password thing is not working. There's something called AEServer which handles the requests, and it keeps dying and leaving zombie processes. Then I can't authenticate. I think that maybe the script is trying to connect to one of the zombie AEServer processes. Anyway, so now I've reverted to having two processes running; one an AppleScript application from my login session that writes the data out to a temp file every 60 seconds or so, and another the perl script from a cron job that reads that data and deals with it, instead of calling the AppleScript directly. Stupid Mac OS X AppleScript! use.perl.org
I integrated perl into macperl this morning with perforce, and noticed a discrepancy with regard to lib/Unicode/. My perl/ had no lib/Unicode/, only lib/unicode/. So I naturally assumed this was correct, and did some p4 wranglings to fix it. I branched Unicode into unicode and deleted Unicode (strike one: I deleted everything locally in the newly created unicode, because local p4 didn't see any difference). So I committed it all and was thinking about how to get the deleted files back when I jumped over to my Linux box and noticed these files were not in perl/lib/unicode/ at all. Just some empty directories. Scratch head.
Aha. macperl was right, and perl was wrong. At one point unicode was removed and replaced by Unicode, but the old unicode directory was left behind and populated with the new files destined for Unicode. Strike two. So screw it, I just delete it all and copy in the new stuff and commit. All I really needed to do was rename one directory locally, but a half dozen commits later, it's straightened out, mostly.
Sigh. And since I copied I lost all the filelog history. Strike three. Oh well. use.perl.org

Politicalamity

| | Comments (0)
The Democrats are annoying me. First they get mad that Bush is giving away to donors, amongst other pictures, a picture of himself taken on September 11. I cannot for the life of me figure out, from their words or from a careful examination, what is unreasonable or wrong about that. This is how politics works: you show your good side. On September 11 and in the aftermath, he did a good job. So what?
Now they are launching an investigation into why Bush didn't release information from August about the possibility of terrorist hijackings. Maybe it is because they had no specific information and they get information like that all the time. Hell, on September 16, five days after the attack, Cheney announced in an interview that they had this information, so it's not like they kept it a secret until now.
Attacking Bush for real problems is one thing, but just making stuff up is annoying. They seriously need to get a life. use.perl.org

160GB

| | Comments (0)
I ordered a Maxtor 160GB external FireWire drive yesterday. My new MP3/file server drive. I have about 22GB of MP3s and another 10GB of various software and media archives (like my archive of every Apple TV ad ever created, up through those Jeff Goldblum iMac ads). Now I can finish burning all my CDs. Yum.
Speaking of MP3s, I bought this little FM transmitter and broadcasted MP3s from my laptop to my car radio yesterday. Quality was so-so, but it is better than carrying around a ton of CDs, or listening to the radio. Yesterday I saw the SoundBug on ThinkGeek, which suctions to a window or other glossy surface and uses the entire surface as a speaker. I could attach it to my car windows! Yow! use.perl.org

ESR Has a Weblog

| | Comments (0)
Armed and Dangerous, the answer to Axis of Ævil. ;-) use.perl.org

ISP

| | Comments (0)
My ISP's performance on the cable modem has been really bad the last two days. So bad that I actually switched to my landline modem. I called them after getting no word back on my support email for many hours, and they said they are working on the problem. I finally get email response, and they ask if I could go to my Start menu (ha!) and run a traceroute/ping to isolate the problem. NO I CAN'T BECAUSE I HAD TO SWITCH TO MY LANDLINE MODEM. Ahem. use.perl.org
The SCOTUS today said that the Miller obscenity test is applicable to the Internet, upholding that portion of the COPA (Child Online Protection Act), by a measure of 8 to 1. I've been saying this would happen for three and a half years, but no one believed me. :-) One justice, Stevens, said the Miller test can't be used for the Internet, because community standards vary too much. While this is a problem with Miller, it's always been dealt with reasonably before.

The law still has to go back to lower courts for a handful of other tests, and it may die yet, but it's still alive, and the ACLU was smacked down, as I hoped they would be, on this important issue. use.perl.org

cpan-mac-plus

| | Comments (0)
No, this is not about running CPAN on a Mac Plus. Autrijus Tang is porting CPANPLUS to MacPerl. Autrijus is hero of the day! use.perl.org

The Sfio And The Bizarre

| | Comments (0)
So Matthias asked me, well, if we don't need SFIO for MacPerl's IO anymore, can we just not link with it it? I don't know, I replied, but ... doesn't SFIO provide our implementation of sprintf? I thought perl supplied sprintf now, he said. Sorta, I responded, but not for %e, %f, %g. Those are still handled with your local implementation.

I don't know if not linking to SFIO would cause other problems -- I'd probably need to fix a few things here and there, plus the MacPerl app still relies on it for one or two things -- but we need to link to it if for no other reason that we need it for sprintf. Yow! use.perl.org

Dialogs with popup menus

| | Comments (0)
For the longest time, dialogs in MacPerl could not have popup menus. Well, you could include one, but it wouldn't respond to clicks. If you wanted one, you needed to convert your Dialog into a Window, which means a lot more manual work to handle various things that Dialogs handle for you. So last night I decided to find out why.

I tracked it down to a difference between how the Window and Dialog classes were handling clicks. Window:

sub click {
    my($self, $pt) = @_;
    for my $pane (@{$self->{panes}}) {
        if ($pane->click($self, $pt)) {
            $self->advance_focus($pane);
            return 1;
        }
    };
    my($handled);
    defined($handled = $self->callhook("click", @_)) and return 1;
}

Dialog:

sub click {
    my($handled);
    defined($handled = $self->callhook("click", @_)) and return 1;
    _dialogselect(@_);
}

Popup menus were appearing via a pane, and the clicks were not being propogated down to the panes. Adding in the missing code to Mac::Dialogs::click(), popup windows now work in dialogs.

FWIW, I am making an über search, so that I can just type in a search term and select a search engine and it'll open my browser to the results, as described in my entry about Google searching. use.perl.org

New Server

| | Comments (0)
use Perl just moved to a new web server today. The DB didn't move, so there should be no migration issues with the data, just with the code. Let me know if anything is broken. And thanks to OSDN for their generosity in providing the machine. use.perl.org

PerlIO

| | Comments (0)
Wow. After some gentle nudging recently from Jarkko and Nick Ing-Simmons, I finally got around to trying to build MacPerl with PerlIO instead of SFIO. And sure enough, it worked. Amazing. Nick did remarkable work. PerlIO handles almost all of the IO perl needs. I just needed to redefine Sfio_t and FILE as PerlIO, and add dTHX to a few spots, and everything -- except for system() outputting to STDOUT -- is Just Working. All of the core test suite is passing as it should.

Sure, the system() problem needs to be fixed, but it will be. One bug -- so far; I suppose more could pop up -- in building with a new IO system on a completely untested platform is just impressive. And this particular problem is not in PerlIO anyway, but an expected roadblock we figured we'd need to address. Once more, great job, Nick. use.perl.org

MacPerl Bugfixes

| | Comments (0)
I closed out all of my outstanding high priority bugs for MacPerl, and have integrated the fixes into both branches. I have a few more assigned to Matthias (God bless him!), but now, as soon as I get time, I want to do a release of MacPerl 5.7.3.

I'll try to do some work on Encode too, if I can, at least enough to identify what problems may exist. And then when those other bugs are taken care of, I'll release 5.6.1r2.

Thomas Wegner has some GUI work I am going to include in 5.7/5.8 too, but that will be added a bit later (I just want to get it out right now). Also, I want to start using 5.7/5.8 regularly soon, but that will require new builds of certain XS modules. That's OK, Thomas will want to use the 5.7/5.8 betas too, sooner or later, so I imagine some of his builds he'll re-build for 5.8. >:-) use.perl.org

He's Back!

| | Comments (0)
Steve Carell returned to The Daily Show, after several weeks away. I was getting scared he might never return, especially when the only thing he's done on the show in weeks was a special "We Love Hollywood" from Hollywood with former Daily Show regular Nancy Walls ... but PHEW! He returned tonight for Even Ste(ph|v)en! use.perl.org
A far-right leader in the Netherlands was shot. Maybe it's just me, but I have seen recently a lot of rabid intolerance for people who have unpopular viewpoints, especially of those on the far right. Hating the ideas is translated to hating the individual who has those ideas. It's fairly sickening, far moreso than the ideas that are the object of the conflict in the first place. My primary hypocrisy is that I am intolerant of intolerance and hypocrisy, and killing those who are intolerant is the ultimate of both.

"If it was politically motivated, this criminal act shows to what extent certain hysterical positions like those shown by the French left over the past 15 days can incite hatred," Bruno Megret, head of France's right-wing National Republican Movement (MNR), told French news agency AFP.

He's right, you know. Except for the "left" part. It's a danger with any group that gets "hysterical" over the viewpoints of others, and this certainly is no limited to the left. Democracy is supposed to be about the free exchange of ideas. It's supposed to be a good thing when such bad, illogical, and evil viewpoints are brought to the fore, only to be defeated by popular opinion. That's a wonderful thing. Even better is when there is no clear viewpoint that's right or wrong, and the people get to hear both sides, and make informed choices. That's democracy. It's good. Silence is not. It's bad. use.perl.org

Hmmmmmm

| | Comments (0)
The note from the mailbox bomber sounds like Alex Chiu. I don't think it is him -- if for no reason other than that I don't want to be sued for slander -- but the resemblance is a bit odd. use.perl.org

Spam updates

| | Comments (0)
I first hit over 1000 spams in a month in December, 2001. Ah, the good old days.

In April I hit over 2500. I have more spams in 2002 than all of 2001, in just over one-third of the time. When I guessed that I would get 20,000+ spams in 2002, up from 7,000+ in 2001, I thought I was overly pessimistic. Now it appears I was underly pessimistic. Damn.

Spam by Month
 
1998-01 :   56 : #
1998-02 :   99 : ##
1998-03 :   61 : #
1998-04 :   68 : #
1998-05 :   90 : #
1998-06 :   92 : #
1998-07 :   79 : #
1998-08 :   48 : #
1998-09 :   49 : #
1998-10 :   68 : #
1998-11 :   83 : #
1998-12 :   64 : #
1999-01 :   75 : #
1999-02 :   96 : ##
1999-03 :   80 : #
1999-04 :  104 : ##
1999-05 :   64 : #
1999-06 :  104 : ##
1999-07 :  191 : ####
1999-08 :  182 : ###
1999-09 :  146 : ###
1999-10 :  152 : ###
1999-11 :  173 : ###
1999-12 :  163 : ###
2000-01 :  158 : ###
2000-02 :  170 : ###
2000-03 :  272 : #####
2000-04 :  220 : ####
2000-05 :  223 : ####
2000-06 :  284 : ######
2000-07 :  237 : #####
2000-08 :  238 : #####
2000-09 :  333 : #######
2000-10 :  359 : #######
2000-11 :  357 : #######
2000-12 :  294 : ######
2001-01 :  332 : #######
2001-02 :  326 : #######
2001-03 :  346 : #######
2001-04 :  480 : ##########
2001-05 :  528 : ###########
2001-06 :  497 : ##########
2001-07 :  628 : #############
2001-08 :  885 : ###################
2001-09 :  740 : ###############
2001-10 :  781 : ################
2001-11 :  814 : #################
2001-12 : 1077 : #######################
2002-01 : 1219 : ##########################
2002-02 : 1388 : #############################
2002-03 : 2064 : ############################################
2002 -04 : 2597 : ################################################## ######
2002-05 :  385 : ########
 
Spam by Year
 
1998 :  857 : ######
1999 : 1530 : ###########
2000 : 3145 : ########################
2001 : 7434 : ################################################## #######
2002 : 7653 : ################################################## #########
 
Total Spam : 20898

use.perl.org

Packages

| | Comments (0)
Wow. I am getting a lot of people telling me it is wrong/jarring/ungood/etc. to put "package Slash::SOAP::Journal" inside of a program. That I should put that code in a module instead, because, after all, it's a package!

Where do these people get such unreasonable ideas? use.perl.org

All Browsers Suck

| | Comments (0)
I like a lot of features of Mozilla, but it is unbearable for me. It is not Mac-like. Amongst other things:
  • It won't store passwords in the system Keychain, but in its own thing
  • It won't use helper apps for mail and FTP
  • It won't use Mac OS contextual menus
  • It doesn't use Mac OS widgets
    • Selecting text works differently (if at all)
    • Buttons and other clickable widgets behave differently
    • Everything is slower

There's more, but I don't want to belabor the point: it is not a Mac app, it is an app that runs on Mac OS. And I want a Mac browser.

MSIE is a good Mac app. But it crashes. And takes my whole machine with it. Some would say that makes it a REALLY good Mac app ...

Opera is a pretty good Mac app, but I don't know how actively they are developing the Mac version -- it's a full version behind -- and frankly, I dislike how it renders things. use.perl.org looks pretty bad in Opera, but looks fine in all my other browsers. And that's not the only site that has the problem. It's just weird-looking.

Netscape 4.x is not *very* Mac-ish, but it is Mac-ish enough. But it is also very old and crufty, and crashes quite a bit. It doesn't take my whole machine with it -- usually -- but it does crash too much. It is my fallback browser when my browser-of-the-month annoys me too much.

iCab is nice, though a bit underdeveloped. However, it is coming along nicely; it has HTTPS and Java and JavaScript. Supposedly. JavaScript support seems weak, still. Of course, that could be more a blessing than a curse. It's CSS support is much improved now over previous versions, which was really my big show-stopper. It doesn't understand file:/Volume/ URLs; only file://localhost/Volume/ or file:///Volume/. It doesn't use my cool new favicon.ico files. When I paste something, it puts a space after it sometimes. Oh well. All Browsers Suck. But for now I am going to stick with iCab, now that CSS support is good. use.perl.org

Slash::Gallery

| | Comments (0)
This web site is a great example of ... I dunno, something. It's cool. I wrote Slash::Gallery a few months ago to run my picture gallery (new baby pictures are up, by the way :-) and put the source online. Then this guy modified it and did a much better layout in the templates -- all quite easy to do, if you can do web layout -- and made it look really great. Hopefully he'll feed some changes back to me. :-) 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 2002.

Computers: April 2002 is the previous archive.

Computers: June 2002 is the next archive.

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