• ###### ExistedGitcommented on "Regular expression parser" kata

Pretty fun kata with prior knowledge in crafting interpreters

• ###### MyNameIsNobodycommented on "Regular expression parser" kata

It still happens with the Java random test.

• ###### Sanjai Kumarcommented on "Counting sheep..." haskell solution

Can someone please explain me this piece of code? what is id?

• ###### BlockArtig2_0commented on "Regular expression parser" kata

Good Kata. If you don't know what to do here, check out "Simplexer" first, since it teaches you the basics of Expression Parsing.

• ###### phaulcommented on "Find Amount of Certain Combinations than its Sum of Elements Are Within a Given Range" kata

This comment is hidden because it contains spoiler information about the solution

• ###### phaulcreated an issue for "Find Amount of Certain Combinations than its Sum of Elements Are Within a Given Range" kata

Go random tests are broken:

``````Random tests
With arr = [0 0 0 0 0 0 0 0], t = 3, k = 3
Expected
<int>: 55
to equal
<int>: 60
``````

You are given a certain array of positive and negative integers which elements occur only once (all of them different from 0)

• ###### phaulcreated a suggestion for "Find Amount of Certain Combinations than its Sum of Elements Are Within a Given Range" kata

There is some wording weirdness in the instructions. I would understand how a sequence of elements in this sense can be contigous - it would be a slice of the original array. Then non contigous would be when it's not a slice of the original array, ie it has one gap. There is no sensible definition for calling an element contigous which the description does as it's not a property of the element. I understand what it's trying to say though. I would reprhase the instructions. Also would explicitly explain that no joint pairs following the original array order are allowed.

• ###### phaulcommented on "Moving Zeros To The End" go solution

This operates on arr in place. While it wasn't explicitly stated the function should operate on a copy, one could argue the return type only makes sense if the function operated on a copy.

• ###### Lopol2010commented on "Regular expression parser" kata

Had to read some Parser Theory articles and make my first grammar for this kata! What do you think, does it looks good?

``````OrExpr = SeqExpr ["|" SeqExpr]
SeqExpr = ("(" OrExpr ")" ["*"] | Str)*
Str = /^(?:[^*()|]+\*?)+/
``````

i used imaginary syntax though

• ###### phaulcreated an issue for "6 By 6 Skyscrapers" kata

Go preloaded tests are not quite right. It doesn't correctly pick up the set variables `clues` and `expected`. I assume because the examples run after all lines of the Describe are evaluated, so the way it's done it only runs with last clues and examples. Could we move setting these variables inside the `It`?

``````var _ = Describe("Sky Scraper", func() {

It("can solve 6x6 puzzle 1", func() {
clues := []int{ 3, 2, 2, 3, 2, 1,
1, 2, 3, 3, 2, 2,
5, 1, 2, 2, 4, 3,
3, 2, 1, 2, 2, 4}

expected := [][]int{{ 2, 1, 4, 3, 5, 6 },
{ 1, 6, 3, 2, 4, 5 },
{ 4, 3, 6, 5, 1, 2 },
{ 6, 5, 2, 1, 3, 4 },
{ 5, 4, 1, 6, 2, 3 },
{ 3, 2, 5, 4, 6, 1 }}

Expect(SolvePuzzle(clues)).To(Equal(expected))
})

It("can solve 6x6 puzzle 2", func() {
clues := []int{ 0, 0, 0, 2, 2, 0, 0, 0, 0, 6, 3, 0, 0, 4, 0, 0, 0, 0, 4, 4, 0, 3, 0, 0}
expected := [][]int{{ 5, 6, 1, 4, 3, 2 },  { 4, 1, 3, 2, 6, 5 }, { 2, 3, 6, 1, 5, 4 },
{ 6, 5, 4, 3, 2, 1 }, { 1, 2, 5, 6, 4, 3 }, { 3, 4, 2, 5, 1, 6 }}

Expect(SolvePuzzle(clues)).To(Equal(expected))
})

It("can solve 6x6 puzzle 3", func() {
clues := []int{ 0, 3, 0, 5, 3, 4, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 2, 3, 3, 2, 0, 3, 1, 0}
expected := [][]int{{ 5, 2, 6, 1, 4, 3 }, { 6, 4, 3, 2, 5, 1 }, { 3, 1, 5, 4, 6, 2 },
{ 2, 6, 1, 5, 3, 4 }, { 4, 3, 2, 6, 1, 5 }, { 1, 5, 4, 3, 2, 6 }}

Expect(SolvePuzzle(clues)).To(Equal(expected))
})
})
``````
• ###### phaulcommented on "Playing on a chessboard" kata

This comment is hidden because it contains spoiler information about the solution

• ###### phaulcreated a suggestion for "Playing on a chessboard" kata

This has confusing instructions. I don't mind the chessboard story or what's there but what's missing. There should be some explanation that you expect the results in a rational representation. It shouldn't be a guesswork that the returned array represents a rational number. I did go, and []int is not a natural way to express rationals.

ok admittedly I haven't read the instructions for other languages which have a hint. I rephrase the suggestion as mentioning this as a language independent requirement at the top.

• ###### ejini战神resolved a suggestion on "Thinking & Testing : Incomplete string" kata

kata hint != kata suggestion

• ###### hobovskyresolved an issue on "Text align justify" kata

Seems to be fixed.

• ###### DallogFheircommented on "Iterate function" kata

If n is given the iterator yields n values and then closes.

Then why, in the test case with a set, the expected size of the set is 5?

first yielded value => {}

second yielded value => {0}

third yielded value => {0, 1}

fourth yielded value => {0, 1, 2}

fifth yielded value => {0, 1, 2, 3}

It yields 5 values and closes. Then why is the expected set {0, 1, 2, 3, 4}?