This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-09
Channels
- # announcements (3)
- # asami (1)
- # babashka (19)
- # beginners (84)
- # calva (3)
- # cider (5)
- # clj-commons (22)
- # clj-kondo (31)
- # cljdoc (4)
- # cljs-dev (5)
- # clojure (65)
- # clojure-australia (1)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-uk (2)
- # clojurescript (18)
- # code-reviews (12)
- # conjure (2)
- # core-async (12)
- # data-science (1)
- # datomic (47)
- # deps-new (1)
- # emacs (2)
- # events (4)
- # fulcro (35)
- # integrant (1)
- # jobs (5)
- # jobs-discuss (10)
- # london-clojurians (1)
- # lsp (13)
- # music (1)
- # nextjournal (1)
- # off-topic (11)
- # parinfer (3)
- # pathom (6)
- # polylith (11)
- # portal (41)
- # re-frame (4)
- # reagent (13)
- # reitit (8)
- # remote-jobs (3)
- # sci (18)
- # shadow-cljs (34)
- # spacemacs (3)
- # tools-build (12)
- # tools-deps (6)
- # vim (2)
- # xtdb (7)
What's the recommended way of manually printing a testsummary after calling test-vars
? I now have:
(defn print-summary []
(t/report (assoc (:report-counters (t/get-current-env)) :type :summary)))
Is it possible to build an Android https://developer.android.com/guide/components/services (without UI, just a background process that reads some files and sends data to the cloud) in Clojurescript + React Native? If so, which approach do you recommend?
I asked in #beginners but it looks like it may be a little specific to cljs.. I'm getting an error trying to pass a namespace to public-ns at runtime:
(defn test1 [v] (ns-publics v))
Encountered error when macroexpanding cljs.core/ns-publics.
AssertionError: Assert failed: Argument to ns-publics must be a quoted symbol
It works in a clj repl but not cljs.. any clues?And I know the fn does nothing, I just trimmed the actual fn to the part thats giving me fits 🙂
ns-publics
is a macro, so it can't be used at run time.
And it also makes sure that you don't pass any run time data in there by requiring you to provide a quoted symbol, like 'a
.
You can use ns-publics
only during compilation.
Ok, I'm storing some hiccup with some keywords that map to custom react components, replaced at runtime by clojure.walk and rendered. The replacement map is e.g. [:question-long dq/question-long]
I want to dynamically generate that replacement map from function metadata. I've annotated the functions and have the function worked out to generate the map correctly with the namespace hardcoded into the function
other challenge is to resolve the symbol at some spot, because the hard coded map does that just fine
trying to prevent forgetting to keep the replacement map up to date as that namespace grows with additional components
You can definitely do that in compile time - create that map with a macro. But note that you'll have to put all the imports manually. Namespace aliasing will help here.
@rdonahue I'll just note at a high level that you should in general avoid var metaprogramming in ClojureScript for production code