One of the craziest things I’m working on right now is a Python interpreter for a Forth-inspired mini-language I call pyf. It’s not a practical programming tool in almost any sense, being much less useful than the language I wrote the interpreter in, but I’ve found that the combination of Forth’s very simple syntax (in its way, it’s as elegant as Lisp’s) with Python’s rich semantics (pyf’s stack holds Python objects, not bytes, making it horrendously slow by Forth standards, but also saving me the need to write a bunch of utility words) makes it a potentially useful tool for creative programming/doodling with code/however you might want to call it. When done right — and I’m not there yet — Forth-style stack-oriented programming is a surprisingly interesting cognitive tool, because it seems to mirror and take advantage of cognitive heuristics that are more awkwardly modeled by other languages (and, of course, vice versa).

I might even end up using it as a macro language in other projects, I guess.

Leave a Reply