Skip to content

Add Pangram Exercise#511

Merged
petertseng merged 5 commits intoexercism:masterfrom
lpalma:add-pangram
Apr 7, 2017
Merged

Add Pangram Exercise#511
petertseng merged 5 commits intoexercism:masterfrom
lpalma:add-pangram

Conversation

@lpalma
Copy link
Copy Markdown
Contributor

@lpalma lpalma commented Mar 28, 2017

I think this exercise is fairly trivial to be implemented. Plus, it is good to have more exercises between Bob and Run Length Encoding, since the first is much simpler than the latter.

@lpalma lpalma force-pushed the add-pangram branch 2 times, most recently from 085c0dc to 3cdeaea Compare April 1, 2017 14:03
Copy link
Copy Markdown
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems reasonable, since the implementation is pretty straightforward, thanks for that! I think I would ask the other maintainers of a few administrative matters (noted as line comments)

Comment thread exercises/pangram/stack.yaml Outdated
@@ -0,0 +1 @@
resolver: lts-8.6
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good time to ask now about whether there is a policy:

  • Do we want to keep the same version across the same track?
  • Or is it acceptable to let each exercise have its own version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I just read the instructions again and realised I may have misunderstood this bit:

  • stack.yaml has just one line specifying the current Stack snapshot. We use the same resolver for all the exercises.

The first part suggests we should include the current Snapshot from the link given, but the second part says we should use the same resolver for all exercises!!!11one

I'd prefer consistency within the track, so either downgrade this one to lts-8.2, or upgrade the others.

Perhaps we could fix the resolver version in a config file within xhaskell and then create a bin in xhaskell/bin that will generate the stack.yaml for a given path? Starting with stack.yaml, this could evolve to a file that would generate the full exercise structure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current Stack snapshot

Yes, I guess that is ambiguous. Perhaps "the track's current Snack snapshot" would be more accurate.

Starting with stack.yaml, this could evolve to a file that would generate the full exercise structure.

Nice idea. We could start simple with a _template directory like https://github.com/exercism/xjava/tree/master/exercises/_template or https://github.com/exercism/xkotlin/tree/master/exercises/_template

Copy link
Copy Markdown
Member

@petertseng petertseng Apr 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either downgrade this one to lts-8.2, or upgrade the others

Let's save the upgrade for its own PR that affects all exercises like #500. I think this PR for Pangram will be ready to merge with 8.2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👍

Comment thread exercises/pangram/test/Tests.hs Outdated

-- Test cases adapted from
-- `exercism/x-common/exercises/pangram/canonical-data.json`
-- on 2017-03-28.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at this point since there is a version at https://github.com/exercism/x-common/blob/master/exercises/pangram/canonical-data.json#L6 we should include it somehow, just not sure what format we want. "x-common version: 1.0.0" perhaps?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the structure I used here was explicitly made standard/convention or simply accepted by adapting from other tests (I simply followed/copied from other tests).

That said, now that we have more data to include, I'm going to propose the following:

Adapted from
Source: exercism/x-common/exercises/pangram/canonical-data.json
Version: 1.0.0
Date: 2017-03-28

Test cases seems redundant since that's what the file is about.

@petertseng petertseng merged commit 4dcca22 into exercism:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants