This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-23
Channels
- # admin-announcements (38)
- # announcements (1)
- # aws (1)
- # beginners (195)
- # boot (1)
- # business (3)
- # cider (100)
- # cljsrn (37)
- # clojure (99)
- # clojure-russia (69)
- # clojure-switzerland (1)
- # clojurescript (120)
- # datavis (26)
- # datomic (23)
- # devcards (4)
- # editors (38)
- # hoplon (18)
- # ldnclj (27)
- # lein-figwheel (28)
- # off-topic (50)
- # om (329)
- # onyx (255)
- # portland-or (1)
- # re-frame (8)
- # reagent (18)
- # spacemacs (5)
- # testing (1)
Hi. I'm playing with macros in ClojureScript (inside a Hoplon project) and there's what I got: http://dpaste.com/1RB43RF I want on my page call a library function which appeals to a macro. But seems that I can't pass a value through, macro receives what is gots inline.
Is this Hoplon feature or the way ClojureScript works in general?
@dm3 I'm doing my portfolio website. I want to create multilanguage version in some crazy way 😛
the thing is just that I need to pass a value...
I would have HTML (well, DOM-generating) content which I would have as a vector, and I would parse it, and extract strings in one language, and have maps from that one to other languages and based on parameter passed to macro return version in particular language
i.e. in *.clj file I would have (1) data, which is (def data '(html (body (div "hello!..")))
(that way with quote) and a macro which either returns it directly (when parameter language
is nil
) or substitutes all the strings like "hello..."
using the map which would be also somewhere...
@dm3: please see above
sounds like it
you could describe html in something like https://github.com/weavejester/hiccup and use simple functions to process it, as it's just vectors and maps
thanks, but I got interested in that macro stuff... and, it seems that I already have a workaround
'cause when I call macro directly from my whatever.cljs.hl
file (one with (page ...)
in it), macro receives actual value
and, it's Hoplon after all 😉
though, Hiccup looks nice, i.e. it's «doing one function and doing it well» (as of Unix philosophy)