trackler 2.0.3.5 → 2.0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/common/exercises/leap/canonical-data.json +8 -23
  3. data/lib/trackler/version.rb +1 -1
  4. data/tracks/c/exercises/meetup/makefile +1 -1
  5. data/tracks/crystal/config.json +0 -18
  6. data/tracks/dlang/config.json +13 -94
  7. data/tracks/fsharp/exercises/binary-search-tree/BinarySearchTreeTest.fs +2 -2
  8. data/tracks/haskell/README.md +118 -24
  9. data/tracks/perl5/config.json +5 -0
  10. data/tracks/perl5/exercises/all-your-base/Example.pm +32 -0
  11. data/tracks/perl5/exercises/all-your-base/all-your-base.t +184 -0
  12. data/tracks/perl6/config.json +5 -0
  13. data/tracks/perl6/exercises/trinary/Example.p6 +6 -0
  14. data/tracks/perl6/exercises/trinary/trinary.t +60 -0
  15. data/tracks/rust/exercises/allergies/.gitignore +7 -0
  16. data/tracks/rust/exercises/anagram/.gitignore +7 -0
  17. data/tracks/rust/exercises/beer-song/.gitignore +7 -0
  18. data/tracks/rust/exercises/bob/.gitignore +7 -0
  19. data/tracks/rust/exercises/bracket-push/.gitignore +7 -0
  20. data/tracks/rust/exercises/circular-buffer/.gitignore +7 -0
  21. data/tracks/rust/exercises/custom-set/.gitignore +7 -0
  22. data/tracks/rust/exercises/difference-of-squares/.gitignore +7 -0
  23. data/tracks/rust/exercises/dominoes/.gitignore +7 -0
  24. data/tracks/rust/exercises/etl/.gitignore +7 -0
  25. data/tracks/rust/exercises/forth/.gitignore +7 -0
  26. data/tracks/rust/exercises/gigasecond/.gitignore +7 -0
  27. data/tracks/rust/exercises/grade-school/.gitignore +7 -0
  28. data/tracks/rust/exercises/hamming/.gitignore +7 -0
  29. data/tracks/rust/exercises/hello-world/.gitignore +7 -0
  30. data/tracks/rust/exercises/hexadecimal/.gitignore +7 -0
  31. data/tracks/rust/exercises/leap/.gitignore +7 -0
  32. data/tracks/rust/exercises/minesweeper/.gitignore +7 -0
  33. data/tracks/rust/exercises/nucleotide-codons/.gitignore +7 -0
  34. data/tracks/rust/exercises/nucleotide-count/.gitignore +7 -0
  35. data/tracks/rust/exercises/ocr-numbers/.gitignore +7 -0
  36. data/tracks/rust/exercises/pangram/.gitignore +7 -0
  37. data/tracks/rust/exercises/parallel-letter-frequency/.gitignore +7 -0
  38. data/tracks/rust/exercises/phone-number/.gitignore +7 -0
  39. data/tracks/rust/exercises/queen-attack/.gitignore +7 -0
  40. data/tracks/rust/exercises/raindrops/.gitignore +7 -0
  41. data/tracks/rust/exercises/rectangles/.gitignore +7 -0
  42. data/tracks/rust/exercises/rna-transcription/.gitignore +7 -0
  43. data/tracks/rust/exercises/robot-name/.gitignore +7 -0
  44. data/tracks/rust/exercises/robot-simulator/.gitignore +7 -0
  45. data/tracks/rust/exercises/roman-numerals/.gitignore +7 -0
  46. data/tracks/rust/exercises/scrabble-score/.gitignore +7 -0
  47. data/tracks/rust/exercises/sieve/.gitignore +7 -0
  48. data/tracks/rust/exercises/space-age/.gitignore +7 -0
  49. data/tracks/rust/exercises/sublist/.gitignore +7 -0
  50. data/tracks/rust/exercises/tournament/.gitignore +7 -0
  51. data/tracks/rust/exercises/variable-length-quantity/.gitignore +7 -0
  52. data/tracks/rust/exercises/word-count/.gitignore +7 -0
  53. data/tracks/rust/exercises/wordy/.gitignore +7 -0
  54. metadata +45 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7246bea41baef8aa38999af188d6a25fb21c359
4
- data.tar.gz: c9b3666bcd5f4c51d3251b9fb1f97048425ed156
3
+ metadata.gz: b901d5120c25f537dcee46f542598bbb15a01356
4
+ data.tar.gz: 8466d0a7d4886cd07a4c9110398131daf7e3dcf9
5
5
  SHA512:
6
- metadata.gz: 5e45c5da080f94f7723a6f32aaabf00005108f74e1000a03436904fa1b7b8f283f3b1c66c2923a3d38ce29d41607c4d61df35986c419faafdb33f94135c5e68a
7
- data.tar.gz: 5e0c721dd96f6beb5e4e4a7e7dde487d74161ff94bb861f62dfe7928fa3fce7a3b45aef1a824c2bd5452a0bdb16295e51ec8e462f33e663802d83633f88f498c
6
+ metadata.gz: b25a7bcb55bb5636de9f61f7ad52e304fa68c9761fc5f479debfd0b58176635183714511d6d3cd0c5a515007c271ebaddf70ac6c7913bc526fdacc4d66e9073b
7
+ data.tar.gz: dda9f974754afe11ae94ec7d937c422ce3dcb5e2cfc24b16fcfc3ee4527df995802b124e0ea46a2d1ab1a491ad602d2ca4ad8ccf2b933d2aa1ea91450b6d3d1b
@@ -1,37 +1,22 @@
1
1
  {
2
2
  "cases": [
3
3
  {
4
- "description": "leap year in twentieth century",
5
- "input": 1996,
6
- "expected": true
7
- },
8
- {
9
- "description": "odd standard year in twentieth century",
10
- "input": 1997,
11
- "expected": false
12
- },
13
- {
14
- "description": "even standard year in twentieth century",
15
- "input": 1998,
4
+ "description": "year not divisible by 4: common year",
5
+ "input": 2015,
16
6
  "expected": false
17
7
  },
18
8
  {
19
- "description": "standard year in nineteenth century",
20
- "input": 1900,
21
- "expected": false
9
+ "description": "year divisible by 4, not divisible by 100: leap year",
10
+ "input": 2016,
11
+ "expected": true
22
12
  },
23
13
  {
24
- "description": "standard year in eighteenth century",
25
- "input": 1800,
14
+ "description": "year divisible by 100, not divisible by 400: common year",
15
+ "input": 2100,
26
16
  "expected": false
27
17
  },
28
18
  {
29
- "description": "leap year twenty four hundred",
30
- "input": 2400,
31
- "expected": true
32
- },
33
- {
34
- "description": "leap year two thousand",
19
+ "description": "year divisible by 400: leap year",
35
20
  "input": 2000,
36
21
  "expected": true
37
22
  }
@@ -1,3 +1,3 @@
1
1
  module Trackler
2
- VERSION = "2.0.3.5"
2
+ VERSION = "2.0.3.6"
3
3
  end
@@ -10,6 +10,6 @@ test: tests.out
10
10
  clean:
11
11
  rm -f *.o *.out
12
12
 
13
- tests.out: test/test_meetup.c src/meetup.c src/meetup.h src/example.c
13
+ tests.out: test/test_meetup.c src/meetup.c src/meetup.h
14
14
  @echo Compiling $@
15
15
  @cc $(CFLAGS) src/meetup.c test/vendor/unity.c test/test_meetup.c -o tests.out
@@ -4,24 +4,6 @@
4
4
  "repository": "https://github.com/exercism/xcrystal",
5
5
  "active": true,
6
6
  "test_pattern": "_spec.cr",
7
- "problems": [
8
- "hello-world",
9
- "hamming",
10
- "gigasecond",
11
- "rna-transcription",
12
- "bob",
13
- "raindrops",
14
- "leap",
15
- "pangram",
16
- "largest-series-product",
17
- "bracket-push",
18
- "sieve",
19
- "roman-numerals",
20
- "atbash-cipher",
21
- "anagram",
22
- "react",
23
- "acronym"
24
- ],
25
7
  "exercises": [
26
8
  {
27
9
  "slug": "hello-world" ,
@@ -35,89 +35,7 @@
35
35
  },
36
36
  {
37
37
  "slug": "rna-transcription" ,
38
- "difficulty": 1,
39
- "topics": []
40
- },
41
- {
42
- "slug": "raindrops" ,
43
- "difficulty": 1,
44
- "topics": []
45
- },
46
- {
47
- "slug": "bob" ,
48
- "difficulty": 1,
49
- "topics": []
50
- },
51
- {
52
- "slug": "etl" ,
53
- "difficulty": 1,
54
- "topics": []
55
- },
56
- {
57
- "slug": "hamming" ,
58
- "difficulty": 1,
59
- "topics": []
60
- },
61
- {
62
- "slug": "nucleotide-count" ,
63
- "difficulty": 1,
64
- "topics": []
65
- },
66
- {
67
- "slug": "robot-name" ,
68
- "difficulty": 1,
69
- "topics": []
70
- },
71
- {
72
- "slug": "difference-of-squares" ,
73
- "difficulty": 1,
74
- "topics": []
75
- },
76
- {
77
- "slug": "roman-numerals" ,
78
- "difficulty": 1,
79
- "topics": []
80
- },
81
- {
82
- "slug": "series" ,
83
- "difficulty": 1,
84
- "topics": []
85
- },
86
- {
87
- "slug": "triangle" ,
88
- "difficulty": 1,
89
- "topics": []
90
- },
91
- {
92
- "slug": "crypto-square" ,
93
- "difficulty": 1,
94
- "topics": []
95
- },
96
- {
97
- "slug": "circular-buffer" ,
98
- "difficulty": 1,
99
- "topics": []
100
- },
101
- {
102
- "slug": "pangram",
103
- "difficulty": 1,
104
- "topics": []
105
- }
106
- ],
107
- "exercises": [
108
- {
109
- "slug": "hello-world" ,
110
- "difficulty": 1,
111
- "topics": []
112
- },
113
- {
114
- "slug": "gigasecond" ,
115
- "difficulty": 1,
116
- "topics": []
117
- },
118
- {
119
- "slug": "rna-transcription" ,
120
- "difficulty": 1,
38
+ "difficulty": 2,
121
39
  "topics": []
122
40
  },
123
41
  {
@@ -127,57 +45,57 @@
127
45
  },
128
46
  {
129
47
  "slug": "bob" ,
130
- "difficulty": 1,
48
+ "difficulty": 2,
131
49
  "topics": []
132
50
  },
133
51
  {
134
52
  "slug": "etl" ,
135
- "difficulty": 1,
53
+ "difficulty": 2,
136
54
  "topics": []
137
55
  },
138
56
  {
139
57
  "slug": "hamming" ,
140
- "difficulty": 1,
58
+ "difficulty": 2,
141
59
  "topics": []
142
60
  },
143
61
  {
144
62
  "slug": "nucleotide-count" ,
145
- "difficulty": 1,
63
+ "difficulty": 3,
146
64
  "topics": []
147
65
  },
148
66
  {
149
67
  "slug": "robot-name" ,
150
- "difficulty": 1,
68
+ "difficulty": 3,
151
69
  "topics": []
152
70
  },
153
71
  {
154
72
  "slug": "difference-of-squares" ,
155
- "difficulty": 1,
73
+ "difficulty": 2,
156
74
  "topics": []
157
75
  },
158
76
  {
159
77
  "slug": "roman-numerals" ,
160
- "difficulty": 1,
78
+ "difficulty": 3,
161
79
  "topics": []
162
80
  },
163
81
  {
164
82
  "slug": "series" ,
165
- "difficulty": 1,
83
+ "difficulty": 3,
166
84
  "topics": []
167
85
  },
168
86
  {
169
87
  "slug": "triangle" ,
170
- "difficulty": 1,
88
+ "difficulty": 2,
171
89
  "topics": []
172
90
  },
173
91
  {
174
92
  "slug": "crypto-square" ,
175
- "difficulty": 1,
93
+ "difficulty": 3,
176
94
  "topics": []
177
95
  },
178
96
  {
179
97
  "slug": "circular-buffer" ,
180
- "difficulty": 1,
98
+ "difficulty": 4,
181
99
  "topics": []
182
100
  },
183
101
  {
@@ -196,3 +114,4 @@
196
114
 
197
115
  ]
198
116
  }
117
+
@@ -24,14 +24,14 @@ let ``Inserting same`` () =
24
24
 
25
25
  [<Test>]
26
26
  [<Ignore("Remove to run test")>]
27
- let ``Inserting greater()`` =
27
+ let ``Inserting greater`` () =
28
28
  let tree = singleton 4 |> insert 5
29
29
  Assert.That(tree |> value, Is.EqualTo(4))
30
30
  Assert.That(tree |> right |> Option.map value, Is.EqualTo(Some 5))
31
31
 
32
32
  [<Test>]
33
33
  [<Ignore("Remove to run test")>]
34
- let ``Complex tree()`` =
34
+ let ``Complex tree`` () =
35
35
  let tree = fromList [4; 2; 6; 1; 3; 7; 5]
36
36
  Assert.That(tree |> value, Is.EqualTo(4))
37
37
  Assert.That(tree |> left |> Option.map value, Is.EqualTo(2))
@@ -6,38 +6,133 @@ Exercism exercises in Haskell
6
6
 
7
7
  ## Contributing Guide
8
8
 
9
- Please see the [contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md)
10
-
11
- ### Development Dependencies
12
-
13
- You should have [Stack](http://docs.haskellstack.org/) installed in your
14
- system to make contributing to this repository easier.
15
-
16
- ### Exercises
17
-
18
- All exercises have the following structure:
9
+ - [Asking for help](#asking-for-help)
10
+ - [How to contribute](#how-to-contribute)
11
+ * [Reporting or fixing bugs](#reporting-or-fixing-bugs)
12
+ * [Reviewing issues and pull requests](#reviewing-issues-and-pull)
13
+ * [Porting exercises](#porting-exercises)
14
+ * [Updating an exercise test suite](#updating-an-exercise-test-suite)
15
+ - [Repository structure and conventions](#repository-structure-and-conventions)
16
+ * [Directory structure](#directory-structure)
17
+ * [Exercise structure](#exercise-structure)
18
+ - [Writing an issue](#writing-an-issue)
19
+ - [Writing a pull request](#writing-a-pull-request)
20
+ - [Development Dependencies](#development-dependencies)
21
+ - [Stub solution](#stub-solution)
22
+ - [Example solution](#example-solution)
23
+ - [Test suite](#test-suite)
24
+ - [Running tests](#running-tests)
25
+ - [Running HLint](#running-hlint)
26
+
27
+ ### Asking for help
28
+ When in doubt just ask!
29
+ - [gitter support](https://gitter.im/exercism/support): more specific/technical questions.
30
+ - [gitter dev](https://gitter.im/exercism/dev): technical questions.
31
+
32
+ In any case, don't be afraid or shy! We promise to be friendly and as helpful as
33
+ possible.
34
+
35
+ ### How to contribute
36
+ As a first step we recommend you read the [contributing guide](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md).
37
+
38
+ #### Reporting or fixing bugs
39
+ Typical examples for a bug: A typo, a missing test case, an unclear or ambiguous
40
+ problem description.
41
+ - If you are unsure whether you have really found a bug [just ask](#asking-for-help).
42
+ - To report a bug you can [write an issue](#writing-an-issue).
43
+ - If you already have a fix for it you may [write a pull request](#writing-a-pull-request).
44
+
45
+ #### Reviewing issues and pull requests
46
+ If you have a dedicated opinion you are welcome to [write a comment](https://help.github.com/articles/commenting-on-a-pull-request/) for an [issue](https://github.com/exercism/xhaskell/issue) or a [pull request](https://github.com/exercism/xhaskell/pull).
47
+ Please be detailed and include reasons, links or arguments to support your opinion.
48
+
49
+ #### Porting exercises
50
+ Here is the [list of missing exercises](http://exercism.io/languages/haskell/todo). See here for more information about [porting an exercise](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#porting-an-exercise-to-another-language-track).
51
+ Of course you can also add a totally new exercise, but it might be a good idea to first discuss it in one of [our forums](#asking-for-help).
52
+
53
+ #### Updating an exercise test suite
54
+ Updating a test suite of an existing exercise is special because it usually affects all languages. Read more about it [here](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#updating-an-exercise-test-suite).
55
+ Note that the whole test suite must run with the sample solution within a couple of seconds.
56
+
57
+ ### Repository structure and conventions
58
+ [Here](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#track-anatomy) is a general description of all the files and directories that are not explicitly described below.
59
+
60
+ #### Directory structure
61
+ ```bash
62
+ ├── .gitignore
63
+ ├── .travis.yml
64
+ ├── LICENSE
65
+ ├── README.md
66
+ ├── SETUP.md
67
+ ├── bin
68
+ │ └── fetch‐configlet
69
+ ├── config.json
70
+ ├── docs
71
+ │ ├── ABOUT.md
72
+ │ ├── INSTALLATION.md
73
+ │ ├── LEARNING.md
74
+ │ ├── RESOURCES.md
75
+ │ └── TESTS.md
76
+ └── exercises
77
+ └── accumulate
78
+ │ ├── HINTS.md
79
+ │ ├── package.yaml
80
+ │ ├── stack.yaml
81
+ │ ├── examples
82
+ │ │ └── success-standard
83
+ │ │ ├── package.yaml
84
+ │ │ └── src
85
+ │ │ └── Accumuĺate.hs
86
+ │ ├── src
87
+ │ │ └── Accumuĺate.hs
88
+ │ └── test
89
+ │ └── Tests.hs
90
+ └── allergies
91
+ │ ├── ...
92
+ └── ...
93
+ ```
94
+ - `config.json`: Every exercise has to be registered here. It has a unique name and a difficulty. The sequence order is also the default order in which the exercises are fetched.
19
95
 
96
+ ### Exercise structure
97
+ Each exercise has the following structure:
20
98
  - `stack.yaml` has just one line specifying the current
21
99
  [Stack snapshot](https://www.stackage.org/snapshots). We use the same
22
100
  resolver for all the exercises.
23
101
  - `package.yaml` is a file in the [hpack](https://github.com/sol/hpack#readme)
24
102
  format that has all dependencies and build instructions for an exercise.
25
- - `src/ModuleName.hs` is a *stub solution*.
26
- - `src/examples/success-foo/package.yaml` has dependencies for the example solution named `foo`.
27
- - `src/examples/success-foo/src/ModuleName.hs` is the source code of the sample solution.
28
- - `test/Tests.hs` is the test suite.
29
- - `HINTS.md` is an optional file containing instructions and/or hints.
103
+ - `HINTS.md` is an optional file containing instructions and/or hints. It is used together with the respective `description.md` for the exercise from [x-common](https://github.com/exercism/x-common) to build the `README.md` file.
104
+ - `src/ModuleName.hs` is a [stub solution](#stub-solution).
105
+ - `examples/success-<name>/package.yaml` contains library dependencies for the [example solution](#example-solution). `<name>` is a unique name for the example - usually "standard" (as in `success-standard`), but it can be some other name in case of multiple example solutions.
106
+ - `examples/success-<name>/src/ModuleName.hs` is the source code of the sample solution.
107
+ - `test/Tests.hs` is the [test suite](#test-suite).
30
108
 
31
- ### Running Tests
109
+ ### Writing an issue
110
+ To report a bug you should [create an issue](https://help.github.com/articles/creating-an-issue/) [here](https://github.com/exercism/xhaskell/issue).
32
111
 
33
- In order to be accepted by Travis-CI, every exercise must compile without
34
- warnings and the example solution must pass the tests without failures.
112
+ ### Writing a pull request
113
+ To fix a bug you should [create a pull request from a fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) [here](https://github.com/exercism/xhaskell/pull). See also [here](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#git-basics) for more information.
35
114
 
36
- To test an exercise, first you need to rename the file `src/Example.hs`
37
- to match the module name, but - because we already have a *stub solution*
38
- in place - we have to move it first, otherwise it will be overwritten.
115
+ ### Development Dependencies
116
+ You should have [Stack](http://docs.haskellstack.org/) installed in your system to make contributing to this repository easier.
117
+
118
+ ### Stub solution
119
+ The stub solution must compile together with the test suite. It should be as general as possible in order to not exclude any possible solutions. It should take Haskell specifics into account (for example use `Maybe` instead of a dummy return value). It should not contain any comments (people might forget to remove them), you can use the hints file instead.
120
+
121
+ ### Example solution
122
+ The example solution could be inspiration for other language implementors. It doesn't need to be perfect or very elegant. But it should be efficient enough for the test suite to finish in only a few seconds.
123
+
124
+ ### Test suite
125
+ The test suite should be derived from the respective `x-common/exercises/<exercise-name>/canonical-data.json` and comply to some formatting and coding standards (to get an idea you may look at some of the existing tests).
39
126
 
40
- Running `stack test --pedantic` compiles and run the tests with
127
+ ### Running Tests
128
+ In order to be accepted by Travis-CI, every exercise must be registered in
129
+ `config.json`, it must compile without warnings and the example solution must
130
+ pass the tests without failures. Additionally the tests should not run longer than
131
+ a few seconds.
132
+
133
+ First you need to provide an [example solution](#example-solution).
134
+
135
+ Running `stack test --pedantic` compiles and runs the tests with
41
136
  `-Wall -Werror`, but unfortunately it doesn't recompile unchanged
42
137
  source code already compiled with warnings.
43
138
 
@@ -50,13 +145,12 @@ stack test --pedantic
50
145
  ```
51
146
 
52
147
  ### Running HLint
53
-
54
148
  All code in this repository should be as idiomatic as possible, so we
55
149
  enforce in Travis-CI that it returns `No hints` when processed by
56
150
  HLint.
57
151
 
58
152
  It is highly recommended to run `hlint` on your sources before opening
59
- a *pull request*, so you can fix your code before submitting it for review.
153
+ a [pull request](#writing-a-pull-request), so you can fix your code before submitting it for review.
60
154
 
61
155
  If you are certain that a suggestion given by `hlint` would make the
62
156
  code worse, you can [suppress it](https://github.com/ndmitchell/hlint#customizing-the-hints)