If you want a lighter-weight package featuring a plaintext REPL, a large library of functions, function definition, arbitrary precision, and more (minus solver capability), give Speedcrunch a try:
In college, I started out with SpeedCrunch because it comes with many KDE-based Linux distros as their default calculator. I eventually went on to play with a few alternatives and ultimately settled on Cantor, which is a nice, notebook-style frontend for pretty much every mathematical programming environment you can think of (including Qalculate!). At the time, I really liked using it with Maxima (and sometimes R).
Qalculate has a plain text repl (qalc), as well. And, as far as I know, all the other things you mention. Speedcrunch might be awesome for all I know (never tried it), but your comment does not really shed any light on why one would pick it over qalculate (what does "lighter-weight" mean? It's not like qalculate takes minutes to start up or is hard to use).
The plain text qalc doesn't compare with Speedcrunch. How do you copy & paste for example? Speedcrunch also has a shortcut for putting the result into the clipboard.
You can make Speedcrunch look like a good old fashioned bc session, whereas Qalculate puts way too much stuff on the screen. It misses a simple REPL mode.
The shortcuts aren't the same, especially for copy. For example instead of Control+C (which normally interrupts the program), you have to use Shift+Control+C.
I switched from Speedcrunch to Qalculate a while ago. I don't actually remember exactly why I switched at this point. (I think due to a lack of updates). Qalculate very similar in many ways, but I do like the interface on Speedcrunch better (after hiding the keyboard). The new UI for Qalculate has a similar enough feel to Speedcrunch that I've been happy with it.
A note to anyone using a high DPI display: you can build this from source and get a version that scales itself cleanly instead of forcing the OS to make a blurry mess out of it.
Speedcrunch is great but has (had?) a very annoying bug: was pretty slow after a while. You need to manually clear the history to make it load fast again.
I have it on speed dial (pause / break key to open and close) and use it all the time.
I have it bound to `$mod+c` and launched as a floating window in i3. It integrates very well into my workflow as I can just quickly launch, perform a one-off calc, and close it whether I'm in a terminal or elsewhere. Since it saves history, I can always relaunch it and continue where I left off as well.
I tried this in cinnamon. But I use multiple desktops and if qalculate is already on another desktop, the experience is pretty bad since it doesn't move to this one (and I do want its 'allow only single process at once' enabled so settings save properly)
I hve a global shortcut to open a Julia REPL session and I use that to perform any sort of quick calculations instead of a GUI calculator. The best thing about this approach is that I can always create new functions for stuff I use often.
Qalc seems like a better calculator to me and is more stable somehow despite being written in I think C++. Not having to download a huge programming language taking up GB of space, research an ecosystem and import ten packages sounds ideal. I prefer python or R and sometimes even BC to Julia for terminal calculating anyways...
I'd let the post about qalculate be about qalculate here.
Yes! (although ruby (irb) instead of python). It's amazingly useful to be able plug in expressions in a single line of text format. Though for more complex expressions, something like qalculate looks nice to me.
If every PC had a number pad I'd agree but efficiently using the top row number keys for both symbols and numbers is a tall expectation for most users to default to. Doubly so when you factor in holding shift and memorizing the operator locations in that row. A full point and click is a great default IMO, even on PC. I'd also argue in the case of devices with a numberpad you're unlikely to care as much about the wasted UI space anyways.
> irrelevant-in-PC physical number buttons paradigm, taking up more than half of useful UI space
Calling it irrelevant is a bit like calling vim irrelevant. Classic calculators don't use REPL, they are designed to minimize the number of keypresses required to input your problem and explore it in the intuitive manner. They use highly efficient modal input languages (kind of like vim). Besides being efficient, these languages tend to have one-off commands you have to remember. Having a cheatsheet on your screen by default is useful for discoverability. In the algebraic calculator paradigm and their typical use cases (napkin math), having a history is not very useful (unlike in RPN where having the stack on the screen is nice).
That said, Qalculate is weird in that it uses a REPL and the input line, which is much slower and clunkier than the algebraic input, but still tries to mimic a classic calculator. It's also slow to start. Not sure what's its use case, as it offers neither speed of a classic calculator nor the feature set of full-fledged math software.
This doesn't make any sense, what kind of cheatsheet do you need to discover numbers on your keyboard???
What kind of efficient modal input language is it where you have to move your hands off the keyboard and move your mouse to press a button to insert a number?
Commands, not numbers. (what is the equivalent of +/- or 1/x?) Algebraic calculators don't have a lot of useful information to display when used properly, maybe the contents of memory registers but not much else. The screen estate can be used for anything, might as well be a cheatsheet.
> where you have to move your hands off the keyboard and move your mouse to press a button
Command cheatsheet, not number cheatsheet obviously (doubling as input won't hurt). Having numbers on it is excessive, as I already said Qalculate does it the weird way.
It sems you're still talking about some idealized vim-calculator instead of this app
> Command cheatsheet, not number cheatsheet
How do sin/cos/tan/e/p/i/ln/kg/mod buttons (that take most of the screen real estate ignoring the numbers) help you "cheat"? Do they help you discover sin/cos? Or is there some shortcut label that helps you remember how to toggle some extra options without using a mouse?
You can hide the number pad from the keys. Or hide the keys entirely. Or keep them and customize which functions they activate, including custom user-defined functions.
could I keep only half of all the keys (e.g., I'd never need 0-9 or cursor keys, but then maybe ANS is useful), reoder them and attach a shortcut to each button?
Or replacing sin with the rad/degree switcher (without the dropdown)?
Yes, you can hide all the 0-9 keys. And add rad/degree buttons. And set whatever functions/settings you can have elsewhere in the UI as buttons. And add or remove columns/rows from the "keypad". The upper-left button in the custom keypad will always be to edit the custom keypad itself, otherwise it's fully modifiable by the user.
That's not a good excuse - that would be an option, not the main UI, and if it weren't the default, than the dev could've realized that that space could be used in a much better way
When I first started it after install there was no keypad visible. Your distro may have set a different default than what the devs did (I just tried it on Windows, so no distro maintainers to change the defaults). It's also easily customizable, there's a button to pick which keypad (if any) you want.
Same. I was happy with `apt install calc` (I think nowadays called apcalc) for years because it does arbitrary precision and isn't as awkward as a python shell or so, but qalc is clearly a step up with support for units and solving
$ calc 2^x=4
x is undefined
$ qalc 2^x=4
((2^x) = 4) = (x = 2)
I used the above for determining after how many years a given inflation rate doubles a price (1.03^x=2)
I think my most recent real-world application for units calculation was about how much energy a device uses in kWh after a year, given that it draws 10W during office hours:
With zsh you can call it with the noglob builtin¹, that way it doesn't try to parse the bracketed section as a globbing pattern; if that works for you, then you can simply "alias qalc='noglob qalc'" for future use.
I wanted to chime in as a calculator dev dude. Qalculate is really nice if you want the kitchen sink, which I do on the desktop. I also, depending on the task use speedcruch which others have mentioned.
Using https://github.com/ArashPartow/exprtk I have one calculator with a repl at 512kb, including a QML wrapper. I have a combined rpn calculator using sympy (based on the work of others) with exprtk as a 'programmer's calculator' on the side (https://github.com/poetaster/fibonacci). And several QML apps for symbolic CAS using sympy.
I have way too many calculators. They are so much fun to build. Now I ask myself, port the Qalculate methods to macros for exprtk or check out using libqalculate? I'm not sure. exprtk is so light? And adding macros discrete.
As an engineer, I usually can just pop my expression into Siri/Spotlight or Cortana with a hotkey and get the result just fine. What kinds of calculations are people needing more for?
Can it do ans* etc. Is there a history of expressions and results. Is the history on-screen while next expression is typed. Is there a current result indicator, i.e. live update of the expression result as you fiddle with parameters.
Just what's coming to mind for basic daily use here.
Indeed, alongside all the other numerical calculations and symbolic manipulation...
Example question: what is the diameter of a sphere of tungsten - in inches, say - that weighs the same as a human (say, 150 lbs)?
Looking up the formula for the volume of a sphere gives: v = (4/3) pi (r^3), and googling the density of tungsten gives us 19.3 g/cm3.
Great! Now we already have inches, centimeters, pounds, grams, a fiddly ^3 to trip up our unit conversion from cubic centimeters to cubic inches (or is it vice versa?), some rearranging of an equation to extract the 'r'...
Luckily with qalculate, we can just smoosh it all together without thinking.
We can substitute 'd/2' for "r", followed by 'x' for 'd' to tell qalculate that that's the quantity we want to figure out, and put it in inches while we're at it:
v = (4/3) pi ((x/2 inches)^3)
We're not after the volume but rather the mass, which is the volume times the density, and should equal 150lbs:
150 lb = (19.3 g/cm3) (4/3) pi ((x/2 inches)^3)
Hit enter and:
x ≈ 7.434184004
Amazing. A 7.4 inch cannonball of tungsten weighs as much as an adult human. Note that the result is only dimensionless because we balanced the equation - if we'd messed up any part of this formula, we'd have probably got our answer back in some perverse unit instead.
Oh and we didn't actually need to look up the formula for the volume of a sphere:
Its returning the text that needs to be inserted in place of x to make the equality true. Since the parentheses already contain the inches they are not redundantly attached to the x. If you remove the inches from the query you get the result in mm, you would use
150 lb = (19.3 g/cm3) (4/3) pi ((x/2)^3) -> inches
to get the answer in inches.
Looking at qalculate in Arch repos, libqalculate comes in at 14.94 MiB, and qalculate-qt at 3.37MiB, so 18.3 MiB total. If you're looking at the Appimage, the rest of the size would be from the libraries it depends on, like Qt/GTK+
About 6MB of it is the libqalculate.so.22.19.0 file, 1340KiB is .xml files that define all the units/functions/etc, and another 6MB is the documentation.
I think the real issue here is the brew formula - the Qt runtime should be under 50MB (over if you include the chromium packages). Only the full development toolchain might be close to 600M and that clearly isn't needed here,
Are you really so strapped for disk space that 70MiB impacts your user experience?
EDIT: The parent comment is disingenuous: the application isn't even 70MB. It's only 70MB if you download the windows edition with vendored libicu (unicode, 31MB) library. It weighs around ~20MB on linux distributions, which is insignificant.
That mindset is why modern-day ultrabooks give the same practical performance as 15 years ago. All of the hardware advances have been gobbled up in the name of "developer productivity".
Check (eg.) the Elevated 4k Demo winner to glimpse what modern computers are actually capable of in the hands of good developers.
Eh. Binary size by itself contributes very little to an application's performance.
>Check (eg.) the Elevated 4k Demo winner to glimpse what modern computers are actually capable of in the hands of good developers.
If all software were to be built using the same techniques the demo scene uses, nothing would ever get done, and if by chance a project does get released, no one would be able to maintain it afterwards. Let's not confuse art and engineering just because both use code as the medium.
Sizecoding productions are an exception, because they tend to use really slow and memory hungry unpackers (can take up to gigabytes of RAM to do their job, for a 4k intro!), and they tend to lack all optimization techniques that could improve speed in exchange for more code (ex: culling, etc...). And flooding memory with millions of generated objects is no problem for these productions, as long as they are not stored in the executable.
But in general, larger binaries are slower to load, simply because there is more bytes to copy from disk to RAM. And although it is not always the case (ex: sizecoding), it usually means a larger memory footprint, resulting in worse CPU cache efficiency, less memory for other apps and filesystem caches, etc... Also, large binaries tend to be a symptom of inefficient code, with too many abstraction layers, poor optimization, etc... Another very common reasons for bloated executables is that they bundle all their libraries, which means that they don't take advantage of shared libraries, requiring the OS to maintain multiple copies of the same library, possibly including some outdated or poorly optimized versions.
I don't agree with this, not by a long shot, this kind of mindset is why we have such a cancerous proliferation of overbloated and slow software today and it's just getting worse and worse every day.
If you'd be running Qalculate on a Linux desktop system, where all the "heavy" dependencies (ICU, GTK or Qt) are already present and shared between all applications, Qalculate wouldn't require 70MB.
Of course you could also provide a Win32 frontend to bring down the space requirements drastically and make it more Windows "native"; there's a well documented libqalculate for exactly those purposes.
I love qalculate. Now Slackware (my distro) ships libqalculate, and then it's trivial to build a frontend.
I loved Qalculate back when it was a KDE3 application. In KDE4 times the UI switched to GTK+, but recently the dev added a newer Qt frontend which is really nice save for the fact that it doesn't have an app menu other than a hamburger menu not really accessible via keyboard; you must use the mouse for it.
I'd love to see a KDE Plasma frontend again with the more traditional layout. The app is great and powerful.
It is a very versatile piece of software indeed. The minimal mode window is a great pop-up calculator that can do a lot, including conversions and working with physical units.
I forgot to mention in my last comment that https://github.com/vetux/qcalculator is also a nice qt based, exprtk using calculator with a python interface and higher floating point precision than plain exprtk.
Doing units in Python is a pain. No easy RPN/stack mode. No flexibility in parsing. Vector, matrix, and date maths require weird syntax. No good concept of infinite number.
I also tend to just use a CAS, specifically maxima (either commandline, via emacs, via wxMaxima or via notebook, see https://github.com/robert-dodier/maxima-jupyter ). It has the plotting, great units etc, and also incredibly handy to do things like a taylor expansion around a point with no effort.
If not maxima, then the old M-x calc will usually do the job
Yes this website needs a huge full screen video of models in business attire making calculations on a white board. When scrolling down I don't wish to find out what it does but would like some quotes from people saying how it changed their lives. Some transitions would be nice, the ones that make my fans spin, it gets cold here in the winter. Without it this website is barely usable.
Along the same lines, I'm nearly Goad Complete (TM) with an amazing SaaS called Append-Slash-Ess as a browser extension. It does what you would expect, at the click of a mouse or touch of a finger, no need of keyboards, which are so last century. We aim to obsolete them so we can rake in, oops, take on our mission of improving the world.
And since our team is made up of (literally) outstanding ex-Ghroaglers, we'll only support the Ghroan browser, of course. And it'll detect and reject others, for the benefit of everyone.
Can you please point me to a website from the 2000s that looks like this? A wayback machine link would do. Because I definitely don't remember websites from the 2000s looking like that.
- had pointless animations of content fading in as you scroll down
- had a GDPR cookie consent popup
- popped up an interstitial form asking for your email address so you could receive their newsletter, but only after you've had the site open for 30 seconds and were in the middle of trying to read it
- was completely blank if you disabled JavaScript to try to avoid all of that nonsense
No thank you; the current design is unironically perfect IMHO.
https://heldercorreia.bitbucket.io/speedcrunch/