Archived link: https://archive.is/CjOCq
Yes, maybe? Most of the examples come from bioinformatics domain. If I look at remote sensing or GIS where C++ and Python reigns or in Epidemiology/Public Health/Clinical Trials where C++/R/SAS reigns, I am not so sure to see anything in Rust coming for a long time. It depends also of the research affinity, when I was looking at the uses of OCaml in scientific research, I found a researcher working on climate models. It only tells me that it is possible to do it not that it is a new trend or the norm. It is nice to see Rust percolating in scientific environment but that is the only thing that the article shows.
I don’t think the article purports to show ‘all scientists everywhere are turning to Rust’. The headline isn’t even misleading. Yes, scientists (not all) are turning to Rust, and the why is explained inside.
In science all the coding is done by graduate students and postdocs. It’s a great opportunity to try out the new shiny. No one is going to challenge you technically.
Then the grad student graduates and the new one is stuck trying to learn new_shiny_language that no one in the lab knows while under pressure to keep the research output going while trying to find a bug that is stopping an R&R to be done while working on their own research.
There is a reason why some scientific code is still written in Fortran. It is too costly to to a rewrite in some more modern program, there are no incentives for a student to spend time rewriting old code because that is not publishable, and the people that have written the code have long left the research lab and no one really knows what is going on in the code.
Our experiences differ, not on the graduate/Phd/postdocs part but I have been constraint to use specific technologies in certain research projects. During your Phd or postdocs maybe, you may have the freedom to chose your tools but it is not certain. Anecdata and personal bias of course.
I am happy to see people using Rust in research, and fresh projects like WhiteBoxTools in GIS/Remote Sensing.
[Comment from banned user removed]
Ah yes, we use programming languages once again to extrapolate negative personality traits in other humans. If you’re going to make such a sweeping, acerbic judgement, can you at least back it up with some data?
I’m a physics graduate student and I don’t think this is correct. From what I’ve seen most people don’t use C++, but those that do use it out of necessity (or ignorance, not knowing that Rust exists). I personally don’t have high performance requirements so I mostly use Python, but most labs I have experience with use Python, Matlab, or LabView. I only have experience with one lab that uses C++, and they use it because they need something very fast to process the absolutely enormous amount of data coming from the detectors in their dark matter experiments.
“Everyone knows 70% of C++. It’s just that no one knows the same 70%.”
In my neck of the woods (computational linguistics) and what I have seen in related fields, pretty much everyone uses Python and perhaps some R for statistics (plus historically Perl and some Prolog). Only people who are implementing core machine learning algorithms use C++ (which is a tiny < 1% subset).
I do not see much Rust either. I used Rust in some projects when I was still in academia and so were some of my students (some liked it and I guess some wrote Rust because they were making extensions to my projects), but I haven’t really encountered many other people in the field who use Rust.
I’m a physics graduate student and a Rustacean of a few years. I don’t really use Rust in my lab for a few reasons:
I generally think that Rust is the better choice if you can get away with it since it enforces correctness to some degree. That said, you have to look at the broader context of your research as to whether you even have a say in this at all. I think this breaks down into two categories:
I‘m not that familiar with Julia, but doesn‘t that language claim to solve Python‘s shortcoming regarding speed? It‘s also much more focused on scientific computing. It would be interesting to hear from the scientists mentioned why they didn‘t choose Julia.
Very small sample: I know of one person using Julia because it was faster than Python for a particular task. (Analysis of mass spectrometry data.)
(I didn’t actually study the code closely, so I can’t say whether it would have been possible to make it fast enough using numpy, etc.)
The article on Julia is linked as a related article: https://www.nature.com/articles/d41586-019-02310-3
Many scientists are using Julia. As a Julia user, I can point out several reasons why one might pick Rust over Julia: Julia is a garbage-collected language, whereas Rust has its borrow-checker (If you need explicit control over performance, Rust might be the better choice). Rust is safer with static type-checking, whereas Julia mostly uses type-annotations for multiple dispatch (Julia is aimed more at computational exploration, whereas Rust aims for compiled binaries, and it seems Varlociraptor aims to build a distributable binary). Julia targets LLVM, whereas Rust targets specific architecture (Rust would be easier with embedded systems).
Rust’s main implementation targets LLVM.