What is HP-RPL?
HP-RPL (Reverse Polish Lisp) is a hybrid stack-based programming language created by Hewlett-Packard for their advanced graphing calculators. The language combines two unusual design philosophies: Forth-style postfix stack execution and Lisp-style symbolic processing.
Because of this hybrid model, HP-RPL is capable of symbolic algebra, numeric computing, matrix manipulation, graphing, recursion, and even creating custom calculator apps β all inside a handheld device.
Specs
Language Type: Stack-based symbolic language
Released: Late 1980s
Used In: HP48, HP49, HP50 calculator series
Execution Model: Postfix evaluation with symbolic expression support
Typing: Dynamic, polymorphic
Primary Purpose: Scientific computing, calculus automation, engineering logic
Example Code (Hello World)
"Hello, HP-RPL!" 1 DISP
Math example:
3 4 + 2 * 1 +
(Output: 15)
How It Works
HP-RPL uses a data stack for execution. Values are pushed first, then operators act on them. Instead of writing:
add(3,4)
you write:
3 4 +
The stack now contains: 7
The language supports:
| Feature | Available |
|---|---|
| Lists, matrices, symbolic algebra | β |
| Recursive functions | β |
| User-defined menus | β |
| Anonymous functions | β |
| Hardware buttons + UI customization | β |
Conditional example:
IF DUP 10 > THEN "BIG" ELSE "SMALL" END
Strengths
- Extremely powerful for symbolic and numeric computation
- Built into millions of engineering calculators
- Supports stack logic, functional style, and symbolic reasoning
- Instant full execution on hardware β no compilation cycle
Weaknesses
- Steep learning curve and unusual syntax
- Debugging requires stack awareness
- Mostly useful only in calculator ecosystems
- Limited modern toolchain support
Where to Run
HP-RPL can run on:
- Physical HP48/49/50 calculators
- Emulator apps like Emu48, x48, HP-GX
- TIO.run (partial sandbox support)
Should You Learn It?
β Yes β if you enjoy retro computing, symbolic math, Forth/Lisp hybrids, or calculator hacking.
β No β if you need a modern programming language for general software development.
Summary
HP-RPL is one of the most unusual yet capable embedded programming languages ever created. Blending postfix execution with symbolic reasoning, it turned calculators into programmable mathematical workstations β long before smartphones or microcontrollers became common.
Top comments (0)