| FORTH definitely seemed to be a kook amplifier. It tended to attract personalities who were unhinged and not very disciplined. The episode that most sticks in my mind was when a cow-orker of mine at Atari tried to write a game in FORTH. He blew all his ROM space with runtime and framework and static bitmaps; game play was going to come later, as soon as he got his great FORTH-based game engine running. Ten months into a six month project, 20K into a 16K ROM and with frame times on the order of 5 FPS (utterly unplayable) he basically stopped giving his manager any status, and was fired. All this time, good performance, great game play and small code space were "just around the corner, like next week, maybe" because the magic of FORTH was going to save the day. That was a near total failure of management, good engineering practice, scheduling and hiring, all at once. At nearly the same time, a friend of mine was writing some great process-control stuff for another company, in FORTH. We had many conversations about the Atari programmer in question. My friend was pragmatic, conscious of his own faults, and probably the best FORTH programmer I've ever known. "Not everyone can handle this stuff," he said. A few years later I asked him if any of his FORTH code had survived when he left that company, and he smiled a little and asked me what I thought. "They threw it all away, right?" "Right." I don't know how much that cost the company in question. Probably a lot. In another case, there was a hardware bring-up engineer who wrote a bunch of tests and exercisers in FORTH. This was an initial win because he taught the hardware people FORTH, too, and they wrote a lot of their tests in it, and they were pretty productive. This was unarguably good stuff. But when it came to write native code drivers for the platform's OS we found all kinds of cycle-level timing issues that had been masked by FORTH's inner interpreter overhead, and I spent weeks chasing some of these, inserting magic NOP instructions to work around glitches. So am I utterly negative about FORTH? No, it's a tool. I get really skeptical that you can ship a real product in it, though, and I think that FORTH's successes are in very specialized niches and not very visible. Color FORTH made me laugh, though. |
The problem wasn't all that hard actually so I wrote a bit of C code that did the job in about 2 working days...
Now, there is nothing wrong with FORTH per-se, it's a great little language and it has some elements that I think are super elegant, in the same way that I think LISP is super elegant (though I'd have a much easier time programming some problem in FORTH than in LISP simply because I have a lot more FORTH experience).
When I looked at the code I decided that FORTH was the wrong tool for that particular job, doing it in C (to great scorn of the original German dude who called C sneeringly a 'great' language because of the larger runtime) made the job very much easier.
The same 'it will work tomorrow' attitude was what kept the project going for all the time that went into it (multiple years), I think in part this was because the guy was so nice and a close buddy of one of the people that ran that place. But when push came to shove the un-elegant sledgehammer of C rammed that particular nail in in record time.
Image processing in FORTH is not the best fit, though I can see some ways in which you could make it fit. Maybe if I tried my hand at it by tomorrow I could have a working prototype ;)