Live data from Hacker News

Show HN: Insect – a high-precision scientific calculator with physical units

insect.sh

131–140 of 205 posts

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#132
post #3

This is pretty cool, it's one of the rare applications I've used where the things I've tried "just work". For example "10 kg to g", "c", "c to km s^(-1)", "c to km/s" all work intuitively. It's great it works at the command line too. Something I wish I'd had when I was studying Physics.

All of these things work in Google, btw. Google has one of the best unit conversion tools, and it's built into the search.

Plus exchange rates

10EUR + 11 USD + 1500 USD + 500CAD in ZAR

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#134
post #78

I really like the UI and seeming wealth of different units. It doesn't look like it supports fluid ounces though. I tried "4 tbsp to oz" and it interprets oz as mass instead of volume. Google correctly gives me 2 as the answer.

Thank you for the feedback. I'm not sure how to support this. I would probably have to call it "fluid_ounce" / "fl_oz" or "fl.oz." in order to distinguish it from the unit of mass.

Well, the way /usr/bin/units solves it is to allow "floz", "usfloz", "fluidounce", or "usfluidounce".

Having to learn that you can type "floz" is better than not being able to do it at all.

(You could also allow "fl oz", "fluid ounce", "fl ounce", etc. if you tweak your parser a little bit, but that's the deluxe version, and any functionality at all would be a big improvement.)

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#135
post #29

Earlier quoted context omitted.

I've always been frustrated by how Google's unit conversion doesn't integrate well with its calculator.

How is wolfram alpha? I always use it for more complicated pure math, but I don't think I ever used it for unit conversion.

It's great at unit conversions. You can do things like "number of milliseconds between amsterdam and paris at speed of sound". I use it all the time.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#136
post #66
post #30

Earlier quoted context omitted.

That's because your unit conversion is invalid. It's entirely possible to construct an equation that computes mi/gal from L/km (or from gal/mi for that matter), but the dimmensionalty of the two numbers clearly disagree. Yes, you can introduce scenarios like yours where "any human" would know what the intended meaning of the question is, but mathematically speaking it's incorrect and encouraging a calculator to perfo…

I don't remember which calculator did this (I think GNU units), but I've seen this handled automatically with a warning saying "Warning: reciprocal conversion"

Yes, that's what GNU units does:

  $ units
  Currency exchange rates from www.timegenie.com on 2016-06-21 
  2926 units, 109 prefixes, 88 nonlinear units
  
  You have: 7.8L/10km
  You want: miles/gallon
  	reciprocal conversion
  	* 3.0155716
  	/ 0.33161209
I think it's fine for a calculator to make guesses as long as it makes it very clear that it's doing so.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#139
I'm a little confused as to how this improves on GNU units, which seems to support far more:

    $ cat .units
    period(len) units=[m;s] 2pi*sqrt(len/gravity) ; (period/2pi)^2 * gravity
    $ units
    2980 units, 109 prefixes, 97 nonlinear units
    
    You have: period(20cm)
    You want: 
            Definition: 0.89729351 s
    You have: period(20cm)
    You want: ms
            * 897.29351
            / 0.0011144625
    You have: period(2ft)
    You want: ms
            * 1566.5419
            / 0.00063834872
    You have: 5 GiB
    You want: bytes
            * 5.3687091e+09
            / 1.8626451e-10
    You have: 5 hundred million
    You want: 
            Definition: 5e+08
    You have: tempF(100)
    You want: tempC
            37.777778
is it supposed to be a competitor? learn how to use a new language? I don't get it.

I like the idea of keeping units, but I'm not sure this makes things easier:

    ≫ V * A / J
      V × (A / J)
       = 1 V·A/J

    You have: V*A/J
    You want: 
             Definition: 1 / s

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#140

Earlier quoted context omitted.

That's why 99% of the time there's no need to use the calculator, just type your formula straight into the search.

And use a remote server with at least 1RTT of delay to do basic arithmetic. Big Data indeed.

It's not so basic though. Google knows the current value of most currencies, for instance. It's actually more efficient for the central servers to pull that data and the clients to query once in a while, rather than every single client (local calculator) to constantly keep all that data up to date. And that's just the currencies.
Post reply on HN