So I’ve updated the RSS feeds somewhat, as well as moving to a newer version of the backend software, so now it should be the case that the web server sends 304′s for the RSS feeds if nothing’s changed in the database. I’ve been doing gzipping of the content all along, but it seems most aggregators don’t support compressed HTTP streams (why would someone write their own HTTP client code these days ?!??). Now that NetNewsWire does though, people should find that helpful if they’re using NNW. Also imported my own aggregator list to a blogroll on the right of my main blog page. I’ll try to write an applescript to automate updating things when I subscribe/unsubscribe, but see below for why I might not do that — of course there’s no way to have NNW automatically call my script to say “By the way, subscriptions just changed”… I should probably also include a link to the OPML for those sources as well…
Monthly archives for August, 2003
Silicon Valley Life
It just occured to me that what I’m doing right now is pretty amazing. I’m sipping coffee at Buck’s, with my 7-month old daughter on one knee, while answering work email (on leave, but that’s increasingly just a technical thing which means I don’t get paid), and IMing with an old business colleague who’s moved to Colorado. Ah WiFi…
Issues I have with Applescript
Applescript is often very useful for doing scripting of Mac apps, and stuff like osascript makes the integration between the fun happy world of *nix and OSX more pleasurable.
But there’s some seriously annoying stuff in Applescript. For example, there’s no event notification service to let you know when something happened in a scriptable application. It seems to me like it ought to be something that Apple built into OSX. Doesn’t seem like it would have been hard, and boy oh boy would it have been useful. Yes, you can make Applescript-callable server applications, which expose functions which can be called from outside. But what I’m talking about is my being able to write a script which monitors some other application for important things, and functions in my script get called when those important things happen. For example, let’s talk about iTunes. I want to write a script which does something whenever the currently playing track in iTunes changes. Only way to do that today is for me to constantly poll the iTunes application and ask it what the currently playing track is, remember what the previous answer was, notice if the answer is now different, and then call myself to take some action. That’s really lame. What *should* happen is that any readable property that’s exposed through Applescript (or I guess through apple events) should be able to have an “onchanged” event registered against it. Then when that property changes, I should be able to get a callback. Not rocket science.
But instead, you’re forced to resort to brutishness:
global latest_song
set latest_song to ""
on idle
tell application "iTunes"
copy name of current track to current_tracks_name
if current_tracks_name is not latest_song then
copy current_tracks_name to latest_song
else
doWhatYouReallyWantToDo
end if
return 10
end tell
end idle
That’s just retarded. What I want to be able to do is:
tell application "SomeSystemService"
add doWhatIReallyWant as property change callback for current track of application "iTunes"
end tell
Then, all that’s required is the SomeSystemService app to be written (not hard), and for all apple event properties to have intelligent notification to that system service. Ideally, you’d want cooperation between the service and the apple event layer, so that no notifications bother happening if noone’s registered a callback against them. In OSX, the implementations of all these properties are subclassed from some OS-defined class anyway, so why would it not be possible to do this?
Ok, time to make dinner.

Recent Comments