r/WatchPeopleCode • • Jul 12 '21

Do you want to learn Rust?

I'm going to go over the process of building a chat server, then a client over the course of a few streams (this will be the pilot).

There is a discord with the channel "learning-rust" setup specifically for this, where you can ask question and share code: https://discord.gg/qtyDMat

If you don't want to use the discord you can use https://paste.rs/web for sharing code and post this in the chat along with your question.

Stream will be at https://www.twitch.tv/togglebit

Start date: 2021-07-13 Start time:

  • 10:00 am BST

  • 09:00 am UTC / GMT

  • 11:00 CET

  • 19:00 AEST

Website: https://togglebit.io/posts/learning-rust/

Prerequisites

  • Rust (and Cargo) installed: https://rustup.rs/

  • A working text editor

  • (Optional) Telnet or netcat (or we can't test the server before creating the client)

Goal

For you to have a basic understanding of Rust and to be able to create something more than just "hello world".

Process

Go over language features, then using these features to implement the program.

Update: added link to stream

42 Upvotes

7 comments sorted by

3

u/toggledbit Jul 12 '21

If this works out well and people are interested in this, I might do a repeat of the first stream on a weekend at a later time for people who are not able to participate on account of the time difference.

2

u/mohamedspicer Jul 12 '21

can share the link of the website uou will be stream on

1

u/mmahowald Jul 12 '21

honest question: why? what is rust good for? im pretty new to the industry and dont know what would make rust preferable over java or c#....or if they are playing in different arenas so that question doesnt even make sense

1

u/toggledbit Jul 13 '21

Rust solves different problems. Both C# and Java have a garbage collector, this is not suitable in certain areas like device drivers, operating systems etc.

You would use Rust in the same space you would use C / C++ / Zig etc.

3

u/shukoroshi Jul 12 '21

Rust is super attractive due to it's focus on safety and performance. It boasts a high degree of memory safety as well as an easier to use concurrency model.

1

u/spaghettu Jul 13 '21

Rust is a compiled language so it’s generally faster than interpreted languages. It boasts speed nearly identical to C, but with added safety benefits such as a very good system for checking memory safety at compile time. A consequence of that is it can sometimes be pretty hard to get your program compiling, making it a little hard for newcomers - but I’d say it’s definitely worth the time investment