Rust in Exercism


#1

Hello all!

I’ve been working on adding a bunch of new exercises to the Rust track in http://exercism.io. So if you have experimented with Exercism, or are just looking for new ways to practice your Rust skills, you now have some new problems to work on:

We’re also interested in getting more opinions on aspects of the Rust track in Exercism. Most importantly, we want to review the default order of our problems. Our goal here is to make sure the problems introduce Rust in an order that is easy for newcomers to the language.

And if there are other coding exercises that you think would be good to have in the Rust track, let us know!


Can we have an interactive way of learning Rust?
#2

Im trying to learn rust, started using exercism.io yesterday.
Its been very nice ATM, forces me to look more into the API docs.

Only been using javascript/typescript before, but Rust have been so far :slight_smile:
Love how easy it it to get up and running on my windows PC

Will a mentor check every exercise and comment ?


#3

I love exercism. The new version, however, requires that solutions be “mentored” before moving on. I’d like this thread to serve as a call for experienced devs to consider being mentors on exercism for the rust track as there is currently a backlog, taking several days to get a solution approved. Perhaps @IanWhitney can tell us how one becomes a mentor at exercism.


#4

I have watched, but not been involved with, the v2 exercism release, so I don’t have much to say about how the implemented the mentoring process.

http://mentoring.exercism.io is the place to go to learn more, from what I can see.


#5

Seems like there’s an independent mode that allows you to do exercises in arbitrary order (they are all unlocked).


#6

This is true, but going that route means mentors will not be notified to glance at your code. You also will not get “credit” for finishing the track, if that matters to you. I have found that submitting an exercise unlocks ancillary exercises (i.e., those not in the main track), which can be worked on and submitted while awaiting mentor acceptance of the main track solution.


#7

I can confirm we get feedback from mentors.
This makes it so much more fun and motivating.

And you learn a lot more when people point out parts that could get better :+1:

Hope more experienced Rust developers join and help out.


#8

Here is a proposition for a coding exercise:

struct Foo {
   value: i32 // can be < 0 in some test cases 
}

fn find_all_foos_for_given_value(foos: &[Foo], target_value: i32) -> &[Foo] {
    // Find all the permutations of Foo so that the sum of their value equals target_value
    // Note that you need to find ALL the permutations: [Foo1, Foo2] != [Foo2, Foo1]
}

PS: it’s based on a problem I’m having right now so I’d be glad to have the solution ahah :smiley:


#9

Actually, usize cannot ever be < 0. You will need to use a signed integer for the field type if you need values that can be < 0.

You should use the term permutations instead of combinations. In permutations the order of elements matters, in combinations it does not.

For proposing new problems in a language track you should probably make a pull request on the github repo for that track, though I think the recent relaunch of exercism uses a central repository of problems, so you might want to go through the gitter channel to figure out the best way to propose this.


#10

Thanks, corrected :slight_smile:


#11

The u in u32 stands for unsigned, that means you cannot use a negative sign with those values. You want a signed integer, so i32.
See:
https://play.rust-lang.org/?gist=86cc8c8825d121f994be3fb0a911a604&version=stable&mode=debug&edition=2015


#12

Definitely not my day, I saw the error but your were quicker than me :slight_smile: Thank you