Archive for September 2012

Delayed Action, revisited

A few days ago, I posted a simple “delayed action” unit that allows you to post a simple action to the Windows Message Queue, to be executed on the main thread after all currently pending messages.  It worked by storing your proc in its own threadsafe queue, then posting a message which, when read, caused the proc to be popped back off the queue and executed. Continue reading ‘Delayed Action, revisited’ »

How not to write a parser

So if you’ve got two JSON objects, one that’s serialized as

{"Value": []}

and the other as

{
  "Value": [
  ]
}

is there any difference between them? Continue reading ‘How not to write a parser’ »

The language engineer’s triangle

Interesting new post by Andreas Hausladen this morning.  It seems that there’s new copy protection in XE3 that scans all DLLs in the same folder as BDS.exe to ensure that they’re signed, apparently to keep crackers from pwning BDS with a poisoned library.  And according to Andreas, it really slows down the IDE’s startup time. Continue reading ‘The language engineer’s triangle’ »

Delayed action

When you work with UIs, order of operations can be very important.  Windows’s UI works based on an event queue and a message pump that reads events from the queue and dispatches them.  And since the UI is single-threaded, this means that at any time, there could be pending events about to execute while you’re handling some UI code.

Sometimes you’ll get into a situation where you need to execute something, but not right away; you need it to happen after all of the pending events have processed.  Now, obviously, the best way to make something happen after everything in the queue has processed is to put something else onto the queue directly behind everything that’s currently in there.  But the tricky part is what happens when it comes back out. Continue reading ‘Delayed action’ »

Thoughts on Embarcadero’s business model

Like a lot of you, I got my SA subscriber’s notification that XE3 has been released last night.  (I decided not to cancel after Embarcadero reconsidered the changes to their licensing policy.)  I’ve been too busy today trying to track down a tricky bug in a personal project I’m working on to download and install it, so I don’t have too much to say about the product yet.  I’ll post a first-look review sometime soon.  But that’s not what I wanted to say here right now.  Since my previous article, I’ve been talking a fair amount with David Intersimone, and it’s been quite the enlightening experience.  A lot of it was private, of course, but there’s one thing that I’d like to talk about. Continue reading ‘Thoughts on Embarcadero’s business model’ »