Live data from Hacker News

Why scientists are turning to Rust

nature.com

91–100 of 105 posts

Re: Why scientists are turning to Rust

#91
post #43

Earlier quoted context omitted.

> Researchers / scientists will rarely even write functions. It's that small of a scope Scientific computing can mean so many different things that if feels like some of us are talking past each other in this thread. The person in the article talks about needing to get out every ounce of performance and writing an application that identifies genome variants at scale. You're talking code so small that it doesn't need…

I think I'm in agreement with you. One usually needs Fortran or C++ or Matlab or Python with Numpy for numerical computing that is doing matrix or sparse matrix work (a lot of numerical computing is like this). I don't know of any uses that are so small as to not need functions outside of some extremely small/simplified models for explanatory purposes. There is also symbolic mathematics that Mathematica really excels…

>Heck, it sounds like bash/ask might even fit this use case if the code is so small as to not need functions.

Assuming that "ask" was a typo and you meant "awk", awk does support user-defined functions, as does bash.

https://www.gnu.org/software/gawk/manual/html_node/User_002d...

https://tldp.org/LDP/abs/html/functions.html

The support for that in both is somewhat limited as compared to "full" programming languages, though.

Re: Why scientists are turning to Rust

#93

I'm a physicist who knows many physicists who write a lot of code. I don't know any physicists who use or even want to use Rust.

Yep, with the exception of the computery fields of pyhsics, they cold not care less about programming languages.

I have seen physicists write entire non trivial image processing pipelines in Matlab. Where they happily processed gigabytes of images made by some weird microscope costing stupid amounts of €.

It (mostly and somehow) works but it is slow as hell (porting to c++ cut the time to run a process from 1 day to a few seconds).

They never even bothered with a "real" language because the "computer guys" can port that stuff if need be.

If you have a hammer...

Re: Why scientists are turning to Rust

#94

Earlier quoted context omitted.

Amen! More long-term staff scientist jobs of all stripes! One lesson I hope people take away from AlphaGo/AlphaFold (and a lot of the work coming out of the Allen Institutes, Broad, etc) is that some really amazing work can be done when big groups of experienced people can work together on a project.

Seriously! My lab does plant root growth modeling, which (like protein folding) is a 3D morphology prediction problem. Tweaking crops for even a small increase in carbon uptake and sequestration in soil (e.g., via deeper or longer roots) may be able to cut a sizeable chunk out of annual CO2 emissions[0], but almost nobody's working on it because it doesn't have direct applications to human healthcare. [0]: http://www…

This is really cool and I wasn't aware of this previously. Thanks for sharing!

Re: Why scientists are turning to Rust

#95
post #91

Earlier quoted context omitted.

I think I'm in agreement with you. One usually needs Fortran or C++ or Matlab or Python with Numpy for numerical computing that is doing matrix or sparse matrix work (a lot of numerical computing is like this). I don't know of any uses that are so small as to not need functions outside of some extremely small/simplified models for explanatory purposes. There is also symbolic mathematics that Mathematica really excels…

>Heck, it sounds like bash/ask might even fit this use case if the code is so small as to not need functions. Assuming that "ask" was a typo and you meant "awk", awk does support user-defined functions, as does bash. https://www.gnu.org/software/gawk/manual/html_node/User_002d... https://tldp.org/LDP/abs/html/functions.html The support for that in both is somewhat limited as compared to "full" programming languages,…

Yep, autocorrect I guess. My point being if someone is just doing a little string work than she'll scripting can be very performant and also dead simple.

I normally think of scientific programming as something involving lots of large matrices, but that isn't the case for everything.

Re: Why scientists are turning to Rust

#96
This seems very suspicious

All these pro rust/mozilla journalists are all related to Mozilla in some ways

Few google search and you start to see how all these people are connected

Hmm

What about CSS developpers, they are also turning to Rust?

We'll need the Markdown writters to turn to rust too!

Re: Why scientists are turning to Rust

#97
post #8

You know why I like Rust as a programmer? It's community feels a lot like how the Perl community did at the height of Perl's popularity. This is in contrast to Python's (has a friendly community, but tends to have bikeshedding), Node's (outright toxic npm-based warfare), or Java's (corporations shit out awful code when they're done with it, ie, everything donated to Eclipse or Apache, or all the dumpster fire code Go…

I'm a researcher and I loved prototyping in Perl once upon a time ago. It was so fast and easy to get an idea out. I've played with Rust too, and have done a project in it. I like it too, but as a necessity, not out of a strong love. I do love the package manager Rust has though. It's so nice to not have to worry about that kind of thing. Once Raku has dataframes, and it is stable, I'll definitely be checking it out.

Interesting. I assume the R flavour of data frames would be most used?

Re: Why scientists are turning to Rust

#98

Earlier quoted context omitted.

Seriously! My lab does plant root growth modeling, which (like protein folding) is a 3D morphology prediction problem. Tweaking crops for even a small increase in carbon uptake and sequestration in soil (e.g., via deeper or longer roots) may be able to cut a sizeable chunk out of annual CO2 emissions[0], but almost nobody's working on it because it doesn't have direct applications to human healthcare. [0]: http://www…

This is really cool and I wasn't aware of this previously. Thanks for sharing!

Sure thing! Seems almost nobody is (I wasn't until a year ago)

Re: Why scientists are turning to Rust

#99
post #97

Earlier quoted context omitted.

I'm a researcher and I loved prototyping in Perl once upon a time ago. It was so fast and easy to get an idea out. I've played with Rust too, and have done a project in it. I like it too, but as a necessity, not out of a strong love. I do love the package manager Rust has though. It's so nice to not have to worry about that kind of thing. Once Raku has dataframes, and it is stable, I'll definitely be checking it out.

Interesting. I assume the R flavour of data frames would be most used?

What other flavor is there? A dataframe is a data structure that is a 2 dimensional array, where each column has its own type. Compared to a matrix, which is also a 2d array, but each column has the same type.

Re: Why scientists are turning to Rust

#100

I can't help but feel that given the requirements laid out in the article Nim would be a more suitable fit for their goals over Rust. I do think Nim really nails great performance with a very clean and straightforward syntax, certainly easier for someone who only works in Python to pick up over Rust.

Nim would be a nice option if the ecosystem were even half as developed as the Rust package ecosystem.

Nim has plotting, dataframe, matrix libs and even a fully featured machine learning library, I don't see the reason why it can't be used, especially by scientists.

https://github.com/Vindaar/ggplotnim https://github.com/unicredit/neo https://github.com/mratsim/Arraymancer

Post reply on HN