d
d copied to clipboard
exercise generator
Hi, other tracks have a code generator that reads problem specifications and creates exercise test cases reading data from a common source. Do you think it could be useful for D language track ?
@ilmanzo, if you're still interested, that would be very helpful. https://exercism.org/docs/building/configlet can sync the metadata and docs for an exercise provided it's in the track config. There's a newer configlet create --practice-exercise <exercise-slug>
that adds an exercise to the config, syncs the data, and creates empty files specified in the track config's files array. So the test generator can run that command and then replace the empty files with the generated ones.
well it was 6 years ago, but yes; the original idea was to have something similar to Go track where each exercise is generated by a program that merges data from a template with the actual D code + json test cases. My D knowledge needs a bit of refreshment but if it still makes sense with the current exercism architecture, I can start working on a proof of concept.
A quick and dirty draft:
https://gist.github.com/ilmanzo/3163cad4e2246f2553f1a90735e79e6b