On 6/22/11 7:05 PM, Josh Dersch wrote:
As befits this conversation of RPN, Lisp, and
calculators, I thought I'd
mention that at one point a couple of years back I hacked together a
Lisp "compiler" (really a translator) for the HP-48 series. It's just a
small set of RPL programs that translate Lisp code (written using
curly-braces in the place of parens, since that's what the HP-48 uses to
denote lists) into its RPL equivalent. The similarities between the two
languages is so slight (RPL does stand for "Reverse Polish Lisp" after
all) it only took an afternoon of doodling around to get a decent subset
of Lisp working. Really, it made me appreciate how flexible the HP-48 is
-- RPL programs can generate other RPL programs!
As a very simple example,
{defun foo {a b} {+ a b}}
becomes a program named "foo" containing:
<< -> a b << a b + >> >>
Never found a good use for it, but it was a fun exercise :).
(If anyone wants the code, I can send it your way...)
Neat!! Hey, I'd love to hack around with that. I have an SX; will
it be ok on there?
-Dave
--
Dave McGuire
Port Charlotte, FL