This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (8)
- # aws (34)
- # beginners (92)
- # calva (19)
- # capetown (1)
- # cider (10)
- # cljs-dev (7)
- # cljsrn (11)
- # clojars (7)
- # clojure (130)
- # clojure-europe (4)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (11)
- # clojure-russia (1)
- # clojure-spec (4)
- # clojure-uk (64)
- # clojurescript (51)
- # cursive (9)
- # data-science (6)
- # datomic (29)
- # emacs (3)
- # figwheel-main (14)
- # fulcro (4)
- # graphql (3)
- # jackdaw (2)
- # jobs (4)
- # kaocha (17)
- # leiningen (3)
- # luminus (1)
- # off-topic (46)
- # pedestal (6)
- # portkey (2)
- # re-frame (6)
- # reagent (1)
- # reitit (9)
- # shadow-cljs (9)
- # sql (10)
- # yada (6)
@wesley.hall: I would definitely go with integrant (or duct). mount is very inflexible as it effectively makes everything a singleton.
@wesley.hall - I would also vote for Integrant; it's the direction we are going in...
Also a colleague who’d used mount extensively at a former place of work (though reported no issues with it); is now a convert to integrant now he’s using it.
I used to be a big fan of mount and then rick converted me to integrant, tend to just use that now
component is fine — but you just end up rebuilding integrant, as you almost always want to move the system to configuration.
@U0FR9C8RZ I think I probably can. I think the point here is that it is idiomatic in integrant to place the configuration of your system in an EDN file. The library reads this file and constructs a system. You essentially just map keywords to component factory functions. In component, this is not really a thing and systems are composed in code, from code... so I think what Rick is saying here is that with component, you often end up creating your own config -> code system.
I think of the declarative Clojure code that defines my system map as config. (albeit config in a fully featured programming language) So I’m not sure I see the difference.
@U0FR9C8RZ the nice thing about literal data for system config is that whatever is building the system can easily traverse the structure and e.g. sort by the dependency partial-order, or you can use things like aero to configure/specialise your system
if it's code then sure, you can traverse the code tree but that's quite possibly got opaque structures in it (closures, function refs) so it's not so easy
@U0FR9C8RZ: I think the others in this thread have explained most of the differences.
As I said “component is fine”, it’s pretty much the same as integrant; but it’s effectively a config map in a clj file. It can be useful to be able to expose that map as configuration file so people can modify or effect values in the system in different contexts - e.g. production vs staging vs dev vs test without changing code.
With component you have to do this work yourself. Or add some notion and wiring of special configurable bits of the system.
Integrant / duct gives you all the pieces you need to separate this out. Without needing much extra glue.
Also it’s worth saying that you can get a lot of power by then meta-merging these maps in a precedence chain. Typically we’ll have an override chain that gets merged into the final system e.g.
(meta-merge [base-config customer-config env-config]) so you can configure different overrides without having to duplicate the whole system map.
Also integrant has some great features, such as hierarchies, refsets, and composite keys. Which are really useful concepts component doesn’t really have.
we use component extensively but have an item on a todo list somewhere to take a look at Integrant, because people keep recommending it
depending on the project it’s probably not worth switching, unless you want things to be more configurable, and adding a config system is about the same amount of work as porting. Like I said component is fine, integrant isn’t much different. I’d certainly consider using it in greenfield projects over component. It’s much better than mount, and far more flexible. mount’s singleton design is a big problem in my mind.
I need to bump the versions in the project clj but I use this as a template to show people new to integrant roughly how it fits together https://github.com/the-frey/compojure-api-integrant
there's some things that aren't perfect about it, but it shows the idea well enough
Looks like all the love goes to integrant 🙂. To be honest, it's my favourite too, so I am happy to be validated. Thanks for input folks.
So a fun little thing I found out the other day: https://clojuredocs.org/clojure.pprint/pprint#example-5591ab88e4b05f167dcf2345 pprint to a file. So when it comes to saving json pprint it can be quite nice :thumbsup:
sorry to lower the tone; has anyone got a good link to the content of yesterday's immigration bill?
put an end to free movement of people and
sweeping Henry 8th powers
all the press sounds so awful that I just wanted to double check
oh I didn't realise they had a transcript of the debate https://hansard.parliament.uk/commons/2019-01-28/debates/321FEFF1-26E7-4194-91BD-BC530B5AE57E/ImmigrationAndSocialSecurityCo-Ordination(EUWithdrawal)Bill#debate-3677218
lots of Labour abstainers. Only a single line whip and that was after a lot of pressure from various sides. Not really what I hoped for from Labour, but what I've come to expect. (I always assume the Tories are going to be bastards on things like this, esp under May, but was hoping that Labour might at least show some leadership here)
Steve Brine (my so called MP, as I couldn't vote) seems to be invisible as far as I can tell... he just follows the party line (conservative)
I did write to him telling that Brexit was one of the reasons I left and I got back a very none answer
But we once did get a handwritten letter from him saying that he understood our frustration at not being able to vote in the UK (for Westminster) and yet having to pay income tax.
I don't really have time to read that right now, @ben.hammond but thanks for the link
I’m so glad that people are talking about
ex-*. More people need to know about it.