exercism / gdscript

Exercism exercises in GDScript.
https://exercism.org/tracks/gdscript
MIT License
5 stars 7 forks source link

Exercises to add #28

Open BNAndras opened 8 months ago

BNAndras commented 8 months ago

@pfertyk, I think we could use a central list of exercises we intend to port in the near future. We can expand this list as needed and check off things as PRs are made.

I think as we check off these exercises, we should move them to the bottom of the list so the exercises left to port are at the top. Feel free to make any edits to this list. I've added a few that'd be easy to port. It's okay if we have more than 20 exercises by the time we launch (Pyret has 48 at the moment, Haxe 69), but I wouldn't hold up the launch just to add more exercises. We can port exercises after the launch too.

Wish list

PRed / Merged

BNAndras commented 8 months ago

I can take care of binary-search, isogram, and raindrops next week. I should poke around for some more medium-ish exercises like robot-simulator since it'd be good to have varying difficulty levels.

BNAndras commented 7 months ago

https://docs.google.com/spreadsheets/d/1X00y60Z6BqYbTMnmmuMYzMoS0eO4KKquSWq2ijXb4Qo/edit#gid=0 Here's a draft list of exercises for #48in24. These exercises will be featured for a week with a grid of what tracks implement the exercise. So that might be a good way for folks to discover GDScript. Obviously, we need to launch the track first, but it's worth keeping this list in the back of our head.

pfertyk commented 7 months ago

Great idea! I will review this list when picking next exercises to implement.

Thanks!

pfertyk commented 7 months ago

@BNAndras I was thinking of adding the binary-search exercise, but the tests (in Python track) use exceptions, which are not available in GDScript. Do you think it would be sufficient to return -1 in case an item is not found? (similar behavior to a normal search method)

BNAndras commented 7 months ago

-1 could be potentially be a valid index so I'm not sure about using it. We'd preferably want to use something that can't possibly be a valid index. For an one-indexed language, that'd be 0. For a language without negative indexing, that'd be -1. Expecting a null value to be returned in lieu of an exception being raised is probably the best you could do.

pfertyk commented 7 months ago

OK, thanks! I've added some medium level exercises to the list, choosing ones that don't require exception handling (judging by their Python test suite).

BNAndras commented 7 months ago

I wouldn’t take too much stock in exception handling seemingly being required. In grains for example, have a student return a false when the input square is less than 1 or greater than 64 since normally we’d expect an integer for valid inputs. If true/false is expected normally, instead have the students return a string representing an error message. Or just have students return the string with an error message every time we have an exception scenario.

BNAndras commented 6 months ago

I'll add circular-buffer since I've already ported it four times in the last week. 😄