4 ms·
it's the first language that doesn't have me use Python for quick shell scripting or small prototypes How do you define quick? Python has a large standard libr
by papaf 6y ago
it's the first language that doesn't have me use Python for quick shell scripting or small prototypes
How do you define quick? Python has a large standard library and so you don't have to hunt for functionality on crates.io and then download/compile -- I have written scripts faster than that.
- nicoburns 6y agoIf you know that a crate exists then you can simply `cargo add foo` and have it download in the background while you get on with writing your script. If you don't know that it exists then you'll have to find it the first time, but you have that problem with python standard library modules too. Writing scripts with Rust likely will be slower than Python, but I don't really buy that having functionality in crates is part of that.
- papaf 6y agoIf you don't know that it exists then you'll have to find it the first time, but you have that problem with python standard library modules too. Except that, if its in the standard library, you don't have to choose between multiple implementations. I have written scripts faster than I have chosen dependencies.
- deleted 6y ago[deleted]
- nicoburns 6y agoIf I want to make an HTTP request in Python, which module should I use? There is a built in one (more than one I believe), but the official docs link out to a 3rd party module https://docs.python.org/3/library/http.client.html https://docs.python.org/3/library/http.client.html
- papaf 6y agoI think things are beginning to get a bit surreal. People arguing that Rust is a better scripting language than Python and now with one particular poor example in the Python standard library means the chaos of crates.io is a comparable solution in terms of reducing choice. Rust is a great C++ alternative. But seriously, the community has cult like marketing.
- nicoburns 6y agoFWIW, I agree with you that Python is better that Rust for scripting (I was not the OP), but finding a crate in Rust is generally a matter of googling "Rust http client" or "Rust regex" and reading the top result. Not exactly hard, and in my experience something that I end up doing in every single language including Python, because using the standard library directly is often not the correct choice.
- swsieber 6y agoAnd there's the Rust cookbook. I view the cookbook as sort of a recommended extended std.
- bluejekyll 6y ago> But seriously, the community has cult like marketing. What in your opinion makes one language cult-like vs. another that many people like and recommend to others? Cults generally have a very negative impact on those who are members vs. the leaders. Usually the members of cults are taken advantage of and are only there to support the people at the top. The Rust community is very far from anything cult-like.
- zepto 6y agoCults are usually bad for the leaders too.
- hannofcart 6y agoYeah, am a Rust beginner but very proficient in Python, and despite having being warned of Rust community's zealotry, I haven't found interacting with them anything but pleasant. The documentation is great. Various channels to interact with the community have always been polite and helpful. Heck, one would think that the author of a leading book on the language popping up everywhere to give helpful answers/clarifications would be seen as welcome and not in-your-face-activism.
- mmcgaha 6y agoThe Python standard library is amazing. A few weeks ago, I wrote a program that provides a SMTP relay, mail storage, and web UI for managing email sequencing. The only dependency that it pulled in was pywin32 so it could run as a windows service; if it ran on a Linux box, there wouldn't be a single dependency. Not including integration testing, the whole deal was two days of work. If I had to pull in and evaluate external libraries I would have spent two days just working out the details of which libraries to select. At least for now, I don't think anything can replace Python for prototyping an idea.
- dehrmann 6y ago> The Python standard library is amazing. I generally agree, but it has some weird holes. There isn't an OrderedSet, it doesn't have a binary tree like Java's TreeMap, its HTTP client isn't great (people mostly use Requests), and there's a lot still missing from its asyncio library. > web UI for managing email sequencing You built a web UI without even using Flask?!
- kavalg 6y agoI can only second that. People would say that Python is a lot slower than Rust and I would agree, but the slowest software I've seen in my life is the one that never gets released ;)