Discussion:
HP sysRPL is a Forth derivative?
(too old to reply)
Marcel Hendrix
2023-02-06 00:16:42 UTC
Permalink
Remarkable. Even has the local variable ideas and JVN's Formula
Translator (or maybe it is the other way around).

The similarity might of course be because stack languages look all alike?

.

-marcel
dxforth
2023-02-06 01:30:45 UTC
Permalink
Post by Marcel Hendrix
Remarkable. Even has the local variable ideas and JVN's Formula
Translator (or maybe it is the other way around).
The similarity might of course be because stack languages look all alike?
http://youtu.be/kHAGnU2HiJE .
"RPN

It's not clear where HP began in the development of the Reverse Polish Notation
(RPN). HP considers it a direct derivation from the mathematical works of Jan
Lukasiewicz, but it's likely that experience with mechanical calculators and/or
the logic system of the Friden ECs influenced them as well."

https://www.hpmuseum.org/rpnvers.htm

"RPL

In the late 1980s, HP was developing a new series of extremely powerful
calculators that needed a new programming language. [...]
HP examined existing languages such as BASIC but found them to be unsuitable
both because of their limitations and their resource demands which were still
rather high for pocket devices. Instead, HP combined elements of RPN, Lisp and
Forth and came up with a language called Reverse Polish Lisp or RPL. From Lisp,
RPL inherited concepts such as atomic and composite objects, temporary (lambda)
variables, garbage collection, the ability to pass unevaluated objects as
arguments etc. and from Forth, RPL inherited threaded execution and RPN notation
with an unlimited stack."

https://www.hpmuseum.org/rpl.htm
Marcel Hendrix
2023-02-06 10:06:49 UTC
Permalink
[..]
the ability to pass unevaluated objects as arguments etc.
[..]

This strikes me as an interesting concept. Is it more than
run-time compilation and/or EVALUATE ? It seems one could do
tricks like partial evaluation of recursive problems with it.
Here SAVE-INPUT and RESTORE-INPUT might be handy, too.
Maybe dig out some examples from that manual ...

-marcel
JKN
2023-02-06 09:19:27 UTC
Permalink
Post by Marcel Hendrix
Remarkable. Even has the local variable ideas and JVN's Formula
Translator (or maybe it is the other way around).
The similarity might of course be because stack languages look all alike?
http://youtu.be/kHAGnU2HiJE .
-marcel
(some) HP Calculators have been RPL based, since, like, forever:

https://en.wikipedia.org/wiki/HP-65
none) (albert
2023-02-06 11:34:56 UTC
Permalink
Post by Marcel Hendrix
Remarkable. Even has the local variable ideas and JVN's Formula
Translator (or maybe it is the other way around).
The similarity might of course be because stack languages look all alike?
http://youtu.be/kHAGnU2HiJE .
My father was an accountant and he had an Olivetti mechanical calculator.
They worked like given a number into a register, then push the add
or subtract button. No way brackets come into play.
Reverse polish is simply the natural way to design calculators.
Post by Marcel Hendrix
-marcel
Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -
minf...@arcor.de
2023-02-07 07:54:55 UTC
Permalink
Post by none) (albert
Post by Marcel Hendrix
Remarkable. Even has the local variable ideas and JVN's Formula
Translator (or maybe it is the other way around).
The similarity might of course be because stack languages look all alike?
http://youtu.be/kHAGnU2HiJE .
My father was an accountant and he had an Olivetti mechanical calculator.
They worked like given a number into a register, then push the add
or subtract button. No way brackets come into play.
Reverse polish is simply the natural way to design calculators.
Unfortunately scientists/engineers have to work with much more complex formulas
than accountants. Converting such formulas to RPN is error-prone.
Anyhow I guess that Excel is now the most used calculator for everybody.

OTOH financial mathematics has become a very advanced and complex field. But
it often works on big data, which is not really Forth's strong side. ;-)
Marcel Hendrix
2023-02-07 09:57:28 UTC
Permalink
On Tuesday, February 7, 2023 at 8:54:57 AM UTC+1, ***@arcor.de wrote:
[..]
Post by ***@arcor.de
Unfortunately scientists/engineers have to work with much more complex formulas
than accountants. Converting such formulas to RPN is error-prone.
Anyhow I guess that Excel is now the most used calculator for everybody.
[..]

Aren't you underestimating the problems with nested parentheses? I sometimes
need to copy the formula and space it all out with each bracket on a new line,
properly indented, to spot the bug.

Not to say that stack-ops are better, but we can replace them by flocal variables :--)

-marcel

Loading...