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
@@ -0,0 +1,68 @@
|
|
1
|
+
# Pascals Triangle
|
2
|
+
|
3
|
+
Compute Pascal's triangle up to a given number of rows.
|
4
|
+
|
5
|
+
In Pascal's Triangle each number is computed by adding the numbers to
|
6
|
+
the right and left of the current position in the previous row.
|
7
|
+
|
8
|
+
```plain
|
9
|
+
1
|
10
|
+
1 1
|
11
|
+
1 2 1
|
12
|
+
1 3 3 1
|
13
|
+
1 4 6 4 1
|
14
|
+
# ... etc
|
15
|
+
```
|
16
|
+
|
17
|
+
## Setup
|
18
|
+
|
19
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
20
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
21
|
+
a Lisp implementation and how to run the tests.
|
22
|
+
|
23
|
+
## Formatting
|
24
|
+
|
25
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
26
|
+
nor whether you use spaces or tabs, this is an important consideration
|
27
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
28
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
29
|
+
the code more readable to the human reviewers. Please review your
|
30
|
+
editors settings on how to accomplish this. Below are instructions for
|
31
|
+
popular editors for Common Lisp.
|
32
|
+
|
33
|
+
### VIM
|
34
|
+
|
35
|
+
Use the following commands to ensure VIM uses only spaces for
|
36
|
+
indentation:
|
37
|
+
|
38
|
+
```vimscript
|
39
|
+
:set tabstop=2
|
40
|
+
:set shiftwidth=2
|
41
|
+
:set expandtab
|
42
|
+
```
|
43
|
+
|
44
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
45
|
+
be added to your `~/.vimrc` file to use it all the time.
|
46
|
+
|
47
|
+
### Emacs
|
48
|
+
|
49
|
+
Emacs is very well suited for editing Common Lisp and has many
|
50
|
+
powerful add-on packages available. The only thing that one needs to
|
51
|
+
do with a stock emacs to make it work well with exercism.io is to
|
52
|
+
evaluate the following code:
|
53
|
+
|
54
|
+
`(setq indent-tab-mode nil)`
|
55
|
+
|
56
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
57
|
+
order to have it set whenever Emacs is launched.
|
58
|
+
|
59
|
+
One suggested add-on for Emacs and Common Lisp is
|
60
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
61
|
+
with the REPL; making iterative coding and testing very easy.
|
62
|
+
|
63
|
+
## Source
|
64
|
+
|
65
|
+
Pascal's Triangle at Wolfram Math World [http://mathworld.wolfram.com/PascalsTriangle.html](http://mathworld.wolfram.com/PascalsTriangle.html)
|
66
|
+
|
67
|
+
## Submitting Incomplete Solutions
|
68
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# Phone Number
|
2
|
+
|
3
|
+
Clean up user-entered phone numbers so that they can be sent SMS messages.
|
4
|
+
|
5
|
+
The **North American Numbering Plan (NANP)** is a telephone numbering system used by many countries in North America like the United States, Canada or Bermuda. All NANP-countries share the same international country code: `1`.
|
6
|
+
|
7
|
+
NANP numbers are ten-digit numbers consisting of a three-digit Numbering Plan Area code, commonly known as *area code*, followed by a seven-digit local number. The first three digits of the local number represent the *exchange code*, followed by the unique four-digit number which is the *subscriber number*.
|
8
|
+
|
9
|
+
|
10
|
+
The format is usually represented as
|
11
|
+
```
|
12
|
+
(NXX)-NXX-XXXX
|
13
|
+
```
|
14
|
+
where `N` is any digit from 2 through 9 and `X` is any digit from 0 through 9.
|
15
|
+
|
16
|
+
Your task is to clean up differently formated telephone numbers by removing punctuation and the country code (1) if present.
|
17
|
+
|
18
|
+
For example, the inputs
|
19
|
+
- `+1 (613)-995-0253`
|
20
|
+
- `613-995-0253`
|
21
|
+
- `1 613 995 0253`
|
22
|
+
- `613.995.0253`
|
23
|
+
|
24
|
+
should all produce the output
|
25
|
+
|
26
|
+
`6139950253`
|
27
|
+
|
28
|
+
**Note:** As this exercise only deals with telephone numbers used in NANP-countries, only 1 is considered a valid country code.
|
29
|
+
|
30
|
+
## Setup
|
31
|
+
|
32
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
33
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
34
|
+
a Lisp implementation and how to run the tests.
|
35
|
+
|
36
|
+
## Formatting
|
37
|
+
|
38
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
39
|
+
nor whether you use spaces or tabs, this is an important consideration
|
40
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
41
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
42
|
+
the code more readable to the human reviewers. Please review your
|
43
|
+
editors settings on how to accomplish this. Below are instructions for
|
44
|
+
popular editors for Common Lisp.
|
45
|
+
|
46
|
+
### VIM
|
47
|
+
|
48
|
+
Use the following commands to ensure VIM uses only spaces for
|
49
|
+
indentation:
|
50
|
+
|
51
|
+
```vimscript
|
52
|
+
:set tabstop=2
|
53
|
+
:set shiftwidth=2
|
54
|
+
:set expandtab
|
55
|
+
```
|
56
|
+
|
57
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
58
|
+
be added to your `~/.vimrc` file to use it all the time.
|
59
|
+
|
60
|
+
### Emacs
|
61
|
+
|
62
|
+
Emacs is very well suited for editing Common Lisp and has many
|
63
|
+
powerful add-on packages available. The only thing that one needs to
|
64
|
+
do with a stock emacs to make it work well with exercism.io is to
|
65
|
+
evaluate the following code:
|
66
|
+
|
67
|
+
`(setq indent-tab-mode nil)`
|
68
|
+
|
69
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
70
|
+
order to have it set whenever Emacs is launched.
|
71
|
+
|
72
|
+
One suggested add-on for Emacs and Common Lisp is
|
73
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
74
|
+
with the REPL; making iterative coding and testing very easy.
|
75
|
+
|
76
|
+
## Source
|
77
|
+
|
78
|
+
Event Manager by JumpstartLab [http://tutorials.jumpstartlab.com/projects/eventmanager.html](http://tutorials.jumpstartlab.com/projects/eventmanager.html)
|
79
|
+
|
80
|
+
## Submitting Incomplete Solutions
|
81
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Prime Factors
|
2
|
+
|
3
|
+
Compute the prime factors of a given natural number.
|
4
|
+
|
5
|
+
A prime number is only evenly divisible by itself and 1.
|
6
|
+
|
7
|
+
Note that 1 is not a prime number.
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
What are the prime factors of 60?
|
12
|
+
|
13
|
+
- Our first divisor is 2. 2 goes into 60, leaving 30.
|
14
|
+
- 2 goes into 30, leaving 15.
|
15
|
+
- 2 doesn't go cleanly into 15. So let's move on to our next divisor, 3.
|
16
|
+
- 3 goes cleanly into 15, leaving 5.
|
17
|
+
- 3 does not go cleanly into 5. The next possible factor is 4.
|
18
|
+
- 4 does not go cleanly into 5. The next possible factor is 5.
|
19
|
+
- 5 does go cleanly into 5.
|
20
|
+
- We're left only with 1, so now, we're done.
|
21
|
+
|
22
|
+
Our successful divisors in that computation represent the list of prime
|
23
|
+
factors of 60: 2, 2, 3, and 5.
|
24
|
+
|
25
|
+
You can check this yourself:
|
26
|
+
|
27
|
+
- 2 * 2 * 3 * 5
|
28
|
+
- = 4 * 15
|
29
|
+
- = 60
|
30
|
+
- Success!
|
31
|
+
|
32
|
+
## Setup
|
33
|
+
|
34
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
35
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
36
|
+
a Lisp implementation and how to run the tests.
|
37
|
+
|
38
|
+
## Formatting
|
39
|
+
|
40
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
41
|
+
nor whether you use spaces or tabs, this is an important consideration
|
42
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
43
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
44
|
+
the code more readable to the human reviewers. Please review your
|
45
|
+
editors settings on how to accomplish this. Below are instructions for
|
46
|
+
popular editors for Common Lisp.
|
47
|
+
|
48
|
+
### VIM
|
49
|
+
|
50
|
+
Use the following commands to ensure VIM uses only spaces for
|
51
|
+
indentation:
|
52
|
+
|
53
|
+
```vimscript
|
54
|
+
:set tabstop=2
|
55
|
+
:set shiftwidth=2
|
56
|
+
:set expandtab
|
57
|
+
```
|
58
|
+
|
59
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
60
|
+
be added to your `~/.vimrc` file to use it all the time.
|
61
|
+
|
62
|
+
### Emacs
|
63
|
+
|
64
|
+
Emacs is very well suited for editing Common Lisp and has many
|
65
|
+
powerful add-on packages available. The only thing that one needs to
|
66
|
+
do with a stock emacs to make it work well with exercism.io is to
|
67
|
+
evaluate the following code:
|
68
|
+
|
69
|
+
`(setq indent-tab-mode nil)`
|
70
|
+
|
71
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
72
|
+
order to have it set whenever Emacs is launched.
|
73
|
+
|
74
|
+
One suggested add-on for Emacs and Common Lisp is
|
75
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
76
|
+
with the REPL; making iterative coding and testing very easy.
|
77
|
+
|
78
|
+
## Source
|
79
|
+
|
80
|
+
The Prime Factors Kata by Uncle Bob [http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata](http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata)
|
81
|
+
|
82
|
+
## Submitting Incomplete Solutions
|
83
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Raindrops
|
2
|
+
|
3
|
+
Convert a number to a string, the contents of which depend on the number's factors.
|
4
|
+
|
5
|
+
- If the number has 3 as a factor, output 'Pling'.
|
6
|
+
- If the number has 5 as a factor, output 'Plang'.
|
7
|
+
- If the number has 7 as a factor, output 'Plong'.
|
8
|
+
- If the number does not have 3, 5, or 7 as a factor,
|
9
|
+
just pass the number's digits straight through.
|
10
|
+
|
11
|
+
## Examples
|
12
|
+
|
13
|
+
- 28's factors are 1, 2, 4, **7**, 14, 28.
|
14
|
+
- In raindrop-speak, this would be a simple "Plong".
|
15
|
+
- 30's factors are 1, 2, **3**, **5**, 6, 10, 15, 30.
|
16
|
+
- In raindrop-speak, this would be a "PlingPlang".
|
17
|
+
- 34 has four factors: 1, 2, 17, and 34.
|
18
|
+
- In raindrop-speak, this would be "34".
|
19
|
+
|
20
|
+
## Setup
|
21
|
+
|
22
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
23
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
24
|
+
a Lisp implementation and how to run the tests.
|
25
|
+
|
26
|
+
## Formatting
|
27
|
+
|
28
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
29
|
+
nor whether you use spaces or tabs, this is an important consideration
|
30
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
31
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
32
|
+
the code more readable to the human reviewers. Please review your
|
33
|
+
editors settings on how to accomplish this. Below are instructions for
|
34
|
+
popular editors for Common Lisp.
|
35
|
+
|
36
|
+
### VIM
|
37
|
+
|
38
|
+
Use the following commands to ensure VIM uses only spaces for
|
39
|
+
indentation:
|
40
|
+
|
41
|
+
```vimscript
|
42
|
+
:set tabstop=2
|
43
|
+
:set shiftwidth=2
|
44
|
+
:set expandtab
|
45
|
+
```
|
46
|
+
|
47
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
48
|
+
be added to your `~/.vimrc` file to use it all the time.
|
49
|
+
|
50
|
+
### Emacs
|
51
|
+
|
52
|
+
Emacs is very well suited for editing Common Lisp and has many
|
53
|
+
powerful add-on packages available. The only thing that one needs to
|
54
|
+
do with a stock emacs to make it work well with exercism.io is to
|
55
|
+
evaluate the following code:
|
56
|
+
|
57
|
+
`(setq indent-tab-mode nil)`
|
58
|
+
|
59
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
60
|
+
order to have it set whenever Emacs is launched.
|
61
|
+
|
62
|
+
One suggested add-on for Emacs and Common Lisp is
|
63
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
64
|
+
with the REPL; making iterative coding and testing very easy.
|
65
|
+
|
66
|
+
## Source
|
67
|
+
|
68
|
+
A variation on a famous interview question intended to weed out potential candidates. [http://jumpstartlab.com](http://jumpstartlab.com)
|
69
|
+
|
70
|
+
## Submitting Incomplete Solutions
|
71
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Rna Transcription
|
2
|
+
|
3
|
+
Given a DNA strand, return its RNA complement (per RNA transcription).
|
4
|
+
|
5
|
+
Both DNA and RNA strands are a sequence of nucleotides.
|
6
|
+
|
7
|
+
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**),
|
8
|
+
guanine (**G**) and thymine (**T**).
|
9
|
+
|
10
|
+
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**),
|
11
|
+
guanine (**G**) and uracil (**U**).
|
12
|
+
|
13
|
+
Given a DNA strand, its transcribed RNA strand is formed by replacing
|
14
|
+
each nucleotide with its complement:
|
15
|
+
|
16
|
+
* `G` -> `C`
|
17
|
+
* `C` -> `G`
|
18
|
+
* `T` -> `A`
|
19
|
+
* `A` -> `U`
|
20
|
+
|
21
|
+
## Setup
|
22
|
+
|
23
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
24
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
25
|
+
a Lisp implementation and how to run the tests.
|
26
|
+
|
27
|
+
## Formatting
|
28
|
+
|
29
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
30
|
+
nor whether you use spaces or tabs, this is an important consideration
|
31
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
32
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
33
|
+
the code more readable to the human reviewers. Please review your
|
34
|
+
editors settings on how to accomplish this. Below are instructions for
|
35
|
+
popular editors for Common Lisp.
|
36
|
+
|
37
|
+
### VIM
|
38
|
+
|
39
|
+
Use the following commands to ensure VIM uses only spaces for
|
40
|
+
indentation:
|
41
|
+
|
42
|
+
```vimscript
|
43
|
+
:set tabstop=2
|
44
|
+
:set shiftwidth=2
|
45
|
+
:set expandtab
|
46
|
+
```
|
47
|
+
|
48
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
49
|
+
be added to your `~/.vimrc` file to use it all the time.
|
50
|
+
|
51
|
+
### Emacs
|
52
|
+
|
53
|
+
Emacs is very well suited for editing Common Lisp and has many
|
54
|
+
powerful add-on packages available. The only thing that one needs to
|
55
|
+
do with a stock emacs to make it work well with exercism.io is to
|
56
|
+
evaluate the following code:
|
57
|
+
|
58
|
+
`(setq indent-tab-mode nil)`
|
59
|
+
|
60
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
61
|
+
order to have it set whenever Emacs is launched.
|
62
|
+
|
63
|
+
One suggested add-on for Emacs and Common Lisp is
|
64
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
65
|
+
with the REPL; making iterative coding and testing very easy.
|
66
|
+
|
67
|
+
## Source
|
68
|
+
|
69
|
+
Rosalind [http://rosalind.info/problems/rna](http://rosalind.info/problems/rna)
|
70
|
+
|
71
|
+
## Submitting Incomplete Solutions
|
72
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Robot Name
|
2
|
+
|
3
|
+
Manage robot factory settings.
|
4
|
+
|
5
|
+
When robots come off the factory floor, they have no name.
|
6
|
+
|
7
|
+
The first time you boot them up, a random name is generated in the format
|
8
|
+
of two uppercase letters followed by three digits, such as RX837 or BC811.
|
9
|
+
|
10
|
+
Every once in a while we need to reset a robot to its factory settings,
|
11
|
+
which means that their name gets wiped. The next time you ask, it will
|
12
|
+
respond with a new random name.
|
13
|
+
|
14
|
+
The names must be random: they should not follow a predictable sequence.
|
15
|
+
Random names means a risk of collisions. Your solution must ensure that
|
16
|
+
every existing robot has a unique name.
|
17
|
+
|
18
|
+
## Setup
|
19
|
+
|
20
|
+
Check out [Exercism Help](http://exercism.io/languages/lisp) for instructions to
|
21
|
+
get started writing Common Lisp. That page will explain how to install and setup
|
22
|
+
a Lisp implementation and how to run the tests.
|
23
|
+
|
24
|
+
## Formatting
|
25
|
+
|
26
|
+
While Common Lisp doesn't care about indentation and layout of code,
|
27
|
+
nor whether you use spaces or tabs, this is an important consideration
|
28
|
+
for submissions to exercism.io. Excercism.io's code widget cannot
|
29
|
+
handle mixing of tab and space characters well so using only spaces is recommended to make
|
30
|
+
the code more readable to the human reviewers. Please review your
|
31
|
+
editors settings on how to accomplish this. Below are instructions for
|
32
|
+
popular editors for Common Lisp.
|
33
|
+
|
34
|
+
### VIM
|
35
|
+
|
36
|
+
Use the following commands to ensure VIM uses only spaces for
|
37
|
+
indentation:
|
38
|
+
|
39
|
+
```vimscript
|
40
|
+
:set tabstop=2
|
41
|
+
:set shiftwidth=2
|
42
|
+
:set expandtab
|
43
|
+
```
|
44
|
+
|
45
|
+
(or as a oneliner `:set tabstop=2 shiftwidth=2 expandtab`). This can
|
46
|
+
be added to your `~/.vimrc` file to use it all the time.
|
47
|
+
|
48
|
+
### Emacs
|
49
|
+
|
50
|
+
Emacs is very well suited for editing Common Lisp and has many
|
51
|
+
powerful add-on packages available. The only thing that one needs to
|
52
|
+
do with a stock emacs to make it work well with exercism.io is to
|
53
|
+
evaluate the following code:
|
54
|
+
|
55
|
+
`(setq indent-tab-mode nil)`
|
56
|
+
|
57
|
+
This can be placed in your `~/.emacs` (or `~/.emacs.d/init.el`) in
|
58
|
+
order to have it set whenever Emacs is launched.
|
59
|
+
|
60
|
+
One suggested add-on for Emacs and Common Lisp is
|
61
|
+
[SLIME](https://github.com/slime/slime) which offers tight integration
|
62
|
+
with the REPL; making iterative coding and testing very easy.
|
63
|
+
|
64
|
+
## Source
|
65
|
+
|
66
|
+
A debugging session with Paul Blackwell at gSchool. [http://gschool.it](http://gschool.it)
|
67
|
+
|
68
|
+
## Submitting Incomplete Solutions
|
69
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|