Hacker News new | past | comments | ask | show | jobs | submit login
What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999) (hpmuseum.org)
115 points by susam on March 6, 2021 | hide | past | favorite | 117 comments



When I was starting my degree (around 96) I went to the US for a week and bought a HP48Gx since they were cheaper there. This happened a few weeks after a Swiss jet crashed departing NY and the reasons were not known at the time so the airport staff was very suspicious. When they saw the calculator and tried to do a simple test calculation and failed, I struggled to explain how use it, since it was also so new to me. Luckily I got 2 out of 1 1 + and I was let go... still have and love it.


HP48GX was the best calculator ever. I used one throughout my middle/high school.

The best features, IMO, were (0) the IR emitter and (1) the ability to program it to switch ON at a specified time and run code.

This means I could hide my calculator somewhere in a room before class started and program it to turn on halfway through class, turn the classroom TV on, turn the volume to max, and start wildly flipping to random channels.

One teacher had all of us students put our hands up and walked around the room looking for who had a remote at their desk, and I remember watching that teacher's face of horror when the TV continued flipping channels as everyone had their hands up.


I bought mine in 96, when I was still in high school, and sold it around 2008 for more than I bought it for. But I miss it.


Droid48 to the rescue.


There's also Emu48.


Reminds me of the story of someone who took a Linux laptop through security; they wanted to see it boot, but didn't recognize the command line and were suspicious.

The owner set PS1 to resemble a DOS shell prompt and they were satisfied.


I remember flying with a bunch of hard drives out of SFO in 2002. I was a little worried security would get 9/11 worried about them. Maybe because it was SFO are are used to seeing tech people flying with odd stuff, they didn't care.


I worked in Mountain View and lived in Palm Springs for a while and used to commute back and forth through SFO/PSP.

Im convinced you could take damn near anything through SFO tech wise, cause they've seen it all. Meanwhile explaining to the TSA people in Palm Springs why I've got 3 laptops, let alone 4 dozen cell phones was always a hassle and a half.


I flew into SFO in approx 1990 with some 3.5 inch floppy disks. The customs guy had to ask me what they were.


I was forced to use an HP12C as part of my university degree. Once you get used to RPN it’s quite uncomfortable to switch back. It’s a much more intuitive way to do math once you get over the small hurdle. 15 years later and I’m still using the same calculator!


For whatever reason my high school had HP48s for my junior year math class, which got replaced the following year for TIs since “that’s what you’ll be using in college”. I much preferred the RPN and ended up convincing my parents my life would be easier with a new HP49g (which wasn’t a lie, it was). That thing helped get me through my math major and I’ll always remember my old school professor who taught my complex analysis course amazed that it could even solve those equations (which I’m sure the TIs could do as well).


The HP48s has a much nicer keyboard than the HP49g though! HP48gx may have been a suitable upgrade instead :)


With the GX (which I got, and it still works) you could run metakernel [0], which itself was one heck of an upgrade over the base system and really an unbelievably impressive effort in its own right. It pushed the hardware so much farther it's still stunning. The HP48 remains one of my favorite calculation devices ever, with a great ratio of utility for both the most simple brainstorming calculations and going right into great depth. I'm still bummed my favorite emulator for iOS devices (m48+) stopped getting updates and faded away, and also that HP let its calculator division languish. What a tool.

----

0: https://www.hpcalc.org/hp48/apps/mk/mk.php


I used a CASIO FX-880P during university, but my dream one would be HP-48GX, unfortunately a bit too out of budget for my former self.


I agree with this and definitely would tell 17 year old me to go for the 48gx instead!


I never used an HP, but I did have a TI-89, and used a program for it that added RPN input.


> It’s a much more intuitive way to do math

Is it? It's easier to code an evaluator, but I'm not convinced it's necessarily more intuitive. In practice, only addition/subtraction and multiplication/division are ambiguous. I'll also play devil's advocate and admit order of precedence is somewhat arbitrary, and precedence of bitwise and and equality is wrong in most languages. Not sure why I'd want this: (flags & (4 == 4)), but that's what flags & 4 == 4 does.


Yes. It is.

One difference is you see all intermediate results. That's huge for avoiding mistakes. In-fix, if you type (5+5)*(9+9), you only see the end result. Post-fix 5 5 + 9 9 + *, you see 10 and 18 along the way.

Another is the stack lets you easily reuse subresults. If you've computed the total energy and want to use it three places, you pick it off of the stack. All your work is there. It's very common that this happens.

It's an incredible productivity boost once you get used to it.


Seeing intermediate values can’t be overstated. It’s a huge sanity check that catches many mistakes way earlier in the process.


It gets even better when you tag numbers with the correct units. The calculator does type checking and automatic unit conversions. So if you key in the wrong operations, you'll either get an error somewhere along the way (from eg. trying to add something in m/s to something in m/2^2) or you'll notice the units at the end of the calculation don't match what you're supposed to end up with.


> if you type (5+5)*(9+9), you only see the end result.

Only if in see-full-expression-before-action mode. Otherwise you would see 10 after the first ), and see 18 after the second ).


For general purpose programming, I want to write expressions in algebraic format but for interacting with a calculator RPN is easier. It removes a whole layer of abstraction wondering what the machine is doing.

I would imagine if I were young today and started with a modern multi line calculator with textbook display then that is what I would be comfortable with but for folks born before 1980 or so the algebraic calculators of our time were error prone.

I have an HP 27S that is algebraic and breaks the mold of being error prone because it shows the whole expression up until the point where a part can be evaluated. Then it evaluates the inner part while still showing the rest of the expression.


> Not sure why I'd want this: (flags & (4 == 4)), but that's what flags & 4 == 4 does.

Originally there was no && operator. You had to use & for Boolean conjunction too. The precedence makes sense under that condition. (And later couldn't be changed without breaking existing code.)


We had plug-and-chug competitions at school: big equations with some inputs, ready, go. The HP RPN folks would always beat the algebraic (casio, TI, etc) ones.


I bought an HP48 in 1990 junior year in college when it came out. A calculator WAS required for engineering school, but this one made everything way easier. I think it was almost $200. Anyway, once you go RPN, you don't go back. It makes way more sense. It finally died 5 years ago: the keys stopped working. I read about how to repair the keypad but finally had to let go. I had all my crib sheets from engineering school stuffed into the pouch. That calculator was epic. I can't imagine trying to do complex math with a slide rule, even though that's how engineers had done it for ages.


Similar story. Got a 48GX in high school. Everyone had TI89, maybe TI-92. I was the only one with HP.

Even with its lowly Saturn CPU and perceptually slower, it was trouncing the TIs at basically every task, especially when you customised it.

I learned RPN and RPL alright, but also got to dive into System RPL: the low level, faster, much more rich RPL, but where every argument was basically unchecked as it was more like HP-provided ASM routines in disguise.

And then learned to bit-bang stuff on the screen in assembly with all the timing tricks to produce 4 grayscale instead of just black/white. Great for coding small games.

Got the the third party CAS algebra extension card that also replaced the original UI for the same thing, only faster and better, and with a much more potent symbolic solver, whose UI was absolutely glorious to write, select, navigate, and perform advanced stuff.

Also got a maxed out storage expansion for the second slot. Such storage was not solid state so it required a continuously operating CR2032 battery to persist over time.

Unfortunately, as robust as it was, some time after engineering school it took a hard fall too much and was irreparably broken.

Later got my hand on a HP49G+, ARM powered but surprisingly the default was to run an emulation of the Saturn CPU, and CAS was bundled. You could still code for the ARM one though. By that time I lost interest so it currently sits in a drawer. Also preferred the 48 boxy design, especially the mushy keys of the new one were way worse.


I took an exam many years ago that required a non-programmable calculator; I told the instructor I literally had no idea how to use a non-RPN calculator any more and she was fine with me using my HP-15.

Sadly my collection of HP and other RPN calculators (there are a few) was stolen two years ago.


I don’t think it’s more intuitive. It’s just that you’re used to it.


Everybody thinks that RPN is about the inverted order when it's really about having an explicit stack instead of an implicit one.

If you're using "algebraic", you sometimes have to put a "(" into your expression a long way ahead of when you need it. Think of how many times you have to go and fix up your left parens when writing C code conditionals. On a calculator, if you screw up, go back to start. Also, old calculators had parentheses limits.

"Modern" algebraic calculators mitigate this somewhat because they can enter the expression in text form on a dot matrix LCD so you can go back and add/delete parentheses as required.

An explicit stack means that I can start and stop subexpression calculations at various points and cache the results. It also means that I can rearrange precedence at my convenience--of course, the flip side is that precedence is my problem instead of the calculator's.


With RPN you can just type facts in as you think of them, and figure out how to combine them later. With conventional entry, you have to have the entire equation in mind from the beginning, or backtrack to add brackets.

RPN has no use for brackets, because there is never any ambiguity.


Yep, had my Radio Shack calculator stolen from a college lab in 1990. Replaced it with a 32sii. After 30 years of RPN, I can never use a normal calculator. They are horrible.


It took awhile to learn RPN in undergrad in electrical engineering. But, once you learn it, it is so much easier to solve problems and it is much more efficient. You never go back, and you are less likely to make errors entering in equations compared to your peers. This is important on timed exams.

I prefer to always use RPN. MacOS has an RPN mode on their calculator, which one can activate by pressing command + R. On my iPhone I have an app called i41CX+, which is an HP-41CX emulator. I highly recommend the app, as the developer is constantly updating it. It probably is the most updated app I have of all of my apps.

Also apparently there are some companies that recreate old HP RPN scientific calculators: https://www.swissmicros.com/products


My 'desktop' calculator on my Linux machines:

http://lashwhip.com/grpn.html

(yes, I know that xcalc has an HP mode, but I only learned of that mode long after I'd begun using GPRN.

The calculator on my Android phone (I 'disabled' the maker installed one):

https://play.google.com/store/apps/details?id=org.efalk.rpnc...

And I've still got my original 80's HP-15C.


Emacs calc-mode is RPN by default as well.


calc-mode is wholly responsible for my HP49G+ not having had its batteries replaced in a few years. :D


My daughter is at the learning algebra stage. I note that the way they teach kids to parse algebraic notation is by building an infix operation tree. If they’d just take the natural next step of discussing postfix (and prefix) traversal, everyone would think rpn natural.


>On my iPhone I have an app called i41CX+

The dev sent me the upgraded one after I reviewed the free(?) one in CNET years ago. I used an HP-41CV with various expansion packs for years. It doesn't have the same feel as the sadly broken physical calculator of course but I still like it. I basically don't anything these days more than simple arithmetic these days though--and if I did I'd use a computer. (I have been tempted by the Swiss Micro models but that would be a pure nostalgia-fueled buy on my part.)


yep, rpn is great!

And since you're solving part by part, it's easier to spot mistakes in calculations.

Going back to algebraic is pretty much impossible... luckily, there are many rpn calculator apps for phones.


RPN is so nice and efficient, can't imagine using anything else. I like that the OSX calculator does RPN.

But mostly I use my old 28S which is next to my keyboard always. Also have a 50g on the desk, but I prefer the 28S.


I get annoyed by the ways the OS X calculator deviates from HP RPN.

The main one is that the pi and e keys act as if they are invoking constant functions that return pi and e, respectively. On an HP calculator, the pi key enters pi.

That may sound like the same thing, but it is not. Consider this sequence:

  2 ln  pi x
On my HP 15C the result is to multiply the natural log of 2 and pi. Same thing with PCalc on my iPhone. With OS X calculator the result is either pi with an error beep if you started with an empty stack or pi times whatever was on the top of the stack if you started with a non-empty stack.

The "2 ln" part leaves ln(2) on the stack. On the HP and other sensible calculators the pi key pushes pi. On the MacOS calculator, it replaces the top of the stack with pi.

They also had some problems where if you did a function and then started entering digits it would overwrite the function result, but I think they fixed those. I've seen what I thought was that problem recently, but when I finished entering the number and hit enter or invoked a function on the number, the previous function result appeared second on the stack, so it apparently is just a bug in displaying the stack.


That sounds like a bug. Why would any value replace the top of the stack?


Interesting, that's certainly broken of the OSX calc.

Admittedly I only use the OSX calc for very basic +-*/ operations. Anything more than that and I grab the 28S!


After using a 41CV for years, I bought a used 28S off someone. I just never cared for it. Probably just too accustomed to the more traditional RPN calcs.


I like to repeat everywhere that HP48 series had code block syntax with arrow notation.

    << a -> a a + >> (double function)
Those machines were well before their time.. I hope the makers had fun, it's really sad it's gone from the market although one could say that ES6 in your smartphone browser is your modern day HP48 reincarnation.


Here's my take on the Forth equivalent.

Defining a DOUBLE word, the usual way, rather than anonymously. (Tricky to pick a good identifier that doesn't sound like it's doing something with double-precision floats.)

    ( num -- num_doubled )
    : DOUBLE DUP + ;
Next up, we push 7 to the stack, define our 'function' (not a Forth term) anonymously using :NONAME which pushes an execution token value to the stack, then we immediately invoke it. This has the effect of printing 14.

    7   :NONAME DUP + ;   EXECUTE .


Too late to edit: the second example leaks memory, as the execution token is not destroyed before becoming inaccessible. As far as I know, ANS Forth doesn't offer a friendly interface for destroying execution tokens.


My grandfather was a civil engineer and he had a number of different RPN HP calculators. He gave them to me when I was becoming interested in programming - a really exciting gift to explore.


Do you still have them? Back in the 90’s when HP was discontinuing them, I bought 4x 32sii. I still have them un-opened. I still have my dads LED one from the 70’s. They are collectors items now.


And the LED ones had relatively short battery life; they were rechargeable. When I started college, HP calculators were still very expensive so I started with a TI. Within a year or two, you could get an HP LED model (HP-55 in my case) for a reasonable price. Through college I still took a slide rule to exams as a backup in case the battery died for some reason though I never had to use it. During the latter part of the 70s, calculators were dropping in price extremely rapidly.


This is an odd explanation. II mean I t may be factually correct but has nothing to do with why people choose to use RPN calculators.

When calculating with an RPN calculator you do the calculation the same way you would by hand: “ok, figugpre out the numerator, now calculate the denominator, ok, do the division, ok now there’s a product, so do the multiplication, now add it to that fraction I just calculated...” except you don’t need to write down the partial results.

Not only is it fewer keystrokes and parentheses and such, but as you’re doing it as you naturally would anyway you’re less likely to get lost.


It's simpler to implement RPN than algebraic notation with precedence. The latter requires an operation stack where operations are stacked until they encounter a lower precedence operator or the user presses =.

The user types less, the computer does a lot less.

I find it fun to think in RPN.


Yeah, it feels like the whole "why" is that RPN reflects how the machine works, so it's easier to build it that way.


Well, it’s easier to build because it has a terse syntax that requires fewer symbols, doesn’t need precedence and associativity rules, and has no ambiguous instructions. It’s easier to use for the same reasons.


> has no ambiguous instructions

Really? What do you call an operator applied to an empty stack? A sequence of commands that leaves the stack non-empty? I don't see why that's any less ambiguous than mismatched parentheses.


> A sequence of commands that leaves the stack non-empty?

That’s actually a feature. It’s even fundamental in concatenative programming languages such as FORTH and Factor.


> What do you call an operator applied to an empty stack?

[Pi] for example is an operator which can push the value of Pi onto an empty stack.


Why would any person or machine care that the stack wasn't empty?


And there is actually no such thing as an empty stack on an RPN calculator. A four register stack, as is common, always holds four numbers.


It may be easier to build, but that difference is quite small and not likely something that would have influenced the design of a scientific calculator. Many people have found RPN to be a superior user interface, and that’s likely the “why”.


Yep!! I implemented an rpn calculator in Swift and it was a breeze - very easy to do.

Here’s the code:

https://github.com/ashok-khanna/RPN-31

Here’s the link:

https://apps.apple.com/ae/app/rpn-30/id1451413517


Yes, the user types less but they have to think more.

Don't get me wrong, I love RPN and I've had a stream of HP calculators through my college years (synthetic programming on the HP41!), but... they come at a cognitive price. When you see an expression, you have to process the precedence in your mind to find out the most nested expression and start entering from there.

Basically, the calculator is cheating by forcing you to do some of its job.


That’s the point. This precedence processing should be intuitive if you’ve learned to do calculations by hand, and it helps you understand the expression as you enter it which makes for easier error detection. It’s also nicer for building up an expression on the fly as opposed to the Answer key on standard calculators.

If you’re just copying existing expressions, you might as well use one of those OCR calculators.


The point is not really whether it's intuitive or not (and for very nested expression, it's really not always intuitive to find the most nested one, especially if you have to remember precedence laws).

The point is that it takes time.

As much of an RPN fan I am, I am not convinced that the time it takes my brain to identify nested expressions is smaller than the time it would take me to just type the expression left to right on a regular calculator.


My personal collection of HP's from back in the day. All are operational and I have the original manuals from a few.

https://photos.app.goo.gl/McLDSnm5ksaRQhSJA


Every time I end up on a non-rpn calculator I struggle to convert the calculation I have in my head to use infix operators.


Same here. I can’t really tell if it’s bias because I am very comfortable with RPN, but another of the benefits of RPN is that it seems much easier to build up a complex computation on the fly without having to backtrack and add parentheses, which on most calculators means you have to start over. With an infix calculator, I have to plan the whole thing out precisely before I even begin entering it, whereas RPN feels like a “streaming” translation that is very easy.


I've had the Droid48 app on my android phone for years. It's a little unstable, hope author updates it. But it's so awesome to have a 48GX available whenever, while my real one sits safely on the shelf at home.

When I first got that thing as kid, nearly returned it, RPN seemed so bizarre. So glad I didn't... Really love that language, would never have understood stack based VMs as deeply if it weren't for the things I coded on that calculator.

Droid48 - https://play.google.com/store/apps/details?id=org.ab.x48&hl=...


I still have my HP 48g and I prefer using the dc[1] for calculations on my laptop.

[1] https://linux.die.net/man/1/dc


I do my taxes every year in dc...


No mention of Forth?

Back in the early 80's Forth was the first language available on the original Macintosh. I loved Forth, but it completely ruins you for every other non-RPN language. I remember writing an ASCII terminal (dial-up modem) application in Forth to learn the language, and afterwards every other language that I was using at the time just looked... weird.

I had to perform a massive mental shift to get back into all of the other languages I was being paid to work with at the time, and it was so difficult (for me, anway) that I never went back to it.


Do you have an example of what you'd consider typical, boring Forth code? I was trying to compare programming styles in different languages the other day by looking at different pieces of randomly selected code, on the theory that most code is probably pretty typical. So, for example, for JS I used the bisect_by function from Crossfilter2, and for Perl I used Net::DBus::Binding::Message::Error::new.

Unfortunately, all the Forth I had on hand or could easily find was one of ⓐ something I'd written myself, ⓑ something written for didactic purposes or as an example of the ideal way to do things, or ⓒ by the author of the Forth implementation it runs on. I'd argue that all of these are likely to be atypical examples of Forth style.


I have 14 RPN and 7 algebraic calculators, so you can say that I prefer RPN 2 to 1 over algebraic models.

About 15 years ago, I was gifted a 1986 12C by our cost accountant. This thing was beat up, missing the badge, and generally nasty; given that and the fact that it is a financial calculator made it pretty much ignorable.

Over the years, the batteries would die in my other calculators and I would reach for that 12C more and more. Eventually the 12C became my main desktop four-banger. Now main did not mean only because I need something to convert between dec and hex, so I also have a TI-36x solar on my desk.

Don't get me wrong, I am a huge fan of the early 90s incarnation of the 36x but I really don't want two calculators on my desk. So last night after reading this thread I was inspired to use some of the programmable features of my 12C and write decimal/hexadecimal conversion routines.

And here are the routines:

  DEC -> HEX: GTO 00
  Input integer 0-255
  Result format is nibble.nibble
  e.g. 10.15 = AF
       12.05 = C5

  HEX -> DEC: GTO 15
  Input format is nibble.nibble
  e.g. enter 14.13 = ED
              1.11 = 1B
  Result is an integer

  01 16
  03 /
  04 DUP
  05 INTG
  06 SWAP
  07 FRAC
  08 .16
  11 *
  12 +
  13 GTO 00
  14 R/S
  15 DUP
  16 INTG
  17 16
  19 *
  20 SWAP
  21 FRAC
  22 100
  25 *
  26 +
  27 GTO 14
Now this formerly disrespected lowly financial calculator has grown to be not only my favorite four-banger but now the only calculator I will ever need at my desk.


The article briefly mentions RPL. It’s a programming language for Hewlett-Packard RPN calculators. It’s an interesting curiosity if you’re in to niche programming languages.

https://en.wikipedia.org/wiki/RPL_(programming_language)


Forth and Postscript are RPN computer languages that you can program in directly. (Likewise the JVM instruction set but most users don't program it directly or add new instructions.) Lisp is FPN ("Forward" Polish Notation).

One reason Lisp needs parentheses while Forth doesn't is that Lisp allows a variable number of arguments to functions; Forth generally does not. It's possible to build variadic Forth functions but you have to push the number of arguments as a parameter, which is usually not very convenient. With Lisp, the closing parenthesis delimits the last argument so the Lisp compiler always knows how many arguments were passed automatically.

Polish notation makes both Forth and Lisp very easy to parse compared to algebraic languages, and as the article points out it also makes expressing function composition very easy in both.


Reading these comments, I'm surprised that people think in RPN. (I mean I shouldn't be, I just didn't think of it)

I wonder if teaching it early on, instead of parenthesis, would have made math lessons different?

Could there have been different notations used for things like factoring out a quadratic equation?


I learned RPN as a college freshman studying engineering in the late 1980's. Almost all of my fellow students had HP RPN calculators. Once we where doing more advanced math RPN -- with the accompanying stack -- became so much easier to enter. We all quickly learned it and I think most of us came to hate standard calculators.


> Could there have been different notations used for things like factoring out a quadratic equation?

well, you're talking about high school algebra, but just adjacent to that is the lisp programming language which uses polish notation. It also uses parentheses because parsing the parentheses-less polish notation requires that the operators have a fixed number of operands

Sussman, co author of SICP and co creator of lisp-like Scheme, has a current idea/book/project he's advocating which is to teach physics using scheme instead of algebraic-calculus because the notation is more precise: rather than differential equations which you need to be skilled at reading, you use polish notation computer programs that can be executed and studied.


Well. just. wow.

I was just thinking of notation, but making math parsable, or teaching a regular math notation, that should be a thing.

I remember hearing generalizations like "chess is pattern matching", and "math is just symbol manipulation", but latter really comes to life if we make math notation regular enough to be funamentally machine readable.

Just think what it could do with ai (or for ai)


Even algebraic has different also-possibles. APL and Smalltalk don't bother with precedence, for example.


I can hardly use a non-RPN calculator. Wonderfully efficient for both simple and complex calculations.


I have a very successful (and free) rpn calculator for iPhone for those interested:

https://apps.apple.com/ae/app/rpn-30/id1451413517


“You must update to iOS 13 ...”

:-/


Sorry :-/

Apple not me


Picked up an HP calculator to take the FE exam. The other approved calculators were simple 4 functions calcs. I assumed everyone would be on the HP but I was the only one who had one at the testing center.


RPN is a lot like vim, the first time you are like DUH! I can't add 2 and 2. But if you take the learning curve, it becomes very efficient and you cannot move back.


hey all -- if anyone is looking for a modern hp calc lineup equivalent, I've been super satisfied with the HP15c clone I got from https://www.swissmicros.com/products a few years back. I was rather disappointed with the 2013 HP15c limited edition re-release. Hope this throws anyone feeling looking for something in $current_year on the right track.


I have an original HP-11C on my desk. It's about 30 years old, works perfectly, and I've had to replace the batteries about once a decade.


I also keep my HP32S RPN from 25 years ago on my desk still.

The combination of HP quality build and RPN.

Not a chance that I would have allowed anything less waste my desk space


I got an HP48G in high school for UIL[1] competitions at the direction of a math teacher, and once I got the hang of it, it's been hard to use anything else. The competitions were a mix of math and seeing how many problems you could go through in 30 mins using a calculator. Pretty fun once you get the hang of it, and the HP48G/RPN did give me more time on non-numerical problems. The IrDA is finicky, but the programming and builtin features are great. The feature set is a bit much for a high school student maybe, but I used it through all of college too. I probably played a bit more minesweeper on it than I should have.

The HP prime and Droid48 apps are nice, but I just don't need calculators as much anymore.

[1] https://www.uiltexas.org/academics/stem/calculator-applicati...


Another advantage to RPN is consistency between machines. Early algebraic models had differing limits of the complexity of the expressions they could evaluate.

Even RPN has a limit, that being the stack depth --- while most of HP's calculators had 4, the HP48 has one limited only by available memory.


I've been experimenting with RPN user interfaces for a while; https://asciinema.org/a/391001 is a screencast of a recent prototype that uses the terminal and builds up an infix representation of the expression that generated a given result. http://canonical.org/~kragen/sw/dev3/rpn-edit#50_iota_2_ln_*... is an earlier prototype that runs in the browser.

I don't think RPN is a super great fit for multitouch screens but it works really well for keyboard interfaces.


I bought an HP41C in 1979, and I have been a fan of RPN ever since. I tossed the 41C back when I got my first Palm HPC and installed the "RealCalc" app. I'm glad that some of the modern calculator apps still support this mode.


I was first exposed to RPN around 1963. It was a game my aunt gave me as a present. I wish I could remember the name of the game. Players rolled dice that had logical operators and perhaps quantifiers on the faces of the dice. The goal was to construct valid logical expressions using RPN. Even for a kid that was nuts about math, the game wasn’t that interesting. Does anyone remember what I’m talking about? I’m not sure of the year, but I think there might have been ads for the game in the magazines I read, like Popular Electronics or Scientific American.



Yes, it was! Thanks so much, I just couldn't remember the name of that game. How did you recall it from over half a century ago?

Looking up used editions of WFF'N Proof on Amazon I recognize the instruction book published in 1965. That must have been around the time I received the game. It looks like more recent sets were more extensive.

Well, the game likely had a positive influence on me, I ended up with a Math degree in college. Even in high school, I understood logic and proofs better than the other kids in my school.


Algorithms for RPN Calculators by John A. Ball (1978) landed in my mailbox two days ago. It’s each and every detail you can imagine regarding RPN. Very well and thoruogh written. A great pleasure to study it:

https://www.amazon.com/Algorithms-RPN-calculators-John-Ball/...


The only reason I don't use my HP-15c scientific, which I got in college well before the turn of the century as an EE undergrad, is because it has been emulated on my phone. Well worth the price:

https://apps.apple.com/us/app/hp-15c-calculator/id503720774

And oh, BTW, I still have my 15c.


I used an HP 50g in high school — I always loved the look of confusion after someone asked to borrow my calculator.


I did so much programming on the HP 28S and the HP 48Gx. Really an awesome mobile programming platform at the time.


I never had much love for RPN until recently when I found myself hand coding PostScript. I loved the minimalism of leaving a result of one operation on top of the stack and feeding it into subsequent operations. I totally want to learn Forth now.


I went through all of high school and college with an HP48 calculator. I can't express how much more natural RPN felt than the more traditional alternative (and fast!).

It also made for very confused expressions whenever anyone borrowed my calculator...


There's an open-source Android app called Droid48 that gives you a virtual HP48, if you're into that sort of thing.

I know when I'm out with coworkers and they whip out Droid48 to calculate the tip, I picked a good place to work.


For ios, I've used Free42 and i48 (Daniel Parnell).


I own an actual 42S and I prefer Free42.


I prefer the iOS app called 42s. Better user interface in my opinion.


I've had a decent experience using RealCalc Plus, although it's just my backup when I don't have my 32SII handy.



I had an HP48SX in high school, back in 1991 or so. I upgraded to an HP48GX in 93, I think? I remember writing a couple of games in RPL during physics class. And cheating on chemistry tests.


RPN is just so much better. An interesting note, the HP 50g can be programmed in RPL, but you can also use the equation editor and mix and match code and equations.


Love my HP50G. I rode a motorcycle during college, so consequentially I always had my HP50G on me wherever I went since I never took it out of my backpack.


Is there a good RPN calculator currently? The HP Prime is lacking apparently, and the 50G is no longer available (and a bit old)


I don't own one, but I've heard great things about SwissMicros calculators (https://www.swissmicros.com/products) from users of HP calculators. The SwissMicros lineup is very similar to HP's 1980s calculator lineup.

Also, the HP 12c financial calculator and the HP 35S scientific calculator are still being sold by HP.


oh shoot, I missed this comment elsewhere in the thread -- just want to say I got their HP15C equivalent years ago and it's high quality.



The HP Prime does have an RPN mode. I bought it recently, for that very feature, when my HP48 died. The keyboard of the HP Prime isn't really optimized for it (some trivial operations on the stack require key combinations, while on the HP48 there were physical keys for them), but it's acceptable.


A 35s and 50g got me through my engineering degree, I'm sure they'll still work fine.


I have the Droid48 app on my android phone. Pretty nice but I actually never use it.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: