[HN Gopher] Show HN: All desktop software calculators are wrong,... ___________________________________________________________________ Show HN: All desktop software calculators are wrong, so I had to build my own A new calculator software cannot really bring attention (https://chachatelier.fr/chalk/) However, I wrote a full article explaining why I had to build something "new" that does not behave like usual desktop calculator softwares : <https://chachatelier.fr/chalk/article/chalk.html> TL;DR All "small" calculator softwares I know share the same design flaws. And the GUI is not the only stumbling block in their poor efficiency. Handling correctly numerical approximations - expected or not - is crucial to trust the results. It is usually not done in lightweight tools. It should. So I prove that if I could do it, OS manufacturers could as well. Author : chacha21 Score : 141 points Date : 2022-03-07 14:20 UTC (8 hours ago) | chacha21 wrote: | https://chachatelier.fr/chalk/article/chalk.html | prashnts wrote: | Unfortunately the link is unreadable on mobile due to the | sidebar taking all the space. | chacha21 wrote: | Quickfix : I have added a button to hide the TOC. Not sure if | it fits mobile screens anyway. | setr wrote: | Body text remains at its original width when ToC is hidden, | remaining unreadable at like 10% of screen width (with a | lot of blank space). | | Probably better quick fix: have ToC initialize as hidden on | page load | FastEatSlow wrote: | Chrome's developer tools has a device toolbar to help you | test usability on mobile devices. | makapuf wrote: | So does firefox if you're using this browser | https://developer.mozilla.org/en- | US/docs/Tools/Responsive_De... | chacha21 wrote: | Thanks, I have added some more "mobile compliant" CSS | styles. | Mindless2112 wrote: | > _Windows Calculator almost does that: you can see the full | input as you type, but it disappears upon hitting the final | "="._ | | This has been rectified, by the way. | chacha21 wrote: | Even if it proves me wrong, it still makes me happy that some | work is done on this tool. (I will fix the article) | ramses0 wrote: | This description is like a dissertation and history lesson in | calculation, all in one. Add a comparison of `chalk` to the | babbage difference engine, and it'll be 100% complete! :-P | shhsshs wrote: | I love this, great idea! I don't need the majority of the fancy | features but I can see the use case for them. | | I built my own calculator app a while ago [0]. I've used an | HP-41C as my main calculator for many years and I have not yet | found a good RPN calculator app available on ALL platforms. I | wanted a simple calculator that felt like an HP-41C that I can | use on my phone + all desktop operating systems and get the same | experience. | | [0] https://github.com/shamus03/ralc (if you're on desktop, it | looks much better if you install it as a PWA and resize to your | preferred size) | 29athrowaway wrote: | This looks more like a CAS. | tpoacher wrote: | LaTeXit looks great, I'll have to try it next time I'm on a | computer. | | Currently I use Anki for the same effect. | exabrial wrote: | Obviously needs social network integration.... | | /s "OS providers seem to have forgotten that a "computer" should | be used to COMPUTE" | smasher164 wrote: | Great work! I like how well considered the design is. This | calculator takes a point in the design space with text input, | equation rendering, a grapher, and Big Int/Floats for number | representation. | | I wonder if the author considered an input method where | keypresses translate directly into a rendered equation? Symbolab | kind of does this, so instead of writing an expression in some | functional style and seeing its rendered output, I can directly | manipulate the rendered equation with the keyboard. | | The other point the author makes about discoverability of | operators like sqrt and cbrt, I feel that you could circumvent it | by introducing a semantic search feature for operators. For | example, typing "square root" would display a list of suggestions | for operators that match that, like an IDE. | | The last question I have is if the author has looked at libraries | like Calcium (https://fredrikj.net/calcium/) or the work that | went into the Android calculator recently | (https://dl.acm.org/doi/pdf/10.1145/3385412.3386037). They use | exact arithmetic with computable real/complex numbers. It might | serve as a cleaner abstraction that switching between different | BigNum representations yourself. | chacha21 wrote: | Hi, | | >I wonder if the author considered an input method where | keypresses translate directly into a rendered equation? | | Personally, I don't like such systems, because I always end up | moving the cursor up/down/left/right trying to add parenthesis | here and there; so I am not considering adding it. I really | feel better with fast, raw text input. | | >The other point the author makes about discoverability of | operators like sqrt and cbrt, I feel that you could circumvent | it by introducing a semantic search feature for operators. | | Indeed, I can add this kind of things by adding keywords to the | documentation items. Currently I rather tried to narrow the | search results, but I can expand them a little with some | experience on what the users really needed. | | >The last question I have is if the author has looked at | libraries like Calcium (...) or the work that went into the | Android calculator recently | | I don't know Calcium, and I am not a smartphone user, so | Android is beyond my little world :-) Calcium seems very | interesting on its own, but it is unlikely that I can use it in | Chalk. I already built my own abstractions to do everything | low-level related to bit manipulation and garbage bits. Adding | a little formal calculus will certainly be home-made either. | However, like I did with ARBLIB, I can also cherrypick just a | subset of the library that would exactly fix one problem or | give some precious help even on a single feature. I will have a | deeper look at its API and how it can mix up with the current | Chalk design. Thanks for pointing it out ! | w0mbat wrote: | I got fed up with all these complicated calculators and re- | implemented the original Mac calculator desk accessory at | https://CalculatorDA.com. It does the simple things I need while | giving me a nice nostalgia buzz. | AdamH12113 wrote: | I have been carrying around a copy of the Windows XP calculator | ever since Microsoft decided that nobody can do both decimal | values and decimal <-> hex <-> binary conversion without having | to go through a menu to change modes. With the XP calculator, I | use F5-F8 as shortcut keys for changing bases whenever I want. | The Windows 10 calculator doesn't even do anything with those | keys in scientific mode. | CharlesW wrote: | A fun story about how that original Mac calculator came to look | the way it did: | https://www.folklore.org/StoryView.py?story=Calculator_Const... | wjdp wrote: | Looks to be Mac only, any good cross platform alternatives? | olliej wrote: | This seems like it's not a "for everyone" calculator, and built | in OS calculators are always going to go "simple desktop | calculator" design as that's what the vast majority of people | want or need. | | That said I just type equations into spotlight - it doesn't | handle user defined functions, graph results, or anything, but it | has a reasonably full suite of the standard arithmetic functions | and operators | chacha21 wrote: | You know what ? I was not even aware that it would work ! (Am I | the only one to discover that just now ? I am not using | Spotlight very often) | | It's kind of cool, but I can still find many grievances about | the way it's done :-) | olliej wrote: | I'm sure it's not ideal, but for my purposes cmd-space | (random math) is generally sufficient. But I'm also not a | mathematician so I do maths with numbers and not letters :) | chacha21 wrote: | Even with numbers only, it can still be useful to know how | wrong the result is. Chalk keeps track of every inaccuracy | when dealing with decimal numbers. | criddell wrote: | I still enjoy using a good handheld calculator. Today it's an HP | 35s which is fine but I only bought it because my HP-28s battery | door broke. | | I'd love to get one of the Swiss Micros[1] but I can't really | justify it when my 35s is good enough. Maybe if I get a nice | bonus this year I'll treat myself. | | [1]: https://www.swissmicros.com/products | myhf wrote: | Lots of cool functionality in Chalk. I love it. | | The main thing I use Google search calculator for is natural- | language unit conversions like "2 gigabytes / 128 kibibits per | second in days" which is not in scope for Chalk, but there's a | nice desktop calculator called Soulver that is good at that kind | of thing. | vermarish wrote: | Being able to compute sin(0.1)/0.1 and reading the uncertainty at | a magnitude of E-309 feels magical after doing everything in | MATLAB, where the default float type only counts down to E-16. | This is really cool! | kkfx wrote: | You should try Emacs calc inside EXWM :D | karmakaze wrote: | I never use the macOS calculator app. I enter my expressions into | Google search. I can't be the only one who does this. | | I would appreciate a better online calculator than Google web | search. What do others use, WolframAlpha? | crobertsbmw wrote: | I open up a Python shell window probably 20 times a day to do | simple maths... | seanw444 wrote: | I recommend https://insect.sh (you can install it through NPM | to use it locally). Does simple maths well, does functions, | does units, does conversions... pretty cool shell calculator. | seanw444 wrote: | If we're talking online, WolframAlpha is amazing. Used to use | it all the time. Now I use Emacs Calc, since it's built right | into Emacs (a keybind away), and it's pretty nice and | featureful. | buescher wrote: | I like Wolfram Alpha a lot but google's calculator is faster | and does a very good job with units analysis. | reportingsjr wrote: | I definitely agree with a lot of the complaints. I truly don't | understand why so many computer calculator interfaces are so | awful. | | I've been using speedcrunch for a couple of years now and it | scratches most of the itches for what I want out of a calculator. | It looks fairly similar to Chalk's design as well. Very nice | interface! | Froedlich wrote: | Another + for speedcrunch, a tool I didn't know I needed until | I discovered it. | keithnz wrote: | I really like speedcrunch also, another really cool calculator | that is more of a language is Frink https://frinklang.org/ | raron wrote: | +1 for SpeedCrunch | | For anything more complex there is SageMath and Jupyter | notebook. | ducktective wrote: | speedcrunch is simply underrated. ticks so many checkboxes | codedokode wrote: | I also noticed that digit keys on keyboard in desktop calculators | are useless - why would you type in numbers by clicking? It's | very slow. | saila wrote: | They're useful to some people for accessibility reasons. | fhrow4484 wrote: | As well as touch screens! | | Accessibility-wise, it gives user choice between on-screen | keyboard and the app native one | | These days many devices can be used in touchscreen only mode | (Microsoft surface etc), so keeping the digits makes even | more sense there. | throwaway81523 wrote: | Interesting but I notice that the Emacs calculator (calc.el) | isn't in the comparison. It is what I use for quick calculations | most of the time. There was also a Mac program called Milo a long | time ago that was very cool. I never had a chance to study it | though. | skavi wrote: | A fun story regarding Milo. | | https://www.pacifict.com/Story/ | kqr wrote: | I second the usefulness of the calculator built into Emacs. | Even if I didn't use Emacs for anything else, I'd keep an alias | around for starting calc. | chacha21 wrote: | I agree, but as good as it is, this is not where people would | like to find a good calculator. | creata wrote: | Pardon my ignorance, but why? Emacs is bundled with macOS | (although that might be very outdated) and most Linux | distros, and it's not very hard to use. | fastflo wrote: | $ python >>> | omaranto wrote: | Looks very cool, congratulations! Have you tried Emacs Calc? | Chalk reminds me of Emacs Calc, but without the symbolic | computation (and without date calculations or anonymous | functions). | chacha21 wrote: | I don't use Emacs, but I feel that people should just have | access to a decent calculator without digging developer forums. | As good as Emacs Calc is, we can admit that it's unlikely to be | seen as an easy-to-find lightweight tool. | [deleted] | algon33 wrote: | Any chance for a windows version? Or a mobile app? The usecase | for a mobile app is more plausible, even given that this is | already a great idea. | [deleted] | madrox wrote: | The history of the OS calculator is rooted in skeumorphism to | look like the pocket calculators of the 90s: | https://en.wikipedia.org/wiki/Calculator | | I doubt any OS calculator got built through a modern software | development process. | dboreham wrote: | 70s | Sophira wrote: | My favourite desktop calculator so far is Qalculate![0] for | similar reasons, and I basically never have the keypad shown. It | uses libqalculate, which also provides an executable version | that's usable on the console, which I also use often. | | It's incredible and I love it. | | [0] https://qalculate.github.io/ | [deleted] | sprash wrote: | This also has a nice command line interface for those who | prefer the terminal. | chacha21 wrote: | Thanks to Show HN I will be given tons of links to softwares I | would never have found by myself :-) | tejohnso wrote: | I'm also using Qalculate! and never had an issue with it. Maybe | I don't require complex enough calculations but whenever I want | some quick basic math, it's a quick keybinding away and there's | a history screen below the input screen so sometimes I don't | even have to type anything to see the answer. | p0nce wrote: | If you are after _weird_ Calc alternative for Windows, I use this | one all the time: | http://graindolium.paradisia.net/applicat/GrainCalcul.rar just | because it lets you use the keyboard instead. | oversocialized wrote: | Anyone remember the omg wtf calculator contest? | https://thedailywtf.com/articles/OMGWTF-Finalist-09-Terrys-C... | brimble wrote: | > On a pocket calculator, you have one keyboard layout, and you | simply ignore the keys you don't use. Has this ever been a | problem? | | Yes. There's a reason they sell basic stand-alone calculators, | too, and it's not just price. There's a reason the ones for | various tasks don't all look the same or have the same keys (a | typical office desktop calculator is usually very basic, for | instance). I'd bet money most calculators _that exist_ are the | fairly basic variety, not a fancy scientific calculator or | whatever. Exclude the ones that were only ever used in school and | never anywhere else and I bet it 's an absolute landslide in | favor of simple calculators. People _are_ confused by the extra | buttons, and don 't want them. | | [EDIT] Not to shit on this calculator, mind you, but this is | another specialized one that won't be for everyone, not a | universal solution. | chacha21 wrote: | We will somewhat disagree, partly because I can't help using | calculators as a scientist, so my opinion is particularly | biased. However, I don't like the trend to hide everything that | looks technical. On the long run, letting people play with | advanced features (that won't break things) is a win-win. | TheDudeMan wrote: | MacOS is really bad abut this sort of thing. It fails on | discoverability. For instance, how do you navigate to a | hidden folder in the file-selection dialog? There is no | option to show hidden, and there is no place to input the | exact path. You must know two things to proceed: That there | is a secret hotkey to allow exact path specification, and | what that hotkey is. It took me years to learn that there was | a hotkey -- I just assumed that it was not possible. | isoprophlex wrote: | Isn't the macos of 2022 just a very shiny thing to browse | the web with, plus a linuxy terminal? | | I always do file operations from the terminal if I can help | it (won't save you when you need to select a file in a gui | I suppose) | | 10+ years of owning macs, and Finder still bugs the hell | out of me. | nicoburns wrote: | I find most of macOS reasonably well designed (at least | compared to the competition), but Finder is truly awful. | I highly recommend Forklift as Finder replacement. | random-one wrote: | You can set this permanently at the terminal with: | defaults write -g AppleShowAllFiles yes | | or to always see the hidden files in the Finder: | defaults write com.apple.finder AppleShowAllFiles yes | | use `defaults` to see and set a number of preferences that | are not apparent. Around the turn of the century Mac OS | started moving to streamline the UX and making it more | difficult to change (and possibly break) things in that | process; for better or worse. I remember the | discoverability of user settings/preferences and | tools/utilities being much easier using the finder and menu | bars in the 90's. Now, one is forced to get comfortable | with the command line to have that level of control and | customization. | vetinari wrote: | > You must know two things to proceed: That there is a | secret hotkey to allow exact path specification, and what | that hotkey is. It took me years to learn that there was a | hotkey -- I just assumed that it was not possible. | | There's also menu item in the Finder menu - you know, that | thing on the upper edge of the screen - Go | Go to | folder... and it also gives away the secret hotkey. | inetknght wrote: | > _MacOS is really bad abut this sort of thing. It fails on | discoverability._ | | It's not just Macs. Just about _everything_ in "modern" | UIs fail discoverability. | jph wrote: | Superb! I downloaded Chalk then did your donation button. Your | calculator is excellent, and your write-up is so thorough that it | works as a case study for UI/UX. Thank you. | mncharity wrote: | > _Some much needed features are difficult to implement and | require a large amount of work. If these features are not | available, this is because nobody really cares, and there are few | pre-existing parts to build upon._ | | Some things resemble "nobody really cares", but are distinct. | Being unaware (eg "I didn't realize how bad it was until it | stopped"). Being impoverished (eg "Any cost, including attention, | is an insurmountable cost barrier", or as in education, a chain- | of-care disaster triage). And so on. | | The "few [...] parts to build upon" is indeed a mechanism for | "large amount of work". Yay patents./s But there are others, and | subtleties. For example, one can lack a part to build upon, | because there are lots and lots of similar parts available, but | all are variously not fit for purpose, or are collectively hiding | the existence of a part that is - a prohibitive discovery cost | (also effort dissipation). Or recursively, a part might not have | been built, because its multiple potential uses have not been | gathered to incentivize it, or a part it in turn needs - an | economic communication failure. All our usual dysfunction. | | I emphasize this because the "nobody really cares" model can be | very attractive, but also very misleading. It can be a wonderful | fit for observations, and predictive of further observations of | the undisturbed system, while also being a very poor model for | planning and predicting interventions. | | For example, from kindergarten to undergraduate, introductory | astronomy content tells students the simply wrong color for the | Sun. In some sense, "nobody really cares" is an excellent | description. Not teachers, professors, authors, publishers, | reviewers, parents or students. But... they could care. | Individually, it's not too hard to flip their state. And it's | possible to imagine interventions with broader impacts. But we | collectively don't get to it, for all the diverse reasons things | aren't gotten to. Much of science education dysfunction is like | that. Because "nobody really cares" that it succeeds... sort of, | kind of, maybe, but also no - that's very not a root cause | analysis. | eliah wrote: | I'm surprised no one has mentioned Soulver yet | (https://soulver.app/). I have used it for years -- it looks like | it has pretty similar functionality to this but (IMO) with a more | native-feeling UI. I love it. | | I don't think it supports as wide a range of math, but it does | seem to pass the accuracy test given in the article | (sin(exp(37))). It also lets you assign variables which I find | handy. | | On the other hand, the propagation of uncertainty in Chalk is | very cool. | DiabloD3 wrote: | I totally get this. The number of times I quakemode a terminal | just to run bc is insane. | Dylan16807 wrote: | Looks cool, though I can't really use it. | | Typo in the boolean section, one of the 'certainly OR false' | results on the chart says 'unlikely'. | orbital-decay wrote: | I love the ground-up design. However, i feel that in-place | operations are missing from your rationale. Good algebraic | calculators are typically able to 1/x or invert anything on the | screen with one button without breaking the input flow, and | repeat operations for the same left- or right-side operand by | pressing =. This massively reduces the time spent on certain | guesstimations when doing napkin math. | im_down_w_otp wrote: | This is exceptionally cool. It feels like what would happen if | one were to fastidiously reimagine the HP 48 user experience for | the desktop (in terms of usage patterns, mental model, etc.). | | I will 100% use this. However, you can take my HP 48GX when you | pry it from my cold, dead hands. :-) | jdeaton wrote: | I still use the python repl in a terminal for my desktop | calculator. Its a good choice since usually im already in the | terminal anyways. | savant_penguin wrote: | I also do the same although when I need fractions, having to | type all the words to import and use the fraction module is a | pain | actually_a_dog wrote: | Why not just save those words, and other commonly used words | to a startup file? Then, you can just do | export PYTHONSTARTUP=/home/savant_penguin/.python/startup.py | | and those things will be automatically loaded for you. If you | don't want them always loaded, but rather just for a | "calculator mode," you can do something like | alias | pycalc='PYTHONSTARTUP=/home/savant_penguin/.python/ipython | startup_calc_mode.py' | | If you use ipython, then you can take advantage of | autocomplete and not have to type as much, too. | colpabar wrote: | Thank you for this!!! I use the repl all the time and had | no idea I could do this. | operator-name wrote: | There's been a lot of suggestions for alternative desktop | calculator programs that try to remedy some of the issues | outlined. I've had similar experiences/annoyances with calculator | apps, most of which to copy handheld calculators but without the | satisfaction of buttons yet the power of a programming | repl/solver. | | I've currently settled on MathLab's Graphing Calculator[0] which | has very similar design elements for any larger scale | calculations. My second choice if the calculation requires | estimates or units is obviously Wolfram Alpha, but the need for | connectivity, lack of calculation history and speed leaves it | lacking as a quick calculation tool. | | [0]: | https://play.google.com/store/apps/details?id=us.mathlab.and... ___________________________________________________________________ (page generated 2022-03-07 23:00 UTC)