3 ms·
IIRC, loc (in rust) might be even faster than tokei at times? I always forget, and I’m sure I saw an old benchmark... We have a whole working group this year f
by steveklabnik 8y ago
IIRC, loc (in rust) might be even faster than tokei at times? I always forget, and I’m sure I saw an old benchmark...
We have a whole working group this year focused on making the experience of writing CLIs awesome, so hopefully we’ll see even more great tools in the future!
- vram22 8y ago>We have a whole working group this year focused on making the experience of writing CLIs awesome Can you explain what you mean by this? Something like the people are going to focus on language and library features that help with writing CLIs? Or something else? Asking because CLIs are one of my interests.
- isaacaggrey 8y agoHere is the Rust CLI working group announcement: https://internals.rust-lang.org/t/announcing-the-cli-working-group/6872 https://internals.rust-lang.org/t/announcing-the-cli-working... Rust has different community working groups that focus on improving the Rust ecosystem in different ways this year: https://internals.rust-lang.org/t/announcing-the-2018-domain-working-groups/6737 https://internals.rust-lang.org/t/announcing-the-2018-domain...
- vram22 8y agoThank you, will take a look.
- epage 8y agoWe've tried to dig into various problematic areas of writing CLIs in Rust [0], worked to create or improve libraries [1], and are working on writing a "book" for Rust-based CLIs [2]. You can reach out to us on gitter [3]. [0]: https://github.com/rust-lang-nursery/cli-wg/issues https://github.com/rust-lang-nursery/cli-wg/issues [1]: https://github.com/rust-clique/ https://github.com/rust-clique/ and https://github.com/assert-rs/ https://github.com/assert-rs/ [2]: https://rust-lang-nursery.github.io/cli-wg/index.html https://rust-lang-nursery.github.io/cli-wg/index.html [3]: https://gitter.im/rust-lang/WG-CLI https://gitter.im/rust-lang/WG-CLI The areas we're trying to finish up for Rust 2018 Edition: - Get clap (arg parsing) to 3.0 [4] - Get assert_cmd [5] / assert_fs [6] to 1.0 - Finish work on man-page generation [7] - Make it easier to package binaries [8] and document the CI for it [9] [4]: https://github.com/rust-lang-nursery/cli-wg/issues/41 https://github.com/rust-lang-nursery/cli-wg/issues/41 [5]: https://github.com/assert-rs/assert_cmd/ https://github.com/assert-rs/assert_cmd/ [6]: https://github.com/assert-rs/assert_fs https://github.com/assert-rs/assert_fs [7]: https://github.com/rust-lang-nursery/cli-wg/issues/38 https://github.com/rust-lang-nursery/cli-wg/issues/38 [8]: https://github.com/crate-ci/cargo-tarball https://github.com/crate-ci/cargo-tarball [9]: https://github.com/crate-ci/crate-ci.github.io https://github.com/crate-ci/crate-ci.github.io
- vram22 8y agoThanks for the detailed answer. Will check out some of those links.
- cgag 8y agoLoc (mine) is usually faster in my tests but doesn't handle comments that start in strings, so if there's something like x="/*" it can be way off, so I usually still point people at tokei. I need to try implementing the string thing. It'd be a lot more fun to try to compete on speed if we were the same on accuracy.
- Aaronepower 8y agoWell luckily I recently published a new comparison benchmark[0]. :) The TL;DR is that loc is faster by a few hundred milliseconds depending on repository size, but as cgag mentions doesn't have comment in string detection so can be quite off in its metrics, for example on the Rust repo Tokei says it has 643,754 lines of code where as loc says it's 635,849. [0]: https://github.com/Aaronepower/tokei/blob/master/COMPARISON.md https://github.com/Aaronepower/tokei/blob/master/COMPARISON....
- steveklabnik 8y agoAwesome! :)