4 ms·
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)
by Hello71 9y ago
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
- rjzzleep 9y agoI'd say better user experience. But then again qalculate! also does provide you with that. https://qalculate.github.io/ https://qalculate.github.io/ {~} % qalc > c to km s^(-1) speed_of_light = approx. 299792.46(km / s) > 10 kg to g 10 * kilogram = 10000 g > $10 to euro dollar * 10 = approx. EUR 8.9501477 > 100oF to oC (((100 * kelvin) + (459.67 * kelvin)) * 5) / 9 = approx. 37.777778 oC
- sharkdp 9y ago> I'm a little confused as to how this improves on GNU units, which seems to support far more [...] > is it supposed to be a competitor? learn how to use a new language? I don't get it. No reason to be confused. GNU units is a great tool. qalculate and speedcrunch are great, too. Insect is just my take at it. Each of these tools has advantages and disadvantages. As for insect, one of the advantages for me is that it is platform-agnostic and can be used from anywhere without installation. The "You have: X; You want: Y" interface is basically replaced by "X -> Y".
- Hello71 9y ago> As for insect, one of the advantages for me is that it is platform-agnostic and can be used from anywhere without installation. wouldn't emscripten work great then? maybe you could add support for definitions in "units" format?
- eps 9y ago> I don't get it. Oh, common. Someone wrote something that's similar to X. If you are so well versed in GNU tools, you surely old enough to know that this happens all the time, sometimes intentionally, sometimes not. People like scratching the proverbal itch and creating stuff. What's there to "not get" and what's the point in feigning a surprise and implying OP's ignorance along the way? If you want to mention that X exists, just say that -"There's X, which is similar. Have you seen it?"
- delhanty 9y agoThere are two differences from GNU Units that I can see straightaway from the GitHub repo: 1. It's written in PureScript. 2. It's MIT licensed. (Actually I had to search the repo to find this - it would be nice if it had a LICENSE file at the top-level that GitHub could pick up.) Anyway, IMO monocultures suck and competition is good. Kudos to the OP!
- averagewall 9y agoWhat's the URL for that? Not everyone uses Linux. In fact, almost nobody does.