Back in a moment.
Thank you Santa.
Friday, June 30
Just thought I'd mention that.
Thursday, June 29
There are a million files on my notebook, and it had to eat cookies.txt?
This site may hiccup a little, because I'm converting it to Minx.
Do not panic!
It doesn't help.
Wednesday, June 28
PaPal - The easy, secure, modern way the buy your indulgences. (But you don't ever want to call their complaints department.)
NovaNova - A central clearinghouse of which BitTorrent directories are up, which are down, and which have been sued out of existence. Updated every 30 seconds.
WTF Overload - Posting pictures of the cutest programming screwups from all over the world.
SlashDigg - An automated, user-recommended, real-time distributed denial of service attack.
PunditSpace - The place for teenage political commentators to expand their social networks.
Blogr - It's a blogging system - only now you can draw boxes around parts of people's posts and leave pointless one-word comments in them.
IRDB - The internet rack database. Know you've seen a particular pair before, but can't remember where? This site has it all, including an innovative 3D indexing system.
Tuesday, June 27
If you believe in astrology, you are an idiot.
More than that: If you believe that astrology might sometimes work, might have a kernel of truth to it, is anything other than a two-thousand-year-old scam feeding off a five-thousand-year-old blunder, then you are an idiot.
Bill Keller, editor of the bleedin' New York Times:
It's an unusual and powerful thing, this freedom that our founders gave to the press.The founders did no such thing.
The founders recognised a pre-existing freedom, and wrote the Bill of Rights to protect that freedom:
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances.The founders gave no special freedom to the press at all. What they did was to forbid Congress to legislate against freedom of speech, and freedom of the press.
That pillock Keller again:
The power that has been given us is not something to be taken lightly.You haven't been given anything. You have arrogated power to yourself, and hold yourself unnacountable.
Draping yourself in the Constitution at this point is not going to convince anyone.
SESSION is an associative array (aka Dictionary). When the session times out, things like 'Tempfile' are no longer defined. (PHP has an unset() function that undefines a reference.) But when PHP sees an undeclared reference, it doesn't error out -- instead it substitutes '' (a blank string) if the reference occurs within a string. So now the user is executingYeah.
rm -r /var/public_www/
As you might imagine, this behavior makes PHP very dangerous in the hands of an idiot.
Sunday, June 25
Got a moment of piece and watched episode twelve/12 of Haruhi Suzumiya on the new TV, which I'm very happy with. It has the usual contrast issues of LCDs, but not overly so, and the colour and clarity are wonderful.
Need to get my HTPC set up next. I'm typing this on my notebook's keyboard, but using the TV as the screen. Again. it's on VGA so it's not sub-pixel perfect like DVI, but it's more than good enough.
But first: Minx. I'm switching the munu comments system to Minx tomorrow, so there's a bit of tweaking and testing I need to do.
Oh, and a very good episode it was too.
Aargh! Stuck pixel! Stuck pixel! Didn't see it before. Stuck pixel!
Red. It's always red.
Friday, June 23
I hate regular expressions.
There's this thing I call information density*. Regular expressions are extremely information-dense. So are (for example) Forth and APL. With any of these, you can express a very complex algorithm in a very short sequence of symbols, but that comes with a cost.
People are used to dealing with information density within a certain range. For the most part, the information we receive has massive amounts of redundancy; you can often miss half the message and still understand it. Not so with regular expressions - every single bit matters. There are no (or almost no) cues to what is going on; you have to inspect each symbol one at a time, parse them into groups, interpret the groups, work out the relationships between the groups... And do it all correctly.
Computers are good at that. Humans not so much.
Well, computers are supposed to be good at it, anyway.
The subject arose because I needed a string-formatting language for the templating system in Minx. Python has fairly good formatting for numbers, dates, and times, but it has no equivalent formatting library for strings. It thinks it has several, but it doesn't. What it has is libraries that format things into strings, but nothing to format the strings themselves.
So I used those. And the first example - not particularly complicated - sent the template engine into what appeared to be an infinite loop. Worked fine in the examples I tested. Worked fine for the first three items on the page. Raised an exception for the next item (quite validly). And then tried to process the item after that and was never heard from again.
I'm sure I could fix it, but it remains that it happened to me, and I wrote the blasted thing. If it happens to me, then a week after launching the software I'm going to find the server with a load average of 700 doing nothing but processing regular expressions for ever and ever.
So I wrote a little text-formatting library instead.
With plugin support.
Sixty lines of code, does almost everything I need.
* There's a specific term for it, but I can't recall it at the moment. But it relates to randomness and entropy.
56 queries taking 0.0161 seconds, 296 records returned.
Powered by Minx 1.1.6c-pink.