Live data from Hacker News

What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

hpmuseum.org

51–60 of 118 posts

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#51
post #20

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

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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#52
post #50
post #41

Earlier quoted context omitted.

> 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.

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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#55

Earlier quoted context omitted.

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 a…

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

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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#56
post #41
post #26

Earlier quoted context omitted.

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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#57
post #6

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.

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

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#58
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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#59
post #41
post #26

Earlier quoted context omitted.

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.

> 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.

Re: What Is RPN? Why Did/Does HP Use RPN? Learning RPN (1999)

#60
post #47

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).
Post reply on HN