News for hackers. Stuff that matters.
Re:Ask HN: How do you learn Rust in 2023? by mortallywounded on Friday November 03, 2023 @10:50AM (#38129673)
Probably the same way you learned it in 2018-2022. By using it to build small projects and progressively get larger.
Re:Ask HN: How do you learn Rust in 2023? by dhux on Friday November 03, 2023 @10:58AM (#38129790)
First read the rust book.. And write your own tiny program.
Re:Ask HN: How do you learn Rust in 2023? by duped on Friday November 03, 2023 @11:35AM (#38130390)
ChatGPT frequently gives out incorrect code, I suggest you start with "the Book" and then work on some projects, like any other language.
Re:Ask HN: How do you learn Rust in 2023? by estebandalelr on Friday November 03, 2023 @12:01PM (#38130704)
Thanks! I am looking at The Book (https://doc.rust-lang.org/book/), but hoped there was an amazing person on youtube.

Yeah, I'll build something, finally trying webassembly.

Re:Ask HN: How do you learn Rust in 2023? by dikek on Friday November 03, 2023 @03:15PM (#38133710)
There's a Youtube playlist I stumbled on. It follows along with the Rust Book.

https://www.youtube.com/watch?v=OX9HJsJUDxA&list=PLai5B987bZ....

Re:Ask HN: How do you learn Rust in 2023? by mortylen on Friday November 03, 2023 @02:44PM (#38133111)
First, quickly go through all the documentation. Then start writing whatever comes to mind. And if you don't understand something, go back to the documentation. For me, that's the best way to learn.
Re:Ask HN: How do you learn Rust in 2023? by bombardier123 on Friday November 03, 2023 @02:44PM (#38133125)
Edited for grammar and format Read the 'Rust Book' as others suggested. Make small programs.

- Result and Option ( if let, match etc)

- understand references / mutable references

- ownership and borrowing.

- traits.

- learn generics

- Box, RC, Refcell,

- threads with Arc/ Mutexes.

- std::sync - channels(tx, rx)

- tokio (if you want to get better at an async runtime)

- take up an open source project and do it rust

Re:Ask HN: How do you learn Rust in 2023? by owenpalmer on Friday November 03, 2023 @02:47PM (#38133166)
Read the Rust Book. Rust is not like other languages, you need to understand the fundamentals before staring a project, otherwise you will get frustrated.
Re:Ask HN: How do you learn Rust in 2023? by zerr on Friday November 03, 2023 @03:17PM (#38133726)
Same with C++. Even C++98/03 becomes beautiful after reading TC++PL.
Re:Ask HN: How do you learn Rust in 2023? by thatxliner on Friday November 03, 2023 @03:08PM (#38133569)
A good resource for learning ownership, borrowing, references and all that jazz: https://rust-unofficial.github.io/too-many-lists/
Re:Ask HN: How do you learn Rust in 2023? by qup on Friday November 03, 2023 @04:04PM (#38134278)
Thanks. I've been learning rust and haven't run across this yet.
Re:Ask HN: How do you learn Rust in 2023? by jamestimmins on Friday November 03, 2023 @03:25PM (#38133812)
I have found ChatGPT to be most useful as a way of explaining tricky code examples in Rust.

So while going through Rust by Example, I'll paste programs into ChatGPT and have a conversation with it about how specific pieces work. I've also done LeetCode problems and then asked ChatGPT for feedback about my approach.

Re:Ask HN: How do you learn Rust in 2023? by skeptrune on Friday November 03, 2023 @05:21PM (#38135155)
Build something. I think making an actix-web REST API is a great place to start
Re:Ask HN: How do you learn Rust in 2023? by seg_lol on Friday November 03, 2023 @07:38PM (#38136462)
Create a Rust program that writes a PPM file to stdout of a shape you want to draw.

Ask ChatGPT to give you example programs you need to implement based on part of rust you want to learn.

Re:Ask HN: How do you learn Rust in 2023? by Mrirazak1 on Saturday November 04, 2023 @12:01AM (#38138015)
Have you tried freecodecamp? Idk if they do it but it’s a suggestion.
Re:Ask HN: How do you learn Rust in 2023? by roland35 on Saturday November 04, 2023 @07:22AM (#38140022)
I found that the oriely book "Programming in Rust" to be very thorough and helpful for me. It helped me really understand the concepts of Rust. Although the free rust documentation is fantastic too!

https://www.oreilly.com/library/view/programming-rust-2nd/97...