trackler 2.2.1.10 → 2.2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/CONTRIBUTING.md +1 -1
- data/problem-specifications/TOPICS.txt +1 -0
- data/problem-specifications/exercises/accumulate/description.md +0 -3
- data/problem-specifications/exercises/hamming/canonical-data.json +3 -3
- data/problem-specifications/exercises/house/canonical-data.json +322 -0
- data/problem-specifications/exercises/palindrome-products/description.md +2 -2
- data/problem-specifications/exercises/simple-cipher/description.md +1 -1
- data/tracks/bash/config.json +0 -11
- data/tracks/cpp/docs/ABOUT.md +12 -37
- data/tracks/csharp/config.json +37 -0
- data/tracks/csharp/config/maintainers.json +10 -0
- data/tracks/csharp/docs/ABOUT.md +1 -1
- data/tracks/csharp/docs/RESOURCES.md +2 -2
- data/tracks/csharp/exercises/Exercises.All.sln +50 -8
- data/tracks/csharp/exercises/Exercises.Default.sln +50 -8
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.cs +9 -0
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +18 -0
- data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +43 -0
- data/tracks/csharp/exercises/collatz-conjecture/Example.cs +30 -0
- data/tracks/csharp/exercises/collatz-conjecture/README.md +38 -0
- data/tracks/csharp/exercises/diamond/Diamond.cs +1 -1
- data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -1
- data/tracks/csharp/exercises/diamond/DiamondTest.cs +39 -21
- data/tracks/csharp/exercises/diamond/Example.cs +2 -2
- data/tracks/csharp/exercises/diamond/HINTS.md +3 -1
- data/tracks/csharp/exercises/spiral-matrix/Example.cs +40 -0
- data/tracks/csharp/exercises/spiral-matrix/README.md +36 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.cs +9 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +18 -0
- data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +78 -0
- data/tracks/csharp/exercises/two-fer/Example.cs +16 -0
- data/tracks/csharp/exercises/two-fer/README.md +25 -0
- data/tracks/csharp/exercises/two-fer/TwoFer.cs +9 -0
- data/tracks/csharp/exercises/two-fer/TwoFer.csproj +18 -0
- data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +24 -0
- data/tracks/dart/README.md +1 -1
- data/tracks/dart/docs/EXERCISE_README_INSERT.md +9 -0
- data/tracks/dart/docs/INSTALLATION.md +13 -0
- data/tracks/dart/docs/LEARNING.md +6 -0
- data/tracks/dart/docs/RESOURCES.md +7 -0
- data/tracks/dart/docs/TESTS.md +133 -0
- data/tracks/delphi/docs/ABOUT.md +18 -5
- data/tracks/delphi/docs/Getting_Started_Guide.md +930 -0
- data/tracks/delphi/exercises/hamming/uHammingExample.pas +1 -1
- data/tracks/delphi/exercises/hamming/uHammingTests.pas +15 -15
- data/tracks/ecmascript/.travis.yml +2 -1
- data/tracks/ecmascript/Makefile +19 -8
- data/tracks/ecmascript/config.json +16 -0
- data/tracks/ecmascript/exercises/accumulate/package.json +5 -5
- data/tracks/ecmascript/exercises/acronym/package.json +5 -5
- data/tracks/ecmascript/exercises/all-your-base/package.json +5 -5
- data/tracks/ecmascript/exercises/allergies/package.json +5 -5
- data/tracks/ecmascript/exercises/alphametics/package.json +5 -5
- data/tracks/ecmascript/exercises/anagram/package.json +5 -5
- data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -5
- data/tracks/ecmascript/exercises/beer-song/package.json +5 -5
- data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -5
- data/tracks/ecmascript/exercises/binary-search/package.json +5 -5
- data/tracks/ecmascript/exercises/binary/package.json +5 -5
- data/tracks/ecmascript/exercises/bob/package.json +5 -5
- data/tracks/ecmascript/exercises/bracket-push/package.json +5 -5
- data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -5
- data/tracks/ecmascript/exercises/clock/package.json +5 -5
- data/tracks/ecmascript/exercises/connect/package.json +5 -5
- data/tracks/ecmascript/exercises/crypto-square/package.json +5 -5
- data/tracks/ecmascript/exercises/custom-set/package.json +5 -5
- data/tracks/ecmascript/exercises/diamond/package.json +5 -5
- data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -5
- data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -5
- data/tracks/ecmascript/exercises/etl/package.json +5 -5
- data/tracks/ecmascript/exercises/flatten-array/package.json +5 -5
- data/tracks/ecmascript/exercises/food-chain/package.json +5 -5
- data/tracks/ecmascript/exercises/gigasecond/package.json +5 -5
- data/tracks/ecmascript/exercises/grade-school/package.json +5 -5
- data/tracks/ecmascript/exercises/grains/package.json +5 -5
- data/tracks/ecmascript/exercises/hamming/package.json +5 -5
- data/tracks/ecmascript/exercises/hello-world/package.json +5 -5
- data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -5
- data/tracks/ecmascript/exercises/isogram/package.json +5 -5
- data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -5
- data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -5
- data/tracks/ecmascript/exercises/leap/package.json +5 -5
- data/tracks/ecmascript/exercises/linked-list/package.json +5 -5
- data/tracks/ecmascript/exercises/list-ops/package.json +5 -5
- data/tracks/ecmascript/exercises/luhn/package.json +5 -5
- data/tracks/ecmascript/exercises/matrix/package.json +5 -5
- data/tracks/ecmascript/exercises/meetup/package.json +5 -5
- data/tracks/ecmascript/exercises/minesweeper/package.json +5 -5
- data/tracks/ecmascript/exercises/nth-prime/package.json +5 -5
- data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -5
- data/tracks/ecmascript/exercises/octal/package.json +5 -5
- data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -5
- data/tracks/ecmascript/exercises/pangram/package.json +5 -5
- data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -5
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -5
- data/tracks/ecmascript/exercises/phone-number/package.json +5 -5
- data/tracks/ecmascript/exercises/pig-latin/package.json +5 -5
- data/tracks/ecmascript/exercises/prime-factors/package.json +5 -5
- data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -5
- data/tracks/ecmascript/exercises/queen-attack/package.json +5 -5
- data/tracks/ecmascript/exercises/raindrops/package.json +5 -5
- data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -5
- data/tracks/ecmascript/exercises/robot-name/package.json +5 -5
- data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -5
- data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -5
- data/tracks/ecmascript/exercises/run-length-encoding/README.md +59 -0
- data/tracks/ecmascript/exercises/run-length-encoding/example.js +13 -0
- data/tracks/ecmascript/exercises/run-length-encoding/package.json +69 -0
- data/tracks/ecmascript/exercises/run-length-encoding/run-length-encoding.spec.js +59 -0
- data/tracks/ecmascript/exercises/saddle-points/package.json +5 -5
- data/tracks/ecmascript/exercises/say/package.json +5 -5
- data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -5
- data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -5
- data/tracks/ecmascript/exercises/series/package.json +5 -5
- data/tracks/ecmascript/exercises/sieve/package.json +5 -5
- data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -5
- data/tracks/ecmascript/exercises/space-age/package.json +5 -5
- data/tracks/ecmascript/exercises/strain/package.json +5 -5
- data/tracks/ecmascript/exercises/sublist/package.json +5 -5
- data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -5
- data/tracks/ecmascript/exercises/triangle/package.json +5 -5
- data/tracks/ecmascript/exercises/trinary/package.json +5 -5
- data/tracks/ecmascript/exercises/twelve-days/package.json +6 -5
- data/tracks/ecmascript/exercises/two-bucket/package.json +5 -5
- data/tracks/ecmascript/exercises/word-count/package.json +5 -5
- data/tracks/ecmascript/exercises/wordy/package.json +5 -5
- data/tracks/ecmascript/package.json +5 -5
- data/tracks/ecmascript/yarn.lock +403 -152
- data/tracks/elixir/docs/ABOUT.md +7 -20
- data/tracks/erlang/docs/ABOUT.md +4 -6
- data/tracks/fsharp/config.json +2 -1
- data/tracks/fsharp/docs/ABOUT.md +6 -2
- data/tracks/gnu-apl/.gitignore +4 -0
- data/tracks/gnu-apl/.travis.yml +5 -0
- data/tracks/gnu-apl/LICENSE +21 -0
- data/tracks/gnu-apl/README.md +67 -0
- data/tracks/gnu-apl/bin/fetch-configlet +32 -0
- data/tracks/gnu-apl/config.json +15 -0
- data/tracks/{scala/exercises/binary-search/src/main/scala/BinarySearch.scala → gnu-apl/config/exercise-readme-insert.md} +0 -0
- data/tracks/gnu-apl/config/exercise-readme.go.tmpl +16 -0
- data/tracks/gnu-apl/config/maintainers.json +6 -0
- data/tracks/gnu-apl/docs/ABOUT.md +0 -0
- data/tracks/gnu-apl/docs/INSTALLATION.md +0 -0
- data/tracks/gnu-apl/docs/LEARNING.md +0 -0
- data/tracks/gnu-apl/docs/RESOURCES.md +0 -0
- data/tracks/gnu-apl/docs/TESTS.md +0 -0
- data/tracks/gnu-apl/img/.keep +0 -0
- data/tracks/go/docs/ABOUT.md +4 -2
- data/tracks/go/exercises/pangram/example.go +1 -1
- data/tracks/go/exercises/pangram/pangram.go +1 -1
- data/tracks/go/exercises/pangram/pangram_test.go +1 -3
- data/tracks/groovy/README.md +2 -0
- data/tracks/groovy/config.json +25 -20
- data/tracks/groovy/docs/ABOUT.md +10 -3
- data/tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy +19 -0
- data/tracks/groovy/exercises/difference-of-squares/{SquaresSpec.groovy → DifferenceOfSquaresSpec.groovy} +3 -3
- data/tracks/groovy/exercises/difference-of-squares/Example.groovy +1 -1
- data/tracks/groovy/exercises/hamming/Hamming.groovy +7 -0
- data/tracks/groovy/exercises/leap/Example.groovy +2 -2
- data/tracks/groovy/exercises/leap/Leap.groovy +11 -0
- data/tracks/groovy/exercises/leap/LeapSpec.groovy +4 -4
- data/tracks/groovy/exercises/nth-prime/Example.groovy +1 -1
- data/tracks/groovy/exercises/nth-prime/NthPrime.groovy +7 -0
- data/tracks/groovy/exercises/nth-prime/{PrimeSpec.groovy → NthPrimeSpec.groovy} +6 -6
- data/tracks/groovy/exercises/phone-number/PhoneNumber.groovy +17 -0
- data/tracks/groovy/exercises/raindrops/Raindrops.groovy +7 -0
- data/tracks/groovy/exercises/rna-transcription/Example.groovy +1 -1
- data/tracks/groovy/exercises/rna-transcription/RnaTranscription.groovy +7 -0
- data/tracks/groovy/exercises/rna-transcription/{ComplementSpec.groovy → RnaTranscriptionSpec.groovy} +2 -2
- data/tracks/groovy/exercises/robot-name/Example.groovy +2 -2
- data/tracks/groovy/exercises/robot-name/RobotName.groovy +9 -0
- data/tracks/groovy/exercises/robot-name/{RobotSpec.groovy → RobotNameSpec.groovy} +6 -6
- data/tracks/groovy/exercises/roman-numerals/Example.groovy +2 -2
- data/tracks/groovy/exercises/roman-numerals/RomanNumerals.groovy +7 -0
- data/tracks/groovy/exercises/roman-numerals/{RomanSpec.groovy → RomanNumeralsSpec.groovy} +2 -2
- data/tracks/groovy/exercises/word-count/Example.groovy +2 -2
- data/tracks/groovy/exercises/word-count/{Phrase.groovy → WordCount.groovy} +2 -2
- data/tracks/groovy/exercises/word-count/WordCountSpec.groovy +47 -0
- data/tracks/java/config.json +84 -74
- data/tracks/java/docs/ABOUT.md +11 -5
- data/tracks/java/exercises/house/README.md +124 -0
- data/tracks/java/exercises/house/build.gradle +18 -0
- data/tracks/java/exercises/house/src/example/java/House.java +55 -0
- data/tracks/java/exercises/house/src/main/java/.keep +0 -0
- data/tracks/java/exercises/house/src/test/java/HouseTest.java +341 -0
- data/tracks/java/exercises/minesweeper/src/example/java/MinesweeperBoard.java +3 -3
- data/tracks/java/exercises/series/src/test/java/SeriesTest.java +6 -5
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +9 -0
- data/tracks/javascript/exercises/circular-buffer/circular-buffer.spec.js +8 -0
- data/tracks/javascript/exercises/simple-cipher/README.md +1 -1
- data/tracks/kotlin/docs/ABOUT.md +7 -10
- data/tracks/lisp/.travis.yml +26 -11
- data/tracks/purescript/docs/ABOUT.md +16 -0
- data/tracks/r/config.json +1 -1
- data/tracks/r/config/maintainers.json +9 -9
- data/tracks/r/docs/ABOUT.md +9 -11
- data/tracks/r/docs/snippet.txt +10 -0
- data/tracks/ruby/docs/ABOUT.md +5 -5
- data/tracks/ruby/exercises/collatz-conjecture/.meta/generator/collatz_conjecture_case.rb +1 -2
- data/tracks/ruby/exercises/space-age/.meta/generator/space_age_case.rb +1 -2
- data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +1 -1
- data/tracks/ruby/lib/generator/exercise_case.rb +15 -0
- data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +42 -28
- data/tracks/scala/exercises/binary-search/example.scala +1 -1
- data/tracks/scala/exercises/binary-search/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +13 -22
- data/tracks/scala/exercises/bowling/src/main/scala/.keep +0 -0
- data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +30 -17
- data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +14 -4
- data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +6 -4
- data/tracks/scala/exercises/food-chain/example.scala +4 -2
- data/tracks/scala/exercises/food-chain/src/test/scala/FoodChainTest.scala +170 -59
- data/tracks/scala/exercises/luhn/example.scala +9 -21
- data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +46 -10
- data/tracks/scala/testgen/src/main/scala/AlphametricsTestGenerator.scala +42 -0
- data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +32 -42
- data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +22 -7
- data/tracks/scala/testgen/src/main/scala/ChangeTestGenerator.scala +37 -0
- data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +25 -20
- data/tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala +13 -2
- data/tracks/scala/testgen/src/main/scala/LuhnTestGenerator.scala +15 -0
- data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +10 -0
- data/tracks/sml/.travis.yml +9 -2
- data/tracks/sml/Makefile +42 -0
- data/tracks/sml/docs/EXERCISE_README_INSERT.md +21 -5
- data/tracks/sml/docs/RESOURCES.md +1 -1
- data/tracks/sml/docs/TESTS.md +2 -2
- metadata +67 -17
- data/tracks/bash/exercises/word-count/README.md +0 -24
- data/tracks/bash/exercises/word-count/example.awk +0 -12
- data/tracks/bash/exercises/word-count/example.sh +0 -21
- data/tracks/dart/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- data/tracks/ecmascript/.babelrc +0 -3
- data/tracks/groovy/exercises/roman-numerals/Roman.groovy +0 -33
- data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +0 -47
- data/tracks/scala/exercises/bowling/src/main/scala/Bowling.scala +0 -11
@@ -30,13 +30,13 @@ final class MinesweeperBoard {
|
|
30
30
|
}
|
31
31
|
|
32
32
|
private String getRowWithNumbers(final int rowNumber) {
|
33
|
-
|
33
|
+
StringBuilder result = new StringBuilder(numberOfColumns);
|
34
34
|
|
35
35
|
for (int columnNumber = 0; columnNumber < numberOfColumns; columnNumber++) {
|
36
|
-
result
|
36
|
+
result.append(getCellNumber(rowNumber, columnNumber));
|
37
37
|
}
|
38
38
|
|
39
|
-
return result;
|
39
|
+
return result.toString();
|
40
40
|
}
|
41
41
|
|
42
42
|
private char getCellNumber(final int rowNumber, final int columnNumber) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import java.util.Arrays;
|
2
|
+
import java.util.Collections;
|
2
3
|
import java.util.List;
|
3
4
|
|
4
5
|
import org.junit.Test;
|
@@ -63,11 +64,11 @@ public class SeriesTest {
|
|
63
64
|
public void canSliceByOne() {
|
64
65
|
Series series = new Series("01234");
|
65
66
|
List<List<Integer>> expected = Arrays.asList(
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
Collections.singletonList(0),
|
68
|
+
Collections.singletonList(1),
|
69
|
+
Collections.singletonList(2),
|
70
|
+
Collections.singletonList(3),
|
71
|
+
Collections.singletonList(4)
|
71
72
|
);
|
72
73
|
List<List<Integer>> actual = series.slices(1);
|
73
74
|
assertNotNull(actual);
|
@@ -38,4 +38,13 @@ public class TwoferTest {
|
|
38
38
|
|
39
39
|
assertEquals(expected, twofer.twofer(input));
|
40
40
|
}
|
41
|
+
|
42
|
+
@Ignore("Remove to run test")
|
43
|
+
@Test
|
44
|
+
public void emptyStringGiven() {
|
45
|
+
String input = "";
|
46
|
+
String expected = "One for , one for me.";
|
47
|
+
|
48
|
+
assertEquals(expected, twofer.twofer(input) );
|
49
|
+
}
|
41
50
|
}
|
@@ -109,4 +109,12 @@ describe('CircularBuffer', function() {
|
|
109
109
|
expect(buffer.read).toThrow(bufferEmptyException());
|
110
110
|
});
|
111
111
|
|
112
|
+
xit('multiple buffers don\'t interfere with each other', function() {
|
113
|
+
var buffer1 = circularBuffer(1);
|
114
|
+
var buffer2 = circularBuffer(1);
|
115
|
+
buffer1.write('1');
|
116
|
+
expect(buffer2.read).toThrow(bufferEmptyException());
|
117
|
+
expect(buffer1.read()).toBe('1');
|
118
|
+
});
|
119
|
+
|
112
120
|
});
|
@@ -47,7 +47,7 @@ Given the key "aaaaaaaaaaaaaaaaaa", encoding the string "iamapandabear"
|
|
47
47
|
would return the original "iamapandabear".
|
48
48
|
|
49
49
|
Given the key "ddddddddddddddddd", encoding our string "iamapandabear"
|
50
|
-
would return the obscured "
|
50
|
+
would return the obscured "ldpdsdqgdehdu"
|
51
51
|
|
52
52
|
In the example above, we've set a = 0 for the key value. So when the
|
53
53
|
plaintext is added to the key, we end up with the same message coming
|
data/tracks/kotlin/docs/ABOUT.md
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
-
Why Kotlin
|
2
|
-
-------------
|
3
1
|
Kotlin was designed and developed by JetBrains, the company behind IntelliJ.
|
4
|
-
It is a language that runs on the JVM which can target versions 6+ (including the Android platform).
|
5
|
-
JetBrains wanted to use a statically typed language which can remove Java boilerplate code,
|
6
|
-
|
7
|
-
The JVM already had alternate languages like Groovy and Scala but neither fit the bill with their desired criteria,
|
8
|
-
so they built Kotlin.
|
2
|
+
It is a language that runs on the JVM which can target versions 6+ (including the Android platform).
|
3
|
+
JetBrains wanted to use a statically typed language which can remove Java boilerplate code, provide modern functional paradigms, and had seamless two-way Java interoperability with their existing codebase.
|
4
|
+
The JVM already had alternate languages like Groovy and Scala but neither fit the bill with their desired criteria, so they built Kotlin.
|
9
5
|
|
10
6
|
Kotlin syntax is similar to Scala and Swift but pulls in the best-of-breed features from other languages such as
|
11
|
-
C# and Groovy.
|
12
|
-
|
13
|
-
|
7
|
+
C# and Groovy.
|
8
|
+
Kotlin took a pragmatic approach at features included in the language by only providing functionality that has
|
9
|
+
been proven to be useful for developers.
|
10
|
+
With this decision they implemented a subset of features of Scala with the intent that it will provide more maintainable code with an easier learning curve for developers looking for a "better Java".
|
14
11
|
|
15
12
|
JetBrains has a dedicated team of developers working on Kotlin with the codebase available on [Github](https://github.com/JetBrains/kotlin).
|
data/tracks/lisp/.travis.yml
CHANGED
@@ -1,28 +1,43 @@
|
|
1
1
|
---
|
2
|
-
language: lisp
|
2
|
+
language: common-lisp
|
3
|
+
sudo: false
|
4
|
+
|
5
|
+
addons:
|
6
|
+
apt:
|
7
|
+
packages:
|
8
|
+
- libc6-i386
|
9
|
+
- openjdk-7-jre
|
3
10
|
|
4
11
|
env:
|
12
|
+
global:
|
13
|
+
- PATH=~/.roswell/bin:$PATH
|
14
|
+
- ROSWELL_INSTALL_DIR=$HOME/.roswell
|
5
15
|
matrix:
|
6
|
-
- LISP=sbcl
|
7
|
-
- LISP=ccl-bin
|
8
|
-
- LISP=ecl
|
9
|
-
# - LISP=clisp
|
16
|
+
- LISP=sbcl
|
10
17
|
- LISP=abcl-bin
|
11
18
|
- LISP=allegro
|
12
|
-
|
13
|
-
|
19
|
+
- LISP=ccl-bin
|
20
|
+
- LISP=ecl
|
21
|
+
- LISP=clasp
|
22
|
+
- LISP=clisp
|
23
|
+
- LISP=cmu-bin
|
24
|
+
#- LISP=sbcl-bin
|
14
25
|
|
15
26
|
matrix:
|
16
27
|
fast_finish: true
|
17
28
|
allow_failures:
|
18
|
-
- env: LISP=
|
19
|
-
- env: LISP=
|
20
|
-
|
21
|
-
# - env: LISP=clasp
|
29
|
+
- env: LISP=clasp
|
30
|
+
- env: LISP=clisp
|
31
|
+
- env: LISP=cmu-bin
|
22
32
|
|
23
33
|
install:
|
24
34
|
- curl -L 'https://raw.githubusercontent.com/snmsts/roswell/release/scripts/install-for-ci.sh' | sh
|
25
35
|
|
36
|
+
cache:
|
37
|
+
directories:
|
38
|
+
- $HOME/.roswell
|
39
|
+
- $HOME/.config/common-lisp
|
40
|
+
|
26
41
|
before_script:
|
27
42
|
- bin/fetch-configlet
|
28
43
|
- bin/configlet lint .
|
@@ -0,0 +1,16 @@
|
|
1
|
+
PureScript is a purely functional, statically-typed programming language with
|
2
|
+
type inference.
|
3
|
+
|
4
|
+
**Functional** means that functions are first-class data types.
|
5
|
+
|
6
|
+
**Purely Functional** means (roughly) that there are no side effects.
|
7
|
+
Every function will always return the same value for a given argument
|
8
|
+
and will do nothing else.
|
9
|
+
|
10
|
+
**Statically-typed** means that identifiers have a type set at compile
|
11
|
+
time--like those in Java, C++ or C#--instead of holding data of any
|
12
|
+
type like those in Python, Ruby or JavaScript.
|
13
|
+
|
14
|
+
**Type inference** means that the compiler will often figure out the
|
15
|
+
type of an identifier by itself so you don't have to specify it.
|
16
|
+
Scala and later versions of C# both do this.
|
data/tracks/r/config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"language": "R",
|
3
|
-
"checklist_issue": 5,
|
4
3
|
"active": true,
|
4
|
+
"blurb": "R is an interpreted, open source programming language with powerful data manipulation and graphical capabilities. It has a thriving package ecosystem and is one of the most popular languages for data science.",
|
5
5
|
"foregone": [
|
6
6
|
|
7
7
|
],
|
@@ -2,22 +2,22 @@
|
|
2
2
|
"maintainers": [
|
3
3
|
{
|
4
4
|
"github_username": "jonmcalder",
|
5
|
-
"show_on_website":
|
5
|
+
"show_on_website": true,
|
6
6
|
"alumnus": false,
|
7
|
-
"name":
|
8
|
-
"bio":
|
9
|
-
"link_text":
|
10
|
-
"link_url":
|
7
|
+
"name": "Jon Calder",
|
8
|
+
"bio": "I was introduced to R during my statistics undergrad in 2006 and have been trying to learn to use it properly ever since! I love the power, flexibility and expressiveness of the language, and hope I can help others to appreciate it too.",
|
9
|
+
"link_text": "My Website",
|
10
|
+
"link_url": "http://joncalder.co.za",
|
11
11
|
"avatar_url": null
|
12
12
|
},
|
13
13
|
{
|
14
14
|
"github_username": "katrinleinweber",
|
15
|
-
"show_on_website":
|
15
|
+
"show_on_website": true,
|
16
16
|
"alumnus": false,
|
17
17
|
"name": null,
|
18
|
-
"bio":
|
19
|
-
"link_text":
|
20
|
-
"link_url":
|
18
|
+
"bio": "I struggled to apply R to my own PhD research data in 2013. A Science Craft grad school course finally got me started when I decided to use another, well-formated data set. Since then, I have found R to be a lifeline for data analysis and teaching myself and others one or the other programming skill :-) R may not be pretty, but it gets the job done.",
|
19
|
+
"link_text": "KonScience podcast (mostly German)",
|
20
|
+
"link_url": "www.konscience.de/archiv/recorded-talks/",
|
21
21
|
"avatar_url": null
|
22
22
|
},
|
23
23
|
{
|
data/tracks/r/docs/ABOUT.md
CHANGED
@@ -1,14 +1,12 @@
|
|
1
|
-
R is
|
1
|
+
R is an open source, programming *lingua franca* of statistics.
|
2
|
+
It was created by **R**oss Ihaka and **R**obert Gentleman at the University of Auckland, who wanted a language that was better suited to statistical computing and easier to use than comparable software designed by computer scientists.
|
2
3
|
|
3
|
-
|
4
|
+
In addition to being a programming language, R is also an environment for interactive data analysis.
|
5
|
+
Its powerful metaprogramming capabilities allow for magically succinct and concise functions.
|
6
|
+
It can also integrate with high-performance programming languages like Fortran, C, and C++.
|
7
|
+
These combined attributes provide an excellent environment for designing [domain-specific languages](https://en.wikipedia.org/wiki/Domain-specific_language).
|
4
8
|
|
5
|
-
|
9
|
+
Ross Ihaka describes R as "a real demonstration of the power of collaboration".
|
10
|
+
R has a fantastic community of both users and developers, who contribute to a massive (and rapidly growing) collection of [packages](https://cran.r-project.org/) for importing, manipulating and visualising data, as well as cutting edge methods for statistical modelling and machine learning.
|
6
11
|
|
7
|
-
|
8
|
-
* An effective data handling and storage facility,
|
9
|
-
* A suite of operators for calculations on arrays, in particular matrices,
|
10
|
-
* A large, coherent, integrated collection of intermediate tools for data analysis,
|
11
|
-
* graphical facilities for data analysis and display either on-screen or on hardcopy, and
|
12
|
-
* A well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.
|
13
|
-
* The term “environment” is intended to characterize it as a fully planned and coherent system, rather than an incremental accretion of very specific and inflexible tools, as is frequently the case with other data analysis software.
|
14
|
-
* R can be extended (easily) via packages. There are about eight packages supplied with the R distribution and many more are available through the CRAN family of Internet sites covering a very wide range of modern statistics.
|
12
|
+
Learn more on [r-project.org](https://www.r-project.org/)!
|
data/tracks/ruby/docs/ABOUT.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.
|
1
|
+
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.
|
2
|
+
It has an elegant syntax that is natural to read and easy to write.
|
2
3
|
|
3
|
-
Ruby was created as a language of careful balance.
|
4
|
+
Ruby was created as a language of careful balance.
|
5
|
+
Its creator, [Yukihiro “Matz” Matsumoto](https://en.wikipedia.org/wiki/Yukihiro_Matsumoto), blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.
|
4
6
|
|
5
7
|
He has often said that he is "trying to make Ruby natural, not simple," in a way that mirrors life.
|
6
8
|
|
7
|
-
Building on this, he adds:
|
8
|
-
|
9
|
-
> Ruby is simple in appearance, but is very complex inside, just like our human body.
|
9
|
+
Building on this, he adds: "Ruby is simple in appearance, but is very complex inside, just like our human body."
|
10
10
|
|
11
11
|
You can read more about the Ruby language [on its site](https://www.ruby-lang.org/en/about/).
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'generator/exercise_case'
|
2
2
|
|
3
3
|
class CollatzConjectureCase < Generator::ExerciseCase
|
4
|
-
using Generator::Underscore
|
5
4
|
|
6
5
|
def workload
|
7
6
|
case expected
|
@@ -25,7 +24,7 @@ class CollatzConjectureCase < Generator::ExerciseCase
|
|
25
24
|
end
|
26
25
|
|
27
26
|
def input
|
28
|
-
number
|
27
|
+
literal(number)
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
require 'generator/exercise_case'
|
2
2
|
|
3
3
|
class SpaceAgeCase < Generator::ExerciseCase
|
4
|
-
using Generator::Underscore
|
5
4
|
|
6
5
|
def workload
|
7
|
-
indent_lines(["age = SpaceAge.new(#{seconds
|
6
|
+
indent_lines(["age = SpaceAge.new(#{literal(seconds)})",
|
8
7
|
"assert_in_delta #{expected}, age.on_#{planet.downcase}, DELTA"
|
9
8
|
], 4)
|
10
9
|
end
|
@@ -4,7 +4,7 @@ class SumOfMultiplesCase < Generator::ExerciseCase
|
|
4
4
|
using Generator::Underscore
|
5
5
|
|
6
6
|
def workload
|
7
|
-
assert_expected = "assert_equal #{expected
|
7
|
+
assert_expected = "assert_equal #{underscore(expected)}"
|
8
8
|
value = "SumOfMultiples.new(#{factors.join(', ')}).to(#{limit})"
|
9
9
|
indent_lines(["#{assert_expected}, #{value}"], 4)
|
10
10
|
end
|
@@ -27,5 +27,20 @@ module Generator
|
|
27
27
|
def respond_to?(sym, include_private = false)
|
28
28
|
canonical.respond_to?(sym) || super
|
29
29
|
end
|
30
|
+
|
31
|
+
protected
|
32
|
+
|
33
|
+
def literal(number)
|
34
|
+
number.underscore
|
35
|
+
end
|
36
|
+
|
37
|
+
def underscore(string)
|
38
|
+
string.underscore
|
39
|
+
end
|
40
|
+
|
41
|
+
def camel_case(string)
|
42
|
+
string.camel_case
|
43
|
+
end
|
44
|
+
|
30
45
|
end
|
31
46
|
end
|
@@ -1,9 +1,12 @@
|
|
1
|
-
import org.scalatest.{
|
1
|
+
import org.scalatest.{Matchers, FunSuite}
|
2
2
|
|
3
|
+
/** @version 1.0.0 */
|
3
4
|
class AlphameticsTest extends FunSuite with Matchers {
|
5
|
+
|
4
6
|
test("puzzle with three letters") {
|
5
|
-
Alphametics.solve("I + BB == ILL") should
|
6
|
-
|
7
|
+
Alphametics.solve("I + BB == ILL") should be (Some(Map('B' -> 9,
|
8
|
+
'I' -> 1,
|
9
|
+
'L' -> 0)))
|
7
10
|
}
|
8
11
|
|
9
12
|
test("solution must have unique value for each letter") {
|
@@ -18,45 +21,56 @@ class AlphameticsTest extends FunSuite with Matchers {
|
|
18
21
|
|
19
22
|
test("puzzle with four letters") {
|
20
23
|
pending
|
21
|
-
Alphametics.solve("AS + A == MOM") should
|
22
|
-
|
24
|
+
Alphametics.solve("AS + A == MOM") should be (Some(Map('A' -> 9,
|
25
|
+
'M' -> 1,
|
26
|
+
'O' -> 0,
|
27
|
+
'S' -> 2)))
|
23
28
|
}
|
24
29
|
|
25
30
|
test("puzzle with six letters") {
|
26
31
|
pending
|
27
|
-
Alphametics.solve("NO + NO + TOO == LATE") should
|
28
|
-
|
32
|
+
Alphametics.solve("NO + NO + TOO == LATE") should be (Some(Map('A' -> 0,
|
33
|
+
'E' -> 2,
|
34
|
+
'L' -> 1,
|
35
|
+
'N' -> 7,
|
36
|
+
'O' -> 4,
|
37
|
+
'T' -> 9)))
|
29
38
|
}
|
30
39
|
|
31
40
|
test("puzzle with seven letters") {
|
32
41
|
pending
|
33
|
-
Alphametics.solve("HE + SEES + THE == LIGHT") should
|
34
|
-
|
42
|
+
Alphametics.solve("HE + SEES + THE == LIGHT") should be (Some(Map('E' -> 4,
|
43
|
+
'G' -> 2,
|
44
|
+
'H' -> 5,
|
45
|
+
'I' -> 0,
|
46
|
+
'L' -> 1,
|
47
|
+
'S' -> 9,
|
48
|
+
'T' -> 7)))
|
35
49
|
}
|
36
50
|
|
37
51
|
test("puzzle with eight letters") {
|
38
52
|
pending
|
39
|
-
Alphametics.solve("SEND + MORE == MONEY") should
|
40
|
-
|
41
|
-
|
53
|
+
Alphametics.solve("SEND + MORE == MONEY") should be (Some(Map('D' -> 7,
|
54
|
+
'E' -> 5,
|
55
|
+
'M' -> 1,
|
56
|
+
'N' -> 6,
|
57
|
+
'O' -> 0,
|
58
|
+
'R' -> 8,
|
59
|
+
'S' -> 9,
|
60
|
+
'Y' -> 2)))
|
42
61
|
}
|
43
62
|
|
44
63
|
test("puzzle with ten letters") {
|
45
64
|
pending
|
46
|
-
Alphametics.solve("AND + A + STRONG + OFFENSE + AS + A + GOOD == DEFENSE") should
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
test("solve puzzle with exponents") {
|
58
|
-
pending
|
59
|
-
Alphametics.solve("PI * R ^ 2 == AREA") should
|
60
|
-
be (Some(Map('P' -> 9, 'I' -> 6, 'R' -> 7, 'A' -> 4, 'E' -> 0)))
|
65
|
+
Alphametics.solve("AND + A + STRONG + OFFENSE + AS + A + GOOD == DEFENSE") should be (Some(Map('A' -> 5,
|
66
|
+
'D' -> 3,
|
67
|
+
'E' -> 4,
|
68
|
+
'F' -> 7,
|
69
|
+
'G' -> 8,
|
70
|
+
'N' -> 0,
|
71
|
+
'O' -> 2,
|
72
|
+
'R' -> 1,
|
73
|
+
'S' -> 6,
|
74
|
+
'T' -> 9)))
|
61
75
|
}
|
62
|
-
}
|
76
|
+
}
|