This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-27
Channels
- # beginners (54)
- # bitcoin (2)
- # boot (1)
- # calva (10)
- # cider (30)
- # cljs-dev (25)
- # cljsrn (17)
- # clojure (27)
- # clojure-dev (16)
- # clojure-estonia (3)
- # clojure-hk (1)
- # clojure-italy (8)
- # clojure-losangeles (1)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-spec (15)
- # clojure-uk (45)
- # clojurebridge (1)
- # clojurescript (95)
- # clojurescript-ios (1)
- # core-async (5)
- # cursive (10)
- # datomic (8)
- # emacs (2)
- # figwheel-main (31)
- # fulcro (99)
- # hyperfiddle (3)
- # immutant (1)
- # jobs (13)
- # jobs-discuss (82)
- # keechma (6)
- # leiningen (3)
- # lumo (1)
- # nrepl (1)
- # off-topic (37)
- # onyx (1)
- # pedestal (6)
- # re-frame (7)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (6)
- # shadow-cljs (14)
- # specter (4)
- # tools-deps (27)
- # yada (12)
Morning!
@maleghast why do you ask btw?
@alex.lynham DM’ed you :-)
also whoever recommended joker
it is great
thank you
my dumb typos are rapidly becoming a thing of the past
I may have mention Joker recently as I was helping someone get it working. Apart from not understanding some macros (a common challenge for tooling I believe) then am really enjoying joker in Spacemacs. Joker encourages me to write better code too :)
Bore da pawb
well in that case thanks @jr0cket I owe you one 🙂
took a bit of hacking to shoehorn it into my emacs config
but worth it
Well we really should thank all the authors of Joker and Eastwood (and anyone else that shares there code with the community of course). I am certainly indebted to everyone who contributes to Spacemacs and anything in the Clojure/ClojureScript world
Subhothayam
Heya @jasonbell - how’s life?
does anyone here have much experience with hybrid Clojure/Java projects?
i did some work on one a long time ago in a galaxy far far away @peterwestmacott - all the java stuff was in its own lein project with tests driven from clj - https://github.com/mccraigmccraig/cascading-cassandra/blob/mccraigmccraig/src/test/com/ifesdjeen/cascading/cassandra/core_test.clj
cascalog seemed like a good idea at the time
@maleghast Yes I'm fine thank you. I trust you are keeping well too.
@jasonbell - Glad to hear it; I am well, thanks for asking 🙂
@peterwestmacott my mqtt broker is a mix of Java and Clojure in one project. heavily based on http-kit so have a look at that as well
@thomas are you managing that with maven?
Anyone up for a quick Integrant question..? I want to define two instances of the same component, each with different config, in my system definition, but the convention seems to be that I need to create a key that is analogous to the namespace of my component, so I can only create one instance of it. Anyone done this?
Example config:
:ig/system
{:fv/httpd #merge [#ref [:fv/httpd]
{:fv/db-fv #ig/ref :fv/db
:fv/event-bus #ig/ref :fv/event-bus
:fv/executor #ig/ref :fv/executor}]
:fv/db {:datasource #ref [:datasource-fv]}
;; Restartable executor - used to control threading in manifold
:fv/executor nil
;; An manifold bus to propagate events through the system
:fv/event-bus nil
;; Selmer for HTML templating
:fv/selmer nil}}
I'd like to be able to define two database pools, the key :fv/db refers to a component with the namespace fv.db, and it seems to be the case (though I could have misunderstood) that the top-level keys in the Integrant system map (:ig/system) are convention-mapped to namespaces
Obviously I could copy the component and use another namespace, but that seems crazy to me - I have a nice config-driven component that creates a HikariCP database connection pool and I want to be able to have two pools, one for each database I want to be able to reach in my app. Surely I should be able to define that my system should be created by re-using the database-pool component with two different sets of config than have two actual__ components where the only difference is the namespace, right?
@maleghast is this what you are looking for: https://github.com/weavejester/integrant#composite-keys
@mccraigmccraig - Yep! Thanks!
fresh pair of eyes &c
i don't use integrant, but i would have found it weird if it didn't support that use-case
You can also use derive. The first use I've seen for the hierarchy system really. I've been trying to think about how I can use it too.
hierarchies are great… I’ve used them a few times… including the prefer-method
extensions. They’re a very much underused feature of clojure imho.