Monday, January 31, 2005

Web (server) logs

I detected a couple of new trends this month, adding to the Eva lemon enthusiasts, and the ones looking for people whose names appear in my genealogy. Both are driven by the wonderfully dumb “Ask Jeeves” engine.

The first looks like people trying to research their homework (questions about planets without moons or rings, or the land under the sea, or worker bee leg adaptations) — and may Eschaton preserve them if they use what they find on my pages.

The second is more of a shock, as my site gets amazingly high (often first place!) ratings on queries about girls' kecks or rainwear fetishism.

Though I was amused by the hit my old RPG pages got for Superhero 2044.

Sunday, January 30, 2005

Film — A Very Long Engagment

It's been a Great War week, having seen Journey's End at the Arts on Tuesday; and now this, which I had seen being advertised as Un long dimanche de fiançailles while we were in Paris in the autumn.

For once a film from Jeunet that isn't comedy of some degree of blackness (comedy only in the older sense of happy outcome); though there are familiar faces in the ensemble from previous works (Dominique Pinon, who appeared many times in The City of Lost Children, as well as Audrey Tautou from Amelie again in the lead). And while Journey's End has everyone acting honourably and dying in the end, here we have layers of deceit that led to the survival of Mathilde's fiancé Manech, despite an explicit judicial condemnation to death by exposure in no-man's-land.

Well, being a century baby, like Elijah Snow or Axel Brass, we know that the intuition Mathilde has that Manech survived will prove true, though the unravelling of the truth makes this a low key weepie. Personally, I would have ended the film about 30 seconds earlier, with Mathilde standing at the garden door, looking out at Manech, rather than any of the inevitable anti-climax of the encounter.

I will say #insert <std::rant-about-sex-scenes> — if I wanted that sort of thing I could get the real deal on the 'net. Otherwise, what's wrong with implication and understatement? Books seem to have outgrown that particular fashion : when will cinema follow suit?

Saturday, January 22, 2005

Unicode (Unicows.dll) and ActiveX

I have been wrestling this week with how to get an ActiveX control which has to invoke Microsoft Unicode APIs (as provided via Unicows.dll) to install on Windows 98. The use of Unicode APIs is forced on me by required code that is autogenerated (so I have to treat it as immutable); and given constraints on installer effort, I was limited to not having multiple .CAB files on the web server.

The .CAB file I started with contains unicows.dll and my DLL all in what I believe to be the correct order; both in the CABARC call and the .INF file (Unicows, then my DLL). The resulting .CAB installs OK on NT derived platforms; but on Win9x and WinMe you get to see the "Do you want to install this ActiveX" dialog - and nothing happens when you say yes. There may be some partial install into the \Windows\Downloaded Program Files folder if you visit it in a DOS box, but nothing shows up in Explorer.

The cause seemed to be that the registration is called before Unicows.dll is installed.

So I thought - instead of "unicows.dll control.dll", put "unicows.dll control.dll helper.dll", tell the CAB file to register through helper.dll, and implement DLLRegisterServer and DllUnregisterServer helper.dll to manually un/register the appropriate CLSID on behalf of control.dll, without actually invoking it.

No dice. However instrumenting helper.dll showed that the DllMain was called to attach and detach, without calling any entrypoint; so I suspect that libraries are tested in some temporary folder with LoadLibrary() before being installed - and control.dll was failing there, every time (assuming that unicows.dll wasn't on the path somewhere).

Now if I'd been able to put all the files I wanted on the server, and was able to figure out where the control was being loaded from, I could have done my first idea, which was to download the bootstrap helper.dll and then fetch the rest. Constrained as I was, I would just have to smuggle the code inside the same .CAB file; indeed inside the helper.dll library, as the only place I could be certain of having full control of what was happening.

So, I thought, let's build control.dll, then add it as an RT_RCDATA resource into helper.dll, and just put "unicows.dll helper.dll" in the .INF and .CAB. Then I could make DllRegisterServer unpack the resource into a file (deleting it in DllUnregisterServer).

Success!

Now when you say yes to the control, the helper.dll library is loaded and unloaded from a process, then loaded again to call DllRegisterServer, and that unpacks control.dll and registers it, and the control executes, and all is well in the garden.

If only there were a simpler way than this.

[LATER] The issue is that even if unicows comes first in the .cab and .inf files, the implicit "." in the path that works everywhere else doesn't work here. You have to put unicows into a folder that is on the path - which in practice means c:\windows (destDir=10). You discover this when trying the above strategy and then trying to be clever by doing a LoadLibrary on the file you've just unpacked and calling its DllRegisterServer.

At least on Win9x, there's no worry about needing admin privilege to drop things into the system folders.

Wednesday, January 19, 2005

Film — Team America : World Police

It is disappointing to see that the Yanks manage to do Thunderbirds better than the ill-fated live action movie that even International Rescue couldn't have saved, and without more than a title screen explosion as hommage to Gerry Anderson.

To say that this isn't the number one intellectually challenging file of 2005 is an understatement. The satire is as as scatter-gun and unsubtle as, well, Team America themselves; and the humour is much the same. Certainly, not a film one would want to take one's parents to see — but it managed to keep the audience laughing, myself included, through most of its length, even though the laughter was sometimes the nervous laughter that masks embarrassment.

Overall - leave your brain at home, prepare for rather sophomoric humour, and enjoy.

Sunday, January 16, 2005

Wish you were here...

Some of the Huygens images look rather like aerial views of an Earthly coastline, don't they?

Slow news week

Prince Harry - why all this synthetic indigation? Reaction to all the Tsunami coverage? It's a student thing, to be deliberately outrageous. Just that when he does it, it gets into national news.

Saturday, January 15, 2005

Book — The Well of Stars by Robert Reed

When I happened upon Marrow, the first book I'd seen by this author, I was quite amazed — this was a confident look into a distant future (10^5 - 10^6 years hence) purely relativistic universe, with emortal post-humans perfectly adapted to that state : when a few are marooned on a barely habitable planet, their escape plan involved bootstrapping a technological civilization over the next five kiloyears.

The next books of his I found (Sister Alice, Down the Bright Way) were earlier, and less impressive, adequate but nothing more.

And then this — a return to the story that began in Marrow, with the Great Ship, itself the size of Neptune, facing an enemy that can overwhelm even its vastness, and possibly the fate of the entire Universe in the balance. This book builds upon its predecessor and is simply breathtaking.

Sunday, January 09, 2005

Web (server) log

Well the last few weeks have shown the usual people looking for names in the extended family, and the usual run of Eva related stuff — I suppose given I have an Eva fan-fic page that's Asuka-themed, it's not surprising that I get caught in searches by otaku looking for heartwarming fics where she falls into bed with the other female members of the cast, or occasionally Ikari-kun (the surprise of this bunch was the search for Kaji/Misato fics).

The oddities have been the "Ask Jeeves" results - questions about Andrews' Liver Salts; about gerbils learning mazes (Pete Windsor could never have expected that that would be an outcome of his 6th form D&D) and, crazily enough, where a citizen of Massachusetts could take food aid for survivors of the recent natural disaster in the Indian Ocean. And I came top of the list for "how many graves can you fit in a graveyard?" with a page that contained no such information.

These show quite how mindless the pattern matching is for the search; and how misleading the natural language interface is. This is really one of the commandments - "thou shalt not give the user cause to needlessly anthropomorphize."

The big freeze

Three weeks ago, the fridge/freezer in the kitchen went into overdrive, plunging the fridge compartment well sub-zero. A hasty defrosting of the freezer seemed to fix it. Until today, when I came to get breakfast, and found that it had happened again! So the freezer contents go out into the backup freezer in the garage, and I wait for the thaw.

Why can't it wait until we have a date for getting the kitchen refitted?

Friday, January 07, 2005

Milestones

The car is sitting on the drive with 5000 showing proudly on the odometer.

Close to home

Driving from work into town for supper this evening, I caught enough of the news to realise why there were police cars blocking off the turn to Madingley at the bottom of the hill, just inside the 40mph limit, and tape all along the roadside. This must be what it is like to have TV news ramming the world's problems in your face all the time.

Thursday, January 06, 2005

As expected

The new year starts depressing, and dull, driving to work under cloudy skies with dull redness in the rear view mirror and strange twilight. Generally feeling well below 100%, demotivated and sluggish.

Monday, January 03, 2005

Holiday Viewing

I did less of this than I'd expected. I did get around to

Dirty Pair Flash Mission 3

which was disappointing. The previous disks had at least got a plot behind much of the comedy; this was disconnected episodes, running mainly on fan-service. The first and last episodes were almost good, but were let down by poor pacing.

Clouds of Witness

Karen got the set of the 1970s Lord Peter Wimsey adaptations (with Ian Carmichael) as her main present. Watching the first one was an exercise in "just one more episode" - and we did the lot in an evening. Classic BBC class.

The Incredibles

Good movie, tolerably low schmalz level. Not a classic of western culture, but still worth seeing.

House of Flying Daggers (spoilers)

One of Karen's colleagues from Health Service days, who was at the same showing as us, likened it to "a Chinese Bridget Jones with daggers and a sad ending", while for my own part, Andy Lau's role clinched my analogy as "Infernal Affairs, wuxia re-mix".

While on balance, I think I preferred his previous Hero, another excellent film. Oh, the fight in the bamboo grove!