The ravens are looking a bit sluggish. Tell Malcolm they need new batteries.

Thursday, April 08

Rant

World Ends, Film At 11

They're making Starship Troopers 2.

When even Slashdotters can point out that the first film is a failed attempt at satire based on a complete lack of understanding of the original book, you know you're in for some Z-grade celluloid.

Can we bring Mike and the robots out of retirement for the premiere? Or Joel, I always liked Joel.

Posted by: Pixy Misa at 08:42 AM | Comments (3) | Add Comment | Trackbacks (Suck)
Post contains 69 words, total size 1 kb.

Wednesday, April 07

Geek

Open Sourceme

If you're looking for an open-source CMS - that's content management system, which means a program to manage your web site - you could do a lot worse than to browse around opensourceCMS. They have (counts) 33 portals, 7 blogging systems, 3 e-commerce packages, 7 groupware systems, 5 forums, 3 "e-learning" packages and 4 other thingies all set up ready for you to test drive.

Unfortunately, they only have packages written in PHP, which is not my favourite langauge (and far from my favourite programming paradigm), but if you're looking for something useful rather than something elegant, it's a darn good place to do a bit of tyre-kicking.

I'm looking for a package that integrates blogging, forum, and portal functions and doesn't suck. So far I haven't found one, which is why I'm writing Minx. Although to be honest recently it's been more of a case of not writing Minx. Sigh.

Update: A number of the packages seem to have had their tyres kicked rather too thoroughly and aren't working right now. They get refreshed (says the site) every hour, so maybe they'll come back soon.

Posted by: Pixy Misa at 11:52 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 190 words, total size 1 kb.

Tuesday, April 06

World

Blood Type C

A few months ago, Arnold Kling wrote this article at Tech Central Station discussing the difference between what he calls Type C and Type M arguments.

Briefly put, Type C arguments discuss the consequences of an action: X is a bad idea, because if you do that, Y will happen. Type M arguments, on the other hand, relate to the motives behind the action: X is a bad thing because you're only doing it to get Z.

It's a very useful categorisation. It's a good article, too. Go read.

There's a further discussion here. The Lefties in the comments just don't get it. To them, it's just the Right beating them up again.

And it's that sort of nonsense from the Left that has pushed me hard into the center, and it's why I treasure more than ever any rational voice from that sector of Polispace. Roger Simon, Michael Totten, Jennifer and other such luminaries. Their voices are sadly few.

Posted by: Pixy Misa at 01:52 PM | Comments (15) | Add Comment | Trackbacks (Suck)
Post contains 166 words, total size 1 kb.

Geek

MT Zoom

I spent a couple of hours today seeing if I could take one of the tricks I've used in the blogging system I'm developing, Minx, and apply it to MT. It does work, but it's not the solution to all life's problems.

MT is robust and has lots of good features, but it's as slow as a dead dog. For example, on an Athlon XP 2800+, with both the code and the database stored in a ram disk, it takes around 28 seconds of CPU time to add a three-word post to Ambient Irony. I haven't yet had time to profile MT to work out what the hell it's doing with all that time. Part of the problem is MT's insistence on static files and its brute-force approach: Whenever you update a post or add a comment, MT will rebuild not only the individual entry, but also the main index, the archive for whatever categories that post is in, and the archives for that day, week and month, and the archives for the previous day, week and month, and, if they exist, the archives for the following day, week and month.

And MT is slow at just rebuilding a single entry, so when it has to run around rebuilding everything in sight, it's really slow.

Without fixing the code, the only way I can see to cure this is to give it less work to do. One way to do this is to disable any archives you don't use. If you don't use categories, make sure that category archives are turned off.

The next thing you can do is to make the templates simpler. And here's where my little trick comes in.

If you have your blog set up like me, the appearance of the posts in the main index is exactly the same as in the monthly archives and the category archives. You could use a sub-template to keep the common data, but there's an even sneakier thing you can do:

Step 1.

Create a new template. Call it something like "Individual Include Template". Copy the section of your main template that deals with the individual entries into this new template. If you are using the default MT template, the result will be this:


<div class="blogbody">

<a name="<$MTEntryID pad="1"$>"></a>
<h3 class="title"><$MTEntryTitle$></h3>

<$MTEntryBody$>

<MTEntryIfExtended>
<span class="extended"><a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>"</a></span><br />
</MTEntryIfExtended>

<div class="posted">Posted by <$MTEntryAuthor$> at <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a>
<MTEntryIfAllowComments>
| <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
</MTEntryIfAllowComments>
<MTEntryIfAllowPings>
| <a href="<$MTCGIPath$><$MTTrackbackScript$>?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack (<$MTEntryTrackbackCount$>)</a>
</MTEntryIfAllowPings>
</div>

</div>
Save the new template.
Step 2.

Now go into the Archiving page in Weblog Config. Click on the Add New button at the bottom, and create a new Individual Entry archive using the template you just created.

You will need to give the files created by this template a new and unique name. This is what the Archive File Template field is for. You will need to use MT tags here to generate the name. A good, simple name might be

<$MTEntryID>.i

Now, save your archive settings and do a full rebuild of your blog to generate all those little .i files, because in the next step you're going to need them.

Step 3.

Go into your Main Index template and (after making a backup copy), cut out all the code you put into your new "Individual Include Template" and replace it with this:

<?php  include 'archives/<$MTEntryID>.i'; ?>

(Assuming that your archive directory is called "archives", which it probably is.)

Save your changes, but don't rebuild yet. Go into the Preferences page in Weblog Config, and scroll down to where it says File extension for archive files This is probably set to html. You will need to change it to php.

And in the Templates page, select your Main Index template and change the output file to index.php.

Save the changes, and now go and rebuild your main index. If you got it right, it will now rebuild without having to process the details of the individual entries. The entries will instead be read automatically from their individual .i files whenever someone visits your blog.

Repeat step 3 for your daily, weekly, monthly and category archives, whichever ones you may be using, except that for these you will not need to specify the "archives" directory as it will look there automatically.

Step 4. (Optional)

Somewhere near the top of your main index, add the following code:

<?php

$timeparts = explode(' ',microtime());
$starttime = $timeparts[1].substr($timeparts[0],1); ?>
And in a suitable place near the end, add this:
<div class="sidetitle">
Render Time
</div>

<div class="side">
<?php
$timeparts = explode(' ',microtime());
$endtime = $timeparts[1].substr($timeparts[0],1);
echo bcsub($endtime,$starttime,6)?> seconds<br>
</div>

This will show you how long PHP takes to put all the individual entries together to build your page. A fairly typical result for Ambient Irony, which has 25 entries on the main page, is 0.005888 seconds. Which I must say is satisfyingly quick.

Having done all of that, is MT now zoomily fast? Alas, no. It will probably halve the time required to add a post or leave a comment, but it's still dog slow compared to what it should be capable of.

ExpressionEngine is quite a bit faster at processing posts and comments - at least ten times faster - but it's between thirty and a hundred times slower at delivering the pages. That's the main reason I decided not to go down that route.

This is basically how Minx works, except that the Minx template engine is about a hundred times faster than Movable Type's. It's just a pity that it's not finished yet. sad

Update:

Here's how to turn off the rebuilding of the index and archive files when someone leaves a comment.

The program that processes comments is called Comments.pm, and it lives in the lib/MT/App directory under whatever directory you have installed MT in.

Before making any changes, copy Comments.pm to Comments.bak.

In Comments.pm, look for the line
sub post {
This is the start of the posting routing that we will need to modify.

Now scroll down from there until you reach three line that read

$app->rebuild_indexes( Blog => $blog )
    or return $app->error($app->translate(
        "Rebuild failed: [_1]", $app->errstr));
Comment out these three lines by putting a # at the start of each line.

That's it.

If you are running MT-Blacklist, you will need to modify the code there instead. The file you want in this case is extlib/jayallen/Blacklist.pm. The code change required is identical.

If you only want to disable this rebuilding function on one blog, you can do it like this:

if ($comment->blog_id != 1) {
    $app->rebuild_indexes( Blog => $blog )
        or return $app->error($app->translate(
            "Rebuild failed: [_1]", $app->errstr));
}
This will cause comments to rebuild indexes and archives on all blogs except for blog number 1.

Posted by: Pixy Misa at 08:12 AM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 1121 words, total size 8 kb.

Monday, April 05

Blog

Trickery

Just testing something tricky. Don't mind me...

And waddya know, it worked. Hehehehehehe. This could be fun!

Posted by: Pixy Misa at 11:24 PM | Comments (7) | Add Comment | Trackbacks (Suck)
Post contains 19 words, total size 1 kb.

Sunday, April 04

Cool

Sign Of The Times

ledsign.jpg

Posted by: Pixy Misa at 12:29 AM | Comments (3) | Add Comment | Trackbacks (Suck)
Post contains 8 words, total size 1 kb.

Saturday, April 03

Anime

How AnimeSuki Got Its Groove Back

AnimeSuki has been a bit quiet lately, listing only a couple of gig of new anime each day.

Thursday they managed to boost that up to thirteen gig.
Friday they raised it to thirty.

Good thing I have unlimited downloads. Good thing too that these DVD-Rs are so cheap...

Update: And pfft! Just like that, they were gone. I wonder if AnimeSuki got bit by an April Fools prank?

Posted by: Pixy Misa at 11:39 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 81 words, total size 1 kb.

Friday, April 02

Blog

Three Blogmigos

Glenn Reynolds, James Lileks and Roger L. Simon together on Hugh Hewitt.

Posted by: Pixy Misa at 11:06 PM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 16 words, total size 1 kb.

Thursday, April 01

Blog

Quick Update

eggcard.jpg

Posted by: Pixy Misa at 01:40 PM | Comments (6) | Add Comment | Trackbacks (Suck)
Post contains 4 words, total size 1 kb.

Cool

If I Was, Which I'm Not

If I was going to spend the rest of my existence as a ten-inch-high plastic figurine, I expect I would indeed want to bust a cap in someone's ass. (Did I say that right? Sounds dirty.)

Gangsta Bitch!
You're Gangsta Bitch Barbie. You're tough and you
like it rough, and of course you like to pop a
cap in any wiggers ass.
If You Were A Barbie, Which Messed Up Version Would You Be?
brought to you by Quizilla


(Thanks to the Cheesemistress of Chaos)

Posted by: Pixy Misa at 01:24 PM | Comments (1) | Add Comment | Trackbacks (Suck)
Post contains 95 words, total size 1 kb.

<< Page 4 of 5 >>
78kb generated in CPU 0.1852, elapsed 0.827 seconds.
58 queries taking 0.7082 seconds, 415 records returned.
Powered by Minx 1.1.6c-pink.
Using http / http://ai.mee.nu / 413