This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-20
Channels
- # announcements (1)
- # beginners (48)
- # cljdoc (6)
- # cljs-dev (1)
- # cljsjs (1)
- # clojure (13)
- # clojure-dev (6)
- # clojure-estonia (1)
- # clojure-europe (1)
- # clojure-finland (8)
- # clojure-gamedev (3)
- # clojure-spec (35)
- # clojure-uk (25)
- # clojurescript (9)
- # datascript (1)
- # datomic (18)
- # figwheel-main (2)
- # fulcro (5)
- # graphql (1)
- # jobs (16)
- # off-topic (76)
- # pathom (39)
- # re-frame (6)
- # reagent (7)
- # remote-jobs (6)
- # rum (3)
- # shadow-cljs (54)
- # spacemacs (8)
- # speculative (2)
- # yada (72)
Is there a way to parametrize namespaces or dependencies? I am at the moment fiddeling around this to make code optionally core.async compatible, but leave it synchronous on the JVM.
So cljs and clj do different things @whilo? That sounds like reader conditionals. https://clojure.org/guides/reader_conditionals
I am heavily making use of reader conditionals, but this is about macro-expanding code differently depending on backend settings. Basically you can use core.async on both JVM and JS, but sync code on the JVM.
There's a hacky way I parameterize namespaces in CLJS here: https://clojurians-log.clojureverse.org/cljs-dev/2019-01-08/1546981037.172600 It CLJ it might be a little more straightforward for namespaces, though not sure about the dependency part.
but when the set is in an atom I can't do this (swap! atom-with-a-set-in-it apply conj '(4 5 6))
(partial apply conj)
returns a function that is is passed the set as its first parameter and your (4 5 6)
as its second parameter
makes sense. thank you @osei.poku