Hacker News new | ask | show | jobs
by gigamonkey 5484 days ago
Another similar story, from my interview with Guy Steele in Coders at Work:

This may seem like a terrible waste of my effort, but one of the most satisfying moments in my career was when I realized that I had found a way to shave one word off an 11-word program that Gosper had written. It was at the expense of a very small amount of execution time, measured in fractions of a machine cycle, but I actually found a way to shorten his code by 1 word and it had only taken me 20 years to do it.

Seibel: So 20 years later you said, “Hey Bill, guess what?”

Steele: It wasn’t that I spent 20 years doing it, but suddenly after 20 years I came back and looked at it again and suddenly had an insight I hadn’t had before: I realized that by changing one of the op codes, it would also be a floating point constant close enough to what I wanted, so I could use the instruction both as an instruction and as a floating point constant.

Seibel: That’s straight out of “The Story of Mel, a Real Programmer.”

Steele: Yeah, exactly. It was one of those things. And, no, I wouldn’t want to do it in real life, but it was the only time I’d managed to reduce some of Gosper’s code. It felt like a real victory. And it was a beautiful piece of code. It was a recursive subroutine for computing sines and cosines.

So that’s the kind of thing we worried about back then.

1 comments

Not really related, but Gosper's algorithm (http://en.wikipedia.org/wiki/Gospers_algorithm) is the thing I've learned in the last few years that blew my mind the hardest. It's how Maple or Mathematica can reduce your crazy sums to a single formula. Earlier work was apparently pioneered by a nun: http://en.wikipedia.org/wiki/Mary_Celine_Fasenmyer