trackler 2.2.1.0 → 2.2.1.1
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/problem-specifications/exercises/list-ops/canonical-data.json +27 -11
- data/problem-specifications/exercises/rotational-cipher/canonical-data.json +8 -8
- data/tracks/clojure/config.json +0 -2
- data/tracks/dart/config.json +0 -2
- data/tracks/elisp/config.json +0 -2
- data/tracks/elixir/config.json +0 -2
- data/tracks/erlang/config.json +190 -83
- data/tracks/go/config.json +0 -2
- data/tracks/groovy/config.json +55 -17
- data/tracks/idris/config.json +0 -2
- data/tracks/java/POLICIES.md +9 -1
- data/tracks/java/exercises/nucleotide-count/src/example/java/{DNA.java → NucleotideCounter.java} +4 -4
- data/tracks/java/exercises/nucleotide-count/src/test/java/{NucleotideTest.java → NucleotideCounterTest.java} +21 -21
- data/tracks/kotlin/exercises/rotational-cipher/README.md +39 -0
- data/tracks/lfe/config.json +0 -2
- data/tracks/lisp/config.json +4 -6
- data/tracks/lisp/config/exercise_readme.go.tmpl +16 -0
- data/tracks/lisp/exercises/allergies/README.md +84 -0
- data/tracks/lisp/exercises/anagram/README.md +60 -0
- data/tracks/lisp/exercises/atbash-cipher/README.md +81 -0
- data/tracks/lisp/exercises/beer-song/README.md +374 -0
- data/tracks/lisp/exercises/binary/README.md +82 -0
- data/tracks/lisp/exercises/bob/README.md +65 -0
- data/tracks/lisp/exercises/crypto-square/README.md +121 -0
- data/tracks/lisp/exercises/difference-of-squares/README.md +66 -0
- data/tracks/lisp/exercises/etl/README.md +98 -0
- data/tracks/lisp/exercises/gigasecond/README.md +58 -0
- data/tracks/lisp/exercises/grade-school/README.md +89 -0
- data/tracks/lisp/exercises/grains/README.md +81 -0
- data/tracks/lisp/exercises/hamming/README.md +89 -0
- data/tracks/lisp/exercises/leap/README.md +80 -0
- data/tracks/lisp/exercises/meetup/README.md +77 -0
- data/tracks/lisp/exercises/nucleotide-count/README.md +80 -0
- data/tracks/lisp/exercises/pascals-triangle/README.md +68 -0
- data/tracks/lisp/exercises/phone-number/README.md +81 -0
- data/tracks/lisp/exercises/prime-factors/README.md +83 -0
- data/tracks/lisp/exercises/raindrops/README.md +71 -0
- data/tracks/lisp/exercises/rna-transcription/README.md +72 -0
- data/tracks/lisp/exercises/robot-name/README.md +69 -0
- data/tracks/lisp/exercises/roman-numerals/README.md +96 -0
- data/tracks/lisp/exercises/scrabble-score/README.md +91 -0
- data/tracks/lisp/exercises/sieve/README.md +81 -0
- data/tracks/lisp/exercises/space-age/README.md +71 -0
- data/tracks/lisp/exercises/strain/README.md +87 -0
- data/tracks/lisp/exercises/triangle/README.md +73 -0
- data/tracks/lisp/exercises/trinary/README.md +75 -0
- data/tracks/lisp/exercises/word-count/README.md +66 -0
- data/tracks/perl5/config.json +0 -2
- data/tracks/perl6/config.json +0 -2
- data/tracks/php/config.json +0 -2
- data/tracks/pony/config.json +33 -0
- data/tracks/python/exercises/scale-generator/scale_generator_test.py +1 -1
- data/tracks/racket/config.json +0 -2
- data/tracks/ruby/config.json +0 -2
- data/tracks/rust/.gitignore +0 -1
- data/tracks/rust/_test/check-exercises.sh +7 -1
- data/tracks/rust/config.json +11 -0
- data/tracks/rust/config/maintainers.json +54 -0
- data/tracks/rust/exercises/acronym/src/lib.rs +0 -0
- data/tracks/rust/exercises/all-your-base/src/lib.rs +35 -0
- data/tracks/rust/exercises/allergies/src/lib.rs +0 -0
- data/tracks/rust/exercises/alphametics/src/lib.rs +5 -0
- data/tracks/rust/exercises/anagram/src/lib.rs +0 -0
- data/tracks/rust/exercises/atbash-cipher/src/lib.rs +0 -0
- data/tracks/rust/exercises/beer-song/src/lib.rs +0 -0
- data/tracks/rust/exercises/bob/src/lib.rs +0 -0
- data/tracks/rust/exercises/bowling/src/lib.rs +0 -0
- data/tracks/rust/exercises/bracket-push/src/lib.rs +0 -0
- data/tracks/rust/exercises/circular-buffer/src/lib.rs +0 -0
- data/tracks/rust/exercises/custom-set/src/lib.rs +0 -0
- data/tracks/rust/exercises/difference-of-squares/src/lib.rs +0 -0
- data/tracks/rust/exercises/dominoes/src/lib.rs +0 -0
- data/tracks/rust/exercises/etl/src/lib.rs +0 -0
- data/tracks/rust/exercises/forth/src/lib.rs +23 -0
- data/tracks/rust/exercises/gigasecond/src/lib.rs +7 -0
- data/tracks/rust/exercises/grade-school/src/lib.rs +26 -0
- data/tracks/rust/exercises/grains/src/lib.rs +7 -0
- data/tracks/rust/exercises/hamming/src/lib.rs +0 -0
- data/tracks/rust/exercises/hello-world/src/lib.rs +5 -0
- data/tracks/rust/exercises/hexadecimal/src/lib.rs +0 -0
- data/tracks/rust/exercises/largest-series-product/src/lib.rs +0 -0
- data/tracks/rust/exercises/leap/src/lib.rs +0 -0
- data/tracks/rust/exercises/luhn-from/src/lib.rs +0 -0
- data/tracks/rust/exercises/luhn-trait/src/lib.rs +0 -0
- data/tracks/rust/exercises/luhn/src/lib.rs +0 -0
- data/tracks/rust/exercises/minesweeper/src/lib.rs +0 -0
- data/tracks/rust/exercises/nucleotide-codons/src/lib.rs +0 -0
- data/tracks/rust/exercises/nucleotide-count/src/lib.rs +0 -0
- data/tracks/rust/exercises/ocr-numbers/src/lib.rs +7 -0
- data/tracks/rust/exercises/pangram/src/lib.rs +0 -0
- data/tracks/rust/exercises/parallel-letter-frequency/src/lib.rs +0 -0
- data/tracks/rust/exercises/pascals-triangle/src/lib.rs +11 -0
- data/tracks/rust/exercises/phone-number/src/lib.rs +0 -0
- data/tracks/rust/exercises/pig-latin/src/lib.rs +0 -0
- data/tracks/rust/exercises/protein-translation/src/lib.rs +0 -0
- data/tracks/rust/exercises/queen-attack/src/lib.rs +0 -0
- data/tracks/rust/exercises/raindrops/src/lib.rs +0 -0
- data/tracks/rust/exercises/react/src/lib.rs +89 -0
- data/tracks/rust/exercises/rectangles/src/lib.rs +0 -0
- data/tracks/rust/exercises/rna-transcription/src/lib.rs +0 -0
- data/tracks/rust/exercises/robot-name/src/lib.rs +0 -0
- data/tracks/rust/exercises/robot-simulator/src/lib.rs +44 -0
- data/tracks/rust/exercises/roman-numerals/src/lib.rs +0 -0
- data/tracks/rust/exercises/rotational-cipher/src/lib.rs +0 -0
- data/tracks/rust/exercises/run-length-encoding/src/lib.rs +0 -0
- data/tracks/rust/exercises/say/.meta/hints.md +19 -0
- data/tracks/rust/exercises/say/Cargo.lock +4 -0
- data/tracks/rust/exercises/say/Cargo.toml +4 -0
- data/tracks/rust/exercises/say/README.md +122 -0
- data/tracks/rust/exercises/say/example.rs +56 -0
- data/tracks/rust/exercises/say/src/lib.rs +4 -0
- data/tracks/rust/exercises/say/tests/say.rs +130 -0
- data/tracks/rust/exercises/scrabble-score/src/lib.rs +0 -0
- data/tracks/rust/exercises/sieve/src/lib.rs +0 -0
- data/tracks/rust/exercises/space-age/src/lib.rs +35 -0
- data/tracks/rust/exercises/sublist/src/lib.rs +0 -0
- data/tracks/rust/exercises/sum-of-multiples/src/lib.rs +0 -0
- data/tracks/rust/exercises/tournament/src/lib.rs +0 -0
- data/tracks/rust/exercises/triangle/src/lib.rs +0 -0
- data/tracks/rust/exercises/variable-length-quantity/src/lib.rs +9 -0
- data/tracks/rust/exercises/word-count/src/lib.rs +0 -0
- data/tracks/rust/exercises/wordy/src/lib.rs +0 -0
- data/tracks/scheme/config.json +0 -2
- metadata +45 -4
data/tracks/go/config.json
CHANGED
data/tracks/groovy/config.json
CHANGED
@@ -4,98 +4,136 @@
|
|
4
4
|
"repository": "https://github.com/exercism/groovy",
|
5
5
|
"checklist_issue": 9,
|
6
6
|
"active": false,
|
7
|
-
"deprecated": [
|
8
|
-
|
9
|
-
],
|
10
7
|
"foregone": [
|
11
8
|
|
12
9
|
],
|
13
10
|
"exercises": [
|
14
11
|
{
|
15
|
-
"
|
12
|
+
"uuid": "30dff5e7-f2a4-4d7b-be1e-765091958a92",
|
16
13
|
"slug": "hello-world",
|
14
|
+
"core": false,
|
15
|
+
"unlocked_by": null,
|
16
|
+
"difficulty": 1,
|
17
17
|
"topics": [
|
18
18
|
|
19
19
|
]
|
20
20
|
},
|
21
21
|
{
|
22
|
-
"
|
22
|
+
"uuid": "02bb7e44-2de1-4a14-a755-696b7cba5f4e",
|
23
23
|
"slug": "hamming",
|
24
|
+
"core": false,
|
25
|
+
"unlocked_by": null,
|
26
|
+
"difficulty": 2,
|
24
27
|
"topics": [
|
25
28
|
|
26
29
|
]
|
27
30
|
},
|
28
31
|
{
|
29
|
-
"
|
32
|
+
"uuid": "9dc8a916-f7a5-4ef0-9341-c0db11553323",
|
30
33
|
"slug": "gigasecond",
|
34
|
+
"core": false,
|
35
|
+
"unlocked_by": null,
|
36
|
+
"difficulty": 4,
|
31
37
|
"topics": [
|
32
38
|
|
33
39
|
]
|
34
40
|
},
|
35
41
|
{
|
36
|
-
"
|
42
|
+
"uuid": "9beb0df7-d55c-47af-8fef-791439c9ab38",
|
37
43
|
"slug": "raindrops",
|
44
|
+
"core": false,
|
45
|
+
"unlocked_by": null,
|
46
|
+
"difficulty": 3,
|
38
47
|
"topics": [
|
39
48
|
|
40
49
|
]
|
41
50
|
},
|
42
51
|
{
|
43
|
-
"
|
52
|
+
"uuid": "d7bc4ce7-c2fe-4564-b925-b0d67f7b748f",
|
44
53
|
"slug": "rna-transcription",
|
54
|
+
"core": false,
|
55
|
+
"unlocked_by": null,
|
56
|
+
"difficulty": 2,
|
45
57
|
"topics": [
|
46
58
|
|
47
59
|
]
|
48
60
|
},
|
49
61
|
{
|
50
|
-
"
|
62
|
+
"uuid": "16d2cb93-b903-4c37-9cd0-40096f0fb51c",
|
51
63
|
"slug": "difference-of-squares",
|
64
|
+
"core": false,
|
65
|
+
"unlocked_by": null,
|
66
|
+
"difficulty": 2,
|
52
67
|
"topics": [
|
53
68
|
|
54
69
|
]
|
55
70
|
},
|
56
71
|
{
|
57
|
-
"
|
72
|
+
"uuid": "7427df2a-74bb-4593-8ca7-7d0287a6792e",
|
58
73
|
"slug": "leap",
|
74
|
+
"core": false,
|
75
|
+
"unlocked_by": null,
|
76
|
+
"difficulty": 1,
|
59
77
|
"topics": [
|
60
78
|
|
61
79
|
]
|
62
80
|
},
|
63
81
|
{
|
64
|
-
"
|
82
|
+
"uuid": "307f0a89-f185-41de-9ab7-f8d7ebfa3a2b",
|
65
83
|
"slug": "nth-prime",
|
84
|
+
"core": false,
|
85
|
+
"unlocked_by": null,
|
86
|
+
"difficulty": 4,
|
66
87
|
"topics": [
|
67
88
|
|
68
89
|
]
|
69
90
|
},
|
70
91
|
{
|
71
|
-
"
|
92
|
+
"uuid": "ccfb87a5-51e3-4e7e-8e60-089a9d9b25d7",
|
72
93
|
"slug": "robot-name",
|
94
|
+
"core": false,
|
95
|
+
"unlocked_by": null,
|
96
|
+
"difficulty": 3,
|
73
97
|
"topics": [
|
74
98
|
|
75
99
|
]
|
76
100
|
},
|
77
101
|
{
|
78
|
-
"
|
102
|
+
"uuid": "915c4792-6949-4aef-826a-8fe5dbe2f59c",
|
79
103
|
"slug": "roman-numerals",
|
80
|
-
"
|
104
|
+
"core": false,
|
105
|
+
"unlocked_by": null,
|
106
|
+
"difficulty": 4,
|
107
|
+
"topics": [
|
108
|
+
"metaprogramming"
|
109
|
+
]
|
81
110
|
},
|
82
111
|
{
|
83
|
-
"
|
112
|
+
"uuid": "4dded3ef-b07b-4d3d-b8c4-29d35d5845a3",
|
84
113
|
"slug": "grains",
|
114
|
+
"core": false,
|
115
|
+
"unlocked_by": null,
|
116
|
+
"difficulty": 2,
|
85
117
|
"topics": [
|
86
118
|
|
87
119
|
]
|
88
120
|
},
|
89
121
|
{
|
90
|
-
"
|
122
|
+
"uuid": "70405bb0-e229-49c8-ad60-6b1722b3c21d",
|
91
123
|
"slug": "word-count",
|
124
|
+
"core": false,
|
125
|
+
"unlocked_by": null,
|
126
|
+
"difficulty": 3,
|
92
127
|
"topics": [
|
93
128
|
|
94
129
|
]
|
95
130
|
},
|
96
131
|
{
|
97
|
-
"
|
132
|
+
"uuid": "5f929d26-1a63-47eb-8698-c5374da70b62",
|
98
133
|
"slug": "phone-number",
|
134
|
+
"core": false,
|
135
|
+
"unlocked_by": null,
|
136
|
+
"difficulty": 3,
|
99
137
|
"topics": [
|
100
138
|
|
101
139
|
]
|
data/tracks/idris/config.json
CHANGED
data/tracks/java/POLICIES.md
CHANGED
@@ -17,7 +17,7 @@ Our policies are not set-in-stone. They represent directions chosen at a point i
|
|
17
17
|
|
18
18
|
| Track Event | Policies to review |
|
19
19
|
|:------------|:-----------------|
|
20
|
-
| Exercise added/updated | [Prefer instance methods](#prefer-instance-methods); [Avoid using final](#avoid-using-final); [Adhere to best practices](#adhere-to-best-practices); [Starter implementations](#starter-implementations); [Ignore noninitial tests](#ignore-noninitial-tests); [Multiple file submissions](#multiple-file-submissions)
|
20
|
+
| Exercise added/updated | [Prefer instance methods](#prefer-instance-methods); [Avoid using final](#avoid-using-final); [Adhere to best practices](#adhere-to-best-practices); [Starter implementations](#starter-implementations); [Ignore noninitial tests](#ignore-noninitial-tests); [Multiple file submissions](#multiple-file-submissions); [Name test class after class under test](#name-test-class-after-class-under-test)
|
21
21
|
| Track rearranged | [Starter implementations](#starter-implementations); [Multiple file submissions](#multiple-file-submissions) |
|
22
22
|
| New issue observed in track | [Good first patches](#good-first-patches) |
|
23
23
|
| "Good first patch" issue completed | [Good first patches](#good-first-patches) |
|
@@ -71,3 +71,11 @@ References: [[1](https://github.com/exercism/java/issues/220#issue-196447088)]
|
|
71
71
|
> The Installing Java instructions should seek to minimize the number of steps and the number of concepts a new-to-the-track practitioner needs to learn to get to coding.
|
72
72
|
|
73
73
|
References: [[1](https://github.com/exercism/java/issues/395#issue-215734887)]
|
74
|
+
|
75
|
+
### Name test class after class under test
|
76
|
+
|
77
|
+
> If you're testing a class called `SomeClassName` then your test class should be called `SomeClassNameTest`.
|
78
|
+
|
79
|
+
> The exception to this is if the tests are split into several test classes where each test class tests different functionality. In that case each class should be named `SomeClassNameFunctionalityTest` where `Functionality` is the name of the functionality to be tested in that class. See the [clock exercise](https://github.com/exercism/java/tree/master/exercises/clock) as an example.
|
80
|
+
|
81
|
+
References: [[1](https://github.com/exercism/java/issues/697)]
|
data/tracks/java/exercises/nucleotide-count/src/example/java/{DNA.java → NucleotideCounter.java}
RENAMED
@@ -1,14 +1,14 @@
|
|
1
1
|
import java.util.HashMap;
|
2
2
|
import java.util.Map;
|
3
3
|
|
4
|
-
|
4
|
+
final class NucleotideCounter {
|
5
5
|
private final String sequence;
|
6
6
|
|
7
|
-
|
7
|
+
NucleotideCounter(String sequence) {
|
8
8
|
this.sequence = sequence;
|
9
9
|
}
|
10
10
|
|
11
|
-
|
11
|
+
int count(char base) {
|
12
12
|
if (isCountable(base))
|
13
13
|
throw new IllegalArgumentException(base + " is not a nucleotide");
|
14
14
|
|
@@ -24,7 +24,7 @@ public final class DNA {
|
|
24
24
|
return COUNTABLE_NUCLEOTIDES.indexOf(base) == -1;
|
25
25
|
}
|
26
26
|
|
27
|
-
|
27
|
+
Map<Character, Integer> nucleotideCounts() {
|
28
28
|
Map<Character, Integer> counts = emptyCounts();
|
29
29
|
for (char c : sequence.toCharArray()) {
|
30
30
|
counts.put(c, counts.get(c) + 1);
|
@@ -8,22 +8,22 @@ import java.util.Map;
|
|
8
8
|
import static org.hamcrest.Matchers.*;
|
9
9
|
import static org.junit.Assert.*;
|
10
10
|
|
11
|
-
public class
|
11
|
+
public class NucleotideCounterTest {
|
12
12
|
|
13
13
|
@Rule
|
14
14
|
public ExpectedException expectedException = ExpectedException.none();
|
15
15
|
|
16
16
|
@Test
|
17
17
|
public void testEmptyDnaStringHasNoAdenine() {
|
18
|
-
|
19
|
-
assertThat(
|
18
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("");
|
19
|
+
assertThat(nucleotideCounter.count('A'), is(0));
|
20
20
|
}
|
21
21
|
|
22
22
|
@Ignore("Remove to run test")
|
23
23
|
@Test
|
24
24
|
public void testEmptyDnaStringHasNoNucleotides() {
|
25
|
-
|
26
|
-
Map<Character, Integer> counts =
|
25
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("");
|
26
|
+
Map<Character, Integer> counts = nucleotideCounter.nucleotideCounts();
|
27
27
|
assertThat(counts.size(), is(4));
|
28
28
|
assertThat(counts, allOf(
|
29
29
|
hasEntry('A', 0),
|
@@ -36,15 +36,15 @@ public class NucleotideTest {
|
|
36
36
|
@Ignore("Remove to run test")
|
37
37
|
@Test
|
38
38
|
public void testRepetitiveCytosineGetsCounted() {
|
39
|
-
|
40
|
-
assertThat(
|
39
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("CCCCC");
|
40
|
+
assertThat(nucleotideCounter.count('C'), is(5));
|
41
41
|
}
|
42
42
|
|
43
43
|
@Ignore("Remove to run test")
|
44
44
|
@Test
|
45
45
|
public void testRepetitiveSequenceWithOnlyGuanine() {
|
46
|
-
|
47
|
-
Map<Character, Integer> counts =
|
46
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("GGGGGGGG");
|
47
|
+
Map<Character, Integer> counts = nucleotideCounter.nucleotideCounts();
|
48
48
|
assertThat(counts.size(), is(4));
|
49
49
|
assertThat(counts, allOf(
|
50
50
|
hasEntry('A', 0),
|
@@ -57,24 +57,24 @@ public class NucleotideTest {
|
|
57
57
|
@Ignore("Remove to run test")
|
58
58
|
@Test
|
59
59
|
public void testCountsOnlyThymine() {
|
60
|
-
|
61
|
-
assertThat(
|
60
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("GGGGGTAACCCGG");
|
61
|
+
assertThat(nucleotideCounter.count('T'), is(1));
|
62
62
|
}
|
63
63
|
|
64
64
|
@Ignore("Remove to run test")
|
65
65
|
@Test
|
66
66
|
public void testCountsANucleotideOnlyOnce() {
|
67
|
-
|
68
|
-
|
69
|
-
assertThat(
|
67
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("CGATTGGG");
|
68
|
+
nucleotideCounter.count('T');
|
69
|
+
assertThat(nucleotideCounter.count('T'), is(2));
|
70
70
|
}
|
71
71
|
|
72
72
|
@Ignore("Remove to run test")
|
73
73
|
@Test
|
74
74
|
public void testDnaCountsDoNotChangeAfterCountingAdenine() {
|
75
|
-
|
76
|
-
|
77
|
-
Map<Character, Integer> counts =
|
75
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("GATTACA");
|
76
|
+
nucleotideCounter.count('A');
|
77
|
+
Map<Character, Integer> counts = nucleotideCounter.nucleotideCounts();
|
78
78
|
assertThat(counts.size(), is(4));
|
79
79
|
assertThat(counts, allOf(
|
80
80
|
hasEntry('A', 3),
|
@@ -88,16 +88,16 @@ public class NucleotideTest {
|
|
88
88
|
@Test
|
89
89
|
public void testValidatesNucleotides() {
|
90
90
|
expectedException.expect(IllegalArgumentException.class);
|
91
|
-
|
92
|
-
|
91
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter("GACT");
|
92
|
+
nucleotideCounter.count('X');
|
93
93
|
}
|
94
94
|
|
95
95
|
@Ignore("Remove to run test")
|
96
96
|
@Test
|
97
97
|
public void testCountsAllNucleotides() {
|
98
98
|
String s = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";
|
99
|
-
|
100
|
-
Map<Character, Integer> counts =
|
99
|
+
NucleotideCounter nucleotideCounter = new NucleotideCounter(s);
|
100
|
+
Map<Character, Integer> counts = nucleotideCounter.nucleotideCounts();
|
101
101
|
assertThat(counts.size(), is(4));
|
102
102
|
assertThat(counts, allOf(
|
103
103
|
hasEntry('A', 20),
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Rotational Cipher
|
2
|
+
|
3
|
+
Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
|
4
|
+
|
5
|
+
The Caesar cipher is a simple shift cipher that relies on
|
6
|
+
transposing all the letters in the alphabet using an integer key
|
7
|
+
between `0` and `26`. Using a key of `0` or `26` will always yield
|
8
|
+
the same output due to modular arithmetic. The letter is shifted
|
9
|
+
for as many values as the value of the key.
|
10
|
+
|
11
|
+
The general notation for rotational ciphers is `ROT + <key>`.
|
12
|
+
The most commonly used rotational cipher is `ROT13`.
|
13
|
+
|
14
|
+
A `ROT13` on the Latin alphabet would be as follows:
|
15
|
+
|
16
|
+
```plain
|
17
|
+
Plain: abcdefghijklmnopqrstuvwxyz
|
18
|
+
Cipher: nopqrstuvwxyzabcdefghijklm
|
19
|
+
```
|
20
|
+
|
21
|
+
It is stronger than the Atbash cipher because it has 27 possible keys, and 25 usable keys.
|
22
|
+
|
23
|
+
Ciphertext is written out in the same formatting as the input including spaces and punctuation.
|
24
|
+
|
25
|
+
## Examples
|
26
|
+
- ROT5 `omg` gives `trl`
|
27
|
+
- ROT0 `c` gives `c`
|
28
|
+
- ROT26 `Cool` gives `Cool`
|
29
|
+
- ROT13 `The quick brown fox jumps over the lazy dog.` gives `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.`
|
30
|
+
- ROT13 `Gur dhvpx oebja sbk whzcf bire gur ynml qbt.` gives `The quick brown fox jumps over the lazy dog.`
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
## Source
|
35
|
+
|
36
|
+
Wikipedia [https://en.wikipedia.org/wiki/Caesar_cipher](https://en.wikipedia.org/wiki/Caesar_cipher)
|
37
|
+
|
38
|
+
## Submitting Incomplete Solutions
|
39
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
data/tracks/lfe/config.json
CHANGED
data/tracks/lisp/config.json
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"slug": "common-lisp",
|
3
2
|
"language": "Common Lisp",
|
4
|
-
"repository": "https://github.com/exercism/common-lisp",
|
5
3
|
"active": true,
|
6
4
|
"exercises": [
|
7
5
|
{
|
@@ -383,10 +381,10 @@
|
|
383
381
|
"slug": "pascals-triangle",
|
384
382
|
"difficulty": 1,
|
385
383
|
"topics": [
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
384
|
+
"Control-flow (loops)",
|
385
|
+
"Mathematics",
|
386
|
+
"Integers",
|
387
|
+
"Sequences"
|
390
388
|
]
|
391
389
|
}
|
392
390
|
],
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# {{ .Spec.Name }}
|
2
|
+
|
3
|
+
{{ .Spec.Description -}}
|
4
|
+
{{- with .Hints }}
|
5
|
+
{{ . }}
|
6
|
+
{{ end }}
|
7
|
+
{{- with .TrackInsert }}
|
8
|
+
{{ . }}
|
9
|
+
{{ end }}
|
10
|
+
{{- with .Spec.Credits -}}
|
11
|
+
## Source
|
12
|
+
|
13
|
+
{{ . }}
|
14
|
+
{{ end }}
|
15
|
+
## Submitting Incomplete Solutions
|
16
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Allergies
|
2
|
+
|
3
|
+
Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
|
4
|
+
|
5
|
+
An allergy test produces a single numeric score which contains the
|
6
|
+
information about all the allergies the person has (that they were
|
7
|
+
tested for).
|
8
|
+
|
9
|
+
The list of items (and their value) that were tested are:
|
10
|
+
|
11
|
+
* eggs (1)
|
12
|
+
* peanuts (2)
|
13
|
+
* shellfish (4)
|
14
|
+
* strawberries (8)
|
15
|
+
* tomatoes (16)
|
16
|
+
* chocolate (32)
|
17
|
+
* pollen (64)
|
18
|
+
* cats (128)
|
19
|
+
|
20
|
+
So if Tom is allergic to peanuts and chocolate, he gets a score of 34.
|
21
|
+
|
22
|
+
Now, given just that score of 34, your program should be able to say:
|
23
|
+
|
24
|
+
- Whether Tom is allergic to any one of those allergens listed above.
|
25
|
+
- All the allergens Tom is allergic to.
|
26
|
+
|
27
|
+
Note: a given score may include allergens **not** listed above (i.e.
|
28
|
+
allergens that score 256, 512, 1024, etc.). Your program should
|
29
|
+
ignore those components of the score. For example, if the allergy
|
30
|
+
score is 257, your program should only report the eggs (1) allergy.
|
31
|
+
|
32
|
+
|
33
|
+
## Setup
|
34
|
+
|
35
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
36
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
37
|
+
a Lisp implementation and how to run the tests.
|
38
|
+
|
39
|
+
## Formatting
|
40
|
+
|
41
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
42
|
+
nor whether you use spaces or tabs, this is an important consideration
|
43
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
44
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
45
|
+
the code more readable to the human reviewers. Please review your
|
46
|
+
editors settings on how to accomplish this. Below are instructions for
|
47
|
+
popular editors for Common Lisp.
|
48
|
+
|
49
|
+
### VIM
|
50
|
+
|
51
|
+
Use the following commands to ensure VIM uses only spaces for
|
52
|
+
indentation:
|
53
|
+
|
54
|
+
```vimscript
|
55
|
+
:set tabstop=2
|
56
|
+
:set shiftwidth=2
|
57
|
+
:set expandtab
|
58
|
+
```
|
59
|
+
|
60
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
61
|
+
be added to your `~/.vimrc` file to use it all the time.
|
62
|
+
|
63
|
+
### Emacs
|
64
|
+
|
65
|
+
Emacs is very well suited for editing Common Lisp and has many
|
66
|
+
powerful add-on packages available. The only thing that one needs to
|
67
|
+
do with a stock emacs to make it work well with exercism.io is to
|
68
|
+
evaluate the following code:
|
69
|
+
|
70
|
+
`(setq indent-tab-mode nil)`
|
71
|
+
|
72
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
73
|
+
order to have it set whenever Emacs is launched.
|
74
|
+
|
75
|
+
One suggested add-on for Emacs and Common Lisp is
|
76
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
77
|
+
with the REPL; making iterative coding and testing very easy.
|
78
|
+
|
79
|
+
## Source
|
80
|
+
|
81
|
+
Jumpstart Lab Warm-up [http://jumpstartlab.com](http://jumpstartlab.com)
|
82
|
+
|
83
|
+
## Submitting Incomplete Solutions
|
84
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|