It's a duck pond.
Why aren't there any ducks?
I don't know. There's never any ducks.
Then how do you know it's a duck pond?
Saturday, August 11
With the technology and market changes over the past year - the arrival of cheap and super-fast quad-core systems, and Softlayer's cheaper bandwidth pricing and bandwidth pooling options - my existing strategy of multiple small servers has become less attractive. And Softlayer are running a special this week that delivers an extra 2GB of memory free on their mid-sized servers.
So I'm going to be smooshing the three current mu.nu servers down to one. I can do this safely because with Minx I can fall back to the mee.nu servers to keep things running - mu.nu users will lose CPanel access while I restore things, but many people don't use CPanel, and their blogs will still work.
Now, if I'm going to smoosh three servers onto one, I'm going to want a fairly large box. Say, something like this:
top - 03:19:56 up 4:58, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 122 total, 1 running, 121 sleeping, 0 stopped, 0 zombie
Cpu0 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu1 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu2 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Cpu3 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 6231080k total, 1116328k used, 5114752k free, 88976k buffers
Swap: 2096440k total, 0k used, 2096440k free, 776044k cached
Fortunately, that's exactly what I have.
Say hello to Midori!
Posted by: Pixy Misa at
06:25 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 258 words, total size 2 kb.
Thursday, August 09
I need an α' channel, dammit!
Posted by: Pixy Misa at
12:20 AM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 11 words, total size 1 kb.
Wednesday, August 08
So if I'm compositing drop shadows, I have to draw the shadows on a dark (but transparent) background, otherwise the antialiasing produces light fringes on the shadows when I composite the shadow layer. But if I use a dark background, when I punch out the text the antialiasing produces a dark fringe on the text when I composite that layer. (This is because the antialiasing antialiases the alpha channel as well as the colours.)
So what I need to do is apply a transparent copy of the text in the text colour over the shadow using an opaque mask. Which I can't do just using the styletext function, because the underlying library only gives you one alpha channel for drawing operators, and I need two.
Darn.
Posted by: Pixy Misa at
06:31 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 128 words, total size 1 kb.
This:
Is the Gigabyte GA-MA69GM-S2H.
It supports up to 16GB of memory (ECC optional), four SATA 3Gb/s drives (with RAID 0, 1 and 10), 2 IDE drives, gigabit ethernet, ten USB 2.0 ports and three Firewire ports; 7.1+2 sound and optical and coax S/PDIF in and out (with optional bracket); VGA, DVI-D, HDMI, component, S-Video, and composite video outputs (though you can only run one digital and one analog output simultaneously); PCIe x16 and x4 slots and two PCI slots. And serial, parallel, floppy, keyboard and mouse, though you need to get optional brackets for the serial and parallel ports.
Apparently it performs well and has good overclocking features too.
What's not to like?
Well, the 690G northbridge provides 24 PCIe lanes, but four of those are used to connect the southbridge, so only 20 are left. The southbridge doesn't integrate either ethernet or Firewire, so if you want a x16 slot and a x4 slot, those have to go on PCI. And clearly you can't have any more PCIe slots either. (The S2H's big brother, the GA-MA69G-S3H, has three PCIe x1 slots in addition to the x16 and x4. Since this is impossible, I'm not sure exactly how they did it.)
Onboard video might be up to playing something like Sims 2, but nothing beyond that. It's about equal to my old 9600XT (4 pixel shaders, 4 ROPs), except that AMD have pulled out the vertex pipelines and left that to the CPU.
Only four SATA ports and no e-SATA. If I add a 2+2 SATA/e-SATA card, that's the PCIe x4 slot gone.
Apart from those minor issues, it's an amazing little board. I want one two.
Posted by: Pixy Misa at
03:39 AM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 281 words, total size 2 kb.
Okay, the real problem is probably that Firefox is single-threaded, but the immediate problem was Firebug. Ever since I installed it I've been getting these random pauses while using Firefox.
Turn it off and the delays are gone, but so of course is Firebug.
Posted by: Pixy Misa at
12:17 AM
| Comments (3)
| Add Comment
| Trackbacks (Suck)
Post contains 46 words, total size 1 kb.
Tuesday, August 07
Hang on. Transparent shadowed text isn't working properly any more.
Poke poke.
Hey! The compositing code for multi-effect text is missing! Who stole the compositing code?! It's right here in the test program, but it's not in the library, just as if the person who compiled the library hadn't actually... uh.
Never mind.
Note to self: overlay.paste(textlayer,(0,0),mask) works because the opacity in the mask controls how the textlayer is composited with the overlay, including the opacity values of the textlayer. Where the mask opacity is 100%, the textlayer colour and opacity replace those in the underlying overlay, allowing the translucency of the text to punch through the translucency of the shadow and/or outline.*
Note to everyone else: Brain has been kind of fuzzy lately, and the text effect compositing process has exactly one too many steps for my working stack.** Particularly at 2AM. Thank the Babylonians for written language. Programming would be really hard if I couldn't write anything down...
* Note to self regarding note to self: And that's why you only have to draw the text twice, not three times.***
** Specifically, the use of the mask alpha channel to control the compositing of the other two alpha channels. My stack seems to be fine with using alpha channels on colours, just not with this particular trick.
*** For values of two not larger than nine, except where overridden by the user.
Posted by: Pixy Misa at
07:59 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 237 words, total size 2 kb.
Sunday, August 05
A little buglet that crops up occasionally in Minx is that if a comment contains a very long word (e.g. a link which isn't linked properly), while it displays correctly on the blog page, it messes up the comment management screen. (Because the blog page uses CSS but that was too much trouble for the comment management screen so I went with tables, and while tables are nice in some ways there's no overflow=hidden option.)
So I need the ability to break up run-on strings in comments. Slashdot does this, for example; if you enter a URL in a Slashdot comment it will show up with spaces in it (though the link still works). But I want the URL to display correctly and the link to work. For that, I need the opposite of , the non-breaking space found in Latin-1 and Unicode: A breaking non-space.
A little Googling confirmed that there is such a beastie. It's called ‌.
Of course, ‌! That should have been obvious!
Mutter mutter.
Posted by: Pixy Misa at
06:20 PM
| Comments (5)
| Add Comment
| Trackbacks (Suck)
Post contains 176 words, total size 1 kb.
Thursday, August 02
The new Photo module is about ready to go. Its primary purpose is to dynamically (or statically) create elegant banners for blogs, but I thought I'd torment it a little and see what I could come up with. Hence the examples below.*
[lolcat]s are undemanding typographically. This example has the text outlined in grey and a drop shadow, but that's reasonably quick (under 100ms on the test system, rather faster on the production servers) since I determined that the Gaussian blur on the shadow didn't really add all that much.
[mote]s are rather more troublesome. The difficulty comes with the title. Unless I can find a free Times-like smallcaps font where the smallcaps are underlined, I have to break the text into three parts and individually calculate the positioning. That's not as straightforward as I'd hoped, and while it works very nicely in this example, if I change the title text, the font size, or the typeface, things start to go subtly (in some cases, not so subtly) out of whack.
One reason is that I'm not properly calculating the intercharacter spacing; I can fix that at the expense of probably no more than a few extra milliseconds. Possibly that's the whole reason, but I doubt I'll be so lucky. We'll see in the morning (later in the morning...) If it takes too long, I'll just expose a tweak array for manual adjustments.
Update: Aha! Image.getbbox does what I need - it returns the boundaries of the actual drawing, ignoring the background. With a little fiddling, that will let me line everything up as precisely as I want.
Update: Yay! That nails it for the underline. Perfect. Takes all of 1.5ms longer and it actually works. Gives me far more flexibility in letting users choose custom fonts and sizes and so on, so I can put the same thing into the banner generator. I can even adjust it so that I get the baseline width rather than the overall width. You can see in the example that the base of the T is underlined, but not the full width; I did that by messing about. I'm not sure what the Chicago Manual says about this - indeed, I wonder where my copy has got to - but I like it that way.
* Well, its primary purpose is to unify the image processing features in Minx by providing a clean wrapper around the PIL and Aggdraw libraries. But the reason I need all that is so that I can dynamically generate elegant banners for blogs.
Posted by: Pixy Misa at
05:43 AM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 427 words, total size 3 kb.
Wednesday, August 01
After a time in the doldrums, things are moving again in PC-land. Intel have slashed the prices of their Core 2 Duo and Quads by as much as 75% since they were introduced last year, and AMD has followed suit, so that now all desktop CPUs from both companies are very affordable.
Memory prices have declined 50% in the same period (at least for DDR2) except for the high-density 2GB unbuffered modules, which have fallen by about 80%. So it's now quite affordable to put 8GB of memory in a PC. Entirely useless if you're running Windows, though, because Microsoft still haven't worked out how to manage device drivers properly...
Meanwhile, Seagate and Western Digital have each announced 1TB drives. Seagate's 750GB model showed up late last year at around A$1 per GB; Western Digital's 1TB drive costs around 50c per GB. This is great news for me, because I currently have 24 disk drives in use.* Well, 23; one side of a mirror died the other day. I'd like to reduce that before any more start dying.
Speaking of which, does anyone know any good programs for finding duplicate files? I downloaded a few, and they all choked and died. Guess I can just md5sum the contents of all my filesystems and load it into MySQL or something.
I priced two machines (Windows and Linux), each more than twice as powerful but costing less than half as much as what I'm using now (built in 2004). Now if only I had some money...
* Yeah, I have a lot of disks, but many of them are smaller, older drives. I could replace 16 of them with 3 of the new drives and have more space than before. Indeed, that's exactly what I hope to do.
Posted by: Pixy Misa at
03:28 PM
| Comments (2)
| Add Comment
| Trackbacks (Suck)
Post contains 303 words, total size 2 kb.
53 queries taking 0.1519 seconds, 353 records returned.
Powered by Minx 1.1.6c-pink.