Live data from Hacker News

The Emacs Calculator (2009)

nullprogram.com

31–40 of 57 posts

Re: The Emacs Calculator (2009)

#31
I find the undogmatic approach to notations interesting here; the basic calculator is RPN, but CAS/symbolic features ("expressions") use algebraic notation (with separate "big" and normal notations). Of course everything has elisp underpinnings with its prefix notation, which is also used for custom extensions. Beyond those broad strokes, the basic notation used feels quite quirky, like using _ for negatives

Re: The Emacs Calculator (2009)

#34
post #4
post #2

I love Emacs but the calculator, being stack based is just too awkward for me. I know there is the "algebraic mode" but it still is too much. Is there a way to configure it to work like, say, SpeedCrunch (my favorite calculator by far) ?

I would sometimes open the Messages buffer and then repeatedly use M-x quick-calc to evaluate a few expressions. Each result is written to the Messages so I have a log. Dirty but works :)

Why open messages, though? You can paste quick calc results with ctrl y and they end up in messages none the less.

Re: The Emacs Calculator (2009)

#35
post #17
post #2

I love Emacs but the calculator, being stack based is just too awkward for me. I know there is the "algebraic mode" but it still is too much. Is there a way to configure it to work like, say, SpeedCrunch (my favorite calculator by far) ?

Gotta raise my hand here too. I'm in my mid-40's, have worked at all levels of the software stack, have played with favored development tools of like nine generations of engineers. I still can't wrap my brain around a RPN calculator well enough to use it productively (but boy howdy can I tell you how the stack engine works!). All the cool kids in physics class in the 80's were using HP's, and I felt left out even the…

I think about it as first listing a bunch of scalars, then consolidating them with operations.

It takes a little practice to start thinking postfix, but it's a relief to not consider order of operations, and tends to be a lot more consistent with how I do arithmetic in my head in the first place.

Re: The Emacs Calculator (2009)

#36
post #28

Earlier quoted context omitted.

The joy of never, ever having to type a parenthesis must be experienced to be appreciated.

And yet so many RPN people are Lisp programmers the rest of the time. I guess it balances out.

I would really like a postfix lisp.

I wonder what edge cases I would run into designing one.

Re: The Emacs Calculator (2009)

#37
post #14
post #8

Calc is so useful to have right there. I have never used Windows calc since discovering the emacs one many years ago. Once I got used to it I had to find an RPN one for my phone (RealCalc and PCalc for Android and IOS, respectively). Algebraic formulas are great but beyond my typical reuse recall duration.

Could you explain why you feel RPN is better for you ? I've never been able to get used to it... Maybe I get it wrong...

It separates naming from evaluating.

I have to bake 7 pies...

7

and each pie takes 45min

7 45 *

=> 315

But I can fit 3 pies in the oven at a time

7 45 * 3 /

=> 105

Using infix notation, I would need to consider order of operations, and put operators before data, increasing the mental stack size.

Using a postfix calculator, I can just throw values onto the stack, and start consolidating them with operations.

Re: The Emacs Calculator (2009)

#39
post #8

Calc is so useful to have right there. I have never used Windows calc since discovering the emacs one many years ago. Once I got used to it I had to find an RPN one for my phone (RealCalc and PCalc for Android and IOS, respectively). Algebraic formulas are great but beyond my typical reuse recall duration.

[deleted]

Re: The Emacs Calculator (2009)

#40
post #14
post #8

Calc is so useful to have right there. I have never used Windows calc since discovering the emacs one many years ago. Once I got used to it I had to find an RPN one for my phone (RealCalc and PCalc for Android and IOS, respectively). Algebraic formulas are great but beyond my typical reuse recall duration.

Could you explain why you feel RPN is better for you ? I've never been able to get used to it... Maybe I get it wrong...

1 point by shoover 0 minutes ago | edit | delete [-]

I’m not sure :) I think it’s because the stack makes it easier to see the state of the calculation, whereas without RPN I have to keep more in my head and can’t see it.

Basically what thomastjeffrey said.

Post reply on HN