The Advisory Boar

By Abhijit Menon-Sen <>

Virtual hosting with Ejabberd

I have been running Ejabberd for some time. Recently, some friends asked me if I would serve Jabber for their domains too, and I was pleased to find that relatively easy to do.

Read more…

Halving a slice of pie

A few days ago, I bought a slice of Date and Apple Pie from Eatopia.

(Eatopia is a food court at the India Habitat Centre in New Delhi. It is noisy and crowded, but used to have a pretty good bakery. I haven't been there for some years, but Hassath and I happened to be in its vicinity, so we stopped in to pick up a sandwich, a croissant, and a slice of the pie that was once a particular favourite of my father's and mine.)

Hassath was going to eat the sandwich; the croissant was mine. The sandwich was larger, so I finished my croissant first, and was reaching for the pie when a thought struck me: where exactly should I bite it to get no more or less than my fair share?

The slice was too wide to fit in my mouth sideways, so I couldn't try to bite it in half lengthwise (precious crumbs!). I would have to approach this resource-sharing problem pointy-end first, and bite very carefully.

Thinking quickly, I simplified the pie slice to a circular section (assuming that it had uniform thickness, and giving up on the crusty outer edge). It was an eighth of the pie, so its area was πr²/8, and the angle at the vertex was π/4 radians. My fair share (ignoring, in the interests of simplicity, the fact that I clearly deserve a larger piece for forgoing the crust) would thus be an isosceles triangle with half that area; and its height is what I needed to determine.

The area of an isosceles triangle with height l and base d is l×d/2. We know that is equal to half of πr²/8; and we can also express d as 2l×tan(π/8), π/8 being half of the central angle. Thus 2l²×tan(π/8) equals πr²/8, and so l is the square root of πr²/(16×tan(π/8)); in other words, l is r times some constant, which suits us fine.

tan(π/8) gave me a bit of pause, before I remembered that π/4 was a more tractable angle, and tan(θ) equals sin(2θ)/1+cos(2θ). sin(π/4) and cos(π/4) are both equal to 1/√2, so the required tangent is √2−1 ≅ 0.4142. Losing patience, I simplified progressively: 0.4 times 16 is 6.4, which is about twice π, so l ≅ r/√2 ≅ 0.7r. I stuffed the pie into my mouth and bit off a piece that looked about right.

So much for applied math. The pie was awful.

(After I'd finished eating, I realised—looking at the remaining piece—that I had incorrectly assumed that my bite mark would be a straight line. If, instead, I had incorrectly assumed that it would be a section of a circle concentric to the outer edge, I could have saved myself some trigonometry and the answer would have been exactly r/√2. But the pie wouldn't have tasted any better for it.)

The Hour of the Furnaces

What does this mean?, asked Hassath, pointing to «La Hora de los Hornos» in an article about documentary films.

The hour of the… something.

Furnaces?

Read more…

Second thoughts about the Simvalley PICO RX-80

After a few weeks of using the phone, I'm less thrilled than I was at first.

Read more…

On applying for a US visa from Delhi

Speaking of renewing passports and the horrors of international travel, 1999 was also the last time I applied for a US visa (and, I hope, the last time I'll ever need to).

Read more…

Renewing my passport

It's somewhat easier now than it was ten years ago.

Read more…

Updating last-modified dates with a git hook

I wrote a git post-commit hook that looks at certain files in my repository whenever I change them, edits them a bit if it wants to, and commits any changes it made. Such a hook could be used to maintain "Last modified: ..." lines in static HTML files as shown below.

Read more…

What is Nehru Place?

It's hard to describe a place where you can find, next to an authorised HP outlet, a chap with syringes full of coloured ink who will refill your inkjet cartridge on the cheap.

Read more…

Celebrity security ordeals

I'm tired of people getting worked up about “demeaning and humiliating” treatment that some celebrity occasionally suffers at the hands of airport or other security personnel.

Read more…

Fighting the fixers: thermal paste edition

While cleaning accumulated dust out of Hassath's Athlon64 heatsink the other day (to silence an overheating alarm), I accidentally lifted the heatsink off the CPU and broke the layer of thermal paste. After that, of course, the machine refused to boot at all, emitting a loud siren-like wail at startup.

Read more…