Lurker News
Hi HN

It also supports percentages, dates and variables.
I've been working on this alone for a few years now, so would love to get some feedback.

Comments (239) 97 threads

Earlier comments
brospars4 replies#
There is something wrong with the order of operations. When I type 2+2*2-6 i get -6 which should be 0.
unsafecast1 reply#
It looks like APL order? Right-to-left.
JackFr1 reply#
No. It’s not right to left. It’s just weird:

  3 ^ 1 * 2   6
  3 ^ 1 / 2   1.73205
  3 ^ 1 + 2   5
  3 ^ 1 - 2   1
unsafecast#
Huh.
sneak#
I would think this might be the first unit test one would write for a calculator program.
bdwjn1 reply#
Oh there's more:

9 - 3 ^ 2 = 0
9 -3 ^ 2 = 18 ???
pi = 3.1415926536
2 pi = 5.1415926536 ???
sin(3.1415926536 radians) = -0
sin(pi radians) = Incompatible units ???

wizofaus1 reply#
Seems to assume + if an arithmetic operator is missing?
tonyonodi1 reply#
This is correct, the idea is that you can type things like "6 foot 3 inches" and have it evaluate as an addition. But the example shown above is definitely a problem, I'll try to think of a work around.

Continue this thread — 1 reply

simonz05#
Yep, this should be evaluated as `(- (+ 2 (* 2 2)) 6)`
suntuba1 reply#
Nice app - I like the workspace sharing feature.

It would be nice if "1 mm / inch" would be returned as a unitless number. I know that you can enter "1 mm in inch" but there are cases where it would help to have the calculator reduce the units for you.

tesseract#
For what it's worth, `1 mm/inch in 1` seems to work as expected.
nonoesp2 replies#
I have a side project slightly similar to the functionality your tool offers focused on expense tracking (or other measures) over time, adding date parsing to the equation in order to plot metrics into a graph and with tags and locations for filtering.
tonyonodi1 reply#
Nice! Can you send a link or is it still in development?
nonoesp#
Hey!

It's still in development. I built a proof-of-concept from scratch almost a year ago, which I just open-sourced at the following link.
https://github.com/nonoesp/note-parser
I intend to develop it a bit more and host it online.
A previous prototype, really barebones, is at https://expensed.me.
The idea is to drag and drop (or type) a plain-text note and visualize the data as a scatterplot or other charts.

Dries0071 reply#
I'm (slowly) working on something that can eat up PSD2 data from banks and parse it into some usable data, but I'm bad at nicely presenting stuff. It would be great to see your tool and get some inspiration, or maybe even use it.
nonoesp#
This sounds super interesting.

I've been thinking of ways to parser phone screenshots with payment data or use bank APIs to add data to my expense tracker, as opposed to adding everything manually, which is the best way I've found for consistency and to make sure everything is properly formatted.
I didn't know about PSD2. Do you have any links or references for me to look at?

shash1 reply#
Interesting! Thank you...

I was trying to divide an area by a smaller area to get the number of widgets, and it insists on making that into a percentage. Is there a way to make it report a raw number instead of percentages when the two quantities are the same unit?

tonyonodi#
What's the exact calculation you're doing?

Load more comments