Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: All desktop software calculators are wrong, so I had to build my own
286 points by chacha21 on March 7, 2022 | hide | past | favorite | 162 comments
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.




The one thing I don't get about all those calculator applications is the existence of the keypad. Like, the users already have the keypad right in front them called keyboard (the names literally share the "key" part). Why would anyone instead choose to use mouse to click those tiny buttons? I feel most calc designers still stuck at the skeuomorphism and never jump out of the box to think about what user really needs.

The only calculators I know that makes keypad optional/hideable are SpeedCrunch and Qalculate!, and now this.


“skeuomorphism” isn’t even a real UX concept; it’s just been carefully designed to look like one.


Well played.


I am a Windows power user, and the default Windows calculator is one of very few programs bundled with the OS that I actually use - and I use it quite frequently.

And I click on the number digits.

Why?

1. Usually I only click on a few buttons, for example I paste some number, then press / then 2, and then typically ENTER key on the numpad (because I can just press it with the thumb of the hand still holding the mouse). Why should I move my hand from the mouse to the keyboard in order to just press two keys? And then I would also need to check if Num Lock is enabled.

2. I had a phase trying Emacs and Vim and eventually decided I don't care about being more efficient at text editing. I want to edit the text effortlessly, and I find selecting text with mouse, or pressing arrow keys repeatedly, actually requiring less effort from me. Yes, it takes more time, but it's not a time lost, I'm thinking about some problem, and no part of my brain needs to think what kind of text editing function I should use. Likewise, clicking a few buttons in a calculator takes more time, but it's not a race. If I have to make a lot of calculations, I'm more likely to use Excel, so it's rare that I actually type stuff into the calculator.

3. Sometimes my left hand is simply not available (I'm petting my dog or eating something or maybe holding my laptop), and while I have a numpad, using functions like sine would require my right hand to travel. In similar vein, sometimes instead of Ctrl+clicking on a link to open it in a new tab, I just right-click, and choose a context option. It does annoy me slightly, but sometimes not enough to start using my left hand.


Your use cases are valid and should be respected and supported. What I was saying is, there are other people who prefer keyboard for efficiency, and they don't need keypad. Make it optional and hideable so that all users are happy. It's very simple change in terms of code diff, but it seems very hard in terms of design choice since even Microsoft doesn't get it.


Making the keypad optional adds user confusion. It might be a worthwhile tradeoff if doing so is necessary to save screen space, but if the keypad is actually accounting for such a significant portion of your screen real estate, I'd love to see your monitor.


As I hinted in my previous comment, power users of Windows, don't use apps bundled with Windows! :D

You can download a calculator that is designed to your preferences. I actually wrote a calculator in Autohotkey that was a keylogger constantly checking if last typed characters can be interpreted as a mathematical expression - if so, the expression was evaluated and displayed as a tooltip, and pressing a shortcut could be pressed to paste an equal sign and that evaluated value. Never finished it though, demotivated by how hard it was to port to other OSes.


Checkout Soulver on macOS. It’s awesome! It’s like an old paper tape calculator on steroids. It supports variables and comments, for example. Also, no virtual keypad :)


+1

The real draw is the unit support (dates, times, currency, etc etc) but makes it feel natural.


Still waiting for Soulver update on iOS .


We have calculators open on our machine label computers. Those computers don't have a keyboard only a touch screen. Without the keypad these computers could not use the windows calculator. That said this is an unusual use case.


If someone was trying to enter text into a running application on that machine, wouldn't an on-screen keyboard pop up? (Unless that's been disabled, of course.)


No it doesn't pop up automatically. It can be brought up but you have to find it.

Anything other than day to day use is done via remote connection.


Well until you need scientific calculator computation, such as log, sin / cos, rad / deg, root.


Your keyboard has letters on it. You can type all of those out.


The one disadvantage of that is you cannot easily see all available functions at once. It loses discoverability. Autocomplete on the input prompt will help rectify that somewhat, but only somewhat.


The discoverability argument doesn't make a lot of sense for a calculator app.

One might want to list the content of a directory without knowing that the magic word is "ls", but there is a 0% chance that someone wants to compute the cosine of a number but can't figure out to type "cos".


But is it cos x, cos(x), cos[x], math.cos(x), or \cos x? Calculators are usually simple enough that all the ops can be buttons. So why not do it? There's always alternatives like Python, Mathematica, Maxima, Fricas, etc. which don't really bother with the buttons, because if they did, it'd look like a Chinese typewriter.


Additionally it also hinders those who do not natively speak English. Sqrt or square root and pow aren't terms that commonly used in calculator for other languages, at least my country.

And I guess sqrt shortform isn't that common used either.

Able to see symbols can clear those ambiguity


I don't mind the buttons for special functions, but for numbers and operators? Yeesh that's redundant. I can type 0 through 9, + and - without needing discoverability for sure. At minimum I assume the calculator does arithmetic. Buttons for special features tell me it does other things too.


I think they were talking about the number keys, and perhaps plus and equals (but that might need shift depending on the keyboard and be less convenient), not cosine and family.


> The only calculators I know that makes keypad optional/hideable are SpeedCrunch and Qalculate!, and now this.

or theres "invisible" calculators like this[1] that do away with GUI altogether. microsoft's onenote has something similar built in as well

1: https://github.com/davebrny/in-line-calculator


Desmos.com/scientific is my go to. Best calculator ever - understands some LaTeX but also has the buttons for scenarios where I don’t know the LaTeX


If you have a J interpreter installed, I'd like to see what preferred calculators can offer.


What about Calca or Soulver? They don’t have keypads at all. They’re more like REPLs for calculation languages.


Touchscreens


SpeQ Mathematics has been my go-to for many years. The times have left it behind, but it's still too handy to forego. It's a simple, vanishingly small (132KB) REPL.


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!


I really like speedcrunch also, another really cool calculator that is more of a language is Frink https://frinklang.org/


Another + for speedcrunch, a tool I didn't know I needed until I discovered it.


+1 for SpeedCrunch

For anything more complex there is SageMath and Jupyter notebook.


speedcrunch is simply underrated. ticks so many checkboxes


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.


I haven't seen Soulver, but it looks very similiar to the one I use on Mac, called Numi. On Android, I use an app called CalcNote which works in a similiar way. Neither does graphing, but you can do common formulas and functions like cos/sin/rad. I use numi for simple calculations, and find it fantastic when I'm trying to figure out project stuff. A recent use is entering wall dimensions to figure out square footage and compare different building materials. I often leave most of my old calculations in numi like a long-lived numerical memory.

https://numi.app/

https://play.google.com/store/apps/details?id=com.burton999....


Thanks for the Android app recommendation, it's amazing! Basically numi on Android, love it!


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.


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


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. (Edit: add that line to your .bashrc if you want to use it all or most of the time!)

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.


Thank you for this!!! I use the repl all the time and had no idea I could do this.


You're quite welcome. After 7+ years of using Python professionally, I find I'm still discovering things I didn't know. And, I'm not referring to just new stuff that gets added, either. It's cool to pick up on these little things every once in a while.


This is a really nice idea.

Together with some from fractions import Fraction as F would be even better

Thanks


I use http://www.speedcrunch.org/ now. Very handy; quick to boot and use.


Reminds me of this: https://krasjet.com/rnd.wlk/julia/

Discussed here a couple of years ago: https://news.ycombinator.com/item?id=23414872


I've been using clisp in the terminal since, well, forever. There's probably no advantage over Python, though.


Halfway through your article and I 100% agree with all your complaints. I compulsively carry my T1-84 calculator everywhere since it feels like such an annoyance to have to resort to using any generic desktop calculator.

ETA: I am very impressed by your calculator so far. I thought my tmux + ipython setup was good, but this shows that I just didn't think about the possibilities of what a proper calculator app could bring to the table.


Thanks ! There were so many things to say that I was afraid nobody would read up to the end. GUI is only the visible part of the iceberg. Number representation (to keep exact values), accuracy, interval arithmetics... are hard to introduce in the first place.


> 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.


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.


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.


> 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.


It does fail on discoverability but there is a great feature of MacOS to compensate. The help->search function (shortcut key: Command-shift-/). I wish it was more prominent, like the quake console[1] or autocad command bar[2].

[1]Come to think of it, I used to have iTerm set up for this, I really must reconfigure it.

[2]https://knowledge.autodesk.com/support/autocad/learn-explore...


There is no Finder menu in the upper edge when you are in the file-selection dialog of some random app.


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.


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.


Thanks for the Forklift recommendation. I've used Path Finder off and on for years, and it has some advantages over regular finder. But it doesn't seem to have enough differences, and their distinguishing features are not readily apparent. Path Finder also has features like upload to S3, but they put that under the menu (Commands -> upload to ).

Will definitely give Forklift a try.


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.


Thanks for these tips. I have often resorted to making symlinks to hidden folders (dotssh -> .ssh, dotconfig -> .config) because I don't feel like looking up the KB shortcut.

One additional note: after setting the defaults, if you want it to take place immediately, you need to kill finder.

    killall Finder


> 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.


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.


A fun story regarding Milo.

https://www.pacifict.com/Story/


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.


I agree, but as good as it is, this is not where people would like to find a good calculator.


Why not? Is the overhead of Emacs around the calculator too much on a modern desktop computer? Emacs apps are far leaner than the many Electron apps people seem to not have a practical problem with.


How is an OS not a good place to find a calculator?


This is very similar to qalculate[1]. It shares a lot of the same features and design decisions

[1] http://qalculate.github.io/


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.


I don't understand this. What do /bin/bc or /bin/dc lack? (It was hard to tell from the article, because most of the graphics did not load.)

A good thing about these bin tools is that you can cut and paste from a text editor, for scripting, and you get a transcript. And, GNU readline works, for history.


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!


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.


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.


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...


Thanks! That story was part of my inspiration. I gave my Calculator DA a lot of visual toggles in the View menu so you can find your way to the look that makes you happy, like Steve did.


Cool!


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/


Thanks to Show HN I will be given tons of links to softwares I would never have found by myself :-)


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.


This also has a nice command line interface for those who prefer the terminal.


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.


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 !



Unfortunately the link is unreadable on mobile due to the sidebar taking all the space.


Quickfix : I have added a button to hide the TOC. Not sure if it fits mobile screens anyway.


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


Chrome's developer tools has a device toolbar to help you test usability on mobile devices.


So does firefox if you're using this browser https://developer.mozilla.org/en-US/docs/Tools/Responsive_De...


Thanks, I have added some more "mobile compliant" CSS styles.


Its still unreadable on mobile. 10% or less of the screen is being used for the text


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


> 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.


Even if it proves me wrong, it still makes me happy that some work is done on this tool. (I will fix the article)


To be honest I read all the materials, 85% of the blog post, and your website and you still have not told me WHY software calculators are wrong.

You drone on and on and on. I'm 15 minutes into this rant of yours and I know all your personal preferences about pocket calculators and software calculators and yet no evidence to suggest why your design is actually better. No evidence to suggest that existing calculators are incorrect.

Can you please provide a real TL;DR where you provide hard proof that popular software calculators are incorrect?


The TLDR as I understand it:

- Most software calculators take up too much space. You don't need buttons on the screen, your keyboard already has the buttons.

- Software calculators don't often give good feedback of what digits/buttons are being pressed. Physical calculators keep the keys and the display in the same small visual space: you can see the buttons you're pressing and the screen at the same time, and you have good haptic feedback. Software calculators force you to trust yourself to type the exact numbers/operations you want, or look back and forth between your keyboard and the screen, which is slow. The other alternative is using the mouse to click every button, which is also slow.

And three of the requirements the author lists for a "good" software calculator:

- The calculator should not compute until you validate the full expression.

- The calculator should display the expression during input, and allow you to correct any typing error you notice.

- The calculator should display the expression that has actually been evaluated.

(end of TLDR)

Now my own opinion: an RPN calculator with a visible stack is more than enough to solve the problems that motivate points 1 + 2.


RPN is just an option (provided by Chalk). The "minimalist" GUI is just the introduction of the full article. You have to reach <https://chachatelier.fr/chalk/article/chalk.html#toc-36> to go deeper into numerical problems of usual softwares.

Once again, Chalk is not the best software ever, it is just what I have to build myself to fix the problems I usually encounter. Not to say that all other softwares are equally bad, but to my knowledge, none of them will address as much limitations at the same time.


Using spotlight search to do calculations meets all 3 requirements, no?


Let's say that : if you do not use arithmetic interval, at some point your floating point computations will be wrong and misleading if you do not carry information about how much bits are garbage. Chalk does that.


If you enjoy skeumorphic calculators with their data interfaces, and haven't already, look into the RPN[1] notation used in (most, I believe) scientific/programmable calculators. Once you go there, you stay there. Just Google[2] or DDG[3] for it to play around.

1: Wikipedia entry: https://en.wikipedia.org/wiki/Reverse_Polish_notation

2: Google search: https://www.google.com/search?q=rpn%20calculator%20online

3: DDG: https://duckduckgo.com/?q=rpn+calculator+online


Chalk has an option to use RPN


Awesome. Got lost in the long article, so missed that.


> 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, but also no - that's very not a root cause analysis.


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)


Have you seen Free42, "...a re-implementation of the HP-42S Scientific Programmable Calculator and HP-82240 Printer?" [0]

It is available for Android, iOS, Windows, macOS, and Linux. (At one point there was even a version available on Windows Phone 8.)

Perhaps it checks your boxes of good RPN calculator, available on all platforms. I don't know how much an HP-42S feels like a 41C.

In any event, thank you for ralc. I've off and on been searching for a nice web-based RPN calculator.

[0] https://thomasokken.com/free42/


I like it, except that the Enter symbol confuses me. I associate it with a windowing button or on/off switch. I probably would use ⏎ (U+23CE) instead.


Good suggestion. I chose that symbol because it is literally called "ENTER SYMBOL" but maybe something more universally accepted would be better.


I have a script bound to a hotkey.

User experience: <hotkey> 1+1<enter> exit<enter>

$ cat ~/bin/ipy ipython -i -c "import itertools as it; from statistics import ;import functools as ft;import operator as op;import io;import pathlib as pl;import pandas as pd;import numpy as np;from math import ;import enum;import re;import sys;import os;import json;from collections import defaultdict, deque, Counter;import random;import decimal;import fractions;from time import time;import datetime as dt;import shutil;import subprocess as sp;import uuid;from hashlib import sha256, sha1, blake2b, blake2s"


You have just upped my game. No longer will I hand-type my imports when I need to bust out the Swiss army knife and type a quick (now lightning-fast) calculation. Don't know why I didn't do this sooner.

For anyone needing more inspiration, here is some pseudocode for my version (which also has accompanying print()'s in the live script as a reminder of what my imports are):

>>> from base64 import b64encode as be, b64decode as bd;from binascii import hexlify as hexl, unhexlify as unhexl;from Crypto.Random import get_random_bytes as grb;from Crypto.Random.random import randint # PARAMS (a, b) INCLUSIVE;from Crypto.Hash import SHA1, SHA256;from urllib.parse import quote, unquote


What I usually end up doing is just using python3 (specifically not python2 because I think python3's handling of division is better for general use). I haven't finished reading your article, but it's really good. I really like that I can open up my "calculator" and use it with just the keyboard, plus it has an immutable history and variables.

Does anyone know of a good RPN calculator for Android? I currently use RealCalc, but it isn't nearly as good as PCalc on iOS. I particularly liked that PCalc was programmable with custom functions.


So I love the concept, but the execution is kinda buggy, at least on macOS 11.6.3. I opened it and typed 1+<mash on top row of keyboard around 190 digits><return>. It calculated it correctly, but the Stop button never turned back into the "=" button (even though the computation and display had clearly finished; clicking it just ran "output(1)" repeatedly). When I quit and relaunched it, and typed output(1), it crashed. Is there a place to submit bug/crash reports?


Chalk is kind of robust, I am surprise you hit a bug at first use. Go to <https://chachatelier.fr/chalk/chalk-contact.php> for bug reports


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.


You can achieve that, this is a preference of Chalk about what should be the next input


I see that you mention it's open source, but for the life of me I cannot find the link to a repo anywhere on the site.

Is it on GitHub? Am I missing something?


Just a zip on the web page


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.


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


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 :-)


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 :)


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.


Oh yeah, I very much use it as a super quick access calculator. If I was needing in a situation where I needed controlled error etc it wouldn’t necessarily be great, but that’s ok because in general if you have me working on something requiring that your project has other issues :)


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...


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.


70s


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. :-)


For Linux and Bsd a good calculator repl I've used is Genius.

https://flathub.org/apps/details/org.gnome.Genius


I just use a Python or Node shell as a calculator. It usually works well enough.


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?


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.


I like Wolfram Alpha a lot but google's calculator is faster and does a very good job with units analysis.


I open up a Python shell window probably 20 times a day to do simple maths…


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.


the spotlight search bar also does math


Because of some reason discussed in the article I like unix's bc and also hoc when avaliable (through plan9). It would be nice if these two could also be included in the comparison.


Off topic, but FYI I thought your page was broken when it’s loading on my phone. All I could see was the table of contents, the main text is barely visible (like 10px) on the very right edge of the screen. The TOC didn’t close until everything is loaded, which took a few seconds for me for some reason (probably bad network on my part). Perhaps making the TOC hidden by default with CSS and open it later would be better UX, not sure.


Alternative: why not use casio emulators? https://education.casio.co.uk/download-emulator-cw

https://education.casio.co.uk/emulator-free-licences

(Looks like they are Windows binaries, didn't try on WineHQ tough)


Looks like Casio has Mac binaries as well (paid): https://edu.casio.com/softwarelicense/index.php


Quickly tried free versions on CrossOver for Mac, works pretty well: https://imgur.com/a/bnTLqbm


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


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.


They're useful to some people for accessibility reasons.


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.


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.


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.


I used to use a firefox addon which have nice expression input and history. Firefox updates killed so many good addon, even yesterday the 97.0 is disabling my addon again.

Now I just keep a RStudio window open.


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).


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.


I'm not sure what you mean by "digging developer forums", but I fully agree with you that Emacs Calc is not a good choice for everyone, in fact, I would not recommend it to anyone that isn't already an Emacs user (but for people who are already Emacs users I do highly recommend it, since it has a ton of functionality and is an easy-to-find lightweight tool ---if you're already in Emacs anyway).

I was just curious to see if you had tried it, since it seems similar in spirit to your project, and thought you might be able to borrow some ideas from it.


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'.


I use IPython frequently for such simple calculations.


Obviously needs social network integration....

/s "OS providers seem to have forgotten that a "computer" should be used to COMPUTE"


My current desktop calculator is actually the PopOS launcher. Support constants, every function I need and even unit conversion.


Yeah I use the math functionality in the built-in Spotlight search on the Mac and it does all the basics I need. Even does currency conversion.


Alfred has a pretty good calculator for Mac that acts like the Google calculator without the need for internet connection.


LaTeXit looks great, I'll have to try it next time I'm on a computer.

Currently I use Anki for the same effect.


Oh. This is mac specific. Nevermind... :/


The best calculator I used on desktop was the Powertoys Calculator. They had the data entry nailed.


I totally get this. The number of times I quakemode a terminal just to run bc is insane.


  $ python
  >>>


The website layout is absolutely broken on Firefox on Android.


Looks to be Mac only, any good cross platform alternatives?



You should try Emacs calc inside EXWM :D


Anyone remember the omg wtf calculator contest? https://thedailywtf.com/articles/OMGWTF-Finalist-09-Terrys-C...


This looks more like a CAS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: