1. Desktop Calculator

Strange really that I never got round to this, but I have always wanted a decent calculator that
I can call my own, and always been somewhat disappointed by the standard windows efforts.

Annoyances of windows 10 calculator (off the top of my head):
Slow startup - admittedly not so bad since I put more memory in.
Value/result is cleared (to 0) when you switch between standard/scientific/programmer modes.
You cannot edit the main input, only append or delete the last digit.
You cannot edit the history, say if you made a typo five steps back.
Seperate history for standard/scientific/programmer modes.
Click on a number in a history element: does nothing; click on the whitespace near it: bingo, restores it. Ditto memory.
You cannot edit the memory, or (optionally) give anything a meaningful name, or preserve anything for the next run.
You cannot edit or paste in a date.
You cannot use eg mod on a hex value.
You cannot see deg/rad/grad side-by side, like you can hex/dec/oct/bin.
You cannot hide/disable unnecessary buttons, or move any oft-used function off a submenu onto the main keypad.
You cannot configure bespoke bitfields, for example symtab[N][S_State] is used/set/fwd/for/parm/sqr/aod/fun/wdb/noclr/rtn/ran/gbl/fres/lit/typ/other/ridt/dlft/drid.
You cannot write personalised or application-specific routines and just plug them in.

Why oh why in 2020 are we so carefully still emulating any of the petty restrictions of cheap 1970s handhelds?

Do it right, you got a killer app right there, especially if we can leverage some of the Eu/Phix advantages
in a way that could be rather more difficult for other programming languages, eg the "roll your own" bits.

PS: Does anyone fancy firing up their Linux calc and seeing how many similar flaws they can find in that?

new topic     » topic index » view message » categorize

2. Re: Desktop Calculator

You can leverage the Euphoria tokenizer libraries. Unfortunately, builtins do not get routine ids. I wrote one that used RichText and allowed for superscripts so you could enter power expressions without clunky symbols like (^) or "power" operations.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Desktop Calculator

You are rigth.

That is why I have been thinking on spreadsheets. I am not happy with the calculator, many time I need to so simple tables for quick calculations, but have not sense to open excel or libreoffice, to do a simple table with 5 rows and 3 columns.

I would like a small and simple spreadsheet, may be on a text console window, that open as quick as the calculator, but offer the ability to introduce formulas to calculate several row at once.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Desktop Calculator

achury said...

...to do a simple table with 5 rows and 3 columns.

I would like a small and simple spreadsheet, may be on a text console window, that open as quick as the calculator, but offer the ability to introduce formulas to calculate several row at once.

A lot of software projects grow and develop but never seem to settle down to some target. They get more features but also get slower and bigger, because you are going to make more money from people who are buying new machines rather than from people who like to hold on to a computer until it dies. I think those with enough money generally buy computers every three years. We, Euphoria developers, developed Euphoria so it would run on software as early as Windows 95. Even loading Internet capability dynamically so it would work on computers that didn't have Winsock installed. We had to let DOS die because there were no active tester/developers running DOS

I think most computers that are as old as ten years could run a calculator described by Pete fast and without breaking a sweat. If you want a spreadsheet that is fast and efficient, you'll save yourself time just downloading one. Download something that has a modest computer target or a newer spreadsheet project that hasn't become really big and really slow yet.

It sounds like a conversation I had with someone by the name of Emanuel who said he preferred SC, which is much faster even though it doesn't have all of the features of other spreadsheet programs. There is no accounting for taste. You might like it or you might hate it. https://www.linuxjournal.com/article/10699

new topic     » goto parent     » topic index » view message » categorize

5. Re: Desktop Calculator

achury said...

I would like a small and simple spreadsheet

You may want to have a quick glance at https://github.com/petelomax/Phix/tree/master/demo/rosetta/7guis in particular Cells.exw, see last image on that link, before diving into the source code.

It is a mini-excel clone in 450 lines.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Desktop Calculator

I like this train of thought.

So bit of a random aside but I've often thought that an 'adding calculator on steroids' would indeed make a nice app (not 100% sure if adding calculator is the correct term, but I basically mean the sort of deal an accountant might use, where each entry is printed out on a continuous roll of paper). The place-it-on-steroids dimension, for me, boiling down to:

  • Seeing the history at a glance
  • History editing
  • 'Complex' expressions (entering 99.95 * 2 * 1.2 on a single line)
  • Comments
  • Variable support

So I guess we are in some ways describing a lightweight spreadsheet, like achury noted. In practice, what I actually do now instead of opening KCalc (my distro's default calculator app) is open Node in a terminal instead.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Desktop Calculator

I just stumbled upon another one: what does 1+2*3 give you in Windows Calculator?

The answer is 9 if you're in standard mode, 7 if you're in scientific or programmer mode. Nice.

I can understand that as a permanent option or menu checkbox, but that's more like "different answers every other Tuesday", cmon!

new topic     » goto parent     » topic index » view message » categorize

8. Re: Desktop Calculator

petelomax said...

I just stumbled upon another one: what does 1+2*3 give you in Windows Calculator?

The answer is 9 if you're in standard mode, 7 if you're in scientific or programmer mode. Nice.

I think it has to do with the functionality it's trying to reproduce. On traditional desk calculator, pressing an operator completes the current calculation and uses the value to start a new one.

Key Press Display
1 1
+ 1
2 2
* 3
3 3
= 9

Now the flaw (bug?) seems to be in the way it displays the calculation it's performing in the background. When you press * it should clear the display and only show 3.

-Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: Desktop Calculator

ghaberek said...

I think it has to do with

Yeah, the article (about operator precedence) I was reading it in explained exactly why.
In standard mode it is basically just emulating a 70's handheld, along with all the old flaws it had.
In scientific/programmer mode it honours precedence, and agrees with what the Eu/Phix statement ?1+2*3 prints.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Desktop Calculator

I forgot I had this online already. Have at it.

https://github.com/shawnpringle/superscriptingcalculator

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu