4 ms·
I'm not writing rust yet, but I'm using a couple of tools written in rust, and based on my experience with it, when I need a utility I seek out one that's writt
by benatkin 8y ago
I'm not writing rust yet, but I'm using a couple of tools written in rust, and based on my experience with it, when I need a utility I seek out one that's written in rust.
I'm using https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep which is rg, like ack or ag (TheSilverSearcher). I've been using it for a few months, and I like it just a little bit more than ag, because I find its help and interface a bit easier to use. Like ag, it's incredibly fast.
Just this week I started using https://github.com/watchexec/watchexec https://github.com/watchexec/watchexec to run rsync to sync from my mac to my vagrant box, because I was switching from using neovim on vagrant to using Visual Studio Code. It works great and has a very nice command-line UI.
Another tool that's written in go that I thought maybe was written in rust that's handy is https://github.com/shenwei356/rush https://github.com/shenwei356/rush which runs multiple commands in parallel, like xargs. I'm using it to transfer images between folders on s3 using aws-cli.
Based on this, and Servo, which is unstoppable with its Doge logo, I think Rust is going to be a very widely used language. https://github.com/servo https://github.com/servo
Edit: I remember part of why I liked rg more than ag - I got to use cargo rather than go, which is a much more intuitive and less opinionated way of downloading libraries than using the go cli. go is coming around though: https://blog.golang.org/modules2019 https://blog.golang.org/modules2019
- sk0g 8y agoHow much of it is because there's a reason (of sorts), to do a complete re-think, when you're porting tools over? C and C++ have been stable for years, and so has all the little UNIX tooling that was built using them. People are excited by Rust, and take it upon themselves to re-build these tools, as they have well defined requirements and characteristics. The reason these tools might be better is because thought has gone in to modernising and enhancing existing features. That might not be so feasible/ easily doable if you were juggling a decades old codebase to start off with. I'm not sure what my point is, entirely... But ripgrep is good! I have replaced awk and grep with it, because it just feels more... user friendly? EDIT: remembered my point. Are you switching to Rust tools because they are written in rust/ benefit from Rust in some unique way, or because it's a common platform people are re-implementing and re-imagining classic UNIX tools in?
- benatkin 8y agoIt’s because I want something that’s been re-imagined, yes.
- feanaro 8y ago> Are you switching to Rust tools because they are written in rust/ benefit from Rust in some unique way, or because it's a common platform people are re-implementing and re-imagining classic UNIX tools in? I think it's a little bit of both for me. The Rust tools tend to have a nicer UX (pretty-printing, colouring by default, with smart detection whether output is to a terminal, subcommand-oriented CLI a la git, etc). This is probably a consequence of nice library defaults but also a matter of culture. They also tend to be very fast. Again, Rust is inherently inducive to writing fast tools, but you also have to do things the right way.
- chmln 8y agoShameless plug - you may also wanna try https://github.com/chmln/sd https://github.com/chmln/sd :)
- benatkin 8y agoI already found it and used it a couple times but forgot about it! It’s pretty neat. Gonna try using it for little things now that I’m using vscode instead of vim.