Live data from Hacker News

Welcome to Comprehensive Rust

google.github.io

91–100 of 204 posts

Re: Welcome to Comprehensive Rust

#91
post #69
post #39

It's kind of surprising to see that Rust is so rapidly accepted by wide range of developers. Unfortunately I'm from DataScience field, so I cannot see much motivation to learn Rust, but I am considering learning it, because language itself seems exciting! Is there anyone on HN who is from DataScience field like me and has learned Rust? It would be much appreciated if you could share the experience.

I suppose if you're coming from Python, you could use Rust (with PyO3) instead of C/C++/Cython in something similar to the Numpy/ML lower-level implementations. But I wish there were a language that solved the two-languages problem (fast vs. easy to work with). I find Rust quite verbose.

> But I wish there were a language that solved the two-languages problem (fast vs. easy to work with).

That is the motivation and purpose of Julia.

For some people's workflows it already seems to have solved the problem, but in general the "easy to work with" part is still in progress IMO. Some of it is the (in)famously annoying compilation delays, but a large part of it is just a tooling and ecosystem thing (both of those sides of the issue are being actively worked on).

The difference from C/C++/other low level languages is that it's not the language itself that's difficult to work with, it's the current tools and workflows that are suboptimal. The language is pretty well-designed and fun to work with, so there's hope that it can actually solve the two-language problem for a wider variety of devs and their needs.

Re: Welcome to Comprehensive Rust

#92
post #89
post #39

It's kind of surprising to see that Rust is so rapidly accepted by wide range of developers. Unfortunately I'm from DataScience field, so I cannot see much motivation to learn Rust, but I am considering learning it, because language itself seems exciting! Is there anyone on HN who is from DataScience field like me and has learned Rust? It would be much appreciated if you could share the experience.

It is not rapidly and widely accepted. It is pushed by a small but very vocal minority for all the wrong reasons. When you have to prove your intelligence level (or rather "street cred") in a competitive market you have to show that you can learn the newest complicated things quickly. Rust is pure cryptonite in such a world.

Cryptonite? I am... not sure it means what you think it means.

Re: Welcome to Comprehensive Rust

#93

Earlier quoted context omitted.

Hi, I wrote the course :-) Yes, this is a real thing — Android has had support for Rust in the Android Platform for a few years now. Most recently, we shipped support for DNS-over-HTTP/3: https://security.googleblog.com/2022/07/dns-over-http3-in-an... We put out the course to make it easy for even more people to onboard with Rust.

Rust does not guarantee that there are no memory leaks, you can have things reference eachother and therefore never count to 0. This is why weak pointers exist in rust.

It does not guarantee, but it is actually quite hard to cause a memory leak by accident, because at the same time Rust makes creating cycles hard.

Re: Welcome to Comprehensive Rust

#94
post #39

It's kind of surprising to see that Rust is so rapidly accepted by wide range of developers. Unfortunately I'm from DataScience field, so I cannot see much motivation to learn Rust, but I am considering learning it, because language itself seems exciting! Is there anyone on HN who is from DataScience field like me and has learned Rust? It would be much appreciated if you could share the experience.

> Is there anyone on HN who is from DataScience field like me and has learned Rust?

Yeah me. I’m data science/data engineering.

Wrote and debugged a lot of R and Python, fair bit of Spark too.

Learning Rust was fine. Not trivial, but definitely worthwhile. I work on more “data systems” than once-off scripts and analysis in my work, so the performance and correctness of Rust has proven more valuable to me than the flexibility and development speed promises of Python. The former lends itself to difficult to maintain, hacky, patchwork code, and the latter falls apart after the nth time you have to fix some Python code in prod that’s failed 3.5 hours into a process, because some random package has thrown some as-yet-unseen error.

There’s some interesting stuff happening in the data space in Rust-polars data-frame library gives you pandas like functionality, but with better performance and type checking, the data-fusion stuff is making strides as well. There isn’t a 1:1 replacement for all your ML libs, but it’s getting there! Linfa and SmartCore are making strides on the sklearn-like space.

Would you use Rust to replace your ml stuff in Python at work tomorrow? No, probably not just at the moment. Is it worth learning because it’ll make you a better dev, and give you more options and tools the next time you have a non-standard problem to solve? Yes, definitely.

Re: Welcome to Comprehensive Rust

#95

Earlier quoted context omitted.

Hi, I wrote the course :-) Yes, this is a real thing — Android has had support for Rust in the Android Platform for a few years now. Most recently, we shipped support for DNS-over-HTTP/3: https://security.googleblog.com/2022/07/dns-over-http3-in-an... We put out the course to make it easy for even more people to onboard with Rust.

Rust does not guarantee that there are no memory leaks, you can have things reference eachother and therefore never count to 0. This is why weak pointers exist in rust.

Right, this is a problem with reference counted data structures in general. You're correct that Rust doesn't try to solve this particular problem.

Put differently, the borrow checker won't allow you to create a cycle of refrences (the & kind). But you can do it with library types such as Rc.

Re: Welcome to Comprehensive Rust

#96
post #92
post #89

Earlier quoted context omitted.

It is not rapidly and widely accepted. It is pushed by a small but very vocal minority for all the wrong reasons. When you have to prove your intelligence level (or rather "street cred") in a competitive market you have to show that you can learn the newest complicated things quickly. Rust is pure cryptonite in such a world.

Cryptonite? I am... not sure it means what you think it means.

I only know this word from context. And it is actually written with "k". So what does it mean? (Context/my reasoning: If you have to prove that you are a smart programmer you can't stay away from learning Rust. Hence it is kryptonite.)

Re: Welcome to Comprehensive Rust

#97

Earlier quoted context omitted.

Rust does not guarantee that there are no memory leaks, you can have things reference eachother and therefore never count to 0. This is why weak pointers exist in rust.

It does not guarantee, but it is actually quite hard to cause a memory leak by accident, because at the same time Rust makes creating cycles hard.

I actually haven't tried this... do you know off the top of your head what it takes to make a cycle with Rc?

It should not be possible with normal borrows (and safe Rust) since they're statically checked to be acyclic.

Re: Welcome to Comprehensive Rust

#98
post #96
post #92

Earlier quoted context omitted.

Cryptonite? I am... not sure it means what you think it means.

I only know this word from context. And it is actually written with "k". So what does it mean? (Context/my reasoning: If you have to prove that you are a smart programmer you can't stay away from learning Rust. Hence it is kryptonite.)

Kryptonite isn't something you can't stay away from. It is something that makes you weak. As it did to Superman in the movie. An Achilles' heel.

Merriam-Webster's definition: https://www.merriam-webster.com/dictionary/kryptonite

Re: Welcome to Comprehensive Rust

#99
post #60

Earlier quoted context omitted.

To be honest, the course suggests using apt since that's an easy security-approved way to install things on our computers (see https://en.wikipedia.org/wiki/GLinux ). I'll be happy to update it to suggest using rustup like "normal". Could you make a PR for that?

Are you sure you're replying to the correct comment?

Sorry, you're right :-) I meant to comment further up where people asked if we could reference rustup.rs in the installation instructions.

Re: Welcome to Comprehensive Rust

#100
post #56
post #39

It's kind of surprising to see that Rust is so rapidly accepted by wide range of developers. Unfortunately I'm from DataScience field, so I cannot see much motivation to learn Rust, but I am considering learning it, because language itself seems exciting! Is there anyone on HN who is from DataScience field like me and has learned Rust? It would be much appreciated if you could share the experience.

Rust is a safer C/C++. If you'd never consider writing anything in C/C++ (i.e. low-level code where performance is essential), you'll never use Rust.

That’s underselling it quite a lot.

Rust has a number of features (ergonomic and technical) and some really nice language design that permits writing quite “high-level” code. Personally, having a compiler and type system as powerful as Rusts makes it worthwhile alone.

Post reply on HN