Categories

  • Apple (15)
  • Coding (4)
  • del.icio.us (14)
  • General (136)
  • Life (10)
    • Remodel (1)
  • Politics (16)
  • Project Steamroller (1)
  • Spam (11)
  • Sysadmin (9)
  • Tech/Geek (15)
  • Uncategorized (52)

Ye Olde Posts

  • March 2010 (1)
  • January 2010 (3)
  • December 2009 (1)
  • November 2009 (1)
  • October 2009 (2)
  • September 2009 (1)
  • August 2009 (3)
  • July 2009 (3)
  • June 2009 (2)
  • May 2009 (2)
  • April 2009 (1)
  • March 2009 (4)
  • February 2009 (2)
  • January 2009 (1)
  • December 2008 (1)
  • September 2008 (1)
  • July 2008 (1)
  • May 2008 (5)
  • April 2008 (2)
  • March 2008 (9)
  • February 2008 (5)
  • January 2008 (6)
  • December 2007 (7)
  • November 2007 (2)
  • October 2007 (6)
  • August 2007 (7)
  • July 2007 (2)
  • June 2007 (3)
  • May 2007 (3)
  • April 2007 (8)
  • March 2007 (8)
  • February 2007 (10)
  • January 2007 (3)
  • December 2006 (2)
  • November 2006 (1)
  • October 2006 (2)
  • August 2006 (2)
  • July 2006 (2)
  • June 2006 (2)
  • May 2006 (5)
  • April 2006 (2)
  • February 2006 (1)
  • January 2006 (2)
  • December 2005 (2)
  • November 2005 (2)
  • October 2005 (3)
  • September 2005 (1)
  • August 2005 (1)
  • July 2005 (3)
  • June 2005 (3)
  • May 2005 (1)
  • April 2005 (1)
  • March 2005 (1)
  • February 2005 (4)
  • January 2005 (1)
  • December 2004 (3)
  • October 2004 (3)
  • July 2004 (1)
  • April 2004 (5)
  • March 2004 (5)
  • February 2004 (5)
  • January 2004 (3)
  • December 2003 (2)
  • November 2003 (9)
  • October 2003 (5)
  • September 2003 (4)
  • August 2003 (3)
  • July 2003 (2)
  • June 2003 (8)
  • May 2003 (5)
  • April 2003 (4)
  • March 2003 (10)
  • February 2003 (25)
  • January 2003 (12)

Monthly archives for August, 2003

Blog backend updated

Aug30
2003
5 Comments Written by Craig

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…

Posted in General
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail

Silicon Valley Life

Aug28
2003
3 Comments Written by Craig

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…

Posted in Life
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail

Issues I have with Applescript

Aug27
2003
1 Comment Written by Craig

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.

Posted in Apple
SHARE THIS Twitter Facebook Delicious StumbleUpon E-mail

Translate

EnglishFrenchGermanItalianPortugueseRussianSlovenianSpanish

Search

Recent Comments

  • Craig on On the efficiency of Virtual Machines
  • flickr.com/photos/jm on On the efficiency of Virtual Machines
  • jmason on Neat. A new way to track website visitors!
  • jmason on On the time domain, with regard to spam
  • pooya on Interesting Tivo trivia bit

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

EvoLve theme by Blogatize  •  Powered by WordPress Craigalog
Craig's musings