Bribery can actually be a good thing! When it occasionally lowers our thresholds to doing other good things, for instance (I don't believe it ever applies to things like government, no).
I've been thinking of setting up something like a quick "tip me a dollar" link, or some such, to make it easy for people who stop by to read something they found Really Useful (I do occasional
howto articles, occasionally rather extraordinarily adoption friendly, like that one) to express a little gratitude in a way that would once in a while buy me a good book, or, admittedly much more likely, sponsor someone else similarly.
Because once in a while, I really feel that way --
this I would like to pay for, whether I need to or not, or in some other fashion add to the author's bin of incoming appreciation that hits the mark, making him/her feel a little better about having done whatever that was and having shared it with me. These things should be encouraged.
Blogger hacks has a rather nice PayPal "tip jar" kind of thing, which verbally gives about the right feel. It's a bit on the spacious side, and kind of eats space I would prefer not to have to allocate. Besides, the more space we allocate for it, I think (and this could of course be argued), the message "give me cold, hard cash" kind of gets nailed in (yes, the text testifies to the opposite; this does not change anything, though). I don't want it to look like or be perceived as that. I just want to make it easy for someone of my own mindset to drop a dollar or two, or whatever feels appropriate.
I wish I were a bit more graphically inclined; these things are difficult to design, if we think "an icon", and perhaps a bit of title text to clarify (on hover, perhaps) -- if anyone tosses some graphic creation (perhaps including the PayPal logo?) I like placed under the public domain (I intend to do the same), I'll be sure to drop my own first tip at you. :-)
Regarding licenses, by the way, I usually like the
Creative Commons licenses, but for once, even the least restrictive ones quite make the cut; we can't have this be the
ShareAlike license, because it requires that you must make clear to others the license terms of the work, and we just don't have the space, and risk mixing up that with the work on the page it sits on, and we can't have the
Attribution license, for the same reason (and adding that the creditee would again be blurred and mixed up with page content). Public domain was good in the Amiga days, though, and still is good.
I will place the results of this idea in the public domain, whenever I finish. Feel free to do whatever you want with it, hopefully for the better of the state of things. :-)
Ah, I didn't remember the provisions for paren match locations were as bad as they are, and for solving the generic case with some guarantee on upper bound execution time I might be prepared to agree.
I might try a solution that will in practice often work, without solving the generic problem (it will fail to find the location under some conditions.) Once you have a match, to determine the paren match spot, iterate through all the possible substring matches for each matched paren. When there was just one, we know its location. When there are more, try executing the regexp again with the n:th substring match replaced for something else. If the regexp no longer matches, we can be reasonably sure that was the match. (It could be worth iterating through all matches and verify that this was the only spot that yielded a non-match -- if we get several, we only really know that we don't know much).
Regarding delays, I think I'll try some in-page gauging of how long (wall) time compiling and executing the regexp takes on average on the machine that runs the script, and adapt the delays accordingly (by some margin), to do as well as each client would allow without ruining the user experience.
That said, if you'd like to improve upon it I'll gladly accept changes. You can shoot them to the mailing list, trac, and/or me directly via email.
I'm not sure where either of those are in URL space (I'm still not into mochikit community and usage), though presume the mailing list would refer to mochikit at googlegroups. Anyway, I'll try to get in touch if and when I do something about this that improves on the status quo.