exercism/rust

Structs concept has "String" as a pre-requisite, but "String" is unavailable

Closed this issue ยท 14 comments

I'm going through the Rust syllabus on exercism. I've successfully completed several, but now am stuck because the next logical concept to approach is structs which requires string, which I can't find anywhere. See screenshot.

image

I'm happy to provide more details upon request. Apologies if I've missed something obvious. Thanks.

This is a known issue; it (and other similar missing concept exercises) are why CI has been failing since v3 went public. example.

Anyone is welcome to open a PR adding a string concept exercise.

Does it make sense to remove the string concept as a dependency until one exists?

I don't think so. The dependency graph typically reflects the prerequisite concepts for a particular concept exercise, not the prerequisite concepts for the concept in general. If we start deleting prerequisites waiting for implementation, we're likely never to restore all of them.

@coriolinus I'm happy to take a try at creating that exercise as I'm currently going through the syllabus too. I'm going to look through any contributing guidelines and readmes but anything I should keep in mind off the top of my head? Any specific points I should note for Rust strings (I'm new to Rust).

I did notice that the link to the docs on adding a new exercise returns a 404. Do you know where those docs now reside? Otherwise I think I can work things out from the rest of the docs and the existing exercises.

@SgiobairOg I was also looking to make an exercise (for the String concept) and I had the same trouble as you. I updated the README.md with the correct links (to the best of my knowledge). I made a pull request and the README will be updated if it gets accepted and merged. I'll let the String exercise be if you're planning to do it.

The most critical factor for a good concept exercise is that it is very tightly focused. The ideal is that a developer experienced in the language, who knows the concept already, won't have to spend more than 5 minutes on the exercise.

For strings, I'd focus on the following learning points:

  • Create a string with dynamic data with the format! macro
  • Append something to a string
  • Iterate over the characters of a string. Maybe count thumbs-up vs thumbs-down emojis or something?
  • (optional) something requiring use of the char_indices method.

It would also be good to test creating a string with String::from or to_string(), but I think of that as a bonus objective from your perspective, because it's hard to write even a trivial test case which demands only that skill.

Once you have the test cases written, you're going to need to write up some sort of story for the concept. It doesn't have to be fancy; mostly coherent is satisfactory.

I'll look forward to the PR!

@coriolinus Seeing how three other identical issues were opened in the last 7 days, I would recommend changing the status of those concept exercises that cannot be yet unlocked from "active" to "wip". This will hide them from users for now.

No, I don't like the idea of messing with unrelated exercises' statuses to hide the fact that we don't yet teach strings. I'd rather see a String concept exercise built.

iHiD commented

Fixed this via #1378

I am still planning on starting an exercise for this and have an idea for it, have just had a rough couple of weeks

iHiD commented

@SgiobairOg Sure! The track shouldn't be failing configlet in the interim, so that needs fixing for now though, which is what the PR does. Then we can hopefully revert the changes soon ๐Ÿ™‚

@coriolinus Seeing how three other identical issues were opened in the last 7 days, I would recommend changing the status of those concept exercises that cannot be yet unlocked from "active" to "wip". This will hide them from users for now.

Make that 4 issues. I opened one this morning and was directed to subscribe to this issue.

iHiD commented

This should be fixed now.