This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-25
Channels
- # aws (1)
- # beginners (60)
- # boot (12)
- # cider (7)
- # cljs-dev (8)
- # cljsrn (24)
- # clojure (169)
- # clojure-nl (1)
- # clojure-russia (3)
- # clojure-spec (15)
- # clojure-switzerland (1)
- # clojure-uk (24)
- # clojurescript (120)
- # core-async (9)
- # datomic (3)
- # emacs (2)
- # gsoc (3)
- # klipse (2)
- # leiningen (4)
- # numerical-computing (13)
- # off-topic (95)
- # om (7)
- # onyx (1)
- # powderkeg (2)
- # protorepl (2)
- # re-frame (6)
- # reagent (58)
- # ring-swagger (1)
- # rum (28)
- # untangled (42)
- # vim (6)
@tony.kay I think you said something about ui-reactkey but I couldn't read it at the time; now I can't find it. Did you delete it or has slack lost it for me? EDIT: Nvm, I found it in #om
@nha are you familiar with the new implicit macro stuff for cljs? It seems you changed one (or more) of my refers to a conditional in cljc
yes, it doesâŚalso the fact that there are macros involved in cljc can be a challenge
Yes well I never wrote a useful macro even in clj, so I am learning both at the same time. What is this implicit macro stuff?
but since youâre in cljc, you have to add the self-refer in a cljs conditional block.
text file -> EDN read -> data structures -> macro expansion -> expanded data structures -> compile
when you have a cljc file, youâve got two things youâre generating that have the same kinda path: clj and cljs
The EDN read step just sets up to emit whichever side of a conditional is relevant (clj or cljs)
So if there was a #?(:cljs (:require-macros untangled-spec.core))
in https://github.com/untangled-web/untangled-spec/blob/develop/src/untangled_spec/core.clj#L1 and it was a cljc
file it would have worked? That's nice
easier to write that so the macro uses helper functions that you can make behave properly
unfortunately not all libs have ported to that, so sometimes youâre still stuck with :refer-macros
and in cljc it gets super-confusing, because the refer
will work no matter what there for the CLJ side of the compile
https://github.com/untangled-web/untangled-spec/blob/develop/src/untangled_spec/core.cljs
the implicit stuff is enabled when the CLJS file requires the macros from the like-named clj namespace