August 2002 Archives
When the iPod was released, I bemoaned that it had no wireless connectivity. But now that iTunes will have Rendezvous capability -- share your playlists with any other Mac on the LAN, automatically -- I wonder if a wireless iPod isn't around the corner.
Imagine, having an iPod that just automatically picked up the playlists in the general vicinity. It's a new form of wardriving: walk around the city and steal^Wlisten to other people's music!
Let me state a couple of ideas to cut through some of this crap:
- We should only attack Iraq if it is necessary to do so to protect ourselves or our allies; in other words, only if an attack by Iraq is in process, or imminent.
- In such a case, where an attack is in process or imminent, approval by allies or backing by a coalition is moot.
All this about when we should attack is crazy talk, unless there is the possibility of us attacking unnecessarily. If someone is questioning whether now is the right time to attack or not, the answer is No. When it becomes necessary, we should attack. And not before. People talking about coalitions are sidestepping the real issue.
The question is, though: is Iraq attacking?
Part of the problem is that I don't believe for a second that Iraq is going to directly attack the US or its allies. If they did today, they would be gone tomorrow. As noted, we won't wait for allies or coalitions in such a case. And we won't hold back our wrath. So what's the issue?
I think that Iraq is most likely behind much of the terrorism against the US, Israel, and much of the West, including the first WTC attack by likely Iraqi agent Ramzi Yousef, and perhaps even the September 11 attacks, that Iraq is providing weapons, money, and in some cases personnel, and that Iraq is working hard to keep evidence of its involvement in these matters secret, so it is difficult for the world to make a case against it. And I think that the US government is scramnbling furiously to get the scarce evidence together.
Whatever the case, I think it's unreasonable for the US to go to war without providing the evidence to its people. But even if the evidence is provided, unless Iraq is actively engaged in attacks against the US or its allies, a military strike against Iraq is unreasonable; and if it is engaged in such attacks, the US has every obligation to respond militarily. The evidence is the key.
Who's Who seems pretty stupid to me though. If you are really someone "important," you don't need to be in the book; if you aren't someone "important," then you don't deserve to be in the book. In theory, anyway. In reality, anyone who gives them money to have an entry published is "important."
Microsoft has released a remote desktop app to allow users of OS X to connect to Windows Servers running terminal services. This is rather a nice little app and runs natively in X. I had been using RDEsktop running under OroborOSX, but this runs nativley and has a rather small footprint.
He mentions both Mac OS X ("OS X") and X11 (via OroborOSX, a frontend to XFree86 for Mac OS X). From the context you can guess he intends "X" to refer specifically to Mac OS X, but noticing he was talking about X11, I at first assumed he meant X11. Maybe "OS X" is specific enough, though I think it's lame shorthand (like "'nix"), but "X" is not acceptable at all. :-)
I found out I could change single entries under Classic, via the Internet Control Panel. I guess the CP calls the IC API which now writes the plist file in Mac OS X instead of the resource file in Mac OS.
So I wrote this little program which gets the data from the IC prefs and writes it out into the right format. It must be run under Mac OS v9, NOT Classic. It just prints out the data to then paste into the proper location in the plist file (overwriting the corresponding entries). I pasted in the new data (after backing up the file) in Mac OS, before rebooting into Mac OS X.
An interesting note: what would have been nice to do is just get the raw data structure as a string, and encode_base64() it. But the module didn't allow for that, so rather than trying to add that to the module, I just re-packed it back into its original format, using the IC headers as a guide.
#!perl -w
use Mac::InternetConfig;
use MIME::Base64;
my %dups;
for my $e (keys %InternetConfigMap) {
next if exists $dups{$e->extension};
$dups{$e->extension}++;
my $c = pack 'sa4a4a4l',
$e->version, $e->file_type, $e->file_creator,
$e->post_creator, $e->flags;
my $d;
for $meth (qw(extension creator_app_name post_app_name MIME_type entry_name)) {
my $s = $e->$meth;
$d.= sprintf "%s%s", chr(length $s), $s;
}
my $b = pack 'ss', 4+length($c . $d), 22; # 22 is constant
my $a = $b . $c . $d;
$a = encode_base64($a, '');
print "\t\t\t\t\t\t<data>\n";
for (split/(.{28})/, $a) {
print "\t\t\t\t\t\t$_\n" if $_;
}
print "\t\t\t\t\t\t</data>\n";
}
__END__
(BTW, this is still Mac OS X 10.1.5, of course; I am hoping many of my gripes are fixed in 10.2, and I will surely report back. :-)
Update: In the case above, there is no glowing/plusing button, so at least I have a visual clue that I can't hit return or enter. But in some cases -- such as saving a file here in Mozilla -- there is a pulsing button ("Save") and no amount of hitting return or enter will cause the button to be "clicked." That's just Bad.
- I don't know if I've mentioned it before, but the black I-bar cursor in Mac OS changes color as it passes over dark backgrounds. Now, in BBEdit in Mac OS X, it still does this, but in other apps it doesn't. I don't think it is Carbon vs. Cocoa, because other Carbon apps don't. The I-bar instead has a grey shadow or something, which makes it very difficult to see when the entire background is black. I often lose my cursor in Mac OS X.
- In many text boxes (such as cmd-~ from the Finder, to open a named directory, which in itself is cool), if you arrow left or right, the cursor disappears until I let go of the arrow key. So I can't hold down the arrow and move the cursor to a specific location, as I never know when to stop. Very annoying.
- I don't know of any way to do custom contextual menus. In Mac OS, I have these little files to handle all sorts of things; for instance, I can ctrl-click on a file and select "Open Using -> file2clip" and it puts the path for that item on my Clipboard. Or select text and choose "CPAN" and it will automatically search for that text on search.cpan.org. That is something I use a lot, and it doesn't appear to exist in Mac OS X.
So my problem is that in Eudora, I like using ProFont ("Programmer's Font", similar to Monaco, but easier to read for code at small point sizes) for messages, but I check Eudora's prefs to use Internet Config (for SMTP host etc.), and there's no way to change the default screen font from Monaco to ProFont.
One solution might be to port Mac::InternetConfig, and use the API. But I tried something else.
I opened
<key>WebBackgroundColour</key>OK, so what's the data? It looks suspiciously familiar. The first line of the XML file, after the declaration, is:
<dict>
<key>ic-data</key>
<data>
////////
</data>
</dict>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyLisOK, so that file tells us:t .dtd">
<!ELEMENT data (#PCDATA)> <!-- Contents interpreted as Base-64 encoded -->Nice. Sure enough:
% perl -MMIME::Base64 -le 'print ord decode_base64(shift)'OK, so now I just need to get the data for ScreenFont, in the right format, then encode it in Base64. MacPerl to the rescue!////////
255
#!perl -wl%InternetConfig gives a sane human-readable value (in this case, ProFont). But %RawInternetConfig provides the raw packed data. I encode it and print it out:
use MIME::Base64;
use Mac::InternetConfig;
print encode_base64($RawInternetConfig{kICScreenFont()}) ;
AAkAAAdQcm9Gb250AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASo I reformat it a bit to have the same line lengths as the other entries in the file, and end up with:A AAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAA4W4tIAA2Q VAAi
WYgDhACj97QAAAAiWYgAMzACAAAAAgCmiLIADt6oAA7e nGj/90AApoirAAAAAAAID0xURVhUdHR4
dAANkFSIhAAiZJgD AwCj97QAAAAiZJ4AAAAAAAgAotoAAIEAAAAAAADMzMzMzMzMzA CmiLpAnfFQ
AKLTKAAiVlL///8AACJWQkCJXpYAotqg////AA AiVkI=
<dict>I quit Eudora, save the plist file, and reopen Eudora, and there it is as my new screen font: ProFont, size 9.
<key>ic-data</key>
<data>
AAkAAAdQcm9Gb250AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////
/wAAAAA4W4tIAA2QVAAiWYgDhACj97QAAAAiWYgAMzAC
AAAAAgCmiLIADt6oAA7enGj/90AApoirAAAAAAAID0xU
RVhUdHR4dAANkFSIhAAiZJgDAwCj97QAAAAiZJ4AAAAA
AAgAotoAAIEAAAAAAADMzMzMzMzMzACmiLpAnfFQAKLT
KAAiVlL///8AACJWQkCJXpYAotqg////AAAiVkI=
</data>
</dict>
Yay!
fink selfupdateThen I just needed to set up
fink update-all
fink install bash
sudo niutil -createprop /Then in Terminal.app I set it to use the default login for this user./users/pudge shell /sw/bin/bash
He starts out by commenting:
Is it me or is it weird that so many open source purists, people who swear by it, argue it to death, and would die for it, seem to like Apple, which isn't open source? Maybe I'm missing something.
Yes, you are. You're confusing people who like Open Source with those who think everything should be Open Source. I know a ton of people who like Open Source and also like Macs or Apple: not one of them, to my knowledge, thinks that everything should be Open Source.
BTW, imho, "open source" is a vestige of dotcom mania.
Two problems: first, none of Winer's opinions are humble.
Second, "open source" has been around a lot longer than "dotcom mania" has been. Sure, it was popularized in large part because of "dotcom mania", but Open Source software runs far deeper than dotcoms ever did; it's been the backbone of many technologies for decades, and continues to be today. TiVo lives on Open Source software. The top web server and scripting language are Open Source. It's not a vestige, it's a way people do things. That's like saying the Internet is a vestige of "dotcom mania". It's nonsense.
One more thing, open source zealots, like all zealots, checked their minds at the door when they joined the party. They're anti-intellectual, can't handle disagreement, are about anything but freedom.
This, from the person voted most-likely-to-be-avoided-in-an-online-discussion (OK, not really, but I bet if there were such a vote, he'd win) because of how much he can't handle disagreement.
Most of the Open Source advocates I know are anything but anti-intellectual; Winer is the one who chastised me for correcting him when he posted a "truly random number generator" on his site that was actually pseudorandom, and for this he commented "my readers are system managers not Math Majors" and called me "small-minded." Maybe he was not being anti-intellectual, just a snob?
Neither are Open Source advocates against freedom; that doesn't even really make sense. Most of them think people should use whatever they want to use (as shown in Winer's own example about them using Macs).
And what is a "zealot"? It is the same thing as the aforementioned "purist"? If so, then one or both of the labels is obviously misapplied. If they are intended to be different, then he is lumping them together inappropriately. It's a case of "condemn people I don't like by labelling them." Most people who use and like Open Source are not zealots, are not purists.
But what am I doing trying to inject logic into this? The real point is here:
In the late 90s open source defined a club that excluded many well-intentioned hard-working developers.
Translation: "When Open Source was popular, I wasn't, and I am bitter about it."
There is no MacOS. There is no MacOSX, nor MacOS9, nor OSX.
There are two operating systems, Mac OS, and Mac OS X. The former is currently at version 9.2.2, and the latter at 10.1.5. The full names are "Mac OS 9.2.2" and "Mac OS X 10.1.5". Throw in a "v" or "version" if you like.
Using "OSX" is barely acceptable, if only because so many people use it, but it is too non-specific: what is "X"? If "OSX" is to be used for "Mac OS X", then why not "OS" to refer to "Mac OS"? It should be avoided.
"MacOSX" is not acceptable, nor any other form omitting the space between "Mac" and "OS". Using "Mac OS" to mean "Mac OS X" is not acceptable; they are two different operating systems. "Mac OS 9" is acceptable, to distinguish it from previous versions of Mac OS, and barely acceptable to distinguish it from "Mac OS X", only because so many people incorrectly use "Mac OS" to refer to "Mac OS X".
There is no MacOS. There is no MacOSX, nor MacOS9, nor OSX.
There are two operating systems, Mac OS, and Mac OS X. The former is currently at version 9.2.2, and the latter at 10.1.5. The full names are "Mac OS 9.2.2" and "Mac OS X 10.1.5". Throw in a "v" or "version" if you like.
Using "OSX" is barely acceptable, if only because so many people use it, but it is too non-specific: what is "X"? If "OSX" is to be used for "Mac OS X", then why not "OS" to refer to "Mac OS"? It should be avoided.
"MacOSX" is not acceptable, nor any other form omitting the space between "Mac" and "OS". Using "Mac OS" to mean "Mac OS X" is not acceptable; they are two different operating systems. "Mac OS 9" is acceptable, to distinguish it from previous versions of Mac OS, and barely acceptable to distinguish it from "Mac OS X", only because so many people incorrectly use "Mac OS" to refer to "Mac OS X".
Also printed on my personal site.
In Mac OS X:
pudge% perl -Iblib/arch -Iblib/lib -MMac::Carbon -MMac::Memory -wle '$x = new Handle "abc"; print $x->get(0, -1); $y = new Handle ("x" x 2**30); print Mac::Carbon::Error(); print $y->size'In MacPerl on Classic, to look up the error:
abc
-116
Can't call method "size" on an undefined value at -e line 1.
print $^E = -116So I got everything to compile and work. It'd be nice to have Error() be $^E, but that isn't likely for right now, as I believe it needs core support, and even then, I don't know if it would be feasible (are Carbon/Cocoa values compatible? how do you tell them apart, if not?). If they are the same, great, I can set $^E now via SETERRNO, and perhaps add the needed support later to get the text of the error message, and in the meantime supply a function to look up the text of the error message.
Size check failed (OS error -116)
I am probably going to implement the missing C functions in Mac::Carbon (name, like everything else, subject to change), and require Mac::Carbon be loaded at the beginning of all other modules that need it. That'll work.
So the next step is to implement those missing GUSI functions and compile more extensions.
I'll need to redo most of this, though; I am modifying the generated C files, because MacPerl uses a custom xsubpp, and these
Again, this is all subject to change.