Reposted that diary, it was about to fall by the wayside, lost in testing of my ColdSync Advogato conduit...
Life: Went to "100% Ads Festival" (used to be the "Ads Night") this weekend, my first time! Was really cool, I recommend it heartily!
One of my friends just got herself a job in Québec City (a three hour bus ride), which is a bit sad, since her boyfriend (also a good friend) just got contracted here in Montréal. Looks like he'll move there when he's done, I'll miss them! Its not like we won't visit, but you know...
I'm just back from their place, we watched "Chasing Amy", one of Kevin Smith's movies. I like it a lot, I feel like it resonates with some things in my life. For example, the two comic store guys, so nerd it hurts :-). We're so broken, but we can't notice (see "Goedel, Escher, Bach" for why).
Palm: After posting a question on the Plucker developer mailing list, it looks like I should be updating the creation time of the PDB in order for Plucker to invalidate its metadata.
Now, the problem is that ColdSync's generic conduit doesn't sync PDBs headers, quite understandably. Argh!
I had started doing a "sync" conduit to update the creation time, but ColdSync::SPC doesn't seem to have anything to set the creation time of a database. So I thought about just deleting the metadata, but this should only be done if the database has changed. Hmm, I could put a "sync" conduit on the database itself, and just delete the metadata if any records have the dirty attribute. I really don't know why ColdSync's "fetch" conduit interface doesn't allow making DLP requests?
While ColdSync looks fine from what I've seen, the Perl module to make conduits could use some improvements. It requires Palm::PDB for no good reason, and dies at the slightest provocation (the PDB doesn't exist for a "sync" conduit? what if I'm about to create it? or I don't need it?).
Work: I have been using this Palm hacking to learn about the mechanics of synchronization, but I'll have to go back at project related stuff now.
I have managed to find how to make a proper makefile (non-recursive, with a complete dependency graph) handle generated header files, including correct auto-dependencies! The trick is simple: have a dependency for every source file (the .c or the .cc file, not the .o file!) on a build-header .PHONY target. Then, make that build-header target depend on the header files that need to be generated (you can generally figure them out from their source file names) and let an implicit rule do the rest! This will build all of the header before they are ever used, which then allows for usual auto-dependencies to work correctly.
This will help both for XPLC (to support IDL source files) and for work stuff, I'm rather proud of this hack, however simple.
Now, to make non-recursive makefiles scale to a large project smoothly using an unpatched GNU Make... :-)
XPLC: Speaking of that, did just a bit of tweaking this friday, after looking into making a Debian package for it. I'm rather disappointed with this. A bunch of files in an unsightly directory (that I can't specify the name of) at the top level, rather sparse documentation, etc. RPMs require a file at the top level (and only for automated packaging), but its a single self-contained file, and you get to pick the name yourself (save for the extension, of course). Blah, I'll ask one of my coworker to help me with this next friday.