3 ms·
I use qalc/qalculate, it has gui/cli version. I got pissed dealing with bc usability problems ("yes I pressed ctrl+c, you know I want to quit, why you ask me to
by ilyt 4y ago
I use qalc/qalculate, it has gui/cli version. I got pissed dealing with bc usability problems ("yes I pressed ctrl+c, you know I want to quit, why you ask me to type some command for it?").
> 10+0xff+0b00010 ->hex
10 + 255 + 2 = 0x10B
Also does some fancy unit conversion stuff like "how long it would take to transfer X gigabytes over Y Mbit link
> 200GB / (100Mbit/s)
(200 gigabytes) / ((100 megabits) / second) = 4 h + 26 min + 40 s
- gavinhoward 4y agoNot for you, since qalc seems to fit your use case, but for anyone else that wants `bc` to exit with Ctrl+c. If you use my `bc` ([1]), configure it with: ./configure.sh -O3 -Sbc.sigint_reset That build will then exit on Ctrl+c. [1]: https://git.yzena.com/gavin/bc https://git.yzena.com/gavin/bc
- amelius 4y ago> yes I pressed ctrl+c, you know I want to quit Normal people would assume that you wanted to copy something into the clipboard.
- creshal 4y agobc predates the usage of Ctrl+C for copy pasting in some graphical UIs (not even all of them) by at least one decade. And it's not the sort of command line tool that you'd reasonably expect a clueless novice to stumble upon. And even if they did, bc terminates gracefully and leaves all your inputs on the screen, so there's not much lost if you do accidentally terminate it mid-work. So there's no really good reason for that behaviour… which is probably why not all bc flavours do it. GNU bc as shipped by Arch e.g. does just silently quit on ^C, and far as I can tell they're not patching it either.