< up >
2023-02-07

Finish rustlings

+----------------------------------------------------+
|          You made it to the Fe-nish line!          |
+--------------------------  ------------------------+
                          \\/
     ▒▒          ▒▒▒▒▒▒▒▒      ▒▒▒▒▒▒▒▒          ▒▒
   ▒▒▒▒  ▒▒    ▒▒        ▒▒  ▒▒        ▒▒    ▒▒  ▒▒▒▒
   ▒▒▒▒  ▒▒  ▒▒            ▒▒            ▒▒  ▒▒  ▒▒▒▒
 ░░▒▒▒▒░░▒▒  ▒▒            ▒▒            ▒▒  ▒▒░░▒▒▒▒
   ▓▓▓▓▓▓▓▓  ▓▓      ▓▓██  ▓▓  ▓▓██      ▓▓  ▓▓▓▓▓▓▓▓
     ▒▒▒▒    ▒▒      ████  ▒▒  ████      ▒▒░░  ▒▒▒▒
       ▒▒  ▒▒▒▒▒▒        ▒▒▒▒▒▒        ▒▒▒▒▒▒  ▒▒
         ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▓▓▒▒▓▓▒▒▒▒▒▒▒▒
           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
             ▒▒▒▒▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒▒▒
           ▒▒  ▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒  ▒▒
         ▒▒    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒    ▒▒
       ▒▒    ▒▒    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒    ▒▒    ▒▒
       ▒▒  ▒▒    ▒▒                  ▒▒    ▒▒  ▒▒
           ▒▒  ▒▒                      ▒▒  ▒▒

I just finished rustlings.

Some data:

Rustlings

I like the approach of rustlings in comparissons to other language learning “platforms” like exercism or aoc2. There is a binary rustlings that is executed with the watch command showing a screen with the current progress such as the compiler output of the current exercise. The output refreshes after each file change. An exercise consists of code that doesn’t compile and/or has unsatisfied tests.

Due to the refreshing output and my two window setup (see image above; rustlings watch on the left, vim on the right), the feedback loop was very tight. Every exercise was mostly implemented but lacked in some key lines that needed to be tweaked/added. This helped learning to read actual rust code and focus on the current lesson. Since rust has a bunch of sophisticated concepts, it is good to not get overwhelmed by all the other stuff around the lesson.

Rust impressions

I read in the book, used the hint commmand, guessed with trial-and-error and just applied the suggestions of the linter clippy.

Rust is tough with all rich syntax and my main thought after this is: You are the garbabe collector. Since rust gurantees memory safety but has no garbage collector, the developer needs to tell the compiler that everything is valid by e.g. borrowing variables or defining lifetimes.

Thoughts despite the ones of my first rust post:

Altough I want to do a few more rust projects to checkout the language with real use-cases, I can’t imaging using it in my current every day life. As a gopher, the lack of runtime is not worth doing the garbage collection stuff.


  1. Yes, I could’ve forked it. But after naively cloning it I always refocused on rustlings than moving to a fork. Well, even right now I’m writing this post instead of fixing it…

  2. While it is not exactly a learning platform, I like to use it as such.