Friday, December 11, 2009

Simple Sabotage

A co-worker forwarded to me a copy of the OSS Simple Sabotage Field Manual. I have reproduced the section on organizational sabotage. It is hilarious, but frightening how many companies that I have worked for seem to follow such self-destructive advice on purpose!

Sunday, December 6, 2009

It seems the problem with apropos was a simple missing argument. I haven't hooked up the error handler yet, so this caused some really weird behavior. It's getting time to think about that. The MIT Scheme debugger uses some special operations to parse the runtime stack, so I have to make a reasonably faithful replication of this.

Friday, December 4, 2009

Innumeracy

I happened upon an article discussing glacial retreat and ice melt. At the end of the article there were several ‘glacial facts’. Here are some:
  • Average yearly retreat of the Himalayan glaciers: In 2006, 30 metres;
  • Rate at which Gangotri is melting per year: 28.1 m
  • Gangotri Length: approx 30 km;
  • Year in which Gangotri will disappear: 2050, if glacier melt continues at the same rate.(emphasis mine)
There is an obvious problem here. 30 meters per year times 50 years (1500 meters) is nowhere near the entire length of the glacier (30000 meters). It's a factor of 20 too small. This isn't a rant about climate change, it's a rant that the journalist and the editor didn't notice the problem with the math. I wouldn't expect that the journalist or the editor be wizards at calculus, but this is just a simple estimate. You don't even need an exact answer (I rounded up the melting rate and the time span to make it easy to multiply).

Thursday, December 3, 2009

More bugs

The bug with pretty printing turned out to be trivial. In a primitive where I was taking the CAR of an object, I returned the original object rather than the CAR. Stupid.

The current bug is more interesting. I got apropos working, but the next day Taylor changed how symbols are interned. apropos worked for one day only.

The bug is weird, though. When I call apropos, I get this:
1 ]=> (apropos "mic")

#[package 1 (user)]
#[package 2 ()]
;Cold load finished
;Package: (user)

2 ]=>
There are two odd things here. First is the repeat of the message that the cold load finished, second is the fact that the prompt is now at level 2.

I can't for the life of me imagine what might cause this. I'm guessing that I really screwed up the definition of a primitive and it is causing a recursive evaluation of something. I'm grasping at straws, though. In any case, this will be fun to debug because it involves weak pointers. The CLR has weak pointers, but now I have to really make them mimic the weak pointers that MIT Scheme expects.

Tuesday, December 1, 2009

Cranks and crackpots

This guy seems coherent enough at first glance: Are real numbers uncountable?