4 ms·
Since this is a calculator topic, I'd like request your input on which calculators you use. I use the Emacs calculator (M-x calc) and XCalc (http://www.tordive
by knight17 6y ago
Since this is a calculator topic, I'd like request your input on which calculators you use.
I use the Emacs calculator (M-x calc) and XCalc (http://www.tordivel.no/xcalc/ http://www.tordivel.no/xcalc/) as I like to use RPN calculators. The Windows 10 calculator is painful and slow. XCalc has a mini mode, where it will sit as a small, single line without distracting you too much. I like that feature very much.
One thing with Emacs is that I forget the shortcuts for non-frequent calculations that I'd have to go and search for it.
- majewsky 6y agoMy favorite calculator of all time is units(1). For example, to calculate how long it takes to download a 20 MiB file over a 56 kbit dialup connection: $ alias units='units --verbose' # in your shell rc $ units Currency exchange rates from FloatRates (USD base) on 2019-06-05 3460 units, 109 prefixes, 109 nonlinear units You have: 56 kibibit/second You want: hour/20 mebibyte reciprocal conversion 1 / (56 kibibit/second) = 0.8126984126984126977077949 hour/20 mebibyte 1 / (56 kibibit/second) = (1 / 1.23046875) hour/20 mebibyte Note that if you are on macOS, you want to install a more recent units via homebrew. The one shipping with the base system is positively ancient.
- drunkpotato 6y agoI use insect almost daily ( https://github.com/sharkdp/insect https://github.com/sharkdp/insect ). It’s a command line calculator, not sure how well it would integrate with comint on emacs. Unit conversions built-in. I don’t know whether it has an RPN mode. The other thing I do frequently is fire up a python3 repl for quick hits. I just did it yesterday for a complex mass file rename I couldn’t figure out how to do with shell variable replacement. With python it was easy with glob and os.rename.
- dTal 6y agoQalculate is the best desktop calculator I've used. It has a command line version, qalc. Qalculate takes unit-aware calculation to the next level by including an algebraic solver. You don't have to rearrange everything to put your unknown on one side - you can just chuck 'x' into your equality somewhere and it'll work it out. For example, to verify the what-if xkcd assertion that an A10's main gun will propel Randall's car up to 7mph in 3 seconds: (60/s) × (x s) × (395 grams) × (1010 m/s) = (3500 lbs)(70 mph) ≈ x = 2.0754319 s 2 seconds! Maybe Randall's car is heavier than 3500 lbs. How much heavier? (60/s) × (3 s) × (395 grams) × (1010 m/s) = (x lb)(70 mph) ≈ x = 5059.1879 More like a Dodge Durango. Unless he's accounting for friction. You see how nice it is to be able to swap around the unknowns in an equality. Other great features are a large number of built-in constants, an astounding variety of built-in functions - it's practically a CAS - and a command history, which is where I pulled the above example from. It also has a plugin for Plasma's krunner, so you can do quick calculations right there in the dropdown. To summarize: Qalculate is the shit.
- boogies 6y agoQalculate is great, but often I just use GNU bc. You just have to remember (or make some type of alias) to pass it the -l flag for floating point etc., and I also use -q for quiet. There's also dc(1) for RPN.
- fbriff 6y agoAs a RPN calculator user, my first choice is XCalc (http://www.tordivel.no/xcalc/ http://www.tordivel.no/xcalc/). The non-RPN one that I use the most is SpeedCrunch (http://speedcrunch.org/ http://speedcrunch.org/), Insect (https://github.com/sharkdp/insect/ https://github.com/sharkdp/insect/) and Frink (http://frinklang.org/ http://frinklang.org/). All have unit conversion too.
- severak_cz 6y agoFrink is my tool of choice for computing, despite it bit esoteric.
- scott_s 6y agoPython repl in a newly opened terminal session. Which is similar to the posted submission. During grad school, I went through a period of trying many different GUI based calculators, until I realized what I really wanted was a language's repl.
- kps 6y agoFor simple quick things I use ksh $((expressions)).
- oefrha 6y agoI kid you not, I use Spotlight on macOS (cmd+space) as my simple calculator if I’m outside the terminal. If I’m inside the terminal I probably have an IPython instance open. For advanced stuff I use Mathematica as mentioned here: https://news.ycombinator.com/item?id=23428991 https://news.ycombinator.com/item?id=23428991
- perryprog 6y agoNot to mention, Spotlight does a /bunch/ of unit conversions. You can even type things like `1km/h to kt` for example. There's quite a few units defined already that I'm usually pleasantly surprised. This also works on iOS. The one downside is you can't do unit conversions of a mathematical expression, just of a number. (i.e., 2^2 m/s does not work but 4 m/s does). Whenever I have to do something more complicated I usually use M-x calc or maxima with ezunits.
- ibiza 6y agoI use a function "ev" that wraps bc. It's crude, but handy: $ ev() { echo "scale=3; $*" | bc -l; } $ ev 22/7 3.142
- geraldcombs 6y agoI do something similar, with a couple of convenience substitutions for commas and multiplication: $ math() { echo "scale=2 ; $" | sed -e "s:x::g" | sed -e "s:,::g" | bc; } $ math 5,382 x 48,927.3 263326728.6
- majewsky 6y agoYou should put this into a codeblock by indenting by 2 spaces. The formatting converts asterisk-delimited text into italics. $ math() { echo "scale=2 ; $*" | sed -e "s:x:*:g" | sed -e "s:,::g" | bc; } $ math 5,382 x 48,927.3 263326728.6
- knight17 6y agoOne good thing about the Emacs calculator is the sheer number of features available. I don't use many, but occasionally use the financial functions, and they are really great. Any suggestions on programs out there with financial functions? See Andrew Hyatt's Emacs calculator for Financial calculation tutorial: http://web.archive.org/web/20171218022230/https://plus.google.com/+AndrewHyatt/posts/YdwsbNmZ4NL http://web.archive.org/web/20171218022230/https://plus.googl... (Link rot, Google Plus, web.archive.org!)
- bjoli 6y agoI have all commands I don't remember bound to leader keys. When in calc I have [leader key] m and then which-key pops up everything I have stored. Other than that, I use scratch in elisp mode and eval. Not as fluent as magnars, but this is a good example of what I mean (towards the end): https://youtu.be/jNa3axo40qM https://youtu.be/jNa3axo40qM
- benhurmarcel 6y agoFor an RPN calculator, I find orpie really great. Otherwise I use WolframAlpha a lot.
- deleted 6y ago[deleted]