Archive for May, 2005

pondering lighttpd

Wednesday, May 25th, 2005

i'm looking at alternatives to apache, at least for serving static content (for example, i serve over 600,000 [pet].swf files a day, mostly embedded in other people's web pages). apache uses a lot of memory per child process, so i want something that has a small memory footprint.

i first was going to try thttpd, but now i am looking at lighttpd. what's particularly intriguing is that it apparently can run PHP very fast as well. it also seems to be in active development, and i'm reading good things about it around the web.

for now i think i am going to try running lighttpd running on a different port, just for serving the embedded pet swfs. i'll report here later.

note to myself

Tuesday, May 24th, 2005

(all one one line)
ps ax -o "vsize" -U www | tail -n +2 | awk '{sum=sum+$1;printf("sum: %d\n", sum)}' | tail -1

displays the total memory used (virtual mem, in 1024-byte blocks) by all processes owned by the user 'www', as reported by ps. i think that's right anyway.

do the same with "rss" instead of "vsize" to get real memory use (also in 1K-blocks).

i'm sure there's an easier way to do this. please share if anyone knows :)

MSN spaces

Tuesday, May 24th, 2005

summary: pasting pets into rich edit controls on IE!

background: all this time i had thought that the pets were compatible with MSN spaces (as long as you used the image-based version of the pet code anyway). and i'd tested it, even… but with firefox only.

it turns out that when you add a blog entry to your MSN space using IE on windows, you get a nice rich text editor. the rich text editor doesn't allow you to paste in raw HTML code… trying to do so simply results in the HTML code being displayed as text, instead of the desired happy pet image.

(on any non-IE browser, you get a plain textarea where you can enter in all the HTML you want (although many tags are filtered out), so the pets work fine in those browsers.)

what to do? although it's tempting to simply tell everyone to use a non-IE browser, that wasn't a realistic option for me. and unlike many other bloggy sites with rich text editors, MSN spaces doesn't have an option to turn off rich text editing!

ack!
(more…)

function(blog)

Friday, May 13th, 2005

from an irc chat with dlb:

<bunnyhero> i need to get over my fear of not contributing anything new to the discussion
<dlb> yeah, and serving as a filter is contributing
<dlb> just picking stuff that interests you and passing it along
<bunnyhero> true true. good point.
<dlb> the signal comes from the self oscillating of the filter network that way

LJ syndication test

Friday, May 13th, 2005

this is a test post to see if the RSS feed will be picked up on the livejournal syndication account "bunnytech."

*waves*

moving to XHTML?

Friday, May 13th, 2005

i think i may try to convert the entire site to XHTML 1.0 transitional. currently it's HTML 4.01 transitional… largely because of how much flash i use, and also partly because of Ian Hickson's "Sending XHTML as text/html Considered Harmful". on the other hand, despite being basically HTML 4, i doubt many (any?) pages validate correctly (especially now since i just added />'s to the img tags in the common header file so that this tech blog will be XHTML 1.0 complaint :P )

so why bother to convert to XHTML? mainly for purposes of self-education, and because XHTML just "feels" tidier, since it's XML, and that appeals to the side of me that likes coding elegance. i think Hickson makes some excellent points, and perhaps serving XHTML as text/html is indeed very broken, but eh, my pages are broken now anyway, so…

but back to embedding flash in XHTML. i'd looked at flash satay, which looks very clean, but having to have a separate container "loading" SWF so that flash movies will stream in IE seemed like too much of a burden to manage.

then i came across deconcept › Proper Flash embedding: FlashObject Best Practices, which is a javascript-based approach to writing in the appropriate flash tags. i haven't tried it yet, but it looks neat, and most of my site requires javascript anyway, so that's not a new burden for my visitors.

i will have to poke around with it and see how it well it works with the cyber pets