Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sharkdp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
91.
▲
by
sharkdp
9y ago
Thank you. Same request is tracked here: https://github.com/sharkdp/insect/issues/86
92.
▲
by
sharkdp
9y ago
That would be great.
93.
▲
by
sharkdp
9y ago
Thank you for the feedback. What do you mean by "specifying output units"? Insect has the "->" operator which does that: 40000 km / c -> ms = 133.426 ms
94.
▲
by
sharkdp
9y ago
Thanks! I'm glad you like it.
95.
▲
by
sharkdp
9y ago
Thank you for the feedback! 1. Yes, I'll definitely add calories, good suggestion. 2. Yes, that's probably a good idea. I should distinguish constants and (user-defined) variables.
96.
▲
by
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
97.
▲
by
sharkdp
9y ago
Thank you. I'll add one of those.
98.
▲
by
sharkdp
9y ago
In your first example, the result of the calculation is dimensionless (length divided by length), so it does not require any unit. It's a scalar value. In your second example, the input gets parsed as "1/(2km)" which is
99.
▲
by
sharkdp
9y ago
I thought about it for some time and decided not to add Celsius and Fahrenheit: https://github.com/sharkdp/insect/issues/68 They are useful, of course, when it comes to simple unit conversions. But they lead
100.
▲
by
sharkdp
9y ago
Thanks! It has already been requested: https://github.com/sharkdp/insect/issues/81
101.
▲
by
sharkdp
9y ago
Ha! That's a really neat idea. Thank you for sharing this. I'll consider adding it.
102.
▲
by
sharkdp
9y ago
Thank you for the feedback. I should probably consider adding something like "Full documentation and terminal version available here ". I hesitated for quite some while before adding "month" and "year" but the
103.
▲
by
sharkdp
9y ago
Thank you for the feedback. Defining own units does not work currently, but you can simply divide by your new unit: >>> U = 1e-6/60 * kat U = 1.66667e-8 kat >>> 1 kat / U 1 kat / U
104.
▲
by
sharkdp
9y ago
whitespace is multiplication. If you use explicit addition, it should work: 2 min + 35 s + 3 min + 54 s = 6.48333 min
105.
▲
by
sharkdp
9y ago
Thank you very much for the feedback. That would be great, yes. I believe that both points are somehow already included in the issue that I'm tracking here: https://github.com/sharkdp/insect/issues/54 Un
106.
▲
by
sharkdp
9y ago
This is only how it is displayed, internal precision is always 30 digits. Floating point numbers are displayed with 6 significant digits Integers are displayed with all digits, unless there are more than ~20 digits, then it is displayed wit
107.
▲
by
sharkdp
9y ago
I realize it looks confusing in this example but this is just how it is displayed (with 6 significant digits). The internal precision is 30 digits.
108.
▲
by
sharkdp
9y ago
Thank you for the feedback. Fair point: Google's unit conversion is really good. For me, there's mainly two things that stand out compared to using a Google search: * The REPL: I wanted an interactive terminal-style calculator whe
109.
▲
by
sharkdp
9y ago
Correct. "2^99 + 1 - 2^99" still works because 2^99 < 10^30
110.
▲
by
sharkdp
9y ago
They are already supported. There is "B" or "byte" for byte and "bit" for bit. SI-prefixes are case-sensitive, so "G" is for giga, "M" for mega, "m" for milli. >>> 6 M
111.
▲
by
sharkdp
9y ago
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.
112.
▲
by
sharkdp
9y ago
Oh, I didn't know that :-)... that's interesting. I'm very much open for suggestions on how to improve the logo. I already went through a couple of iterations... https://github.com/sharkdp/insect/blo
113.
▲
by
sharkdp
9y ago
Good suggestion, thank you! I was already thinking about some way to measure "perceived complexity" of a physical unit - this sounds like a very good try for such a heuristic.
114.
▲
by
sharkdp
9y ago
Thank you! "bel" is already supported ("decibel" also, due to the handling of SI prefixes). Unfortunately, "dB" is parsed as "deci-byte". While this is not really a useful unit, this is on purpose (se
115.
▲
by
sharkdp
9y ago
Thank you for the feedback! Automatic simplification (as opposed to explicit conversion) is a complex topic. There are a few simplifications that are already applied, for example: 20 L / m^2 = 0.02 m You are absolutely right,
116.
▲
by
sharkdp
9y ago
Thank you for the feedback. That is intentional. Whitespace (or even lack thereof, as in "2x") is implicit multiplication. Otherwise, you'd have to write multiplication signs everywhere: 2*sin(5*cm/(2*m))
117.
▲
by
sharkdp
9y ago
Thank you very much. I'll look into this. Thank you for the reference.
118.
▲
by
sharkdp
9y ago
Oh no :-) Quick workaround: ≫ Meaning = 6 ≫ of = 1 ≫ life = 7
119.
▲
by
sharkdp
9y ago
Thank you for the feedback. I'm always open for suggestions on new units ( https://github.com/sharkdp/purescript-quantities )!
120.
▲
by
sharkdp
9y ago
Yes, 100% agree with your comment. I'd rather have a calculator application that is maybe a little less "smart" in exchange for mathematical correctness and predictability.
More ›