Tuesday, October 13, 2009

Going Forth

I came across a surprising book in the Needham Public Library when I was 15. It was called Starting Forth, and it was about a programming language called Forth.

The author Leo Brodie had written a charming and fun book about a very interesting language. Forth is a stack based language, and it has a postfix notation in its syntax. So instead of writing 3 + 4 you wrote 3 4 +. Seems strange, but to me it was very familiar because I got my start using HP calculators where you did exactly the same thing.

Forth is interactive, like BASIC. It has a very small core of functions called words, and you create an application by adding new words which have the same syntax as the ones that come built-in. Essentially you extend the language to solve your problem. Smalltalk is also like this.

Forth is the language used to program NASA's space shuttle, so it has some clout. I discovered that there are quite a few Forth fans out there, and I even managed to buy a Forth language cartridge for my VIC-20. Awesome.

Friday, October 9, 2009

Strange Computer Stories

The following is a true story. My Commodore VIC-20 suddenly stopped working. Somehow I figured out that the power supply (one of those black bricks) was at fault. I told my boss Mr. Alessi about it. I needed to order a new one. He made an interesting proposal. He happened to be an electrical engineer specializing in power supplies. He had a novel idea. He would make me a new power supply for my computer himself at no charge, for fun.

Okay, I accepted. He explained that he wanted to build me a very special power supply. It would have a standard lightbulb socket on top, into which would be screwed a standard 60 watt bulb. The purpose of this strange addition? It would act as part of a surge protection mechanism. If there was a surge, the filament in the bulb would become hotter and its resistance would go up. A kind of thermistor (look that up). This was useful for regulating the voltage.

The end result was a very plain looking black project box with a two prong power cord going in on one side, and power cable going to the VIC-20 on the other end. On top, to one side was a dimly orange glowing Sylvania lightbulb. The brightness (dimness really) would remain fairly steady. Here and there it would suddenly glow a little brighter, or dimmer. No lie.

Did it work? Seemed to.