Live data from Hacker News

Becoming Rustacean: Resources to Learn Rust Programming

nativebyx.dev

31–40 of 48 posts

Re: Becoming Rustacean: Resources to Learn Rust Programming

#32

The Rust Foundation would like a word with whoever owns this site

The second weird comment like this I'd seen this morning. Looks like the first got edited with some context[0], apparently people are upset because Rust Foundation is updating their trademark policy.

[0]: Rust, RR, Neovim: A perfect debug combination https://news.ycombinator.com/item?id=35523585

Re: Becoming Rustacean: Resources to Learn Rust Programming

#34
Some great resources here. One thing I want to point out: Rustlings follows the path of The Book and provides references for each section where appropriate. So I would not advise treating them as separate learning paths. They work best when used to reinforce each other.

Re: Becoming Rustacean: Resources to Learn Rust Programming

#35
post #25

Earlier quoted context omitted.

I mean, that's probably true in some broad categorical sense, for the question of "speed of execution of final program" which it's not clear your parent meant. However it's not true in the specifics, there are so often little tweaks Rust has that otherwise comparable languages don't have that squeeze out a little better performance and this adds up. For example: C++ std::vector is a perfectly respectable growable arr…

Well I guess we can always play micro-benchmarks game if you want to go down that path, including selecting specific compiler toolchains and flags while making it a point that it is a property of language XYZ, to make it even better.

I don't see the std::vector example as a micro-benchmark, we're not talking about wasting a few microseconds in a contrived example, we're talking about destroying the amortized constant time growth performance of the data structure because of an API goof.

Re: Becoming Rustacean: Resources to Learn Rust Programming

#36
post #24
post #11

Earlier quoted context omitted.

Oh, no, it isn't. Take the speed of Haskell or Prolog. They are much slower than Rust at runtime.

First of all Prolog is usually not AOT compiled rather JITed, secondly regarding Haskell, it is an issue with the skill set of the developer more than anything.

Given expert skills in both Haskell and Rust, Rust is by far the fastest performing language. And if you use idiomatic Haskell the difference is even bigger. E.g. if you use lots of Monad transformers and lazy evaluation.

Re: Becoming Rustacean: Resources to Learn Rust Programming

#37
post #3
post #2

I really like the speed of rust. It’s very difficult to learn it though

As someone who came mostly from Python and some C: I must say the most difficult part was stopping myself from forcing aesthetical ideas of how to structure code from the other languages into Rust. There are three points here: - Rust lends itself to certain structures (that you might not be used to) and makes others very harder to pull off (that you might be used to). The trick is not try to do the latter when the fo…

As a javascript/typescript developer I took a notion to learn Rust and it has been hard but rewarding on a personal level. Im concerned though that I'm learning somwthing that has very few if any real jobs right now. All I see is block chain nonsense. In your opinion is there much chance that this will change?

Re: Becoming Rustacean: Resources to Learn Rust Programming

#38
post #3

Earlier quoted context omitted.

As someone who came mostly from Python and some C: I must say the most difficult part was stopping myself from forcing aesthetical ideas of how to structure code from the other languages into Rust. There are three points here: - Rust lends itself to certain structures (that you might not be used to) and makes others very harder to pull off (that you might be used to). The trick is not try to do the latter when the fo…

As a javascript/typescript developer I took a notion to learn Rust and it has been hard but rewarding on a personal level. Im concerned though that I'm learning somwthing that has very few if any real jobs right now. All I see is block chain nonsense. In your opinion is there much chance that this will change?

To be honest I would say Rust is worth learning even if you were to never use the language at all after learning it.

The problems Rust attempts to tackle are fundamental problems you will encounter in many languages. Understanding how to program or how to think in order not to get those problems in the first place is the thing Rust can teach you. A lesson that any programmer can learn from.

That being said Rust has great testability and interopability. I myself use Rust in some (work) projects in conjunction with Python.

So I definitly see some future for the language, also commercially. But even if I wouldn't, I would still recommend learning it.

Re: Becoming Rustacean: Resources to Learn Rust Programming

#40
post #6

Earlier quoted context omitted.

The trick to learning Rust is to first start learning C++; that way your motivation to learn Rust increases even further and you start getting the feeling that Rust is easy ;) This is similar to the psychological trick of how an obese person, to make himself/herself feel better, stands next to an even more obese person :)

Not just any c++, I'd recommend performance aware modern c++. It leads towards the functional-ish zero-copy lock-free thinking rust rewards. I've been told ocaml or f# programmers also find rust easy.

I think there are definitely aspects of Rust that OCaml/F# developers would find easy because it borrows a lot of syntax and concepts from ML. But to be honest those bits are the easy parts or Rust. Knowing OCaml or F# won't help with the borrow checker.

I think C++ programmers are probably the ones that are likely to find Rust easiest because they should be familiar with lifetimes even if they never really had to write them down.

Post reply on HN