Roshan.info

Archive for the ‘Musings’ Category

99 Bottles of beer on the wall, postscript, and webservers

Tuesday, August 3rd, 2004

I was sharing the links which were the consequence of the following story with people, when Max suggested that I put it up here, so here it is. :-)

You probably know the song:

99 bottles of beer on the wall, 99 bottles of beer,
Take one down and pass it around.
98 bottles of beer on the wall.

Well, I was searching for a program to generate the entire song, when I
happened to stumble upon a page which contains (at last count)
programs in 621 different languages to generate the beer song!

Exploring the site found entries written in standard languages like BASIC (of course), Pascal, C, C++, etc., and also entries using PostScript, bash, sed, etc! I knew PostScript was a full-featured programming language, but had never really read up much on this capability. Having got the initial prod from the Beer entry, did some more exploring and found a page called the
First Guide to PostScript. And from there, onwards to
PS-HTTPD - a webserver written in PostScript!

So, armed with this knowledge, I think it’s finally possible to achieve a task we were investigating a few years before at the company I used to work for: install a version of SETI@Home to run on the HP Colour Laserprinter! It’d be a PostScript program. Send it to the printer, and a few hours later, the printer would finally print out a sheet of paper - a printout of the analysis of the data packet that it examined. :-)

“Fire!”

Thursday, February 26th, 2004

Every culture has something that they seem obsessed about, and for the Brits, it seems to be fire. Or rather, preventing fire. Of course, given history and the Great Fire of London back in September 1666, they have a reason to worry - but are they carrying it to extremes?

Everywhere you go, you see large fire-doors, clearly marked as “Fire doors” in case you would happen to miss such an obvious fact. Fire extinguishers, fire hoses, fire exits, you name it, London’s got it.

There’s also the habit of the irregular fire drills. I’m not saying that this is bad - except that they manage to pick the most awkward times to do the drills. A friend once had cycled to college in the pouring rain, had changed into fresh, dry clothes he’d brought with him, and had been downstairs when the fire-alarm went off. And here he was, out in the rain again, getting drenched - in the dry clothes which he’d been looking forward to wearing when he got to college, out of the rain. :-|
The college also has fire-hoses located strategically all over the building - the only problem is, almost ALL of these hoses which I’ve seen over the past few days have had an “Out of Order - Do not use” sign posted on them!

Over-engineered doors

Thursday, February 26th, 2004

I’m always seeing things in London that I think are totally daft, but this really takes the cake. A few months ago, Canary Wharf closed off the route many people normally take to travel to and from the tube station, and made an alternate route available, which takes one through the foyer of a building.

This building of course had doors - nice revolving ones; actually, AUTOMATED revolving doors - they turn by themselves, and their speed can’t be influenced by anyone pushing any harder. The only problem was that they turned WAY too slowly, so people got frustrated crawling through these instead of passing/walking through in a second as is usual. So you’d see the these doors spinning by themselves, as a steady stream of people headed for the constantly open emergency exits - causing a nice draught to go through the entire building (which is actually the reason for revolving doors - revolving doors were installed in skyrise buildings initially because of the problems with a draught with any other kind of door). Plus, on an extremely windy night, the building would be completely empty, but you’d see the force of the wind setting off the doors, and they’d be spinning in a ghostly manner, with not a soul in sight.

Whoever owns the building did take the hint, though, so they removed the motors, and the doors were then normal revolving doors - push to revolve.

Any praise people had for this change quickly disappeared, as a week later the people noticed that the doors were spinning by themselves again - although this time the doors were indeed moving much faster than earlier. This seemed like a step in the right direction, except that people quickly found out the hard way that the doors had a habit of stopping while people were still inside them, causing them to bang painfully against the doors. Plus, you never knew if the doors were in fact working, but waiting stopped, or if the doors were not working at all. Pushing on the door to activate the door usually took it few seconds to start spinning again. You can imagine what happened next - the doors were again left unused, and the emergency doors were constantly open.

A few weeks later, there were notes posted up saying “Please use the revolving doors” - and as one approached them - lo and behold - the doors would start spinning without you even touching them. They had finally installed proximity sensors, and the doors would keep on turning until it knew everyone was clear.

It’s been some weeks now, and everyone is still using the revolving doors. Whether it’s due to them finally working properly, or people just having plain given up, I don’t know. But this story makes me recall the doors with their pleasing disposition from “The Hitchhiker’s Guide to the Galaxy”.

Let’s see how long this continues, before they decide to tinker with the doors again….

Testing MovableType

Friday, February 20th, 2004

Just installed Movable type, and testing to see what exactly it can do, and how it can be integrated into the rest of the site…