Archive for September, 2006

still lusting, after all these years

Friday, September 8th, 2006

Apple’s iPhone is totally coming and I’m totally going to be financially irresponsible and get one. Maybe not Tuesday, when they’re apparently going to unveil feature-length movie sales via iTunes, but … maybe so.

Just remember, when Steve demos realtime video chat over the Apple phone with anyone using iChat on their Mac, you heard it here first. A year ago.

Since the i- prefix is losing favor, the real question is, what will it be called? MacPhone? Eew. I hope not.

I still think this is the most Apple-like and compelling of all the speculative designs that have been floated. If Apple’s actual design is better than this, I will not only drool all the way to the Apple store, I will … very possibly … lick the thing. Okay, not really. I just couldn’t think of a better hyperbole.

back in the saddle

Friday, September 8th, 2006

A new comment on my Jan. 22 post about embedding a Perl interpreter into a Cocoa app has made me do what I meant to do today anyway: reopen that project and get to work on it again. (It’s my thesis project … if that explains the long break … )

It’s been a while, so I may have to refresh my memory, but here’s what happened.

I wound up using CamelBones. There were a couple of glitches, but that was using the beta 5 version. Version 1.0 is now out and according to the author (who I emailed) at least one of the glitches was a real bug and has been fixed in 1.0.

But yeah, with the CamelBones framework linked in, I inited an instance of the interpreter with something like this:


CBPerl* sp = nil;
NSString* appBundlePath = [ [ NSBundle mainBundle ] bundlePath ];
NSString* libPath = [ NSBundle pathForResource:@"PerlLibraries" ofType:nil inDirectory:appBundlePath ];

// REVISIT
// CBGetPerlArchver is not being found by the linker, but is found when building a vanilla
// CB project. *shrug*. anyway here’s what it returns in that project:
char* hackyhackhack = “darwin-thread-multi-2level-5.8.6″;

[ CBPerl stubInit:hackyhackhack ];
sp = [ CBPerl sharedPerl ];

The hackyhackhack is the bug I mentioned: apparently CBGetPerlArchVer is available in version 1.0, so such machine-specific ugliness is no longer necessary.

Using the interpreter is then a matter of calling [ CBPerl eval ]:


[ sp useLib:libPath ];
[ sp useModule:@"WWW::Wikipedia" ];

// make the wiki object once
[ sp eval:@"$wikiObj = WWW::Wikipedia->new(); $wikiObj->timeout( 2 );" ];

Now, getting results out of CamelBones-land was another problem for me. I don’t remember the details, but for some reason I wound up using [ CBPerl varAsString ] exclusively. This was fine for my purposes but obviously has its limitations. It may be that I wasn’t using CB correctly, or that there were other bugs, that may have since been ironed out.

I ought to revisit this in light of the new version of CamelBones.

Gandalf: benevolent mage and scholar? or lunatic oppressor of the disempowered?

Friday, September 8th, 2006

This is brilliant. It’s so well-written that it actually took me a while to be convinced that it was satire. (Of course I take the implication that Chomsky-esque relativism is completely absurd as an extra dose of funny.)

Chomsky: We should examine carefully what’s being established here in the prologue. For one, the point is clearly made that the “master ring,” the so-called “one ring to rule them all,” is actually a rather elaborate justification for preemptive war on Mordor.

Chomsky: But without the pipe-weed, Middle Earth would fall apart. Saruman is trying to break up Gandalf’s pipe-weed ring. He’s trying to divert it.

Zinn: Well, you know, it would be manifestly difficult to believe in magic rings unless everyone was high on pipe-weed. So it is in Gandalf’s interest to keep Middle Earth hooked.

Zinn: And now we jump to the Orcs chopping down the trees in Isengard.

Chomsky: A terrible thing the Orcs do here, isn’t it? They destroy nature. But again, what have we seen, time and time again?

Zinn: The Orcs have no resources. They’re desperate.

Chomsky: Desperate people driven to do desperate things.

Chomsky: This takes me back to the media’s involvement in all this, and the way the media is being controlled by Gandalf, such as when he covers Saruman’s palantir in Orthanc. This is the stone that allows one to see, and thus communicate with, different cultures.

Chomsky: They’ll cross this bridge and the bridge will collapse, and they’ll never be able to communicate with the Balrog again, or with the Orcs inside. In fact, they’re sealing off the Orcs from ever escaping. They’re leaving the Orcs in the cave with this big Balrog. Now, again, surely, among these Moria Orcs were some Orc radicals — aggressive, angry, militant radicals. We shouldn’t understate that.

Zinn: Well, look how the Orcs grow up. What do you expect?

Chomsky: I mean, what other options have they?

Zinn: I dare say that, were I an Orc, I might possibly be one of those terrorist Orcs, shooting arrows at the Fellowship myself.

Chomsky: Here comes the Balrog. Notice Gandalf’s unilateral action. “Quick, get away, I have to fight this thing alone!”

Zinn: Once again you see a creature that’s on fire being demonized in this movie: the flaming eye, the flaming Balrog. As though being on fire is this terrible affliction to have.

Chomsky: As though they can help it if they’re on fire.

“and you wear a bowtie”

Sunday, September 3rd, 2006

Yeah, so this is two years old, but I hadn’t seen it: Jon Stewart on Crossfire.

I love that man.

And c’mon, even if you’ve seen it before, watching Tucker Carlson squirm on live TV is such guilty fun, isn’t it?

(Wikipedia has a bit about the Stewart appearance in Carlson’s article, and also tells us that Mr. Carlson stopped wearing bowties as of April 11, 2006.)