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.

No comments: