Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sharkdp
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
sharkdp
9mo ago
Thank you! I reported this as https://github.com/astral-sh/ty/issues/1994 Support for auto-completing TypedDict keys is tracked here: https://github.com/astral-sh/ty/issues/86
2.
▲
by
sharkdp
9mo ago
We should generally support TypeDicts. Can you go into more details of what is not working for you?
3.
▲
by
sharkdp
2y ago
> Is it possible that your program was waiting for input that never came? We do close stdin to prevent this. So you can benchmark `cat`, for example, and it works just fine.
4.
▲
by
sharkdp
2y ago
> On the flip side (making things more random as opposed to less), something that randomizes the initial stack pointer would be nice, as I've sometimes seen this go really, really wrong (renaming a binary from foo to foo_new made it
5.
▲
by
sharkdp
2y ago
> “Best publicly available” != “great” Of course. But it is free and open source. And everyone is invited to make it better.
6.
▲
by
sharkdp
2y ago
> Robust statistics with p-values (not just min/max, compensation for multiple hypotheses, no Gaussian assumptions) This is not included in the core of hyperfine, but we do have scripts to compute "advanced" statistics, an
7.
▲
by
sharkdp
2y ago
If that's the case, I would consider it a bug. Please feel free to report it. In general, hyperfine should not take longer than ~3 seconds, unless the command itself takes > 300 ms second to run. In the latter case, we do a minimum
8.
▲
by
sharkdp
2y ago
I don't think it's useless. You can use hyperfine to run multiple benchmarks at the same time, to get a comparison between multiple tools. So if you want it to work without quotes, you need to (1) come up with a way to separate co
9.
▲
by
sharkdp
2y ago
> The issue is it runs a kajillion tests to try and be “statistical”. If you see any reason for putting “statistical” in quotes, please let us know. hyperfine does not run a lot of tests, but it does try to find outliers in your measurem
10.
▲
by
sharkdp
2y ago
That doesn't make a lot of sense. It's more like the opposite of what you are saying. The precision of hyperfine is typically in the single-digit millisecond range. Maybe just below 1 ms if you take special care to run the benchma
11.
▲
by
sharkdp
2y ago
Yes. If you don't make use of shell builtins/syntax, you can use hyperfine's `--shell=none`/`-N` option to disable the intermediate shell.
12.
▲
by
sharkdp
2y ago
Caching is something that you almost always have to be aware of when benchmarking command line applications, even if the application itself has no caching behavior. Please see https://github.com/sharkdp/hyperfine?tab=re
13.
▲
by
sharkdp
3y ago
> 365·243 ought to be 365·2425 exactly: Yes. This is also how it is defined: https://github.com/sharkdp/numbat/blob/ba9e97b1fbf6353d24695... The calculation above is showing a rounded result (6 significan
14.
▲
by
sharkdp
3y ago
Yes. If you want to know more, you can read about it here: https://github.com/sharkdp/numbat/blob/master/assets/reasons...
15.
▲
by
sharkdp
3y ago
So 'year' refers to the Gregorian year and is equal to 365.243 days [1]. We also have 'julian_year' which is equal to '365.25 days'. We also have 'sidereal_day' equal to '23.9345 hours', and
16.
▲
by
sharkdp
3y ago
Frink is not open source, unfortunately.
17.
▲
by
sharkdp
3y ago
Insect is the predecessor project. Numbat is the replacement. It also has an interactive version at https://numbat.dev/
18.
▲
by
sharkdp
3y ago
Thank you for the reference. I hadn't seen Unchained. You missed the point about this example though. I wanted to show how Numbat can help prevent the exact error that you made in your program. 'G_Newton * earth_mass * solar_mass
19.
▲
by
sharkdp
3y ago
I looked at Julia and Unitful.jl quite a bit when designing Numbat. It looks great. > Extending it to cover all of Numbat's functionality could be trivially accomplished in a few lines. Look, I'm not claiming that Numbat is sup
20.
▲
by
sharkdp
3y ago
Yes. We use up-to-date currency exchange rates from the European Central Bank [1]. https://github.com/sharkdp/numbat/blob/786512175b99c195a7d5b...
21.
▲
by
sharkdp
3y ago
Thank you. I don't think we diverge from units on purpose anywhere, but I am probably not very familiar with its syntax, to be honest. I did however look at its huge collection of units and checked if there were any important units mis
22.
▲
by
sharkdp
3y ago
No, we do not have aggregate types in Numbat yet. But it is definitely something I would like to support. Note that it is possible to construct a type system solution to this problem (vectors/matrices with non-uniform units). A colleag
23.
▲
by
sharkdp
3y ago
F# is the only language I looked at that has a really powerful unit system. The author of that unit system wrote his PhD thesis on the subject [1]. Numbat's type system is actually pretty close to what was suggested in that thesis (in
24.
▲
by
sharkdp
3y ago
> As a physicist, if you ever see units on the parameter to a trigonmetric function, you can be fairly certain something is wrong. Exactly. Which is why trigonometric functions in Numbat have the signature cos(x: Scalar) -> Scalar
25.
▲
by
sharkdp
3y ago
I looked at Frink quite a bit and I agree that it looks cool. But as far as I can tell, it does not have a static type system. At least it's not based on physical dimensions. And it is not open source.
26.
▲
by
sharkdp
3y ago
You don't have to convert to scalars. Numbers have a type of 1 (= Scalar). You can just call exp(3), for example: https://numbat.dev/?q=exp%283%29%E2%8F%8E Or you could pass an angle quantity, which is convertible to a
27.
▲
Show HN: Numbat – A programming language with physical dimensions as types
(numbat.dev)
146 points
by
sharkdp
3y ago
|
113 comments
28.
▲
by
sharkdp
3y ago
I usually follow HN closely, but I would have probably missed it, if I hadn't received notifications from friends on three different channels. Thank you very much for writing the post!
29.
▲
by
sharkdp
3y ago
Thank you for the kind words Martin. I hope we can continue this journey in the next couple of years :-)
30.
▲
by
sharkdp
3y ago
Thanks Holger. I have fond memories of the BWInf times!
More ›