Surprised no one has mentioned another great and similar resource called Rustlings [0] (yes very punny name). You are given some files with todo statements which you'll need to fix and make the code compile and pass all the tests. It's an interactive way to learn which is what got me through learning Rust a few years ago. [0] https://github.com/rust-lang/rustlings
The difference is that Rustlings requires the person to already know Rust whereas the link on this post (100 Exercises to Learn Rust) starts teaching Rust from the basics (assuming that the person knows another language).
Exercises to Learn Rust
71–80 of 129 posts
Re: Exercises to Learn Rust
#72Earlier quoted context omitted.
You get ridiculous performance gains with Rust a web backend. Even Microsoft is rewriting part of their C# backend to Rust on the 365 application side of things. Which is where you get to deal with the hefty ms-graph api which handles literal fucktons of data. Anyway. It is more verbose than something like Go or Python. I’m not sure it’s really so bad compared to most languages, but some of the benefits you get from…
Office team never was a big .NET fan, and they were partially responsible for Longhorn's failure, see also Hilo C++ tutorial made by the team as part of Vista SDK tutorials, or their love for Webwidgets to C++ code, so that isn't that surprising. It isn't as if C# vlatest wouldn't be able to take up the task, Bing, XBox game servers, and other large scale services are fully on .NET.
Re: Exercises to Learn Rust
#73Earlier quoted context omitted.
> Pavex is in beta, so you need to activate Pavex with an activation key: > You can retrieve an activation from the Pavex Discord server’s #activation channel after you’ve joined the beta on Pavex.dev.
To be fair, he did say it was "pretty novel"...
Re: Exercises to Learn Rust
#74This looks like a great resource! https://rust-exercises.com/03_ticket_v1/07_setters This shows why I wouldn't use Rust for anything. Seems like a lot of verbosity for gains that don't really apply whatsoever for the kind of work I do (web apps and APIs). You have to remember let/mut fine, but then ownership/borrowing, and finally this `into()` thing - yuck! Like washing your face with sandpaper.
(Note: For the specific example of integer-to-float, Rust has an alternative built-in syntax, but `.into()` is the canonical way that also works in generic code.)
Re: Exercises to Learn Rust
#75Experienced Rust users: how do you rate this? What level of proficiency would this leave you with
Re: Exercises to Learn Rust
#76This is quite interesting! While we're on the topic, does anyone know of a similar set of exercises for learning Golang?
Go by example is an established favorite. https://gobyexample.com/
To the creator, a sincere thank you!
Re: Exercises to Learn Rust
#77Worth noting that this set of exercises was created by the author of "Zero to Production in Rust", the well-reviewed book with the crab-in-a-human-skull cover[1]. [1]: https://www.zero2prod.com
> crab-in-a-human-skull cover Anyone know the story behind this?
To be fair, there is no particular backstory. I picked a hermit crab as the book logo since crabs are strongly associated with Rust due to Ferris, Rust's mascot. I then landed on that style (and the skull) because they looked sick and distinctive. The cover images of many technical books are incredibly dull these days.
Re: Exercises to Learn Rust
#78Earlier quoted context omitted.
Also the same one who is making a new web server framework for Rust called Pavex, which is apparently pretty novel in how it works compared to others like Actix Web and Axum [0][1]. [0] https://www.lpalmieri.com/posts/a-taste-of-pavex-rust-web-fr... [1] https://blog.logrocket.com/using-pavex-rust-web-development/
> Pavex is in beta, so you need to activate Pavex with an activation key: > You can retrieve an activation from the Pavex Discord server’s #activation channel after you’ve joined the beta on Pavex.dev.
Re: Exercises to Learn Rust
#79Re: Exercises to Learn Rust
#80Earlier quoted context omitted.
Ownership is not implementation. Ownership is contract. If you’re an owner of a house you can do more than if you’re only renting and if you’re renting you can do more than if you’re only looking at the house from the street. Ownership is a very useful concept that influences interfaces in real life so why wouldn’t it in programming?
This reads like the Rust equivalent of the OOP 'animal/cat/dog' intros of yore. Real world comparisons are almost never all that helpful when it comes to computing concepts.
Consider a simple Java method signature:
public static MyCustomFileReader open(FileHandle someFile) { ... }
Who is responsible for closing the file after you're done with reading it?
Does the returned reader close the file handle on close, or should I issue another close on the file handle afterwards?
Can I open multiple readers on the same file? The only way to know is to check the javadoc comment, if someone took time to write it. In Rust there are no doubts like that.