Live data from Hacker News

Show HN: I made a web-based notepad with a built in unit calculator

numpad.io

111–120 of 246 posts

Re: Show HN: I made a web-based notepad with a built in unit calculator

#112

Mini feedback: The difference between a defined variable and an undefined variable could be clearer. And should an expression with an undefined variable still give a value? So if you had: Alice's food + Bob's foood = £30 then I think there should be more to highlight the typo. P.S. This is an awesome thing

Ooh a super useful function (in my experience) is the monthly mortgage repayment calculator.

MonthlyRepayment(principle, annual_interest, term_in_years)

Re: Show HN: I made a web-based notepad with a built in unit calculator

#114

I also made one of these, still working on it now with a focus on including support for accuracy/measurement errors. This is impressively close to what I have in my desired spec (but already more future proof). Congratz! https://github.com/xixixao/recomputer https://xixixao.github.io/recomputer/

Nice work! I like that you're using rational numbers, I thought about going that route but decided to compromise by using Decmial.js in the end. Also really like the "Same Use Case" section in your readme. It's a good summary of the reasons I made this app :)

Re: Show HN: I made a web-based notepad with a built in unit calculator

#115

Nice work on getting this out. I think it looks pretty neat and simple to use. I’ve had some issues when using it though: - on mobile, moving the cursor in a calculation doesn’t work very well; - More important, multiplying “200 * 10%” results in “2000%”, I believe the result should be “20”; https://www.wolframalpha.com/input?i=200+*+10%25

I also had issues navigating on mobile (iPad). There seem to be hover states that get in the way (example: I tapped on a line to move to that line and it had a small popup to say something was copied)

Re: Show HN: I made a web-based notepad with a built in unit calculator

#117
Can you add bit and byte values, as well as units per unit of time please?

Base 10 (GB for example) and base 2 (GiB) would be very handy. Full words as an alias as well, so GB -> gigabyte, and GiB -> gibibyte.

That way you can do something like:

1GB / 40MB/s in minutes

1GB to Gib

1GB to bits

50 bits to bytes

Re: Show HN: I made a web-based notepad with a built in unit calculator

#118

Earlier quoted context omitted.

"kph" is also supported, will add support for "km/h"

And `mpg`/`l/100k` please!

I've avoided adding mpg because the UK and US disagree on what a gallon is and mpUKg/mpUSg is not very nice to look at. You can write "miles per gallon" or "miles per US gallon" because per is the same as the "/" operator, and you can sort of do "L/100km" but you can't convert to it.

I'll have to think some more about this one.

Re: Show HN: I made a web-based notepad with a built in unit calculator

#119
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?

Re: Show HN: I made a web-based notepad with a built in unit calculator

#120
This is really neat, but you need to rethink the date/time/duration arithmetics. You’re equating 12 months with 365.25 days, which gives rise to results like “1 month - 31 days” giving “-0.0184804928 months”. At the same time, “30th January + 1 month” gives “28 Feb 2022 at 12:00:00” (why “2022”, and why “at 12:00:00”? — this is only a date calculation without reference to a year or to a time of day), while “30th January + 30 days” gives “1 Mar 2022 at 12:00:00”, although “1 month in days” gives “30.4375 days”.

In reality, months/years are simply not convertible to days/weeks arithmetically, and you can’t sensibly add months to certain dates, and sometimes also not years (for February 29th). The former should give “Incompatible units”, and the latter should result in something like “Undefined” for incompatible dates.

Post reply on HN