• ###### jdaalbacommented on "Symbolic differentiation of prefix expressions" kata

Very nice kata!

• ###### Pr0j3c71Lecommented on "Symbolic differentiation of prefix expressions" kata

Either:
Add variable exponent test case: (^ x x) -> (+ (^ x x) (* (ln x) (^ x x))), (^ 2 x) -> (* (ln 2) (^ 2 x)); or
Add "Exponents will not involve variable" to the desciption.

• ###### plncommented on "Symbolic differentiation of prefix expressions" kata

In the instructions it says you should evaluate values in the resulting expression.

• ###### janquocommented on "Symbolic differentiation of prefix expressions" kata

Could you please clarify how division should be handled? It seems everywhere that we are supposed to work on integers but this test case - `diff("(/ x 2)"), "0.5"` - introduces floating point numbers and I'm not sure what's the logic behind it.

• ###### plncommented on "The Social Network" kata

Where did you need to cast ? When are interfaces ever a problem?

• ###### dfhwzecreated a question for "The Social Network" kata

Why use interfaces at all if we need to cast certain properties?
Why use mutable properties when you require unique identifiers?

• ###### plnresolved an issue on "Symbolic differentiation of prefix expressions" kata

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

• ###### plncommented on "Symbolic differentiation of prefix expressions" kata

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

• ###### champignoomcreated an issue for "Symbolic differentiation of prefix expressions" kata

`(tan (* 2 x)) --> (/ 2 (^ (cos (* 2 x)) 2))`

`expected: "(* 2 (/ 1 (^ (tan (* 2 x)) 2)))"`

Although without redundancy, no simplification is involved during the first differentiation, yet it is not taken into account by the answer.

• ###### plnresolved an issue on "Symbolic differentiation of prefix expressions" kata

I added better messages to the mentioned test cases.

• ###### dfkohcreated an issue for "Symbolic differentiation of prefix expressions" kata

I enjoyed this kata, except for the part at the end where I had to reshuffle all my commutativity stuff to make it match the test cases.

Not sure how much of the issue I ran into is only part of the rust version.

From reading the thread below, it seems like the expected way to resolve the commutativity ordering issues is to rely on the example tests? This isn't explicitly stated in the instructions (though I suggest that it should be), and is a bit annoying that the tests conflict with the given reference materials on what the ordering should be (the reference link gives the chain rule as f(g(x))' = f(g(x)) * g'(x), but the tests implement it as f(g(x))' = g'(x) * f(g(x)))

However, the main actual issue I ran into is that it's possible to pass the given example tests and yet fail on the tests where you can't see what the expected result is due to the opaque error message `assertion failed: result == expected1 || result == expected2`, which obscures the information about the expected ordering of the solution (in my case, the associativity was being grouped differently, my solution encoded cos(x) * 3 * (sin(x))^2 as `(* (* (cos x) 3) (^ (sin x) 2))`, grouping multiplication from left to right, which isn't rejected by the example tests or addressed in the instructions)

If this message could be fixed in the Rust implementation so that the kata can be completed without potentially requiring guessing, that would be great.

• ###### plnresolved an issue on "Symbolic differentiation of prefix expressions" kata

This has been suggested and replied to before.

• ###### irigicreated an issue for "Symbolic differentiation of prefix expressions" kata

I believe the test case for (^ x 2) is broken, because it does not respect commutativity of multiplication:

x^2 should return 2x: '( x 2)' should equal '(* 2 x)'

Currently, it requires the answer only in one of two possible forms.

• ###### RGafiyatullincommented on "Symbolic differentiation of prefix expressions" kata

Thanks, the `tan` case works for me now.

Try it now