This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-11
Channels
- # announcements (1)
- # aws (4)
- # beginners (16)
- # cider (9)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (46)
- # clojure-brasil (1)
- # clojure-spec (3)
- # clojure-uk (4)
- # clojurescript (46)
- # cursive (26)
- # duct (1)
- # emacs (31)
- # figwheel (1)
- # fulcro (9)
- # graalvm (21)
- # kaocha (1)
- # nyc (1)
- # off-topic (4)
- # pathom (6)
- # planck (45)
- # re-frame (2)
- # reagent (11)
- # ring (5)
- # rum (9)
- # spacemacs (2)
- # sql (60)
- # tools-deps (3)
Can someone help me out with a macro callable from Clojurescript? https://clojureverse.org/t/help-me-with-a-clojurescript-macro/4249
play around with macroexpand-1
to see what your macro gets expanded into in the two cases
evaluation happens at runtime, you can evaluate arguments with a function call, for example
it looks like you're trying to generate code at macroexpansion time for a runtime value
I wonder if it's good enough to do codegen the old fashioned way. discover your MaterialUI keys in an earlier build step, then serialize it to a file such that you are invoking your macro with a literal argument
getting the value through an argument to the macro delays its evaluation so you don't know it
I’m trying to figure out how to loop in a macro… I looked how doseq is done… and… that’s some scary shit
I give up… I’m tired and I can’t solve it… even tried using js/eval. I’m missing something here. Will try again later. Thank you for your help @UHBQQMPGR
sorry I can't be of more help this time, also a bit distracted myself. the macro-eval-compile triad in cljs is a tricky beast
fwiw, I'm using material in a project too, and have gone with the codegen route I suggested earlier
It might turn to be unsolvable. Whatever I come up with if it doesn't pass advanced compilation is useless anyway
@davehodge nice!
(s/def ::my-ch #(instance? cljs.core.async.impl.channels/ManyToManyChannel %))
Is there a better way to write a chan?
predicate for specs? I.e. without reaching into impl
?where is defn
defined in CLJS? I can’t find it in core.cljc
. Is it a compiler special case?