HNHacker News
TopNewBestAskShowJobs

tonyonodi

386 karma · joined August 22, 2014

submissionscomments
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Both are MIT licensed, I don't think this is the case.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Yeah, that's a feature I really wanted to get out before my launch deadline but sadly it didn't make the cut. Soon though.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Yes I can, I'm busy with launch stuff today but I'll get that done soon
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
What's the exact calculation you're doing?
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
NumPad uses Decimal.js to represent numbers

https://mikemcl.github.io/decimal.js/

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
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.

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
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 :)
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Some people just want to watch the world burn.

No, you're right. I thought I'd prevented it from parsing numbers as variables, but apparently not. It's on my todo list now.

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Thanks! I'll be implementing a sum (and mean/median/mode) function soon.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I'm sorry about that, I don't have an Android device to test on. But I'll fix that when I get hold of one.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Gosh, everyone has made one of these haven't they?
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
"kph" is also supported, will add support for "km/h"
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Thanks for the feedback

1. "square" before a unit I probably will implement that in the future. I'm not sure why "400 m^2" isn't working for you, I've just tried it and it works as expected for me?

2. It's a little bit clunky, but I decided to always specify the time and date being shown because there's so much potential for ambiguity. I might revisit this if I can think of a better way of doing it that's still unambiguous (the Soulver way isn't bad tbh)

3. "min" is supported, I've never come across "mn", do you know where it's used?

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Yeah, honestly this has been annoying me too, I just haven't got around to fixing it. It's using CodeMirror 6 as the editor, the author said he deliberately made this version not "break" the default tab behaviour, which I think is understandable as a library author, but that makes it my job to fix!
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Yeah, I'm British and I'll concede that how we write it doesn't make sense. I do intend to localise it/add options in the future.

NumPad currently accepts numbers in the "9,999.9" format, which is the default in the anglosphere, but "9.999,9" is common elsewhere. So that's another thing I'd like to address in the future.

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Thanks! Turning the current language into a Turing complete one would be a huge step up in complexity and I'm not sure it will ever make sense to implement. But I have thought about adding the ability for users to define their own functions in JS and might get around to that one day.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I'm just paying the standard fee for a .io, it's a far less polluted namespace than .com :)
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I think that's right, isn't it?
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
It's on the list ;) https://numpad.io/about/
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Is there anywhere else that uses "£"? I didn't feel great about having $ default to USD but it is probably what most users want. I'll probably make it location-aware and/or allow the user to decide which it defaults to in the future.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
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.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I hadn't thought about that before but I think you're right, I've added it to my roadmap.

Getting operator precedence right has been pretty fraught tbh. For example "1km / 3 hours" is evaluated as "(1km) / (3 hours)", but "1 / 3 hours" is evaluated as "(1 / 3) hours", which is odd from a PL perspective, but I think it's more intuitive from a user perspective for this sort of thing.

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
You're right, I'm using lz-string to compress the text before shoving it in the URL. This is definitely a necessary evil for the time being so I don't need a back end component to the app. But eventually I do want prettier URLs and collaborative editing if I can make that work without it bankrupting me or driving me insane.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I'm a big fan of Soulver too! It's the OG in this app category and I still use it for calculations NumPad can't do (yet!).
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Well, I love this comment. And yes, time zone support terrifies me an order of magnitude more than anything else on the list.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Oh, thank you for the bug report. I'm not sure why that's happening, but will look into it shortly.
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I hadn't seen that before, it's very impressive!
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Glad you like it! Thank you for the bug report, I'll get it fixed shortly
tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
Because Turing completeness scares me!

I was a big fan of Light Table when it first came out and the developers behind it have gone on to do some really interesting things, but I want to keep this project more limited in scope for now.

tonyonodi··on Show HN: I made a web-based notepad with a built in unit calculator
I've never made a VS Code extension, but I think it would be possible; no plans to do so currently though.
← PreviousPage 2 of 3Next →