Fork me on GitHub
#cursive
<
2015-11-25
>
roelof15:11:45

hello, does anyone has explanation why in this koan https://github.com/functional-koans/clojure-koans/blob/master/src/koans/23_meta.clj . Cursive says that Giant cannot be resolved in line 13

Alex Miller (Clojure team)15:11:31

that looks like a typo to me and it should be lower-case giants

roelof15:11:55

I do not think so. if I do that part in a lein repl I see a answer

Alex Miller (Clojure team)15:11:50

well, I guess it depends on the intent of the koans writer in this case. hard for me to say for sure.

roelof15:11:25

I tried other ide like lightable and that one has no problems with it

Alex Miller (Clojure team)15:11:37

I think the reason you are probably seeing different things is because meditations is a macro that is delaying evaluation and that will confuse some editor environments

roelof15:11:04

that can be

Alex Miller (Clojure team)15:11:26

the "Giants" in that line is a symbol, which you notice is quoted in line 5

roelof15:11:54

I know Light table says my solution is wrong where a lein repl says it true

Alex Miller (Clojure team)15:11:46

what was your solution?

roelof15:11:48

yep, that is quoted in line 5 is correct

roelof15:11:28

my solution is this one : (= {:division "West"} (meta '^{:division "West"} Giants))

roelof15:11:56

lein repl says then true

Alex Miller (Clojure team)15:11:46

I certainly think that is the intent of the koan :)

roelof15:11:16

but till now no ide can handle it right 😞

roelof15:11:47

LT says this is false and Cursive cannot resolve the Giant part

roelof15:11:34

he, when I quote the Giants part , I can do run -> run and see no error message

roelof15:11:48

only also no messages from the unsolved koans

Alex Miller (Clojure team)15:11:49

I think it's confusing at a glance why this works - the reader macro ^{:division "West"} is being applied to the symbol after it Giants and then quoting (prior to that whole thing) is being applied to avoid evaluation of Giants, which is an undefined symbol

Alex Miller (Clojure team)15:11:44

I suspect Cursive is seeing the (undefined) symbol without properly accounting for the context of the quote prior to the reader macro somehow

jaen15:11:33

@roelof: understanding macros is hard, so Cursive can't understand any and all macro. Did you try just evaluating even though Cursive says it can't resolve the symbol? It's just a warning that Curisve can't find it in the index (because it can't understand any and all macro), but I think you can run it anyway if you know it's correct.

roelof15:11:58

with the same trick LT has still problems

roelof15:11:19

Thanks all