d icon indicating copy to clipboard operation
d copied to clipboard

First range exercise

Open maxhaton opened this issue 6 years ago • 8 comments

None of the exercises currently utilise any D more unique features or idioms, so I made one that does (ranges)

maxhaton avatar Aug 24 '19 01:08 maxhaton

Forgot to update config, will do

maxhaton avatar Aug 24 '19 01:08 maxhaton

Hi @maxhaton, thank you for your contribution.

Please let me know if I'm wrong, but all the exercises used on Exercism for all language tracks are found in the problem-specifications repository. This helps with consistency from language to language by supplying the exercise details along with valid inputs and outputs.

I don't see any for First Range, but let me know if I'm missing it. If this is an exercise you would want on Exercism, I would suggest creating a pull request into the Problem Specifications repository that could be use for all language tracks.

Thanks!

amscotti avatar Aug 24 '19 16:08 amscotti

I have absolutely no idea how exercism manages exercises, but this one is basically specific to the D programming language e.g. no other language understands ranges to the same level (C++ kind of does but no). I was assuming that it just loads the exercises straight from a git clone.

maxhaton avatar Aug 24 '19 17:08 maxhaton

A reminder that even if this exercise were to be applicable to other tracks, according to https://github.com/exercism/problem-specifications/issues/1560:

If you would like to add a new exercise to your track, please do it as a track-specific exercise for now, and we can discuss generalising it into this repository further down the line.

Therefore, this PR should proceed as a track-specific exercise.

petertseng avatar Aug 24 '19 21:08 petertseng

@petertseng Thanks for pointing that out to me, I missed that posting.

Are there details on what an "track-specific exercise" is anywhere? I never seen this before on the tracks I have worked on.

amscotti avatar Aug 25 '19 13:08 amscotti

Here are two places to look for the details.

  1. Here is the existing documentation about a track-specific exercise: https://github.com/exercism/docs/blob/master/you-can-help/make-up-new-exercises.md#custom-problem-specifications
  2. If you prefer to look at an existing example rather than read documentation, see the list of currently existing track-specific exercises, generated with https://github.com/petertseng/exercism-problem-specifications/blob/list-tracks/track-specific.rb

sml: ["bracket-push"] elm: ["bracket-push"] swift: ["bracket-push"] objective-c: ["bracket-push"] ballerina: ["hello-world-service", "greeting-service", "service-invocation", "legacy-service-client", "calculator-service", "order-management", "service-composition", "echo-service"] rust: ["luhn-from", "luhn-trait", "fizzy", "macros", "decimal", "doubly-linked-list"] r: ["fizz-buzz"] elixir: ["bracket-push"] erlang: ["bracket-push"] purescript: ["bracket-push"] pharo-smalltalk: ["die"] coq: ["tautology"]

(The inclusion of bracket-push in this list is not a mistake; since the bracket-push -> matching-brackets rename was already performed in problem-specifications, every track that still has yet to perform that rename now has bracket-push as a track-specific exercise. All other exercises in the list of course are also track-specific exercises and were never subject to a rename.)

petertseng avatar Aug 26 '19 05:08 petertseng

@petertseng thanks for the link, very helpful!

@maxhaton Base on reading the about Custom Problem Specifications this PR also needs a description.md and a metadata.yml file to be under an .meta folder of the exercise folder.

Take a look at the Implementing a Completely New Exercise page for details on the format of the files. Let me know there is anything I can help with.

amscotti avatar Aug 27 '19 01:08 amscotti

I will do that when I'm back at my computer

maxhaton avatar Aug 27 '19 12:08 maxhaton