Computers: May 2002 Archives
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.
We still lost, though.
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;Matthias suggested changing the first s/static/extern/ which works. *shrug*
static int foo = 4;
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.
As with writing, the key is to pick something and just do 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!
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.
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.
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!
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.
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!
I tracked it down to a difference between how the Window and Dialog classes were handling clicks. Window:
sub click {Dialog:
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;
}
sub click {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.
my($handled);
defined($handled = $self->callhook("click", @_)) and return 1;
_dialogselect(@_);
}
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.
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.
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. >:-)
"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.
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
- 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.