annals of poorly executed upgrades

I had tried 2.2 before and given up on it (is there a compelling reason to completely reject the syntax of an established configuration and at the same time not provide some kind of migration tool?)…. Turns out that 2.0’s threading is not all that good, where 2.2’s is, but the bear was getting all the right modules and php all hooked in again.

for some benighted reason, I decided to upgrade httpd from Apache 2.0.63 to 2.2.8. I had tried 2.2 before and given up on it as I couldn’t map my old configuration onto the new version/style (is there a compelling reason to completely reject the syntax of an established configuration and at the same time not provide some kind of migration tool?). I was either more lucky or more stubborn this time. I’d love to share how I got it to work, but I can’t recall all the steps and missteps involved.

The catalyst was realizing how slow the server with one user accessing the squirrelmail webmail instance: I knew there were different service models (prefork, threaded, etc.) and decided to try them. Turns out that 2.0’s threading is not all that good, where 2.2’s is, but the bear was getting all the right modules and php all hooked in again. There is a lot of stuff in Apache 1.x and 2.0.x that just works, even if is somehow inelegant. I can sort of see the reason to break out the config directives into files rather that sections of the same file that get muddled. But a parser that could take an existing (ie, working) config file and a. make it work in a 2.2 environment and b. do the sectioning would be a great thing.

At the end of the day, the performance issues I was annoyed by seem to be resolved.

Continue reading “annals of poorly executed upgrades”

where does the time go?

Congress has a lot to do: Appropriations, Tax Reform, Health Insurance, Campaign Finance Reform, Housing, Environmental Protection, Energy Sufficiency, Mass Transportation.

…The whole thing — Barbara Jordan’s statement on the impeachment process — is worth reading, but I was struck by that list of political concerns, that legislative agenda.

Congress has a lot to do: Appropriations, Tax Reform, Health Insurance, Campaign Finance Reform, Housing, Environmental Protection, Energy Sufficiency, Mass Transportation.

[From Sisyphus Shrugged – not nearly enough ]

The whole thing — Barbara Jordan’s statement on the impeachment process — is worth reading, but I was struck by that list of political concerns, that legislative agenda. That was on the table in 1974, and without exception, it could be on today’s agenda as well.

So what has gotten done in those 34 years?

you rang?

While we were down on the field working on our forehand flicks , we saw some strange goings-on: turns out it was the 15th Annual Greater Seattle Open Boomerang Tournament . We got some details from one of the competitors, with the most interesting of all being that the world championship will be here in August.

While we were down on the field working on our forehand flicks, we saw some strange goings-on: turns out it was the15th Annual Greater Seattle Open Boomerang Tournament. We got some details from one of the competitors, with the most interesting of all being that the world championship will be here in August.

Tossing a flying disc, no matter how cleverly or for however many consecutive catches, seems pretty pedestrian after seeing boomerangs in the wild.

driving force

Explaining to a 9 year old girl why Air Mail paper is so thin and why the postage is so much more(almost US$1 per ounce), I was reminded that the mail has always been the driver of new transportation technologies…. The underlying reality is that the needs of commerce to move information — orders, bills, plans, proposals, contracts — and the competitive advantage of getting there first has driven the adoption of all these marvels.

Explaining to a 9 year old girl why Air Mail paper is so thin and why the postage is so much more(almost US$1 per ounce), I was reminded that the mail has always been the driver of new transportation technologies. From stage coaches and ships to trains to airplanes, the mail coach/train/plane was always the first service to some distant place. The telegraph, telephone, and fax emerged in parallel, and the internet is the ultimate manifestation of intangible communication. I wonder if there is a good history transportation/communications technology and markets?

The underlying reality is that the needs of commerce to move information — orders, bills, plans, proposals, contracts — and the competitive advantage of getting there first has driven the adoption of all these marvels. We think the telephone was invented so we could make birthday calls, but it was really about making deals.

adventures in regular expressions

Given a block of text like the following: BEGIN:VEVENT GEO:48.1667\;-123.1167 TRANSP:TRANSPARENT LOCATION:Dungeness\, Washington DTSTART:20080608T131700Z UID:D56BE4D5-F9A3-4026-B99A-C2D979639220 SUMMARY:High Tide 1.83 meters DTSTAMP:20080617T002129Z END:VEVENT BEGIN:VEVENT GEO:48.1667\;-123.1167 TRANSP:TRANSPARENT LOCATION:Dungeness\, Washington DTSTART:20081012T013000Z UID:373CB6BD-F894-4826-8D04-6683AADFB4C4 SUMMARY:Sunset DTSTAMP:20080617T002129Z END:VEVENT BEGIN:VEVENT GEO:48.1667\;-123.1167 TRANSP:TRANSPARENT LOCATION:Dungeness\, Washington DTSTART:20080125T035500Z UID:1EAC4C71-23B1-456D-9302-1436E407B84E SUMMARY:Moonrise DTSTAMP:20080617T002129Z END:VEVENT BEGIN:VEVENT GEO:48.1667\;-123.1167 TRANSP:TRANSPARENT LOCATION:Dungeness\, Washington DTSTART:20080920T081500Z UID:CF306FB5-480D-433D-9E2C-34569BE0A654 SUMMARY:Low Tide -0.33 meters DTSTAMP:20080617T002129Z END:VEVENT remove all the SUMMARY:Moonrise|Sunrise|High Tide VEVENT mentions, leaving just the low tides.

…#!/usr/bin/perl local $/ = undef; my @low_tides = (); while (<>) { my @header = /(BEGIN:VCALENDAR.*?METHOD:PUBLISH\r?\n)/gs; my @events = /(BEGIN:VEVENT.*?END:VEVENT\r?\n)/gs; my $footer = “END:VCALENDAR\n”; push(@ical, @header); push(@ical, grep { /SUMMARY:Low Tide.*-\d/ } @events); push(@ical, $footer); } # Now @low_tides is an array of strings, each one containing just the # BEGIN:VEVENT through END:VEVENT lines of a single low tide event.

Given a block of text like the following:

BEGIN:VEVENT
GEO:48.1667\;-123.1167
TRANSP:TRANSPARENT
LOCATION:Dungeness\, Washington
DTSTART:20080608T131700Z
UID:D56BE4D5-F9A3-4026-B99A-C2D979639220
SUMMARY:High Tide 1.83 meters
DTSTAMP:20080617T002129Z
END:VEVENT
BEGIN:VEVENT
GEO:48.1667\;-123.1167
TRANSP:TRANSPARENT
LOCATION:Dungeness\, Washington
DTSTART:20081012T013000Z
UID:373CB6BD-F894-4826-8D04-6683AADFB4C4
SUMMARY:Sunset
DTSTAMP:20080617T002129Z
END:VEVENT
BEGIN:VEVENT
GEO:48.1667\;-123.1167
TRANSP:TRANSPARENT
LOCATION:Dungeness\, Washington
DTSTART:20080125T035500Z
UID:1EAC4C71-23B1-456D-9302-1436E407B84E
SUMMARY:Moonrise
DTSTAMP:20080617T002129Z
END:VEVENT
BEGIN:VEVENT
GEO:48.1667\;-123.1167
TRANSP:TRANSPARENT
LOCATION:Dungeness\, Washington
DTSTART:20080920T081500Z
UID:CF306FB5-480D-433D-9E2C-34569BE0A654
SUMMARY:Low Tide -0.33 meters
DTSTAMP:20080617T002129Z
END:VEVENT
remove all the SUMMARY:Moonrise|Sunrise|High Tide VEVENT mentions, leaving just the low tides.

This (?s)BEGIN:VEVENT??.*?END:VEVENT will find just the VEVENT items.

This (?s)BEGIN:VEVENT.*?SUMMARY:Low Tide.*?END:VEVENT gets too much: it grabs everything from the first instance of BEGIN:VEVENT to the END:VEVENT after the Low Tide, no matter how many other events get collected. Looks I need a look-behind: find the END:VEVENT and the Low Tide that came just before it, and then, everything back to the BEGIN:VEVENT.

And ideally, I just pull out the minus tides, especially if I have to go that far (anything that includes a ferry ride needs to be carefully considered).

After a lot of back and forth with a perl guru (I really get tripped up by this stuff), it was clear that I was trying to do much in one pass (better to pull out the events, then extract the ones we want, all with the default delimiter/linebreak turned off). So what I ended up with appears below the fold. I had the regex right (those have always been my bête noire) but I had no idea what to do with what I was getting.

Continue reading “adventures in regular expressions”

why, indeed?

Popcorn was required this evening, and I had laid in some kernels a week or two ago in preparation for just this eventuality. So into a 2 qt pan went a couple of tablespoons of oil and, after some time seeking the right temperature, 1/3 cup of kernels.

Popcorn was required this evening, and I had laid in some kernels a week or two ago in preparation for just this eventuality. So into a 2 qt pan went a couple of tablespoons of oil and, after some time seeking the right temperature, 1/3 cup of kernels. The 11 year old, as he saw the drama unfold, asked, “why do people buy it when they can make it?”

My work is proceeding nicely.