#ScryptoClassof2022 Week 2, Chapter 2 on Rust & Scrypto

Week 1 is officially over and we have over 20 people starting their journey into Rust & Scrypto! I have seen many people take the first steps to set up their computer to code for the first time as well as others with a bit of experience dive into Rust for the first time! Congratulations everyone for taking the leap and getting started!

If you missed week 1, feel free to read through here and catch up!

Several AWESOME projects have been nice enough to award prizes to the most active and helpful members of #ScryptoClassof2022!

Radup.io donating $XRD

Ociswap.com donating $OCI

Delphibets.com donating $DPH

Daxter donating scryptochaps.com NFTs and Radix Pandas NFTs

Cerberrads.com donating CerberRad NFTs

AIK_ALLRADIX#2238 and radixdltstaking.com donating $XSE

I have also added 1 Scrypto Punk NFT to be awarded each week

All donations will be awarded to those active students that are contributing to the course and helping others solve problems each week!

Week 1 winners are @ArtiFICR#3622 , @Haseeb.xrd#0556, @Quwin#6226 , @NellySayon#0505, @erroll gnargnar#2915, @cryptocactus#8733, @Arc#7276, and @Mala#4140 on Discord! Please DM me your Radix wallet addresses and I will send prizes out soon.

If you didnā€™t get a prize this week, Fear not! We will have a ton more every single week with even more projects joining up to support our mission to be the future builders of #Scrypto and to show the world its power over Solidity.

Chapter 2 is a project chapter building the guessing_game program. The book does an excellent job walking through the development of this program. I am going to include this program with brief descriptions of what each line does. Several people have completed this chapter early, but donā€™t get used to this slower pace! Chapter 3 and beyond picks up the pace covering a lot more material. While you are reading through Chapter 2, please post any questions you come across in the #Scrypto-Class-of-2022 discord group so we can all solve them together.

Letā€™s Get Rusty video covering chapter 2 content!

Donā€™t forget to add your rand crate dependency in the .toml

A command introduced in this chapter that I find very useful is:

ā€˜cargo doc --openā€™

This will build documentation provided by all of your dependencies locally and open it in your browser. If youā€™re interested in other functionality in the rand crate, for example, run cargo doc --open and click rand in the sidebar on the left.

Study Group Schedule

June 12th - June 18th - Chapter 1

June 19th Time TBD - Live Q&A on chapter 1 content

June 19th - June 25th - Chapter 2

June 26th Time 12pm UTC - Live Q&A on chapter 1 - chapter 2 content

June 26th - July 2nd - Chapter 3

July 3rd Time 12pm UTC - Live Q&A on chapter 1 - chapter 3 content

July 3rd - July 9th - Chapter 4

July 10th Time 12pm UTC - Live Q&A on chapter 1 - chapter 4 content

July 10th - July 16th - Chapter 5

July 17th Time 12pm UTC - Live Q&A on chapter 1 - chapter 5 content

July 17th - July 23rd - Chapter 6

July 24th Time 12pm UTC - Live Q&A on chapter 1 - chapter 6 content

July 24th - July 30th - Chapter 7

July 31st Time 12pm UTC - Live Q&A on chapter 1 - chapter 7 content

July 31st - August 6th - Chapter 8

August 7th Time 12pm UTC - Live Q&A on chapter 1 - chapter 8 content

Iā€™ll be editing these posts to make them more complete as we go, so if you think of anything important to add please comment below. We can begin discussing now with any questions that you may come across. No question is too stupid so please donā€™t be shy. Its not too late to start your journey with us into Scrypto, join us here:

Radix DLT <ā€” discord server invite link

All you have to do is scroll down the chats on the left all the way to the developer section where you will see scrypto-class-of-2022

Thank you all for participating and keeping this an exciting experience while we all learn Rust and Scrypto together!

Supplmental Info

These tables for types of numbers are helpful for me since I have not memorized which is best to use just yet.

image

image

Here is the free web version of the book we are using for this course.

https://doc.rust-lang.org/book/

I am still trying to learn the ins and outs of using github, and this tutorial seems very complete.

Complete beginnerā€™s guide to using Git

Github download

Git download

https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Git clone pulls any repository in from url

Git status shows status

Git add add new files or changes to repository

Git commit -m ā€œā€ locks into repository locally, with message

Git push pushes commits up to github.com

Git pull pulls down from github.com

these only work within the directory of the github repository

Learning rust by tons of small examples

Peter Kimā€™s Scrypto Journey!

Awesome Videos

Rust Crash Course | Rustlang - Helpful crash course

Getting started with Scrypto - This material has not been covered yet but provided in case you want to experiment

Radix DeFi, Scrypto, and Smart Contract Learning Event - Live from Lisbon

15 Likes

Thank you Austin for collecting and summarizing all this information.
One small advice to everyone participating in the class: after successfully finishing the Guessing game, try to adjust it. E.g choose other numbers, change the name of the variables, change the messages or even try to introduce an option for the player to quit the game. This will help you to understand what the code is actually doing.

3 Likes

Thanks for posting this, I am not a programmer but I certainty want to look into this and try it out, will let you know how I get on!

2 Likes

Thanks for creating this. I have also started my Rust/Scrypto journey recently and will try to be more active in the discord.

3 Likes

Thanks for writing this all out!

2 Likes

I am also planning to finally join, maybe I am not too late. :wink: And hope to be easier with a little background of IT. Keep this weekly posts coming, because this will be my starting point.

3 Likes

You are definitely not too late. Chapter 1 and 2 are pretty quick to read and learn. Chapter 1 is mostly just getting your computer set up. Chapter 2 is developing a simple program that is a number guessing game and Chapter 2 reading just started today. you could literally be caught up to pace in a couple days. Chapter 3 and forward is where the content gets a little more complicated, but at this point it shouldnt be bad at all to do the first two chapters this week! Feel free to ask here, telegram @aus87 or discord in the Scrypto-class-of-2022 channel for any help you need.

4 Likes

Thanks again Austin for managing this class.
This is the best place for people to get started in Rust/Scrypto

4 Likes

Man, my code says I have 17 syntax errors. :joy: Rustc and rust analyzer are hard on me.

1 Like

Luckily the analyzer / linter is clever enough that after you save your file, you will see all your errors with a self-explanatory message. But I do agree with you, you need a little time to just get used to the syntax. :slight_smile:

1 Like

You arenā€™t the only one! As you figure out what is going wrong you will learn a lot. I had the same and found a few spaces in the wrong places among other things.

Amazingly good article! Keep up the good work :fire:

2 Likes

Great!! Thanks for creating this. I want to develop something for Radix in the future.

2 Likes

I had no idea what coding even entailed a few weeks ago. Now I have written several Rust programs to calculate a given number in the fibonacci sequence and converting temperatures between Celsius and Fahrenheit. Its been an awesome and rewarding experience learning this stuff already. If I can do this, certainly anyone can.

2 Likes