July 12, 2006

Geek

Bonk

Python doesn't assign values to variables, it binds names to values.

Need to write that on a stickynote and attach it to my monitor.

Posted by: Pixy Misa at 05:05 PM | Comments (2) | Add Comment | Trackbacks (Suck)

July 10, 2006

Geek

We Hates It

We hates Python scoping rules. We hates them forever.

(Currently going for a doc crawl on the theory that it can't be that broken.)

Huh.

Okay, the problem I'm having involves modules, threads, and thread-specific global data. I haven't solved the problem with modules yet, but it turns out there was some magic added to Python 2.4 for thread-specific globals (threading.local). That's a comfort, because I knew that worked, but I couldn't figure out how. CherryPy, the web framework I'm using, supports this under 2.3, but it turns out that it's a hack and it's very slow. So I'm not going mad. Or at least, no more than usual.

I'm moving Minx from the test design, where it is a single CGI program (and so each request is perfectly isolated and I can slap the code together any which way) to production, as a multi-threaded persistent server. Which is much more fiddly in terms of structuring the code and variables, but is twenty to thirty times faster.

Up to 95% of the time taken by the CGI version is overhead: starting a shell, then starting a Python interpreter, loading the twenty or so libraries used, opening a connection to MySQL, and so on. The multi-threaded version does all of that once. (Or at worst, once per thread, for a persistent thread pool.) It also uses Psyco, the Python compiler, which adds a 30% to 50% speed boost for this sort of app. For the CGI version, Psyco takes long enough to do the compile that the overall performance is worse in most cases...

Only because the threads weren't actually isolated from one another, it didn't work at all. I could either add an extra parameter to all the roughly 100 functions I've written so far, or I could work out how to do thread-specific globals.

Update: Okay, all is forgiven. The threading.local trick works flawlessly, even with modules. Threading-local global data for one module is not visible in another, but even if that complicates things for me, that's right. They're modules, not include files. So I have thread-local module-local global variables... Yay!

Update: And it works perfectly with CherryPy. I expected that, because it only makes sense that CherryPy would be using the standard threading module, but there's a difference between being the only sensible way to do something and actually testing it.

Posted by: Pixy Misa at 10:34 PM | Comments (7) | Add Comment | Trackbacks (Suck)

July 07, 2006

Cool

Of Course I Am

Your results:
You are Wonder Woman

Wonder Woman
75%
Green Lantern
65%
Spider-Man
65%
Robin
55%
Supergirl
55%
Catwoman
50%
The Flash
50%
Hulk
50%
Iron Man
45%
Superman
40%
Batman
30%
You are a beautiful princess
with great strength of character.
Click here to take the "Which Superhero are you?" quiz...

Yes, I cheated. Of course I cheated. I got Spider Man. Twice.

(via Shamus T. Young)

Posted by: Pixy Misa at 02:15 PM | Comments (11) | Add Comment | Trackbacks (Suck)

World

Pow! Right To The Stars!

Insty:

TO THE STARS: A new foundation aimed at promoting faster-than-light travel. Give generously, especially if you're really rich.
Cosmic Log:
"The strategy of the Foundation will be to cover the whole span of ambitions, but with cycles of short-term, affordable investigations that target the most important questions. This span includes the seemingly simple concept of solar sails to the seemingly impossible goal of faster-than-light travel, to hedge the bets."
I hereby announce the creation of the Pixy Misa Omega Prize: One trillion dollars (US 1970 dollars adjusted for inflation) will be payable on the successful demonstration* of a human-safe, reusable, functioning faster-than-light drive.

* Successful demonstration defined as Pixy Misa using said drive to travel backwards** in time and earn at least two trillion dollars from compound interest and market investments.
** And yes, it has to be backwards in time. I can communicate forwards in time just fine. See here and here.

Posted by: Pixy Misa at 01:49 PM | Comments (8) | Add Comment | Trackbacks (Suck)

July 04, 2006

World

Happy Birthday America!

Love, Australia.

P.S. Don't mean to nag, but if you get a chance could you please return the lawnmower? Ta. Oz.

Posted by: Pixy Misa at 09:29 PM | Comments (3) | Add Comment | Trackbacks (Suck)

July 02, 2006

Anime

Episode What?!

I just kicked off the download for Keroro Gunso episode 27. I'd thought it was a standard 26-episode series.

Apparently not.

52 then? Um...

Would you believe 114 and counting?

Don't know how good it is beyond the first few episodes, though. (I did quite enjoy the first few episodes, but then the fansubs stopped. They've started up again - from a different group, and at a rapid pace - but I haven't gotten back to it yet.)

Posted by: Pixy Misa at 09:26 PM | Comments (8) | Add Comment | Trackbacks (Suck)

World

Read The Whole Thing

Back in April, author Dan Simmons (Hyperion series, Ilium, Hardcase and others) wrote a cautionary tale about - as his character termed it - the Century War, the Long war With Islam.

If you're reading this little blog, then most likely you have read essayists like Steven Den Beste and Bill Whittle, or at least the news and opinion sites like Instapundit and Little Green Footballs, or if not that, then some history, so if (like me) you had followed the links and read that story (it was framed as fiction, sort of; truth framed as fiction framed as truth) you would have nodded your head and skipped forward a little and said, Yes, yes. I know that, but it's always good to see another one who sees the dangers.

What Simmons didn't see, it appears, is the wilful blindness and vitriol of those who do not wish to see the world as it is. His response to the (predictable) outpouring of bile is a much longer and more tightly reasoned* essay. Read it. Admittedly, the people who do read it will largely not be those who most need to read it, but read it anyway.

* Not that the original story wasn't tightly reasoned, it's just that the reasoning was opaque to many readers. This essay brings the facts and reasoning to the front.

Posted by: Pixy Misa at 06:50 PM | Comments (2) | Add Comment | Trackbacks (Suck)

July 01, 2006

Life

A Day Of Peace

The Jawa Report is back up on a new server, at least if you're not in Europe, a large chunk of which has been firewalled off.

The rest of munu is largely stable, although there are a lot minor issues left after all the messing about I had to do during the attack.

I still have two broken computers, but that means I still have two working computers. (Well, two working computers that I am actively using.) I'll get the broken ones fixed sooner or later.

And I had nothing that I had to do today. Lots of things to do, but nothing that had to be done today. For the first time in a month, I didn't have some critical emergency to deal with.

I slept in. I read Alastair Reynolds' Pushing Ice (not unflawed, but eminently readable). I have a million things to do tomorrow, but that's tomorrow.

And now I'm going to go and beat up some girls. (The first reviewer on that page has it pretty much right. Good game, lots of fun, but could have been a lot better.)

Posted by: Pixy Misa at 10:07 PM | Comments (21) | Add Comment | Trackbacks (Suck)

June 29, 2006

Rant

I HATE PERL

Just thought I'd mention that.

Posted by: Pixy Misa at 05:04 PM | Comments (369) | Add Comment | Trackbacks (Suck)

Rant

Sesame Seeds

There are a million files on my notebook, and it had to eat cookies.txt?

Grr.

Posted by: Pixy Misa at 12:48 PM | Comments (1) | Add Comment | Trackbacks (Suck)

June 28, 2006

Geek

Warning Warning Warning

This site may hiccup a little, because I'm converting it to Minx.

Do not panic!

It doesn't help.

Posted by: Pixy Misa at 04:22 PM | Comments (4) | Add Comment | Trackbacks (Suck)

June 27, 2006

Cool

Web Sites That Do Not Exist... Yet

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.

Posted by: Pixy Misa at 02:28 PM | Comments (7) | Add Comment | Trackbacks (Suck)

World

A Message From Our Sponsors

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.

Thank you.

Posted by: Pixy Misa at 12:56 PM | Comments (8) | Add Comment | Trackbacks (Suck)

Rant

Not Even Wrong

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.

Posted by: Pixy Misa at 12:16 PM | Comments (5) | Add Comment | Trackbacks (Suck)

June 26, 2006

Geek

Quote Of The Day

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 executing

rm -r /var/public_www/

As you might imagine, this behavior makes PHP very dangerous in the hands of an idiot.

Yeah.

Posted by: Pixy Misa at 02:25 PM | Comments (6) | Add Comment | Trackbacks (Suck)

June 24, 2006

Life

Yay!

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.

Posted by: Pixy Misa at 10:26 PM | Comments (9) | Add Comment | Trackbacks (Suck)

June 22, 2006

Life

Splatsville

Still having major notebook problems. I've got a 1GB SD card installed at the moment, and I'm saving all my work there rather than the hard disk. It seems to run fine most of the time, but it's a pain in the butt when it needs to boot.

I'll try swapping drives again this weekend.

Posted by: Pixy Misa at 09:57 PM | Comments (2) | Add Comment | Trackbacks (Suck)

June 21, 2006

Geek

Aha! (Maybe)

It's not the memory - Memtest-86 gives it a clean bill of health.

It's not the disk - checkdsk runs fine, and my applications have no problems.

Windows says it's a disk problem but it acts like it's a memory problem.

What can cause that?

The pagefile. The evil, good-for-nothing, rat bastard pagefile.

I thought to myself If this were a real operating system, it would have a log of all these errors.

Then I thought, It is a real operating system. A crappy one, but a real OS nonetheless.

And it has crappy log files, but they exist, and they were full of errors - all relating to the pagefile.

As soon as I manage to get the darn thing to boot, I'm going to disable it.

Again. I already disabled it, but it didn't take. Who knows why; this is Windows.

Okay, it finished booting, and now has no pagefile.

Let's see if it crashes.

...

So far, so good. I did get one of those "delayed write failed" errors (so maybe it is the disk after all), but I managed to watch last week's episode of Haruhi Suzumiya on my new TV without anything catching fire, blowing up, crashing, or collapsing into a closed space.

Which is good enough for now.

Tomorrow I send the motherboard from my new PC back for replacement. Then I plan to (finally!) get the forms processing working in Minx. This is an example of what you can do with fairly simple templates; I intend to expand on that. A lot.

Posted by: Pixy Misa at 08:19 PM | Comments (2) | Add Comment | Trackbacks (Suck)

Cool

In Other News

Corel wrote to me and said, essentially, Yeah, our Paint Shop Pro pricing in Australia sucks. We know, and we're working to fix it, but we're tied up in old distribution contracts.

For those who haven't been following the story: I can download Paint Shop Pro online for $59. Except I can't, because I live in Australia.

I can buy it in a box for $79, less a $30 mail-in rebate. Except I can't, because I live in Australia.

Because I live in Australia, it costs me two hundred and ninety-nine dollars.

But at least they have acknowledged the problem.

Posted by: Pixy Misa at 04:01 PM | Comments (3) | Add Comment | Trackbacks (Suck)

Geek

Okay Then

Either not the memory, or not only the memory.

Joy.

Update: Memtest-86 is on the third pass without finding any errors.

Not the memory, then.

Not the disk drive, since I swapped that yesterday and it died within ten minutes.

It happens whether I'm on battery or mains power.

Grr.

Dell is having a sale right now...

Posted by: Pixy Misa at 04:26 AM | Comments (4) | Add Comment | Trackbacks (Suck)

June 20, 2006

Geek

It Was The Memory

I'm just hoping it was only the memory.

Swapped drives in my notebook: BSOD within 10 minutes.

Pulled out the original 256MB of memory: No BSOD so far.

Windows Explorer has restarted a couple of times, but that is not exactly unusual. I'm going to run another checkdsk, because if the memory was playing up, there could be some nasty things lurking in my filesystem.

No progress on the media centre box; looks like that will have to go back for the friendly folks at EYO to take a look at. I've been buying stuff from them for years, and this is the first time something has just plain not worked. Video cards that don't run under Linux, sure. Network cards that are incompatible with my motherboard, yep. And the Hard Drive Destruction Bunny is always lurking around the next corner. But this is the first time I haven't been able to get a new toy to at least boot.

Posted by: Pixy Misa at 09:33 PM | No Comments | Add Comment | Trackbacks (Suck)

Cool

I've Seen Things You People Wouldn't Believe

apotheosis, commenting at Protein Wisdom:

Clara Bow was the IT girl.

Then there came pixie misa. Who has watched server farms glittering in the dark near the Tannhauser Gate.

Hate to disillusion the fellow. So I won't.

Posted by: Pixy Misa at 09:28 PM | Comments (1) | Add Comment | Trackbacks (Suck)

Life

That'd Be Right

Bought a new media centre PC.

It doesn't work.

Oh, and my notebook died about thirty times last night. It may or may not be the hard disk. It was working this morning, but when I got to the office and tried to bring it back from standby it cold booted.

I do have a backup.

Posted by: Pixy Misa at 05:14 PM | Comments (2) | Add Comment | Trackbacks (Suck)

June 17, 2006

Life

Speaking Of Which

Working 15 hour days, 7 days a week, gets to you after a while.

I haven't even watched the latest episode of Haruhi Suzumiya yet.

I have a brand new HDTV, and I haven't watched anything on it.

<Dies.>

Posted by: Pixy Misa at 04:38 PM | Comments (12) | Add Comment | Trackbacks (Suck)

Life

Yes

DDoSed again.

"Interesting" isn't the term I'd use, though. "Bloody irritating", perhaps.

Posted by: Pixy Misa at 04:34 PM | Comments (1) | Add Comment | Trackbacks (Suck)

<< Page 11 >>

Processing 0.02, elapsed 0.0444 seconds.
48 queries taking 0.0244 seconds, 141 records returned.
Page size 100 kb.
Powered by Minx 0.8 beta.