Create new track for GDScript

Will do… OK if I make an exception for “expert,” which comes alphabetically before “trio,” though?

Or we can keep them alphabetical and just make them prereqs of each other? (I was mistaken: I originally wrote that apparently JS and Haskell do that, but that’s false. Just the description implies it in the JS track.)

I’m not a maintainer, so no opinion. However, if you want to use auto-sorting, exceptions are tricky to manage.

1 Like

You can’t make a practice exercise a prerequisite for another. See Practice Exercises | Exercism's Docs. Resistor Color, Resistor Color Duo, and Resistor Color Trio will line up fine if you sort the config alphabetically by exercise name. If you first sort by difficulty and then exercise name, you’d need to assign the same difficulty. 1 - 3 is displayed on the site as easy, 4 - 6 medium, and 7 - 10 hard, so on my tracks, I focus on that instead of individual levels.

Resistor Color Expert as you noted is an issue that you’d need to handle manually. It’s not a problem-specs exercise so I haven’t had to deal with it. An option might be changing the exercise name so it falls immediately after Trio. Resistor Color Quad or Resistor Color Quartet makes some sense since you’re dealing with four bands and it continues the Duo/Trio naming pattern.

1 Like

Q comes before T though :stuck_out_tongue:

  • Resistor Color ,
  • Resistor Color Duo
  • Resistor Color Trio
  • Resistor Color Wizard

Alternatively:

  • Resistor Color Virtuoso
2 Likes

JS sorts by difficulty, then by name, so this isn’t an issue for us.

2 Likes

Apparently, I’ve been singing my A B Cs incorrectly all these years.

2 Likes

How about “Ultimate”? (Then it’s still more about the exercise rather than the student, in line with the others…)

I see Python has Expert too — I guess they sort manually. :person_shrugging:

Yup. The Python track gets a ton of love and care and is very carefully manually configured.

If you were willing to “spend” a difficulty level, you could have resistor-color-expert at a difficulty one above the others, and adjust the difficulty of unrelated exercises so none appear between.

1 Like

We can sort it automatically just this once, make our exception, and then manually insert alphabetically after this, I guess.

Or go with Ultimate, Virtuoso, or Wizard. Any opinions?

It’s true, but I’m not sure this last one is really medium-level difficulty (in any language).

So we’re talking about multiple bash scripts — the ones Jeremy made plus my student-specific one. I guess multiple would need to be rewritten in PowerShell: my test-local-gdscript-solution.sh depends on run.sh; if we support docker for students as well, run-in-docker.sh will also need a PowerShell version (and we’d need a corresponding option in test-local-gdscript-solution.sh or separate test-local-gdscript-solution-in-docker.sh for students to run that would then call run-in-docker.sh).

Mine could be merged into run-tests.sh since it does duplicate a bit of the logic; on the other hand, it’s much more specific to the student testing context, so I’m OK with this slight duplication. @IsaacG , do you have any thoughts on that bash-specific aspect? Would it make sense for run-tests.sh to become run-test.sh (defaulting to the student’s current exercise if given no arguments, and behaving like the current run-tests.sh if given the argument --all)?

And can you @IsaacG and @Meatball both confirm whether Docker support is important? I can see that our audience is unlikely to have it installed, in which case we need only support it for track maintainers/contributors, and just have bash and PS versions of run.sh and test-local-gdscript-solution.sh (unless it’s merged into run-tests.sh.)

If you can run the exercises on native Windows you only need the bash versions for docker (and don’t have to make docker user-friendly).

run-tests.sh is a script for testing the test runner itself against the tests located in the tests folder in the test runner repo. So you don’t have to have a run-all option or a run-tests script at all for students. You only have to have a script to run the tests for a specific exercise available to the student.

1 Like

Code duplication is bad. Put common code into functions in a common file. Source the common file and reuse functions :slight_smile:

Does it benefit the student/track to implement multiple versions of the exercise if the difficulties are the same? More isn’t always better; exercises should be exploring something new (concept, difficultly). Otherwise, it might be worth asking if it makes sense to drop one.

1 Like

Yeah, a variety of topics and difficulties is what the docs suggest so there’s likely something for everybody at launch. You can always fill in the other exercises later as desired. Not all exercises will make sense for all tracks. Several historically haven’t implemented reverse-string since their language’s standard library allows you to easily reverse a string.

1 Like

I’m not sure which way you are implying, @BNAndras . Cut or keep?

If there are no other opinions, can I go with Ultimate and make the changes already? Or if @IsaacG and @BNAndras are both wanting to cut this, does this mean it will be cut from Python as well? And is @Meatball OK with this cut? Who actually gets to decide? I really just came here with a simple question about exercise order, on this front ;)

Not sure what you mean. We still need a local/student/single-exercise test runner for Windows, in two versions (docker vs. not), right?

Edit: Sorry, I’d totally misread you @Meatball . I see what you mean now. @IsaacG , my request didn’t make sense — the logic duplication isn’t even slight, it’s not there at all (between run-tests.sh and my student addition.)

About the jq dependency (for students not running Docker), I see now that the JSON requirement comes from exercism itself. But, handily, GDScript has JSON support built-in. So if we really want, we can ditch jq in favor of a GDScript script. Do you both agree?

And do you both agree that I PR Add script for students' local Linux testing · exercism/gdscript-test-runner@6108272 · GitHub since there isn’t any duplication? Yes, it uses jq, but having this would at least provide a baseline to manually test before swapping out jq for something else (if that’s what we land on).

I wasn’t advocating for either. The exercises in question are already added, and we can only mark existing exercises as deprecated. Deprecation means the exercises remain in the system but are only available for students who started the exercise before that point…

You can freely change Resistor Color Expert’s name, but don’t change the UUID. You might be able to also change the slug to match the new name, but I haven’t done that before.

If there are no other opinions, can I go with Ultimate and make the changes already? Or if @IsaacG and @BNAndras are both wanting to cut this, does this mean it will be cut from Python as well? And is @Meatball OK with this cut? Who actually gets to decide? I really just came here with a simple question about exercise order, on this front ;)

I am biased in this question, mostly because I co-wrote that exercise (original version is on the Python track). Personally, if the exercise hasn’t changed in any meaningful way, I would prefer that the name stays the same. But also if the exercise is ever attended to be expanded to problem spec it would make it more difficult if various tracks have used different namings.

About the jq dependency (for students not running Docker), I see now that the JSON requirement comes from exercism itself. But, handily, GDScript has JSON support built-in. So if we really want, we can ditch jq in favor of a GDScript script. Do you both agree?

Yeah if Json could be handeld through Gdscript would that be preferable. Alternativly Powershell can do JSON parsing, so an option if that doesn’t work would be to use: bash with jq and Powershell. And there is jq for Windows as well.

And do you both agree that I PR Add script for students’ local Linux testing · exercism/gdscript-test-runner@6108272 · GitHub since there isn’t any duplication? Yes, it uses jq, but having this would at least provide a baseline to manually test before swapping out jq for something else (if that’s what we land on).

Looks good