Lurker News

Comments (215) 23 threads

Earlier comments
xfactor9733 replies#
For the benchmarks did you clear the page cache inbetween runs? It’s crazy fast and seems a little suspect
infogulch#
The readme says the benchmarks are designed to run warm, so I would assume each was run once or twice beforehand.
sharkdp2 replies#
Thank you for the feedback!

The benchmarks that are mentioned in the README are performed for a "warm cache", i.e. I'm running one of the tools first to fill the caches. Then, I'm performing multiple runs of each tool (using bench for some nice statistics) such that both tools profit from the warmed-up cache.
I also perform other benchmarks where I clear the caches. In this case, 'fd' is usually even faster.
The scripts for both warm and cold cache are here: https://gist.github.com/sharkdp/4bc3e5f5ea9df2f29c02ede50634...

xfactor973#
Awesome. Sorry I should’ve dug a little deeper before commenting. Nice job on the multithreading also!
dbdr#
> using bench for some nice statistics

'bench' turns out to be this tool: https://github.com/Gabriel439/bench
It seems to be quite useful, and I was not aware of it, thanks! Would probably be nice to have it packaged in distributions...

the8472#
for a narrow set of usecases with cold page caches I have written ffcnt[0]. As the name says I mostly use it to count how many million files have accumulated over time in a large directory tree. It could be extended to do regex matching on filenames a la find though, I just never had the need for it.

[0] https://github.com/the8472/ffcnt

sharkdp#
Thank you for the hint! Unfortunately, this is not in rust 1.16, which I currently still want to support.
smegel1 reply#
> Ignores patterns from your .gitignore, by default.

Do you need to be in the current git directory for this to happen, or all git dirs that happen to be traversed?
And are you using an NFA based regex engine?

sharkdp1 reply#
It will work for all git directories that are encountered. This behavior can be disabled with the '-I' flag, if needed.

fd uses Rusts regex engine (https://github.com/rust-lang/regex) which is based on finite automata.

JepZ1 reply#
I am not sure if I find that a smart default as I frequently exclude generated files from git repositories and when want to find something I do not know why I would not like to find such a file if my pattern matches it.

I would prefer to let the switch enable the .gitignore logic, but as I don't know the authors use-case, theirs might be valid too.

Sean1708#
Surely the common case is that you don't want to search generated files? Or at least I personally am almost never interested in generated files because they're not the ones I'm going to be changing/doing stuff with.
Karrot_Kream4 replies#
Will we ever be able to promote a tool without talking about the programming language it is implemented in?
dysoco1 reply#
Yeah when it's written in Python or C and not Go/Rust.
mmirate1 reply#
Aye, that's because being written in Python, C or Go is - in my eyes - a strike against the project in an absolute sense, because it will be more buggy and difficult to maintain due to lacking the functional-programming abstractions and powerful static-type system of a good ML descendant such as Rust or OCaml. (Or of Haskell, but it tends to lack the practicality of the ML family.)

So of course one does not trumpet that one's project is written in Python, C or Go.
n.b. I said "absolute sense" because all of this this is, of course, inapplicable when searching for libraries specifically for a language such as Python, C, or Go.

burntsushi3 replies#
I don't buy it. People say, "X (written in Foo)" because there is fundamentally an interest in the fact that something is written in Foo (and this may indeed depend on the nature of X). Back when Go was new and shiny, it was the same situation.[1] :-)

[1] - https://news.ycombinator.com/item?id=4685594

Continue this thread — 3 replies

giancarlostoro#
I rather always know up front what language something is coded in. For example if it were coded in Java or .NET people would want to know.
omaranto#
Rust is somewhat of a special case: I bet some people mention their software is written in Rust just to avoid a bunch of comments proposing to rewrite it in Rust,
OJFord#
In a package manager I wouldn't expect to see it. On HN, especially as a Show HN, the audience has a much higher likelihood of being interested in digging into the code, perhaps even becoming a contributor. That makes the language used much more pertinent.

Load more comments