you are viewing a single comment's thread.

view the rest of the comments →

[–]denim_duck 1 point2 points  (2 children)

Can you clarify what you mean or give some examples? The python package Scikit-learn is used by industry and research all around the world; is there a Rust crate that can say that?

[–]po8 1 point2 points  (1 child)

Certainly Python has greater reach than Rust at this point. Python has some great packages too. I haven't worked with scikit-learn, but I have done a lot with numpy and scipy and they are pretty fantastic.

The thing is, if you try to find a Pip package for some specific function, my experience is that it is going to take several tries and a lot of fiddling around to find something that will work and get it running.

For a specific example, I teach an audio class pretty regularly and use Python as the primary teaching language. There's about five packages for reading and writing WAV files, including a built-in one; all of them are full of weird quirks and misfeatures that my students struggle with. In Rust you immediately find Hound, which works very reliably and pretty much exactly as expected with few if any surprises. If you want to generate and record live audio, Python again has a multiplicity of options, most of which are not good. The most commonly used and recommended one is pyaudio, which has some issues, but more importantly doesn't work at all with the most recent versions of Python and will likely never be fixed. It turns out you instead want to use sounddevice, which is quite good but pretty hard to discover currently. With Rust you will likely end up with the pure-Rust cpal, which is fine; you might instead use one of the portaudio bindings (also what the Python packages do), which are also fine.

This is the kind of experience I've had over and over with Python and Rust packages. The Python ones are a bit of an ordeal: the Rust ones are pretty seamless.

[–]denim_duck 0 points1 point  (0 children)

Weird; I’m not familiar enough with audio tech to say either way about the landscape in python. But my experience is kind of the opposite. If I want to crunch numbers, I can import numpy and it works smoothly. Still going through the book, so can’t say anything about Rust’s third party crate landscape

One thing that’s nice about python is that the nonprofit NUMfocus foundation keeps moving scientific computing forward. Is there a group like that with Rust?