« Alex and Io | Main | Good Weekend »
August 26, 2004
AppleScript, ECPG, and QuickTime
It is certainly a varied life, working for Matterform Media. Today, when I showed up, I figured I would be presenting my case for why we need to migrate away from REALbasic to this cool system called ECPG or Embedded SQL. ECPG is a way of putting your damn SQL into C directly. I think it looks pretty cool, it looks like this:
void show_people() { EXEC SQL BEGIN DECLARE SECTION; VARCHAR name[255]; int age; int name_ind, age_ind; EXEC SQL END DECLARE SECTION; // get the people EXEC SQL DECLARE show_people_people_cursor CURSOR FOR SELECT name, age FROM people ORDER BY name; EXEC SQL WHENEVER NOT FOUND DO BREAK; EXEC SQL OPEN show_people_people_cursor; while(1) { EXEC SQL FETCH NEXT FROM show_people_people_cursor INTO :name:name_ind, :age:age_ind; printf("found %s (age %d)\n", (name_ind ? "(null)" : name.arr), (age_ind ? 0 : age)); } }
So, natually, Michael hates it (and he should: it's C, after all) and I want to write our massive spam crime analyzer bot in it. The existing implementation takes about 2 days per 2/3rds of a percent (0.66%) for dealing with the spamspace, and that's not including the spam from the past two weeks which has been reflected to our other database. So, I'm looking at C and thinking it's the ticket, and Michael wants to poke at our RB until it's sorta fast.
I don't think we're going to get there.
Anyway, what I wound up working on today instead was an AppleScript evaluation library for the first half, until we hit the weird irresolvable problems, and then a little QuickTime-based sound recorder demo app which will be used in iAnswer. Neither of them work very well, but they both seem to sort of do some stuff in a way kind of from time to time when they feel like it. But at least it wasn't scanning more damned beads, so I'm happy.
Since I got home, I've been reading Jarrod's excellent journal. I told him I would read it and I haven't had time until now that he's finally back home.
In reference to yesterday's post, I'm downloading the CIA World Factbook and I'm going to see how bad parsing it is, and I'm going to make a little database here to hold the stats for each country so I can generate my little table in it's entirety, and then perhaps graph it. But then again we know that Sealand is going to have the best representation ratio, and it's a kingdom… :)
It's only midnight and I'm already tired. It's like I graduated into a goddamn retirement home. I have an airport extreme, which is connected to the internet over a modem. A few things around here seem, at times, to be somewhat weird.
Posted by FusionGyro at August 26, 2004 06:03 AM