News for hackers. Stuff that matters.
Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @07:12PM (#23161255)
> When I started learning Rust I made the mistake of following the advice to read The Book first. While it's a great resource, it's pretty overwhelming for a beginner to get told "If you'd like to learn this programming language the best way to start is to read this 20 chapter book!" Most people give up before they even get started when they get advice like this. Nobody ever told someone to read a 20 chapter book just to get started with Javascript or Python. Rust's learning curve is no joke but you gotta give the people what they want, and they want to program, not read about programming. Programming is fun and reading about programming is not as fun.

As one of the authors of the book, I wholeheartedly agree that it's not for everyone. Folks should learn in the way that works well for them. I'm glad this resource exists!

Re:Learning Rust in 2020 by dpwm on Tuesday May 12, 2020 @07:50PM (#23161576)
I don't usually like programming books. I am usually easily overwhelmed by them and I find that they are at the wrong pace for me.

This weekend I read most of the Rust book without much effort and found it really helpful for getting up to speed with the language, especially the more novel bits around safety. It took me to the point where I was able to explore and evaluate the bits of the language I needed with only library docs. I know that the remaining chapters are there for when I am ready for them.

My experience with the Rust book as made me more likely to consider starting with a book when approaching programming languages in the future.

Reading other comments, I recognize that I was fortunate to have a project in mind that motivated my reading of the book and just happened to be an excellent fit for Rust.

Re:Learning Rust in 2020 by wwee on Wednesday May 13, 2020 @12:41AM (#23163537)
As someone who already programs in multiple high-level languages, I feel that the Rust book hits the sweet spot for me. It doesn't go over basic programming concepts which I already know, and focuses on fundamental, unique concepts of Rust. I feel that the scope is pretty close to perfect as well, it doesn't try to cover every single detail. (The Rustonomicon serves as Part 2 for me)
Re:Learning Rust in 2020 by eska on Tuesday May 12, 2020 @08:41PM (#23162043)
I'm in the same boat. I worked on a pet project while reading the book (still at it). Make some progress, read about how unit tests are done, add some unit tests, learn how modules work, refactor some code into a module.. Inbetween I google some things that I need but haven't mentioned in the book yet but that I need at that moment (e.g. cow strings used in a crate). Works for me!
Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @08:25PM (#23161910)
Thanks for the kind words!
Re:Learning Rust in 2020 by _bxg1 on Tuesday May 12, 2020 @10:36PM (#23162840)
Came here to say this exact thing. I never learn well from programming books, but I did from the Rust book. I think it's because of how bite-sized and focused the different pieces are, as well as how hands-on and example-driven it is.
Re:Learning Rust in 2020 by cesarb on Tuesday May 12, 2020 @07:38PM (#23161469)
To be fair, when I first saw this advice to read the book first, the book was this one: https://doc.rust-lang.org/1.30.0/book/first-edition/ which is much shorter.

That is, the advice "the best way to learn Rust is to read the book" came from when the book was a different one; it's still repeated (perhaps by people who learned from the old book), but it might no longer be as valid.

Just for fun, I've been re-reading the book (that is: reading the new book), and it's much more tiring than I remember the old book being (but I've learned a new trick or two, things that didn't exist back in the Rust 1.0 days when I first learned through reading the book).

Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @07:43PM (#23161509)
Yeah. I think it comes down to style. The new book is almost exactly twice as long as the old one; the old one had less stuff to explain, and also didn't explain it in as much depth. Some people prefer brevity. Some prefer the extra explanation. It's a constant struggle to keep the book from getting even longer.

I think the new book is far, far, far better, but I can understand why some other folks don't agree.

Re:Learning Rust in 2020 by _bxg1 on Tuesday May 12, 2020 @10:39PM (#23162867)
I think personally I like it when things go in "layers". Start with a shallow pass, and then do one or more passes of increasing depth
Re:Learning Rust in 2020 by sanderjd on Tuesday May 12, 2020 @07:22PM (#23161315)
Yes I think that line highlights the "different strokes for different folks" aspect of learning things: my instinct when I learned javascript and python was to pick up and read long books about them! I'm glad there are lots of different kinds of resources that exist, which people can pick and choose from as best suits them.
Re:Learning Rust in 2020 by CapriciousCptl on Tuesday May 12, 2020 @08:32PM (#23161973)
I've read the book and its iterations 3 times. It may not be for everyone but it's been wonderful for me. When I was first learning Rust some time ago you were also a great resource on IRC. Thank you Steve.
Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @09:05PM (#23162237)
<3
Re:Learning Rust in 2020 by noxer on Wednesday May 13, 2020 @05:16AM (#23165022)
I did like to book. I read it in small steps over like 3 weeks. The only thing that's really missing and makes people get a rough start is, that there is no step-by-step dev environment setup. VS Code + Rust (apparently what most people use) should work "out of the box" but nowhere is an official and maintained recourse how to set it up correctly. Just a bunch of outdated blog posts how someone someday got it to work. If you never used VS Code before you are almost certainly waiting hours to get you rust scratchpad running which you definitely want to have while reading the book.

Yes, is may not really fit in the book but then there should be a official place for this. Preferably with different OSes and IDEs covered.

Re:Learning Rust in 2020 by satvikpendem on Wednesday May 13, 2020 @08:05AM (#23165969)
The book should mention that one should use rust-analyzer rather than RLS as the code completion engine in VSCode. The former is much better.
Re:Learning Rust in 2020 by steveklabnik on Wednesday May 13, 2020 @08:30AM (#23166176)
This is part of why doing this is tricky, and why we don't. If this section were in the book today, it would say the RLS, because the RLS is the current project from the Rust Project proper. That's about to change, but still, it's a good example of why this is hard.
Re:Learning Rust in 2020 by noxer on Wednesday May 13, 2020 @09:19AM (#23166597)
It should ofc name both and give all the information needed for a beginner to make a educated decision what to use.

But like I said the book may not be the right place for this but there MUST be a place for this and if not then such a place must be created. Many many other languages/frameworks etc. have the same problem.

Re:Learning Rust in 2020 by gilbetron on Tuesday May 12, 2020 @08:30PM (#23161955)
I'm about 1/4 of the way through your book, and it is my favorite programming book since the original C book, which I read ... sigh ... almost 30 years ago.

Well done!

Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @09:06PM (#23162247)
If it makes you feel any better, I also read that book... 20 years ago? Regardless, thanks!
Re:Learning Rust in 2020 by JeremyNT on Wednesday May 13, 2020 @11:16AM (#23167671)
> As one of the authors of the book, I wholeheartedly agree that it's not for everyone. Folks should learn in the way that works well for them. I'm glad this resource exists!

I started off reading your book, and I found it really helpful, even though I didn't make it all the way through. I feel like there are a lot of resources cropping up that are good supplemental material (the "half hour to learn Rust" blog post linked in this document being one of those) which can quickly get people up to speed, but the details in the book are still valuable.

Reading through (most of) the book was really helpful when I went to Exercism (another fine resource recommended by the post linked here), and I still use it as a reference when I am fuzzy on a concept.

Re:Learning Rust in 2020 by empath75 on Tuesday May 12, 2020 @07:41PM (#23161492)
The rust book is great and I refer to it frequently, but rust never clicked for me until I just jumped in and did the advent of code with it.

I think the hard part of just reading the book is that unless you have some problem you’re trying to solve, it’s hard to get motivated to read it.

It’d be nice if there was a book that’s a bit less dry —- something like Learn You A Haskell or Why’s poignant guide to Ruby.

Re:Learning Rust in 2020 by steveklabnik on Tuesday May 12, 2020 @07:44PM (#23161516)
I would also love to see a book with some whimsy; when I try to emulate this style, it doesn't work. Oh well.
Re:Learning Rust in 2020 by j-pb on Wednesday May 13, 2020 @05:19PM (#23171947)
Currently on day 4 of reading it all day and just finished chapter 12.

Thanks for writing it!