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.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/lib/trackler/version.rb +1 -1
  4. data/problem-specifications/CONTRIBUTING.md +1 -1
  5. data/problem-specifications/TOPICS.txt +1 -0
  6. data/problem-specifications/exercises/accumulate/description.md +0 -3
  7. data/problem-specifications/exercises/hamming/canonical-data.json +3 -3
  8. data/problem-specifications/exercises/house/canonical-data.json +322 -0
  9. data/problem-specifications/exercises/palindrome-products/description.md +2 -2
  10. data/problem-specifications/exercises/simple-cipher/description.md +1 -1
  11. data/tracks/bash/config.json +0 -11
  12. data/tracks/cpp/docs/ABOUT.md +12 -37
  13. data/tracks/csharp/config.json +37 -0
  14. data/tracks/csharp/config/maintainers.json +10 -0
  15. data/tracks/csharp/docs/ABOUT.md +1 -1
  16. data/tracks/csharp/docs/RESOURCES.md +2 -2
  17. data/tracks/csharp/exercises/Exercises.All.sln +50 -8
  18. data/tracks/csharp/exercises/Exercises.Default.sln +50 -8
  19. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.cs +9 -0
  20. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjecture.csproj +18 -0
  21. data/tracks/csharp/exercises/collatz-conjecture/CollatzConjectureTest.cs +43 -0
  22. data/tracks/csharp/exercises/collatz-conjecture/Example.cs +30 -0
  23. data/tracks/csharp/exercises/collatz-conjecture/README.md +38 -0
  24. data/tracks/csharp/exercises/diamond/Diamond.cs +1 -1
  25. data/tracks/csharp/exercises/diamond/Diamond.csproj +3 -1
  26. data/tracks/csharp/exercises/diamond/DiamondTest.cs +39 -21
  27. data/tracks/csharp/exercises/diamond/Example.cs +2 -2
  28. data/tracks/csharp/exercises/diamond/HINTS.md +3 -1
  29. data/tracks/csharp/exercises/spiral-matrix/Example.cs +40 -0
  30. data/tracks/csharp/exercises/spiral-matrix/README.md +36 -0
  31. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.cs +9 -0
  32. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrix.csproj +18 -0
  33. data/tracks/csharp/exercises/spiral-matrix/SpiralMatrixTest.cs +78 -0
  34. data/tracks/csharp/exercises/two-fer/Example.cs +16 -0
  35. data/tracks/csharp/exercises/two-fer/README.md +25 -0
  36. data/tracks/csharp/exercises/two-fer/TwoFer.cs +9 -0
  37. data/tracks/csharp/exercises/two-fer/TwoFer.csproj +18 -0
  38. data/tracks/csharp/exercises/two-fer/TwoFerTest.cs +24 -0
  39. data/tracks/dart/README.md +1 -1
  40. data/tracks/dart/docs/EXERCISE_README_INSERT.md +9 -0
  41. data/tracks/dart/docs/INSTALLATION.md +13 -0
  42. data/tracks/dart/docs/LEARNING.md +6 -0
  43. data/tracks/dart/docs/RESOURCES.md +7 -0
  44. data/tracks/dart/docs/TESTS.md +133 -0
  45. data/tracks/delphi/docs/ABOUT.md +18 -5
  46. data/tracks/delphi/docs/Getting_Started_Guide.md +930 -0
  47. data/tracks/delphi/exercises/hamming/uHammingExample.pas +1 -1
  48. data/tracks/delphi/exercises/hamming/uHammingTests.pas +15 -15
  49. data/tracks/ecmascript/.travis.yml +2 -1
  50. data/tracks/ecmascript/Makefile +19 -8
  51. data/tracks/ecmascript/config.json +16 -0
  52. data/tracks/ecmascript/exercises/accumulate/package.json +5 -5
  53. data/tracks/ecmascript/exercises/acronym/package.json +5 -5
  54. data/tracks/ecmascript/exercises/all-your-base/package.json +5 -5
  55. data/tracks/ecmascript/exercises/allergies/package.json +5 -5
  56. data/tracks/ecmascript/exercises/alphametics/package.json +5 -5
  57. data/tracks/ecmascript/exercises/anagram/package.json +5 -5
  58. data/tracks/ecmascript/exercises/atbash-cipher/package.json +5 -5
  59. data/tracks/ecmascript/exercises/beer-song/package.json +5 -5
  60. data/tracks/ecmascript/exercises/binary-search-tree/package.json +5 -5
  61. data/tracks/ecmascript/exercises/binary-search/package.json +5 -5
  62. data/tracks/ecmascript/exercises/binary/package.json +5 -5
  63. data/tracks/ecmascript/exercises/bob/package.json +5 -5
  64. data/tracks/ecmascript/exercises/bracket-push/package.json +5 -5
  65. data/tracks/ecmascript/exercises/circular-buffer/package.json +5 -5
  66. data/tracks/ecmascript/exercises/clock/package.json +5 -5
  67. data/tracks/ecmascript/exercises/connect/package.json +5 -5
  68. data/tracks/ecmascript/exercises/crypto-square/package.json +5 -5
  69. data/tracks/ecmascript/exercises/custom-set/package.json +5 -5
  70. data/tracks/ecmascript/exercises/diamond/package.json +5 -5
  71. data/tracks/ecmascript/exercises/difference-of-squares/package.json +5 -5
  72. data/tracks/ecmascript/exercises/diffie-hellman/package.json +5 -5
  73. data/tracks/ecmascript/exercises/etl/package.json +5 -5
  74. data/tracks/ecmascript/exercises/flatten-array/package.json +5 -5
  75. data/tracks/ecmascript/exercises/food-chain/package.json +5 -5
  76. data/tracks/ecmascript/exercises/gigasecond/package.json +5 -5
  77. data/tracks/ecmascript/exercises/grade-school/package.json +5 -5
  78. data/tracks/ecmascript/exercises/grains/package.json +5 -5
  79. data/tracks/ecmascript/exercises/hamming/package.json +5 -5
  80. data/tracks/ecmascript/exercises/hello-world/package.json +5 -5
  81. data/tracks/ecmascript/exercises/hexadecimal/package.json +5 -5
  82. data/tracks/ecmascript/exercises/isogram/package.json +5 -5
  83. data/tracks/ecmascript/exercises/kindergarten-garden/package.json +5 -5
  84. data/tracks/ecmascript/exercises/largest-series-product/package.json +5 -5
  85. data/tracks/ecmascript/exercises/leap/package.json +5 -5
  86. data/tracks/ecmascript/exercises/linked-list/package.json +5 -5
  87. data/tracks/ecmascript/exercises/list-ops/package.json +5 -5
  88. data/tracks/ecmascript/exercises/luhn/package.json +5 -5
  89. data/tracks/ecmascript/exercises/matrix/package.json +5 -5
  90. data/tracks/ecmascript/exercises/meetup/package.json +5 -5
  91. data/tracks/ecmascript/exercises/minesweeper/package.json +5 -5
  92. data/tracks/ecmascript/exercises/nth-prime/package.json +5 -5
  93. data/tracks/ecmascript/exercises/ocr-numbers/package.json +5 -5
  94. data/tracks/ecmascript/exercises/octal/package.json +5 -5
  95. data/tracks/ecmascript/exercises/palindrome-products/package.json +5 -5
  96. data/tracks/ecmascript/exercises/pangram/package.json +5 -5
  97. data/tracks/ecmascript/exercises/pascals-triangle/package.json +5 -5
  98. data/tracks/ecmascript/exercises/perfect-numbers/package.json +5 -5
  99. data/tracks/ecmascript/exercises/phone-number/package.json +5 -5
  100. data/tracks/ecmascript/exercises/pig-latin/package.json +5 -5
  101. data/tracks/ecmascript/exercises/prime-factors/package.json +5 -5
  102. data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +5 -5
  103. data/tracks/ecmascript/exercises/queen-attack/package.json +5 -5
  104. data/tracks/ecmascript/exercises/raindrops/package.json +5 -5
  105. data/tracks/ecmascript/exercises/rna-transcription/package.json +5 -5
  106. data/tracks/ecmascript/exercises/robot-name/package.json +5 -5
  107. data/tracks/ecmascript/exercises/robot-simulator/package.json +5 -5
  108. data/tracks/ecmascript/exercises/roman-numerals/package.json +5 -5
  109. data/tracks/ecmascript/exercises/run-length-encoding/README.md +59 -0
  110. data/tracks/ecmascript/exercises/run-length-encoding/example.js +13 -0
  111. data/tracks/ecmascript/exercises/run-length-encoding/package.json +69 -0
  112. data/tracks/ecmascript/exercises/run-length-encoding/run-length-encoding.spec.js +59 -0
  113. data/tracks/ecmascript/exercises/saddle-points/package.json +5 -5
  114. data/tracks/ecmascript/exercises/say/package.json +5 -5
  115. data/tracks/ecmascript/exercises/scrabble-score/package.json +5 -5
  116. data/tracks/ecmascript/exercises/secret-handshake/package.json +5 -5
  117. data/tracks/ecmascript/exercises/series/package.json +5 -5
  118. data/tracks/ecmascript/exercises/sieve/package.json +5 -5
  119. data/tracks/ecmascript/exercises/simple-cipher/package.json +5 -5
  120. data/tracks/ecmascript/exercises/space-age/package.json +5 -5
  121. data/tracks/ecmascript/exercises/strain/package.json +5 -5
  122. data/tracks/ecmascript/exercises/sublist/package.json +5 -5
  123. data/tracks/ecmascript/exercises/sum-of-multiples/package.json +5 -5
  124. data/tracks/ecmascript/exercises/triangle/package.json +5 -5
  125. data/tracks/ecmascript/exercises/trinary/package.json +5 -5
  126. data/tracks/ecmascript/exercises/twelve-days/package.json +6 -5
  127. data/tracks/ecmascript/exercises/two-bucket/package.json +5 -5
  128. data/tracks/ecmascript/exercises/word-count/package.json +5 -5
  129. data/tracks/ecmascript/exercises/wordy/package.json +5 -5
  130. data/tracks/ecmascript/package.json +5 -5
  131. data/tracks/ecmascript/yarn.lock +403 -152
  132. data/tracks/elixir/docs/ABOUT.md +7 -20
  133. data/tracks/erlang/docs/ABOUT.md +4 -6
  134. data/tracks/fsharp/config.json +2 -1
  135. data/tracks/fsharp/docs/ABOUT.md +6 -2
  136. data/tracks/gnu-apl/.gitignore +4 -0
  137. data/tracks/gnu-apl/.travis.yml +5 -0
  138. data/tracks/gnu-apl/LICENSE +21 -0
  139. data/tracks/gnu-apl/README.md +67 -0
  140. data/tracks/gnu-apl/bin/fetch-configlet +32 -0
  141. data/tracks/gnu-apl/config.json +15 -0
  142. data/tracks/{scala/exercises/binary-search/src/main/scala/BinarySearch.scala → gnu-apl/config/exercise-readme-insert.md} +0 -0
  143. data/tracks/gnu-apl/config/exercise-readme.go.tmpl +16 -0
  144. data/tracks/gnu-apl/config/maintainers.json +6 -0
  145. data/tracks/gnu-apl/docs/ABOUT.md +0 -0
  146. data/tracks/gnu-apl/docs/INSTALLATION.md +0 -0
  147. data/tracks/gnu-apl/docs/LEARNING.md +0 -0
  148. data/tracks/gnu-apl/docs/RESOURCES.md +0 -0
  149. data/tracks/gnu-apl/docs/TESTS.md +0 -0
  150. data/tracks/gnu-apl/img/.keep +0 -0
  151. data/tracks/go/docs/ABOUT.md +4 -2
  152. data/tracks/go/exercises/pangram/example.go +1 -1
  153. data/tracks/go/exercises/pangram/pangram.go +1 -1
  154. data/tracks/go/exercises/pangram/pangram_test.go +1 -3
  155. data/tracks/groovy/README.md +2 -0
  156. data/tracks/groovy/config.json +25 -20
  157. data/tracks/groovy/docs/ABOUT.md +10 -3
  158. data/tracks/groovy/exercises/difference-of-squares/DifferenceOfSquares.groovy +19 -0
  159. data/tracks/groovy/exercises/difference-of-squares/{SquaresSpec.groovy → DifferenceOfSquaresSpec.groovy} +3 -3
  160. data/tracks/groovy/exercises/difference-of-squares/Example.groovy +1 -1
  161. data/tracks/groovy/exercises/hamming/Hamming.groovy +7 -0
  162. data/tracks/groovy/exercises/leap/Example.groovy +2 -2
  163. data/tracks/groovy/exercises/leap/Leap.groovy +11 -0
  164. data/tracks/groovy/exercises/leap/LeapSpec.groovy +4 -4
  165. data/tracks/groovy/exercises/nth-prime/Example.groovy +1 -1
  166. data/tracks/groovy/exercises/nth-prime/NthPrime.groovy +7 -0
  167. data/tracks/groovy/exercises/nth-prime/{PrimeSpec.groovy → NthPrimeSpec.groovy} +6 -6
  168. data/tracks/groovy/exercises/phone-number/PhoneNumber.groovy +17 -0
  169. data/tracks/groovy/exercises/raindrops/Raindrops.groovy +7 -0
  170. data/tracks/groovy/exercises/rna-transcription/Example.groovy +1 -1
  171. data/tracks/groovy/exercises/rna-transcription/RnaTranscription.groovy +7 -0
  172. data/tracks/groovy/exercises/rna-transcription/{ComplementSpec.groovy → RnaTranscriptionSpec.groovy} +2 -2
  173. data/tracks/groovy/exercises/robot-name/Example.groovy +2 -2
  174. data/tracks/groovy/exercises/robot-name/RobotName.groovy +9 -0
  175. data/tracks/groovy/exercises/robot-name/{RobotSpec.groovy → RobotNameSpec.groovy} +6 -6
  176. data/tracks/groovy/exercises/roman-numerals/Example.groovy +2 -2
  177. data/tracks/groovy/exercises/roman-numerals/RomanNumerals.groovy +7 -0
  178. data/tracks/groovy/exercises/roman-numerals/{RomanSpec.groovy → RomanNumeralsSpec.groovy} +2 -2
  179. data/tracks/groovy/exercises/word-count/Example.groovy +2 -2
  180. data/tracks/groovy/exercises/word-count/{Phrase.groovy → WordCount.groovy} +2 -2
  181. data/tracks/groovy/exercises/word-count/WordCountSpec.groovy +47 -0
  182. data/tracks/java/config.json +84 -74
  183. data/tracks/java/docs/ABOUT.md +11 -5
  184. data/tracks/java/exercises/house/README.md +124 -0
  185. data/tracks/java/exercises/house/build.gradle +18 -0
  186. data/tracks/java/exercises/house/src/example/java/House.java +55 -0
  187. data/tracks/java/exercises/house/src/main/java/.keep +0 -0
  188. data/tracks/java/exercises/house/src/test/java/HouseTest.java +341 -0
  189. data/tracks/java/exercises/minesweeper/src/example/java/MinesweeperBoard.java +3 -3
  190. data/tracks/java/exercises/series/src/test/java/SeriesTest.java +6 -5
  191. data/tracks/java/exercises/settings.gradle +1 -0
  192. data/tracks/java/exercises/two-fer/src/test/java/TwoferTest.java +9 -0
  193. data/tracks/javascript/exercises/circular-buffer/circular-buffer.spec.js +8 -0
  194. data/tracks/javascript/exercises/simple-cipher/README.md +1 -1
  195. data/tracks/kotlin/docs/ABOUT.md +7 -10
  196. data/tracks/lisp/.travis.yml +26 -11
  197. data/tracks/purescript/docs/ABOUT.md +16 -0
  198. data/tracks/r/config.json +1 -1
  199. data/tracks/r/config/maintainers.json +9 -9
  200. data/tracks/r/docs/ABOUT.md +9 -11
  201. data/tracks/r/docs/snippet.txt +10 -0
  202. data/tracks/ruby/docs/ABOUT.md +5 -5
  203. data/tracks/ruby/exercises/collatz-conjecture/.meta/generator/collatz_conjecture_case.rb +1 -2
  204. data/tracks/ruby/exercises/space-age/.meta/generator/space_age_case.rb +1 -2
  205. data/tracks/ruby/exercises/sum-of-multiples/.meta/generator/sum_of_multiples_case.rb +1 -1
  206. data/tracks/ruby/lib/generator/exercise_case.rb +15 -0
  207. data/tracks/scala/exercises/alphametics/src/test/scala/AlphameticsTest.scala +42 -28
  208. data/tracks/scala/exercises/binary-search/example.scala +1 -1
  209. data/tracks/scala/exercises/binary-search/src/main/scala/.keep +0 -0
  210. data/tracks/scala/exercises/binary-search/src/test/scala/BinarySearchTest.scala +13 -22
  211. data/tracks/scala/exercises/bowling/src/main/scala/.keep +0 -0
  212. data/tracks/scala/exercises/bowling/src/test/scala/BowlingSuite.scala +30 -17
  213. data/tracks/scala/exercises/change/src/test/scala/ChangeTest.scala +14 -4
  214. data/tracks/scala/exercises/custom-set/src/test/scala/CustomSetTest.scala +6 -4
  215. data/tracks/scala/exercises/food-chain/example.scala +4 -2
  216. data/tracks/scala/exercises/food-chain/src/test/scala/FoodChainTest.scala +170 -59
  217. data/tracks/scala/exercises/luhn/example.scala +9 -21
  218. data/tracks/scala/exercises/luhn/src/test/scala/LuhnTest.scala +46 -10
  219. data/tracks/scala/testgen/src/main/scala/AlphametricsTestGenerator.scala +42 -0
  220. data/tracks/scala/testgen/src/main/scala/BinarySearchTestGenerator.scala +32 -42
  221. data/tracks/scala/testgen/src/main/scala/BowlingTestGenerator.scala +22 -7
  222. data/tracks/scala/testgen/src/main/scala/ChangeTestGenerator.scala +37 -0
  223. data/tracks/scala/testgen/src/main/scala/CustomSetTestGenerator.scala +25 -20
  224. data/tracks/scala/testgen/src/main/scala/FoodChainTestGenerator.scala +13 -2
  225. data/tracks/scala/testgen/src/main/scala/LuhnTestGenerator.scala +15 -0
  226. data/tracks/scala/testgen/src/main/scala/TestBuilder.scala +10 -0
  227. data/tracks/sml/.travis.yml +9 -2
  228. data/tracks/sml/Makefile +42 -0
  229. data/tracks/sml/docs/EXERCISE_README_INSERT.md +21 -5
  230. data/tracks/sml/docs/RESOURCES.md +1 -1
  231. data/tracks/sml/docs/TESTS.md +2 -2
  232. metadata +67 -17
  233. data/tracks/bash/exercises/word-count/README.md +0 -24
  234. data/tracks/bash/exercises/word-count/example.awk +0 -12
  235. data/tracks/bash/exercises/word-count/example.sh +0 -21
  236. data/tracks/dart/.github/PULL_REQUEST_TEMPLATE.md +0 -23
  237. data/tracks/ecmascript/.babelrc +0 -3
  238. data/tracks/groovy/exercises/roman-numerals/Roman.groovy +0 -33
  239. data/tracks/groovy/exercises/word-count/PhraseSpec.groovy +0 -47
  240. 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
- String result = "";
33
+ StringBuilder result = new StringBuilder(numberOfColumns);
34
34
 
35
35
  for (int columnNumber = 0; columnNumber < numberOfColumns; columnNumber++) {
36
- result += getCellNumber(rowNumber, columnNumber);
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
- Arrays.asList(0),
67
- Arrays.asList(1),
68
- Arrays.asList(2),
69
- Arrays.asList(3),
70
- Arrays.asList(4)
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);
@@ -31,6 +31,7 @@ include 'grade-school'
31
31
  include 'hamming'
32
32
  include 'hexadecimal'
33
33
  include 'hello-world'
34
+ include 'house'
34
35
  include 'isogram'
35
36
  include 'kindergarten-garden'
36
37
  include 'largest-series-product'
@@ -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 "lpdsdqgdehdu"
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
@@ -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
- provide modern functional paradigms, and had seamless two-way Java interoperability with their existing codebase.
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. Kotlin took a pragmatic approach at features included in the language by only providing functionality that has
12
- been proven to be useful for developers. With this decision they implemented a subset of features of Scala with the intent
13
- that it will provide more maintainable code with an easier learning curve for developers looking for a "better Java".
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).
@@ -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-bin
7
- - LISP=ccl-bin
8
- - LISP=ecl
9
- # - LISP=clisp
16
+ - LISP=sbcl
10
17
  - LISP=abcl-bin
11
18
  - LISP=allegro
12
- # - LISP=clasp
13
- # - LISP=cmu-bin
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=abcl-bin
19
- - env: LISP=allegro
20
- # - env: LISP=cmu-bin
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": false,
5
+ "show_on_website": true,
6
6
  "alumnus": false,
7
- "name": null,
8
- "bio": null,
9
- "link_text": null,
10
- "link_url": null,
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": false,
15
+ "show_on_website": true,
16
16
  "alumnus": false,
17
17
  "name": null,
18
- "bio": null,
19
- "link_text": null,
20
- "link_url": null,
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
  {
@@ -1,14 +1,12 @@
1
- R is a free, open source, programming language and software environment for statistical computing and graphics developed at Bell Laboratories as a GNU project. It is designed as a true computer language, and is written in C, Fortran and R.
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
- R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, etc) and graphical techniques, and is highly extensible.
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
- One of its strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control. Along with this, for computationally-intensive tasks, C, C++ and Fortran can be linked and called at runtime or one can even write C code to manipulate R objects directly.
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
- The R software suite includes:
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/)!
@@ -0,0 +1,10 @@
1
+ collatz <- function(num) {
2
+ if (num <= 0)
3
+ stop("num must be positive")
4
+ else if (num == 1)
5
+ return(0)
6
+ else if (num %% 2 == 0)
7
+ return(1 + collatz(num / 2))
8
+ else
9
+ return(1 + collatz(3 * num + 1))
10
+ }
@@ -1,11 +1,11 @@
1
- Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
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. 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
+ 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.underscore
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.underscore})",
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.underscore}"
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.{FunSuite, Matchers}
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
- be (Some(Map('I' -> 1, 'B' -> 9, 'L' -> 0)))
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
- be (Some(Map('A' -> 9, 'S' -> 2, 'M' -> 1, 'O' -> 0)))
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
- be (Some(Map('N' -> 7, 'O' -> 4, 'T' -> 9, 'L' -> 1, 'A' -> 0, 'E' -> 2)))
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
- be (Some(Map('E' -> 4, 'G' -> 2, 'H' -> 5, 'I' -> 0, 'L' -> 1, 'S' -> 9, 'T' -> 7)))
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
- be (Some(Map('S' -> 9, 'E' -> 5, 'N' -> 6, 'D' -> 7, 'M' -> 1,
41
- 'O' -> 0, 'R' -> 8, 'Y' -> 2)))
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
- be (Some(Map('A' -> 5, 'D' -> 3, 'E' -> 4, 'F' -> 7, 'G' -> 8,
48
- 'N' -> 0, 'O' -> 2, 'R' -> 1, 'S' -> 6, 'T' -> 9)))
49
- }
50
-
51
- test("solve puzzle with multiplication") {
52
- pending
53
- Alphametics.solve("IF * DR == DORI") should
54
- be (Some(Map('I' -> 8, 'F' -> 2, 'D' -> 3, 'R' -> 9, 'O' -> 1)))
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
+ }