5 ms·
Question for Rust programmers, do you still use Rust for quick hacking and exploration/prototyping or reach for another tool? Rust is getting more attractive e
by SpoofedHello 7y ago
Question for Rust programmers, do you still use Rust for quick hacking and exploration/prototyping or reach for another tool?
Rust is getting more attractive everyday, I wonder if there is something about the language that highly influences lib authors to write quality stuff or if the community has a high ratio of experienced devs.
- nixpulvis 7y agoDepending... if it's truly something quick I need to do, that is disposable, I use Ruby/shell script 9/10 times. This includes things like, restarting my computer, connecting to WiFi, checking the time in London, doing math, hitting an API. Prototyping ideas is great in Rust, since it's compiler/type system are a nice pair of helping hands. I will say, a proper first class REPL would be nice. Maybe some day.
- heavenlyblue 7y ago>> Prototyping ideas is great in Rust Agree. I tried to prototype in Python, but even with great IDE support it's hard to manage constant refactoring when you're moving fast.
- yoklov 7y agoIt depends on what I'm doing, but generally yes I'll write it in Rust unless I think it's a bad fit (e.g. if it's something that's better off as a shell script or whatever I'll just use that instead).
- morty_s 7y agoSo a couple things. The community does have experienced devs. But the language is just fun and expressive to use. IMO all the “fighting with the borrow checker” stuff is overblown. If you do get some complaint from the compiler, it is usually very easy to fix. Moreover, rust is very expressive. The functional facilities coupled with combinators make the language very ergonomic to use. I use the language for almost everything I can. If it’s something that would normally be a quick script, I will still reach for rust but not be very constrained. If the project turns into something more it’s easy to refactor and decrease memory usage etc. Testing is kind of a “first class citizen” so that plus “compilation driven development” make it a pretty hackable tool.
- mcqueenjordan 7y agoYep, I've moved to writing all my automation/tools in rust. Simply because I enjoy it more. The speed and correctness is a real nice bonus. My one caveat is that I'd say rust is a language best to pick up after you're already a polyglot with a few years of experience in several other languages. It uses so many ideas and concepts from several other paradigms that I think it helps an unusually great amount to have a polyglot background coming in.
- cetra3 7y agoI use it all the time to whip up quick scripts. The other day I made a cli tool that allows you to use Jmespath syntax for yaml files. Memory management aside: compilation-time guarantees of your code is probably the best thing about the language.
- asdkhadsj 7y ago> Question for Rust programmers, do you still use Rust for quick hacking and exploration/prototyping or reach for another tool? I have replaced all my tooling with Rust, fwiw. Rewrote several things at work with Rust (which started this train for me lol), and now all my projects are in Rust as well. I often say that Rusts complexity is oversold (by myself, too, at times), and it can be just as productive as Go, if used like Go. That is to say, Go is often touted as being hyper productive because it takes decisions away from you, such as Generics. You can apply the same tools to Rust, and suddenly you lack a ton of features but also reduce the possible roadblocks you might be wanting to avoid. Personally I don't even avoid any Rust features these days, I use all of them (that I understand, at least lol.. which I think is all). I more productive than in my Go days (~5 years in Go, fwiw).
- heavenlyblue 7y agoDo you use an IDE for Rust?
- mplanchard 7y agoNot GP, but I use VSCode or Vim with the Rust Language Server and have had a good experience, certainly better than either the Jedi or Microsoft Python language server.
- asdkhadsj 7y agoPreviously[1] I was using Kakoune with the Rust LSP, now I'm using Atom with the Atom-IDE-Rust plugin, which is mostly just the LSP backing it I believe. LSPs are great :) [1]: I switched to Atom for non-Rust reasons. Boy do I miss Kakoune every day haha.
- bluejekyll 7y agoI personally use VSCode with the Rust Language Server. A lot of people seem to really enjoy the IntelliJ Rust plugin.
- aknudsen 7y ago
- nguoi 7y agoYes, though I admit my choice is influenced by wanting to learn to be better at using Rust, not by what is best for the task I write C at work: to me Rust is fun for playing with a more functional style. The type system makes refactoring easy when I mess up. The tooling is good and the answer to 'why is thing X like Y?' is rarely 'because of legacy'.
- sreevisakh 7y agoI wrote a data processing utility in rust once and it took me four tries. But the final result was way better than I expected. For all the complaints that the compiler makes, it does expose genuine and obscure problems in your code that other languages would happily neglect. The key is to understand the errors rather than fight it. They are often symptoms of architectural problems in your code that you would otherwise miss. I have much more confidence in the final result while using rust compared to other languages, and the pain of satisfying the compiler is definitely worth it.