March 2002 Archives

New Requirements For Office

| | Comments (0)
In order to run for federal office in the US, you will be required to use government-approved software (see §306). If none is available for your chosen platform -- assuming you use computers at all ... what if you are from the Luddite Party? -- you must use a different platform. In other words, you could be required by law to use Windows to run for federal office.

WOW.

Sure, we can hope that such software will be available for other platforms, and there is nothing in the legislation that prohibits someone from developing such software, but still ... if they don't, you are out of luck.

FWIW, the software in question is for recording/reporting of camapaign finance information.

The only loophole I see is "once such software is made available to such candidate." One might argue that if I use Mac OS or Linux, and you give me Windows software, then you have not indeed made available to me any "such software," where such software is software that "permits this, allows that, allows another thing" since it does not permit or allow anything for you, not being a Windows user.

Kinda scary. use.perl.org

TiVo Survey

| | Comments (0)
Today I filled out a survey for TiVo that asked, among other things, what I'd like to have my TiVo integrated with (DVD/CD/MP3 player, please!) and what wireless networking technology I'd want to use with my TiVo (802.11, thanks very much!). I apparently get a TiVo doll in exchange for my filling out the survey, but I'd rather get the chance to purchase a TiVo/DVD/CD/MP3 (with streaming MP3 capability!) player. use.perl.org

D'oh

| | Comments (0)
Getting sick (fever ~102) when your wife could go into labor at any moment is kinda lame. use.perl.org

SORTCODE.COM

| | Comments (0)
Dear Sir/madam,

SORTCODE.COM was not renewed and this domain had become available to register.

Consequently, we have been approached to market this domain name that has been tracked and registered by a client. As a result, KIDS-PARTIES.COM is now available from us for IMMEDIATE transfer.

We note that a search on the search engine Google.com returns 2,160,000 results for "SORT CODE" (THOUGH OF COURSE NOT ALL RESULTS ARE RELEVANT) but still, with so many companies that could benefit from this domain, along with what many would consider to be a "wholesale price", we expect to secure a quick transfer.


YOW! This is actually a serious spam. What ... morons. use.perl.org

More movies

| | Comments (0)
I finally did it, I went out and purchased O Brother, Where Art Thou?. Someone told me it is one of his least favorite Coen Brothers movies; it is my favorite. I loved the movie, but I wonder if the fact that it is the only Coen Brothers movie I've ever seen that I can enjoy with my family that makes a difference in my enjoyment. Hmmmmmm.

I TiVo'd a movie I'd been waiting to see since last fall when I first heard about it, The Believer, a movie about a Jewish Nazi in the 1960s. I've not seen it yet, but apparently it's a movie about not just the inherent contradiction in hating what he is, but also in that he compulsively tells people the secret he can't bear for anyone to know. The film's won the Sundance Film Festival last year, apparently. I saw commercials on Showtime for it last year, but to my knowledge it was never shown until now ... maybe Sept. 11 delayed it?

And then there's Revolution OS, which was on Sundance last night. It is the story we all know: boy goes to university, boy becomes insane, boy masterminds plot to stand up to megaconglomerate computer company. It features all your favorites, like RMS in the starring role, ESR, Bruce Perens, Larry Augustin, etc. And MAN are we all freaking geeks or WHAT? And I don't mean it in a good way. Yeesh. use.perl.org

EV Nova

| | Comments (0)
I played Escape Velocity: Nova last night. For many many hours. (Yes, Captain Hector, I will send in my shareware fee.) It reminds me of the good old days of the original Escape Velocity, just ... better. I was never a huge EV player, so I can't give a rundown of the differences, but I just like it, darnit. use.perl.org

UN Dues

| | Comments (0)
Here's an interesting piece laying out some of the facts of UN dues for those who care. Things like the fact that the UN has no power to make mandatory any payments of dues; that the US has paid, without reimbursement, far more (perhaps 1000% or more in the past 10 years) on behalf of the UN than its total dues amount to; that many people disregard in this discussion the fact that the Constitution supercedes the UN Charter in how the US must act in regard to the UN and payments to the UN; etc.

Should the US pay more money to the UN? I don't know, maybe. But it might be easier to get it paid if people would start realizing that the dues are not an obligation and that the US, far from shirking its duty to the UN, provides more assistance to the UN than any other nation, by far. use.perl.org

YAPC

| | Comments (0)
I registered for YAPC ... did you? HUH? use.perl.org

SPAM and pobox.com

| | Comments (0)
I went ahead and turned on the spam filtering on pobox.com, where I get most of my mail through. I turned on the highest level of filtering, and told it to never delete, so everything it thinks might be spam is tagged in the subject with "[spam score ...]". And I just toss everything with that tag into my SpamAuto mailbox, which I periodically scan to make sure there's been no mistakes.

It makes my Eudora filters simpler, anyway ... :-)

freeside++ use.perl.org

ECODE

| | Comments (0)
OK, ECODE should work now. It's just a pseudotag that allows you to embed code in with Plain Old Text or HTML Formatted post modes. It looks exactly like the Code post mode -- which essentially means that it converts whitespace to a combination of space and   entities, and wraps it in TT tags -- except that it is indented (with BLOCKQUOTE).

CREATE TABLE users_hits (
    uid mediumint UNSIGNED NOT NULL,
    lastclick TIMESTAMP,
    hits int DEFAULT '0' NOT NULL,
    PRIMARY KEY (uid)
) TYPE = myisam;

Yay. Also, if you need to put "<ECODE>" in your text, you can supply your own end tag:

<ECODE END="LALALA">
You can do <ECODE>...</ECODE> now!  Yay for you!
</LALALA>

Nifty. For those who have used ECODE or LITERAL (a deprecated synonym of ECODE) before, the rest works the same, except that beginning and trailing whitespace are now stripped, making it easier to use in Plain Old Text mode, where before you might get a lot of blank lines if you weren't careful.

[Previously referenced bug now fixed.] use.perl.org
The INS last week sent out notice that the two pilots of the planes that crashed into the World Trade Center -- one of them Mohammed Atta -- had been approved for extended student visas.

They were approved in August 2001.

This is disturbing on so many levels. They never should have been approved. They never should have taken seven months to send out approvals. They never should have sent out these specific notices.

This is a NO-FRILLS flight -- hold th' CANADIAN BACON!! use.perl.org
If the SOAP example I gave doesn't authenticate properly, try providing your own cookie instead of reading from an existing cookie file.

use Digest::MD5 'md5_hex';
 
my $cookie = HTTP::Cookies->new;
$cookie->set_cookie(0, user => bakeUserCookie($uid, $pass), '/', $host);
 
sub bakeUserCookie {
    my($uid, $passwd) = @_;
    my $cookie = $uid . '::' . md5_hex($passwd);
    $cookie =~ s/(.)/sprintf("%%%02x", ord($1))/ge;
    $cookie =~ s/%/%25/g;
    return $cookie;
}

use.perl.org

Mac::Glues on Mac OS X

| | Comments (0)
I did some investigation tonight on how to make glues for Mac::Glue from Mac OS X apps. Some observations:
  • We sometimes get the AppleScript terminology data in the aete resource from the files themselves. However, there is no one standard in the apps themselves. iTunes.app has a iTunes.rsrc resource fork file which I could open with MacPerl to create the glue; Internet Explorer.app had a similar file, but it was not a resource fork file, it was a plain data file. And Cocoa apps like Mail.app don't have such a file with aete resource at all.
  • I suspect that, unlike Mac OS, Mac OS X won't have applications that won't respond to the "ascr\gdte" Apple event, which returns the aete data. In other words, maybe we won't have to parse any file data, and just get it via an event (which is what happens for most apps even under Mac OS 9).
  • The observations about being able to get aete data via Apple events doesn't directly apply to Scripting Additions and the "dialect" file. Standard Additions.osax is like Internet Explorer.app ... I need to figure out how to get the data from these things, since we always just opened the resource fork, and that may no longer be feasible. OTOH, maybe it will be. Or maybe I can somehow get the data via some Apple event.
  • So to get the data, I think can just drop a package on the droplet, find $package/Contents/PkgInfo, open it up, get the application's signature ("emal" for Mail.app), and then use that to get the aete data. It worked just fine this way for Mail.app, and I created a usable glue and everything:

      use Mac::Glue;
      my $mail = new Mac::Glue 'Mail';
      $mail->activate;
      $mail->mailto('mailto:pudge@pobox.com');

    Yes, this is MacPerl running under Classic talking to a Cocoa app running under Mac OS X via Apple events with Mac::Glue. And it works with very little modification of Mac::AETE::App and Mac::AETE::Format::Glue.
  • Not all the problems are so easily solved, of course. There's the Scripting Additions problem mentioned above; there's also potential problems with launching apps, especially by path instead of signature, etc. All will need to be tested and played with in due time.

  • Of course, none of this is entirely useful right now, unless you want to use MacPerl on Mac OS X. The real purpose of this is to know what to do when we can use Mac::Glue under native perl on Mac OS X.
use.perl.org

Movies

| | Comments (0)
Today I rewtatched O Brother, Where Art Thou? with my wife. It was even better the second time, and despite being set in the South and being from the guys who did Fargo, my wife watched and enjoyed it.

I also watch A Season On The Brink, the first movie from ESPN, about Bobby Knight's 1985-86 season as head basketball coach of Indiana University. It wasn't great. It was OK, but nothing too special, except for the fact that is dropped about 50 f-bombs on basic cable. use.perl.org
I am basically done with MacPerl 5.6.1r1, the first MacPerl release in four years, including all code, docs, and testing. I am going to write up an announcement, build an installer, test the installer a little bit, let it sit for a few days, and probably release on Monday. use.perl.org

Spam Filters

| | Comments (0)
So I have about 60 filters in Eudora now, in just a couple of days, and well over half of my spam is being caught. I am satisfied with the progress. I figure I could catch maybe 90% within a week. use.perl.org

Spam 'n Me

| | Comments (0)
In 1998, I received 857 spams.

In 1999, I received 1,532 spams.

In 2000, I received 3,140 spams.

In 2001, I received 7,386 spams.

Already in 2002, I have received 2,954 spams. If February had been 31 days, I'd likely have gotten as many spams last month as I did in all of 1999.

I have never auto-filtered spam ... until now. It's gotten to be too much. I am getting about 50 spams per day, manually filtered to my spam box. Sigh. I get more spam every year than all previous years combined. This year I expect to get about 20,000 spams at the current rate of growth, which has been sustained over several years, and shows no signs of abating.

It is really disgusting. use.perl.org

macperldelta

| | Comments (0)
I was trying to decide how best to document the changes to MacPerl, and figured a macperldelta document would be best, so last night I culled the MacPerl Changes doc and bug reports and other things and wrote it up. Check it out, if you like, in POD, HTML, or plain text.

Yes, this means we're getting ever closer to a release! :-) use.perl.org

SOAP is here, wash yourself

| | Comments (0)
Journals now support SOAP. This is experimental and subject to change, though I hope that it won't change significantly, except to fix bugs and improve in various ways.

There are five methods.

  • add_entry(LIST)
    add_entry(SUBJECT, BODY)

    Add an journal entry. Either pass two arguments, SUBJECT and BODY, or pass a list of key-value pairs, where the allowed keys are subject, body, discuss, posttype, tid.

    discuss is a boolean for turning on discussions. posttype is an integer specifying one of the allowed post types. tid is an integer specifying the one of the topic IDs (topics aren't really used in journals on use.perl.org right now). These things will take your defaults if left unspecified.

    Method returns the unique ID of the new entry, or false for failure.

  • modify_entry(ID, LIST)

    Similar to add_entry, but modifies an existing entry, specified by ID. Journal ID can also be seen in the header of the particular journal entry in the web interface. Supply only the keys that are to be modified.

    Method returns the same unique ID if successful, or false for failure.

  • delete_entry(ID)

    Deletes entry specified by given ID.

    Returns true for success, false for failure.

  • get_entry(ID)

    Returns hashref with data for given entry, or false for failure.

    Data currently includes the URL to the journal entry, the URL to the journal discussion, the ID of the journal, the ID of the journal discussion, the body, the subject, the posting date, the topic ID, the user ID, the user nickname, and the posttype.

  • get_entries(UID, LIMIT)

    Returns arrayref of hashrefs, with data for journal entries for user with given UID, or false for failure. Returns most recent LIMIT number of entries, with three keys for each entry: URL to the journal entry, the ID of the journal, and the subject.

Now, how to use it? I gave an example recently, but here is another. Note that I use SOAP::Lite (although any SOAP client should work) and I use my own local Netscape cookie file on Mac OS to provide authentication. If you don't properly authenticate, you will be able to use the get_* methods, but not the others; and, of course, you can only add/modify/delete your own entries.

#!/usr/bin/perl -w
use strict;
use HTTP::Cookies;
use SOAP::Lite;

my $host        = 'use.perl.org';
my $uri         = "http://$host/Slash/Journal/SOAP";
my $proxy       = "http://$host/journal.pl";
my $cookie_file = "$ENV{HOME}Netscape Users:Chris Nandor:MagicCookie";

my $cookie_jar  = HTTP::Cookies::Netscape->new;
$cookie_jar->load($ cookie_file);

my $journal = SOAP::Lite->uri($uri)
                        ->proxy($proxy, cookie_jar => $cookie_jar);

# now, the methods

my $recents = $journal->get_entries( 1, 10 )->result;
my $recent  = $journal->get_entry( $recents->[0]{id} )->result;

my $new_id  = $journal->add_entry( 'this is a test again', 'ha!' )->result;
$journal->modify_entry( $new_id, body => 'uh!' );

# this one is dangerous, be careful
# $journal->delete_entry( $new_id );

__END__

I hope this makes your journal experience a more pleasurable one. Note that you shouldn't abuse this by making a ton of entries, because I'll be angry, and so will your fellow users who are set to receive a message each time you post a new entry.

Two more things: there currently is no nickname->uid mapping (although get_entry returns the nickname and uid). There will be at some point, probably. Also, the only way to get recent journals is via RSS, which may suit whatever evil purposes you have.

Special thanks to jjohn for his help in figuring some of this stuff out. use.perl.org

Microsoft has introduced a bug into most versions of Windows Internet Explorer whereby s/(\S)\s+([,.;:/]\S)/$1&nbsp;$2/g ... that is, if you have HTML that matches that, this .is .my .text .nyah .nyah .nyah, then the spaces will be replaced by non-breaking spaces when the page is rendered.

Now, web browsers usually stretch out a page horizontally to accomodate non-breaking spaces, and MSIE is no exception. So any user can stretch out a page on a site that allows comments posting by just inserting a "." (or , ; : /) before each word.

So what to do about it? I tried various things like converting spaces to other characters (like the new &zwnj;, thanks TorgoX) but it didn't do the trick. The only thing that works is to either disallow such text, which is unreasonable -- we won't let Microsoft's bug dictate that people can't use PERIODS in their posts -- or we could match the pattern and insert an &nbsp; (yes, you're reading right, inserting a non-breaking space actually tells MSIE to break where it previously wasn't breaking! wooooo!), but that too is munging a user's comment text because of a Microsoft bug. It's less intrusive than disallowing overabundance of periods, but it is still annoying, and we don't want to do it.

And of course, we get a lot of people saying there's a "bug" in Slash. It is a bug in MSIE. There is no bug in Slash relating to this. To say otherwise means you are a liar, or you are ignorant.

So we are stuck with either munging user input or just letting Windows MSIE users deal with it, and optionally complain to Microsoft. For now, we've chosen the latter. 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 an archive of entries from March 2002 listed from newest to oldest.

February 2002 is the previous archive.

April 2002 is the next archive.

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