trackler 2.1.0.33 → 2.1.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/bash/config.json +39 -20
- data/tracks/bash/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/bash/exercises/difference-of-squares/difference_of_squares_test.sh +71 -0
- data/tracks/bash/exercises/difference-of-squares/example.sh +25 -0
- data/tracks/clojurescript/config.json +0 -5
- data/tracks/clojurescript/{exercises/TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/coffeescript/config.json +63 -26
- data/tracks/coffeescript/{SETUP.md → docs/EXERCISE_README_INSERT.md} +4 -2
- data/tracks/coffeescript/exercises/luhn/luhn_test.spec.coffee +2 -2
- data/tracks/coffeescript/exercises/palindrome-products/palindrome_products_test.spec.coffee +1 -1
- data/tracks/crystal/config.json +27 -10
- data/tracks/dlang/config.json +2 -3
- data/tracks/dlang/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/haxe/config.json +7 -2
- data/tracks/haxe/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/java/{exercises/_template → _template}/build.gradle +0 -0
- data/tracks/java/{exercises/_template → _template}/src/example/java/.keep +0 -0
- data/tracks/java/{exercises/_template → _template}/src/main/java/.keep +0 -0
- data/tracks/java/{exercises/_template → _template}/src/test/java/.keep +0 -0
- data/tracks/java/config.json +201 -77
- data/tracks/julia/config.json +1 -7
- data/tracks/kotlin/{exercises/_template → _template}/build.gradle +0 -0
- data/tracks/kotlin/{exercises/_template → _template}/src/example/kotlin/.keep +0 -0
- data/tracks/kotlin/{exercises/_template → _template}/src/main/kotlin/.keep +0 -0
- data/tracks/kotlin/{exercises/_template → _template}/src/test/kotlin/.keep +0 -0
- data/tracks/mips/config.json +42 -14
- data/tracks/mips/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/nasm/config.json +1 -0
- data/tracks/nasm/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/nasm/exercises/.keep +0 -2
- data/tracks/nim/config.json +6 -0
- data/tracks/nim/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/nim/exercises/raindrops/example.nim +18 -0
- data/tracks/nim/exercises/raindrops/raindrops_test.nim +51 -0
- data/tracks/ocaml/config.json +97 -30
- data/tracks/perl5/config.json +186 -66
- data/tracks/perl5/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/perl6/bin/README.md +16 -6
- data/tracks/perl6/bin/exercise-gen.pl6 +21 -6
- data/tracks/perl6/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/perl6/exercises/accumulate/example.yaml +10 -0
- data/tracks/perl6/exercises/all-your-base/all-your-base.t +1 -0
- data/tracks/perl6/exercises/all-your-base/example.yaml +49 -0
- data/tracks/perl6/exercises/allergies/Allergies.pm6 +1 -1
- data/tracks/perl6/exercises/allergies/example.yaml +21 -0
- data/tracks/perl6/exercises/anagram/example.yaml +19 -0
- data/tracks/perl6/exercises/atbash-cipher/AtbashCipher.pm6 +1 -1
- data/tracks/perl6/exercises/atbash-cipher/example.yaml +15 -0
- data/tracks/perl6/exercises/bob/Example.pm6 +4 -0
- data/tracks/perl6/exercises/bob/example.yaml +24 -0
- data/tracks/perl6/exercises/clock/clock.t +1 -0
- data/tracks/perl6/exercises/clock/example.yaml +17 -0
- data/tracks/perl6/exercises/flatten-array/example.yaml +17 -0
- data/tracks/perl6/exercises/grade-school/example.yaml +22 -0
- data/tracks/perl6/exercises/grains/example.yaml +13 -0
- data/tracks/perl6/exercises/hello-world/Example.pm6 +9 -0
- data/tracks/perl6/exercises/hello-world/example.yaml +21 -0
- data/tracks/perl6/exercises/leap/Example.pm6 +1 -1
- data/tracks/perl6/exercises/leap/Leap.pm6 +1 -1
- data/tracks/perl6/exercises/leap/example.yaml +15 -0
- data/tracks/perl6/exercises/linked-list/LinkedList.pm6 +1 -1
- data/tracks/perl6/exercises/linked-list/example.yaml +51 -0
- data/tracks/perl6/exercises/linked-list/linked-list.t +0 -1
- data/tracks/perl6/exercises/luhn/example.yaml +19 -0
- data/tracks/perl6/exercises/phone-number/{PhoneNumber.pm6 → Phone.pm6} +0 -0
- data/tracks/perl6/exercises/phone-number/example.yaml +10 -0
- data/tracks/perl6/exercises/raindrops/example.yaml +15 -0
- data/tracks/perl6/exercises/rna-transcription/example.yaml +10 -0
- data/tracks/perl6/exercises/robot-name/example.yaml +24 -0
- data/tracks/perl6/exercises/robot-name/robot-name.t +4 -0
- data/tracks/perl6/exercises/scrabble-score/example.yaml +21 -0
- data/tracks/perl6/exercises/space-age/example.yaml +52 -0
- data/tracks/perl6/exercises/word-count/example.yaml +9 -0
- data/tracks/perl6/exercises/wordy/example.yaml +20 -0
- data/tracks/perl6/templates/module.mustache +4 -0
- data/tracks/perl6/templates/test.mustache +2 -1
- data/tracks/plsql/config.json +30 -10
- data/tracks/plsql/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/pony/config.json +0 -6
- data/tracks/pony/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/powershell/config.json +6 -2
- data/tracks/powershell/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/python/config.json +101 -39
- data/tracks/r/config.json +0 -4
- data/tracks/ruby/config.json +84 -6
- data/tracks/ruby/{exercises/TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/tcl/config.json +1 -0
- data/tracks/tcl/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/tcl/exercises/.keep +0 -2
- data/tracks/teco/config.json +0 -4
- data/tracks/teco/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/vbnet/config.json +1 -0
- data/tracks/vbnet/{SETUP.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/vimscript/config.json +64 -19
- data/tracks/vimscript/{TRACK_HINTS.md → docs/EXERCISE_README_INSERT.md} +0 -0
- data/tracks/vimscript/exercises/beer-song/beer_song.vader +50 -0
- data/tracks/vimscript/exercises/beer-song/beer_song.vim +24 -0
- data/tracks/vimscript/exercises/beer-song/example.vim +21 -0
- metadata +37 -29
data/tracks/julia/config.json
CHANGED
@@ -109,7 +109,7 @@
|
|
109
109
|
"control-flow (conditionals)"
|
110
110
|
]
|
111
111
|
},
|
112
|
-
|
112
|
+
{
|
113
113
|
"slug": "atbash-cipher",
|
114
114
|
"difficulty": 1,
|
115
115
|
"topics": [
|
@@ -240,12 +240,6 @@
|
|
240
240
|
],
|
241
241
|
"deprecated": [
|
242
242
|
|
243
|
-
],
|
244
|
-
"ignored": [
|
245
|
-
"bin",
|
246
|
-
"img",
|
247
|
-
"docs",
|
248
|
-
"juliamnt"
|
249
243
|
],
|
250
244
|
"foregone": [
|
251
245
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tracks/mips/config.json
CHANGED
@@ -18,72 +18,100 @@
|
|
18
18
|
{
|
19
19
|
"difficulty": 1,
|
20
20
|
"slug": "binary",
|
21
|
-
"topics": [
|
21
|
+
"topics": [
|
22
|
+
|
23
|
+
]
|
22
24
|
},
|
23
25
|
{
|
24
26
|
"difficulty": 1,
|
25
27
|
"slug": "octal",
|
26
|
-
"topics": [
|
28
|
+
"topics": [
|
29
|
+
|
30
|
+
]
|
27
31
|
},
|
28
32
|
{
|
29
33
|
"difficulty": 1,
|
30
34
|
"slug": "trinary",
|
31
|
-
"topics": [
|
35
|
+
"topics": [
|
36
|
+
|
37
|
+
]
|
32
38
|
},
|
33
39
|
{
|
34
40
|
"difficulty": 1,
|
35
41
|
"slug": "hexadecimal",
|
36
|
-
"topics": [
|
42
|
+
"topics": [
|
43
|
+
|
44
|
+
]
|
37
45
|
},
|
38
46
|
{
|
39
47
|
"difficulty": 1,
|
40
48
|
"slug": "leap",
|
41
|
-
"topics": [
|
49
|
+
"topics": [
|
50
|
+
|
51
|
+
]
|
42
52
|
},
|
43
53
|
{
|
44
54
|
"difficulty": 1,
|
45
55
|
"slug": "difference-of-squares",
|
46
|
-
"topics": [
|
56
|
+
"topics": [
|
57
|
+
|
58
|
+
]
|
47
59
|
},
|
48
60
|
{
|
49
61
|
"difficulty": 1,
|
50
62
|
"slug": "hamming",
|
51
|
-
"topics": [
|
63
|
+
"topics": [
|
64
|
+
|
65
|
+
]
|
52
66
|
},
|
53
67
|
{
|
54
68
|
"difficulty": 1,
|
55
69
|
"slug": "rna-transcription",
|
56
|
-
"topics": [
|
70
|
+
"topics": [
|
71
|
+
|
72
|
+
]
|
57
73
|
},
|
58
74
|
{
|
59
75
|
"difficulty": 1,
|
60
76
|
"slug": "isogram",
|
61
|
-
"topics": [
|
77
|
+
"topics": [
|
78
|
+
|
79
|
+
]
|
62
80
|
},
|
63
81
|
{
|
64
82
|
"difficulty": 1,
|
65
83
|
"slug": "triangle",
|
66
|
-
"topics": [
|
84
|
+
"topics": [
|
85
|
+
|
86
|
+
]
|
67
87
|
},
|
68
88
|
{
|
69
89
|
"difficulty": 1,
|
70
90
|
"slug": "atbash-cipher",
|
71
|
-
"topics": [
|
91
|
+
"topics": [
|
92
|
+
|
93
|
+
]
|
72
94
|
},
|
73
95
|
{
|
74
96
|
"difficulty": 1,
|
75
97
|
"slug": "scrabble-score",
|
76
|
-
"topics": [
|
98
|
+
"topics": [
|
99
|
+
|
100
|
+
]
|
77
101
|
},
|
78
102
|
{
|
79
103
|
"difficulty": 1,
|
80
104
|
"slug": "raindrops",
|
81
|
-
"topics": [
|
105
|
+
"topics": [
|
106
|
+
|
107
|
+
]
|
82
108
|
},
|
83
109
|
{
|
84
110
|
"difficulty": 1,
|
85
111
|
"slug": "nth-prime",
|
86
|
-
"topics": [
|
112
|
+
"topics": [
|
113
|
+
|
114
|
+
]
|
87
115
|
}
|
88
116
|
]
|
89
117
|
}
|
File without changes
|
data/tracks/nasm/config.json
CHANGED
File without changes
|
data/tracks/nasm/exercises/.keep
CHANGED
data/tracks/nim/config.json
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
|
9
9
|
],
|
10
10
|
"ignored": [
|
11
|
+
"docs",
|
11
12
|
"_test"
|
12
13
|
],
|
13
14
|
"foregone": [
|
@@ -78,6 +79,11 @@
|
|
78
79
|
"difficulty": 1,
|
79
80
|
"slug": "difference-of-squares",
|
80
81
|
"topics": []
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"difficulty": 1,
|
85
|
+
"slug": "raindrops",
|
86
|
+
"topics": []
|
81
87
|
}
|
82
88
|
]
|
83
89
|
}
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import strutils
|
2
|
+
|
3
|
+
proc convert*(sound: int): string =
|
4
|
+
var raindrops = ""
|
5
|
+
|
6
|
+
if (sound mod 3) == 0:
|
7
|
+
raindrops.add("Pling")
|
8
|
+
|
9
|
+
if (sound mod 5) == 0:
|
10
|
+
raindrops.add("Plang")
|
11
|
+
|
12
|
+
if (sound mod 7) == 0:
|
13
|
+
raindrops.add("Plong")
|
14
|
+
|
15
|
+
if len(raindrops) > 0:
|
16
|
+
raindrops
|
17
|
+
else:
|
18
|
+
intToStr(sound)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import tables
|
2
|
+
import unittest
|
3
|
+
import raindrops
|
4
|
+
|
5
|
+
test "convert 1":
|
6
|
+
check convert(1) == "1"
|
7
|
+
|
8
|
+
test "convert 3":
|
9
|
+
check convert(3) == "Pling"
|
10
|
+
|
11
|
+
test "convert 5":
|
12
|
+
check convert(5) == "Plang"
|
13
|
+
|
14
|
+
test "convert 7":
|
15
|
+
check convert(7) == "Plong"
|
16
|
+
|
17
|
+
test "convert 6":
|
18
|
+
check convert(6) == "Pling"
|
19
|
+
|
20
|
+
test "convert 9":
|
21
|
+
check convert(9) == "Pling"
|
22
|
+
|
23
|
+
test "convert 10":
|
24
|
+
check convert(10) == "Plang"
|
25
|
+
|
26
|
+
test "convert 14":
|
27
|
+
check convert(14) == "Plong"
|
28
|
+
|
29
|
+
test "convert 15":
|
30
|
+
check convert(15) == "PlingPlang"
|
31
|
+
|
32
|
+
test "convert 21":
|
33
|
+
check convert(21) == "PlingPlong"
|
34
|
+
|
35
|
+
test "convert 25":
|
36
|
+
check convert(25) == "Plang"
|
37
|
+
|
38
|
+
test "convert 35":
|
39
|
+
check convert(35) == "PlangPlong"
|
40
|
+
|
41
|
+
test "convert 49":
|
42
|
+
check convert(49) == "Plong"
|
43
|
+
|
44
|
+
test "convert 52":
|
45
|
+
check convert(52) == "52"
|
46
|
+
|
47
|
+
test "convert 105":
|
48
|
+
check convert(105) == "PlingPlangPlong"
|
49
|
+
|
50
|
+
test "convert 12121":
|
51
|
+
check convert(12121) == "12121"
|
data/tracks/ocaml/config.json
CHANGED
@@ -30,7 +30,9 @@
|
|
30
30
|
{
|
31
31
|
"slug": "raindrops",
|
32
32
|
"difficulty": 2,
|
33
|
-
"topics": [
|
33
|
+
"topics": [
|
34
|
+
|
35
|
+
]
|
34
36
|
},
|
35
37
|
{
|
36
38
|
"slug": "difference-of-squares",
|
@@ -78,7 +80,7 @@
|
|
78
80
|
"slug": "anagram",
|
79
81
|
"difficulty": 3,
|
80
82
|
"topics": [
|
81
|
-
"Strings"
|
83
|
+
"Strings"
|
82
84
|
]
|
83
85
|
},
|
84
86
|
{
|
@@ -92,142 +94,207 @@
|
|
92
94
|
{
|
93
95
|
"slug": "triangle",
|
94
96
|
"difficulty": 3,
|
95
|
-
"topics": [
|
97
|
+
"topics": [
|
98
|
+
"Mathematics"
|
99
|
+
]
|
96
100
|
},
|
97
101
|
{
|
98
102
|
"slug": "pangram",
|
99
103
|
"difficulty": 3,
|
100
|
-
"topics": [
|
104
|
+
"topics": [
|
105
|
+
"Strings"
|
106
|
+
]
|
101
107
|
},
|
102
108
|
{
|
103
109
|
"slug": "acronym",
|
104
110
|
"difficulty": 3,
|
105
|
-
"topics": [
|
111
|
+
"topics": [
|
112
|
+
"Strings"
|
113
|
+
]
|
106
114
|
},
|
107
115
|
{
|
108
116
|
"slug": "all-your-base",
|
109
117
|
"difficulty": 4,
|
110
|
-
"topics": [
|
118
|
+
"topics": [
|
119
|
+
"Mathematics"
|
120
|
+
]
|
111
121
|
},
|
112
122
|
{
|
113
123
|
"slug": "bracket-push",
|
114
124
|
"difficulty": 4,
|
115
|
-
"topics": [
|
125
|
+
"topics": [
|
126
|
+
"Stacks"
|
127
|
+
]
|
116
128
|
},
|
117
129
|
{
|
118
130
|
"slug": "luhn",
|
119
131
|
"difficulty": 4,
|
120
|
-
"topics": [
|
132
|
+
"topics": [
|
133
|
+
"Arithmetic"
|
134
|
+
]
|
121
135
|
},
|
122
136
|
{
|
123
137
|
"slug": "binary-search",
|
124
138
|
"difficulty": 4,
|
125
|
-
"topics": [
|
139
|
+
"topics": [
|
140
|
+
"Search",
|
141
|
+
"Algorithms",
|
142
|
+
"Arrays"
|
143
|
+
]
|
126
144
|
},
|
127
145
|
{
|
128
146
|
"slug": "phone-number",
|
129
147
|
"difficulty": 4,
|
130
|
-
"topics": [
|
148
|
+
"topics": [
|
149
|
+
"Strings"
|
150
|
+
]
|
131
151
|
},
|
132
152
|
{
|
133
153
|
"slug": "word-count",
|
134
154
|
"difficulty": 4,
|
135
|
-
"topics": [
|
155
|
+
"topics": [
|
156
|
+
"Strings",
|
157
|
+
"Counting"
|
158
|
+
]
|
136
159
|
},
|
137
160
|
{
|
138
161
|
"slug": "beer-song",
|
139
162
|
"difficulty": 4,
|
140
|
-
"topics": [
|
163
|
+
"topics": [
|
164
|
+
"Strings"
|
165
|
+
]
|
141
166
|
},
|
142
167
|
{
|
143
168
|
"slug": "run-length-encoding",
|
144
169
|
"difficulty": 5,
|
145
|
-
"topics": [
|
170
|
+
"topics": [
|
171
|
+
"Algorithms",
|
172
|
+
"Transforming"
|
173
|
+
]
|
146
174
|
},
|
147
175
|
{
|
148
176
|
"slug": "roman-numerals",
|
149
177
|
"difficulty": 5,
|
150
|
-
"topics": [
|
178
|
+
"topics": [
|
179
|
+
"Strings"
|
180
|
+
]
|
151
181
|
},
|
152
182
|
{
|
153
183
|
"slug": "prime-factors",
|
154
184
|
"difficulty": 5,
|
155
|
-
"topics": [
|
185
|
+
"topics": [
|
186
|
+
"Mathematics",
|
187
|
+
"Algorithms"
|
188
|
+
]
|
156
189
|
},
|
157
190
|
{
|
158
191
|
"slug": "say",
|
159
192
|
"difficulty": 5,
|
160
|
-
"topics": [
|
193
|
+
"topics": [
|
194
|
+
"Strings"
|
195
|
+
]
|
161
196
|
},
|
162
197
|
{
|
163
198
|
"slug": "robot-name",
|
164
199
|
"difficulty": 6,
|
165
|
-
"topics": [
|
200
|
+
"topics": [
|
201
|
+
"Randomness",
|
202
|
+
"Mutable state"
|
203
|
+
]
|
166
204
|
},
|
167
205
|
{
|
168
206
|
"slug": "change",
|
169
207
|
"difficulty": 6,
|
170
|
-
"topics": [
|
208
|
+
"topics": [
|
209
|
+
"Dynamic Programming",
|
210
|
+
"Algorithms"
|
211
|
+
]
|
171
212
|
},
|
172
213
|
{
|
173
214
|
"slug": "list-ops",
|
174
215
|
"difficulty": 6,
|
175
|
-
"topics": [
|
216
|
+
"topics": [
|
217
|
+
"Functional programming"
|
218
|
+
]
|
176
219
|
},
|
177
220
|
{
|
178
221
|
"slug": "atbash-cipher",
|
179
222
|
"difficulty": 7,
|
180
|
-
"topics": [
|
223
|
+
"topics": [
|
224
|
+
"Transforming"
|
225
|
+
]
|
181
226
|
},
|
182
227
|
{
|
183
228
|
"slug": "minesweeper",
|
184
229
|
"difficulty": 7,
|
185
|
-
"topics": [
|
230
|
+
"topics": [
|
231
|
+
"Transforming",
|
232
|
+
"Arrays"
|
233
|
+
]
|
186
234
|
},
|
187
235
|
{
|
188
236
|
"slug": "bowling",
|
189
237
|
"difficulty": 7,
|
190
|
-
"topics": [
|
238
|
+
"topics": [
|
239
|
+
"Algorithms"
|
240
|
+
]
|
191
241
|
},
|
192
242
|
{
|
193
243
|
"slug": "dominoes",
|
194
244
|
"difficulty": 7,
|
195
|
-
"topics": [
|
245
|
+
"topics": [
|
246
|
+
"Algorithms",
|
247
|
+
"Search"
|
248
|
+
]
|
196
249
|
},
|
197
250
|
{
|
198
251
|
"slug": "custom-set",
|
199
252
|
"difficulty": 8,
|
200
|
-
"topics": [
|
253
|
+
"topics": [
|
254
|
+
"Functional programming"
|
255
|
+
]
|
201
256
|
},
|
202
257
|
{
|
203
258
|
"slug": "connect",
|
204
259
|
"difficulty": 8,
|
205
|
-
"topics": [
|
260
|
+
"topics": [
|
261
|
+
"Search"
|
262
|
+
]
|
206
263
|
},
|
207
264
|
{
|
208
265
|
"slug": "meetup",
|
209
266
|
"difficulty": 9,
|
210
|
-
"topics": [
|
267
|
+
"topics": [
|
268
|
+
"Dates"
|
269
|
+
]
|
211
270
|
},
|
212
271
|
{
|
213
272
|
"slug": "forth",
|
214
273
|
"difficulty": 9,
|
215
|
-
"topics": [
|
274
|
+
"topics": [
|
275
|
+
"Interpreters"
|
276
|
+
]
|
216
277
|
},
|
217
278
|
{
|
218
279
|
"slug": "zipper",
|
219
280
|
"difficulty": 10,
|
220
|
-
"topics": [
|
281
|
+
"topics": [
|
282
|
+
"Functional programming"
|
283
|
+
]
|
221
284
|
},
|
222
285
|
{
|
223
286
|
"slug": "react",
|
224
287
|
"difficulty": 10,
|
225
|
-
|
288
|
+
"topics": [
|
289
|
+
"Reactive programming"
|
290
|
+
]
|
226
291
|
},
|
227
292
|
{
|
228
293
|
"slug": "hangman",
|
229
294
|
"difficulty": 10,
|
230
|
-
|
295
|
+
"topics": [
|
296
|
+
"Reactive programming"
|
297
|
+
]
|
231
298
|
}
|
232
299
|
],
|
233
300
|
"deprecated": [
|