News for hackers. Stuff that matters.
Re:UI is hell: four-function calculators by 7thaccount on Friday January 24, 2025 @07:25AM (#42812449)
I own several RPN calculators (they are very cool), but still find modern TI or Casio calculators to be superior now when I'm not using a spreadsheet or something like Mathematica.

Even 15 years ago, you could type out an entire equation that would have to be used multiple times and just update a single part of it and hit enter and then scroll up, modify, and hit enter again. All of that without having to resort to keystroke programming.

RPN is easier to reason about, but in aggregate doesn't save much time when you have a really slick modern interface and can scroll around and see things pretty printed. In engineering it is common to have some crazy looking things that are just easier to reason about when you can see it matches what is on the paper in front of you.

Re:UI is hell: four-function calculators by bruce343434 on Friday January 24, 2025 @11:25AM (#42814677)
> things [] are just easier to reason about when you can see it matches what is on the paper in front of you.

I have this sentiment every time I dive into some "other" programming math notation. Such as (lisp), rpn, infix without precedence, etc. In theory I like it, but then in practice it's just kind of painful.

We humans are entrenched in our bad but default notation!

Re:UI is hell: four-function calculators by roelschroeven on Friday January 24, 2025 @11:45AM (#42814879)
Is infix notation even that bad?

I guess RPN has advantages for use as an input method for calculators, but as an actual algebraic notation? It seems to me it's very cumbersome to perform standard algebra on equations in RPN notation (or prefix notation, for that matter).

I can't be sure but as far as I know nobody has using anything other than infix for algebra. Every time I see a text explaining the advantages of RPN, it's always in the context of calculator input.

Re:UI is hell: four-function calculators by 7thaccount on Friday January 24, 2025 @11:48AM (#42814919)
There are disadvantages to RPN as well. I read a book on the Forth programming language (also uses RPN) and some calculations that are algebraically simple require pretty bizarre stack shuffling with RPN stacks. I wish I had the source example. It was something pretty standard in a highschool algebra book like the midpoint formula or something like that. The reverse might be true as well in some situations, but I can't recall any examples outside of RPN's historical advantage against old TI calcs in the 80s. Maybe a forth or RPN enthusiast could help.
Re:UI is hell: four-function calculators by kstrauser on Friday January 24, 2025 @11:29AM (#42814716)
I have an HP 50g that makes it easy to flip between RPN and textbook-style graphical equations where you can arrow around and tweak any value. You can have both approaches in the same place.
Re:UI is hell: four-function calculators by 7thaccount on Friday January 24, 2025 @11:45AM (#42814881)
Agreed, but the 50g is ancient and is the only calculator to my knowledge that has that capability.

For the most part the options are an older style RPN calculator (even the super nice swiss micros don't have equation scroll, although you can at least see the contents of the stack on the screen like the later HP calcs could), or what TI and Casio have.

Re:UI is hell: four-function calculators by wtallis on Friday January 24, 2025 @05:34PM (#42817581)
The whole 48/49/50 series covering 1990–2015 has that equation writer functionality, or in other words: every RPN graphing calculator.
Re:UI is hell: four-function calculators by 7thaccount on Friday January 24, 2025 @06:42PM (#42818028)
Good point.

Still a niche within a though. They weren't that common in the wild like the old HPs were. I knew someone in the engineering program at Texas Tech with a 50g, but never saw a single engineer or stem major at my school with one. They had them in production for awhile, so they're out there (logically speaking), but they've got to be a big outlier.

Re:UI is hell: four-function calculators by billmcneale on Friday January 24, 2025 @01:06PM (#42815664)
I used to be in love with RPN and owned multiple HP calculators (HP-41, HP-15) but RPN is cheating by offloading effort on the user.

When you see a complicated, parenthesized expression, it's up to you to figure out the deepest expression, enter it first, and then work your way out.

Standard calculators require more keystrokes but they can be entered without much thought, left to right. And these days, you can also edit and modify your input, so it's hard to justify RPN.

Re:UI is hell: four-function calculators by kccqzy on Friday January 24, 2025 @01:16PM (#42815736)
Why would you need to enter the deepest expression first?
Re:UI is hell: four-function calculators by 7thaccount on Friday January 24, 2025 @02:18PM (#42816152)
I think they mean that for a complicated expression you have to spend more brain power figuring out how to input things with RPN. It is a little more common sense with infix.
Re:UI is hell: four-function calculators by billmcneale on Friday January 24, 2025 @04:22PM (#42817040)
Yes, exactly.

If you have

1 + (2 * 3 + (4 / 5))

The smallest key count with RPN is to start entering the deepest expression first:

4 ^ 5 / 2 ^ 3 * + 1 +

You can type it left to right but it takes more keys and is probably on par with standard paren arithmetic, which negates the RPN advantage

1 ^ 2 ^ 3 * 4 ^ 5 / + +

Re:UI is hell: four-function calculators by benhurmarcel on Saturday January 25, 2025 @08:26AM (#42821512)
I’ve been thinking that an RPN calculator app could easily display the full natural expression while you enter it in RPN. And let you modify it afterwards.

I haven’t found such an interface yet.