5 ms·
Author here. I'm happy to answer questions! I don't have any performance numbers for this loop because it was already very fast. This was just a warm-up exerci
by ekidd 10y ago
Author here. I'm happy to answer questions!
I don't have any performance numbers for this loop because it was already very fast. This was just a warm-up exercise before trying to parallelize more complicated loops.
My experience with Rust has been interesting. On the one hand, if you compare Rust to Ruby or JavaScript, there really is a "Rust tax"—you have to think about ownership and references and types. But Rust pays me back by making refactoring very easy, and by catching some surprisingly subtle errors at compile time. Plus, I really like Cargo and the crates.io ecosystem.
Rust might not be a good match for every project or every programmer, but I'm really enjoying it for low-level, high-performance code.
- dkastner 10y agoA huge payoff that Rust provides vs Ruby or JavaScript is when writing development tools. It saves so much time and trouble to install a binary than to try and get someone to download the right version of Ruby, gem install, etc. Rust, while having its tax, is really great about telling you why your code won't compile and keeping you from footgunning yourself.
- chrismorgan 10y agoTrying to get ack or ag working properly on Windows is a bit of a pain. Now there’s an equivalent in Rust, rg, and I can get something that’s mostly superior to these others with `cargo install rg`. (OK, so I had to have installed Rust first. But I had done that.)
- eridius 10y agoThere does not appear to be a crate called "rg". Are you perhasp referring to https://crates.io/crates/ripgrep https://crates.io/crates/ripgrep?
- GolDDranks 10y agoHe definitely is, it's just that "rg" is the binary that compiling ripgrep produces.
- chrismorgan 10y agoWhoops, yep. `cargo install ripgrep`.
- bluejekyll 10y agoYou always have to install something or it must exist first. Node, FCC, clang, Ruby, Python... you just need to think of rustup as the the equivalent of getting you rust compiler environment setup.
- maccard 10y agoWhat's difficult about it? Just use chocolatey.
- burntsushi 10y agoYou can also get a Windows binary that I think should Just Work :-) https://github.com/BurntSushi/ripgrep/releases https://github.com/BurntSushi/ripgrep/releases
- chrismorgan 10y agoHooray for standalone programs!
- munificent 10y agoThis was a great article. I love step-by-step journeys through what programming actually looks like like this.