7 ms·
The Emacs Calculator (2009)
- wiz21c 9y agoI 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) ?
- nikital 9y agoI 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 :)
- kqr 9y agoWhy open messages, though? You can paste quick calc results with ctrl y and they end up in messages none the less.
- exikyut 9y agoTIL about SpeedCrunch! http://www.speedcrunch.org/ http://www.speedcrunch.org/ http://www.speedcrunch.org/download.html http://www.speedcrunch.org/download.html even links to 32- and 64-bit prebuilt Qt binaries for Linux. Nice.
- ajross 9y agoGotta 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 then. Never managed to make it work for myself.
- thomastjeffery 9y agoI 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.
- presto8 9y agoI'm the exact opposite. RPN calculators are totally natural to me, whereas I get confused on normal calculators. Normal (non-algebraic) calculators are inconsistent. To get "2+3", it's infix: 2, +, 3, =. To get "cos(45)" it's postfix: 45 cos (and no equals). And something like "cos(2+3)" is a mixture of both. RPN, is always the same, numbers first, then operators, and usually more keystroke efficient. Some operators take multiple arguments. RPN also has the advantage of (rarely) needing a memory register, since the values can be left on the stack and accessed as they are needed.
- nn3 9y agoI mainly use the algebraic mode Just prefix every expression with '
- rsanders 9y agoBeing an old HP48 user, finding Calc was what me fall the rest of the way in love with Emacs. If I'm at the shell prompt I'll still startup GP/Pari for quick calculations, but it's hard to beat Calc for longer sessions. The only downside is that, like any advanced Emacs functionality, if you don't use it frequently you forget all the commands.
- dhimes 9y agoI fell in love with smartphones (iPhone) when I downloaded the HP41 app. I feel ya.
- lambda 9y agoAnd an HP48 emulator is still what I use on my phone as a calculator. For the reason you mention, I need to get into the habit of using Calc for my quick calculations; right now, I usually use Google (ick, infix notation) or dc.
- rsanders 9y agoI'm the same! None of the native RPN apps even come close.
- eggy 9y agoRPN is so efficient when you are running a series of calcs when you learn it. I feel icky now if I use algebraic input or calculator and I have to backspace. It's like using a word processor, not a calculator! I am in Emacs all day for all things. It is a big mess of a world I like muddying about in!
- pasbesoin 9y agoI've have Free42 on my Android phone. Do you have a particular emulator to recommend? -- http://thomasokken.com/free42/ http://thomasokken.com/free42/
- lambda 9y ago
- knight17 9y agoEmacs calc can do financial/TVM calculations, too. A useful tutorial by Andrew Hyatt on doing financial calculations [0]; he has wrote many other calc tutorials [1] in the Emacs Google Plus community [2]. [0] Emacs financial calculations: https://plus.google.com/+AndrewHyatt/posts/YdwsbNmZ4NL https://plus.google.com/+AndrewHyatt/posts/YdwsbNmZ4NL [1] Index of Andrew Hyatt's emacs calc tutorials: https://blog.markhepburn.com/2013/12/07/andrew-hyatts-emacs-calc-tutorials https://blog.markhepburn.com/2013/12/07/andrew-hyatts-emacs-... [2] Emacs Google Plus community: https://plus.google.com/communities/114815898697665598016 https://plus.google.com/communities/114815898697665598016
- shoover 9y agoCalc 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.
- wiz21c 9y agoCould 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...
- deleted 9y ago[deleted]
- eadmund 9y agoAfter you get used to it, you end up being able to calculate much more quickly. It's basically having a little Forth machine in your hand or at the end of your keyboard.
- macintux 9y agoThe joy of never, ever having to type a parenthesis must be experienced to be appreciated.
- brians 9y agoAnd yet so many RPN people are Lisp programmers the rest of the time. I guess it balances out.
- thomastjeffery 9y agoI would really like a postfix lisp. I wonder what edge cases I would run into designing one.
- jhallenworld 9y agoJOE also had a calculator: Esc M It tries to include features of a Casio scientific calculator, so includes things like statistics / regression (of selected block) and engineering notation display. It inserts underscores between every three digits for easier reading: 0.123_456 It is not reverse polish.
- kickingvegas 9y agoBeen using Emacs since '89 and did not know this was a thing. Thanks!
- anyfoo 9y agoI took the time to properly learn and use emacs-calc this year, after being an emacs user anyway. Before that, I tended to use bc on the shell for quick calculations, but always felt that to be too limited. Since then I am practically a daily user. It's not without downsides, and some simple workflows that seem common and trivial to me personally feel a bit awkward and contorting. For example, working with variables/equations, with that '=>' "operator", is rather strange. There also seems to be no support for hex numbers in 0x-prefixed lowercase notation, which makes it hard to impossible to just copy and paste hex numbers for programming. And while emacs-calc has a very impressive scientific unit system, often I just want to use unit prefixes, like u,m,M for micro,milli,Mega respectively, without having to resort to using actual physical units in my calculations (and then finding out again how to simplify appropriately). I also almost don't use the trail at all, mostly because its navigation and actioning feels tedious and downright archaic, making me think that emacs-calc probably started out a few decades ago, with a specific, now outdated, terminal paradigm in mind. But all in all, it's pretty impressive, and fills the role as my daily companion for quick, and sometimes more elaborate, computations well.
- imglorp 9y agoThis small addition lets you work with SI byte units. I have no idea why this wouldn't be in the default unit set, but hey, this is why we use emacs. https://raw.githubusercontent.com/mnp/dotfiles/master/shared-elisp/my-calc-extras.el https://raw.githubusercontent.com/mnp/dotfiles/master/shared...
- usernam 9y agoSince I've discovered "nickle"[1] (by pure chance), I've been aliasing bc=nickle on every system I had access to. nickle has normal algebraic notation with arbitrary precision, configurable base input/output for every expression (very reminiscent of calc), math functions and C operators work out of the box. It has variables, as well as a simple c-like language for additional extensions. If RPN is not for you, "nickle" is a perfect "bc" replacement which works as you would expect. [1] https://nickle.org/manual.html https://nickle.org/manual.html
- zokier 9y agoI 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
- ne01 9y agoHere it goes again, my favorite OS, Emacs. If only it had a web browser as good as chrome.
- thomastjeffery 9y agoI wonder what a web browser would look like if it evolved inside emacs.
- anyfoo 9y agoThere were and still are approaches to web browsing in Emacs. But like every other completely mainstream web browser, keeping up with the evolving web, and especially its client-side programmability and performance needs, made its usefulness rather marginal. In the end it’s often less trouble to switch over to the browser window that’s already open anyway and copy and paste data between it and emacs.
- usnigg 9y agoThat's sweet! I personally also like maxima a lot with it's associated emacs mode and especially the neat imaxima interface which you can easily set up to display formulas in latex inside an emacs buffer. Check it out: https://sites.google.com/site/imaximaimath/ https://sites.google.com/site/imaximaimath/
- adrianmonk 9y ago"That's just awesome! That's a text editor ... doing calculus!" Well, some might call that a good definition of scope creep, but at this point I'm sure we're all well aware that even though Emacs might be called a text editor, that's not really all it is.
- xor-xor 9y agoI like to think of Emacs as a virtual lisp machine for writing your own text editor.
- AlexCoventry 9y agoThis totally nerd sniped me last night. But what is the point? I can't think of a situation where it would give better results than professional tools dedicated to the same tasks. It was probably cool in the 90s, when the alternatives were much weaker.