Clojurians
#lumo
<
2017-10-27
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

jiyinyiyong07:10:28

a.b$macros=> (ns a.core$macros)
nil
a.core$macros=> (defmacro hell [x] `(+ x 2))
#'a.core$macros/hell
a.core$macros=> (macroexpand '(a.core/hell 1))
(a.core/hell 1)
a.core$macros=> (ns foo.core$macros)
nil
foo.core$macros=> (defmacro hell [x] `(+ x 2))
#'foo.core$macros/hell
foo.core$macros=> (macroexpand '(foo.core/hell 1))
(js* "(~{} + ~{})" foo.core/x 2)

jiyinyiyong07:10:45

a.core and foo.core are different? why?

hlolli09:10:15

@jiyinyiyong because the macro only gets compiled in $macro suffixed namespaces, http://blog.fikesfarm.com/posts/2015-09-07-messing-with-macros-at-the-repl.html

hlolli09:10:07

ah sorry, they are both $macros. I'm feverish today, didnt read well.

jiyinyiyong09:10:42

yeah, it's very strange to me...

hlolli09:10:58

you get the same result from Planck?

jiyinyiyong09:10:12

didn't install planck, so didn't try

anmonteiro15:10:32

Probably a simple compilation bug

anmonteiro15:10:42

Upstream in the compiler