Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RPL, FORTH, & LISP: A History

56 views
Skip to first unread message

jay...@kbbs.com

unread,
Nov 4, 1995, 3:00:00 AM11/4/95
to

Michael Heinz (mhe...@ssw.com) wrote:

> Except for the use of the stack there is no resemblance at all
> between FORTH and RPL - even an evolutionary one. RPL is not a
> subset of FORTH anymore than C is a subset of Pascal - they are
> unrelated languages.
> The stack commands in RPL are descended from HP's own key-stroke
> programming languages, used in earlier HP calculators, such as the
> 67 and 41; the logic structures are based on LISP. What's left to be
> based on FORTH?

Correction: RPL is both historically and philosophically a child of
both FORTH *and* LISP. In the words of Bill Wickes, the father of
RPL:

Several existing operating systems and languages were
considered, but none could meet all of the design objectives.
A new system was therefore developed, which merges the
-> threaded interpretation of Forth with the functional approach
-> of Lisp. The resulting operating system, known unofficially
as RPL (for Reverse-Polish Lisp), made its first public
appearance in June of 1986 in the HP-18C Business Consultant
calculator.

-- excerpt from "RPL: A Mathematical Control Language", by W. C.
Wickes, published in "Programming Environments", Institute for
Applied Forth Research, Inc., 1988; see larger excerpt in intro to
RPLMAN.DOC on GD4.

Here's the history of the beast as best I can recall it. (Please
correct any errors).

When the HP-71 came out, many people wanted to run their HP-41
software on it, but there was no way, because the 41 used RPN and the
71 used BASIC. Worlds apart. Bill Wickes suggested to HP that they
write an HP-71 41 Translator that would be able to run 41 code. HP
said that such a task would be daunting. Even if possible, it would
take too many years to write it.

But Bill Wickes had a brainstorm. Emulate the 41 in FORTH! After all,
FORTH already existed for the HP-71 in the FORTH/Assembler ROM. In
very little time (comparatively), he offered to HP the amazing HP-71
41 Translator ROM. Plug it into your HP-71, and you not only get a
complete HP-41, but also a complete FORTH package. They said it
couldn't be done, and he did it.

The success of this project allowed Bill to propose a bold project:
the development of an entirely new class of high-end calculators.
Features that would have taken too long to develop using traditional
programming techniques became feasible using Bill's insights. As the
ideas matured, so did the development language. The end result (which
we now call RPL) has as one of its primary reasons for existence the
ease and speed of operating system development.

Visible artifacts of RPL's roots in FORTH are plentiful in the names
of the stack operations: SWAP, DROP, OVER, ROT, ROLL, PICK, DEPTH, and
DUP mean the same thing in FORTH as they do in RPL, and notice that
none of these names were ever used in traditional HP RPN. FORTH also
has 2DUP and 2DROP, which is what DUP2 and DROP2 are called in System
RPL. FORTH and System RPL both use ! to mean store, @ to mean recall,
' to push an object's address, ; to end a program (FORTH uses : to
start a program; SRPL uses ::), ABORT, EXIT, DO/LOOP, CASE,
BEGIN/UNTIL, WHILE/REPEAT, PAD, CONTEXT, CREATE, SUB$, POS, NULL$ ...
you get the idea.

Yes, there are LISP roots, too; obvious examples are the use of CAR
and CDR in System RPL entry point names (thankfully renamed to HEAD
and TAIL in User RPL on the G/GX).

Ok? The answer to the debate over FORTH vs. LISP is: BOTH.

-Joseph K. Horn- EQU jay...@kbbsnet.com


--
[-] KBBS Los Angeles http://www.kbbsnet.com Telnet: 204.96.25.7 [-]

0 new messages