I dusted off my ancient HP 200LX palmtop in the hopes of using it to do some hands on learning of Forth while on my latest trip. I figured with 40+ hours of flying, there had to be some time to spend coding? The experiment turned out to be pretty successful - I've learned quite a bit about Forth, embedded programming, alternate approaches to problem solving, got a new use out of some old hardware, and most importantly, passed the time in various lines and flights much faster.
I was reminded at what an amazing device the 200LX is. The keyboard is remarkably usable. And, the device really is a DOS based computer - so anything that runs on DOS can run on it. And it was great to travel with - a couple double AA batteries lasted the entire trip. Something my cell phone and laptop can't begin to compete with.
Here's what the device looks like - I'm using my G1 as reference:
What makes this experiment successful isn't just the 200LX hardware. There's also the Forth implementation. I went with HP-Pygmy Forth, a version of Forth customized for the 200LX, and I wasn't disappointed. What beautiful software this is.
It's small enough to run comfortably on the palmtop, yet serious enough to do sophisticated Forth programming with. It's also completely self contained - the software provides it's own editor to write code in, as well as a really easy way to view the source code of itself. There's even extensions available for working with graphics on the device. I really can't say enough good things about how impressive HP-Pygmy is.
I had big plans for developing some significant code in Forth - I was thinking about writing my own Sudoku game. However, I never got close to implementing it. Though, I did learn a number of peripheral lessons and wrapped my head around embedded systems and Forth.
I really enjoyed being able to work on a programming problem while standing in a lengthy customs or ticket line. There's something pleasantly active about programming that reading a magazine or book can't compete with.
This, of course, has me wondering if I could replicate this sort of environment on my T-mobile G1 phone, so I wouldn't have to carry around two devices. Seems simple enough, but I'm not sure. The whole self contained nature of HP-Pygmy, including an editor, compiler, assembler and source code, is something I haven't seen in a Java based Forth. On the other hand, a Java based Forth should allow me easy access to Java classes and method calls, which means that developing software that actually does interesting stuff on the G1 seems quite possible.
Regardless, it sure is a wonderful feeling to grasp new concepts - and if there's one thing to be said about Forth, it has many new concepts.