mornin'
måning
G'morn
Bore da
Open question to oh great wise & experienced Clojurians: Does alter-var-root not break the concept of immutability? I know it’s really a re-binding but I’m not sure I understand it’s use cases and the difference between it and an atom?
its overwriting the root binding for a var, thus making it visible to all threads.
its last man wins, not as CAS operation like (swap!) for atoms
so having multiple threads doing alter-var-root on the same var is a big no-no.
@martintrojer: thanks for explanation. So follow up question: why have it at all?
I think its a matter of “I know what I’m doing Clojure, don’t get in my way!"
it's so you can reload code at the repl mostly
(at least, that's mostly why vars exist)
might as well expose that mechanism to users such that they can use it if they want to
OK - so reloading code was the use case that sprang to my mind too.
or hacky tests where you want to swap out a fn somewhere
(and can’t be bothered to do the whole defprotocol, defrecord thing)
@martintrojer: in test case wouldn’t you just close over using with-redefs?
see also: stuart sierra's reloaded, where you often want a global place to put a ref to the whole system
@tcrayford: so much to read and learn..so little time! 😉
I like reloaded/component a bunch (more reloaded than component, but that's a personal thing). It's a good way of structuring systems
@tcrayford: both have been on my list of stuff to look at for > 6 months but other stuff always gets in the way.
yeah haha :simple_smile:
know that feel
@gjnoonan: picking up your thread about Clojurians in the the North. I live in NE (Newcastle/Sunderland area) and work in London. I am, to my knowledge, the only NE Clojurian! Would be a lonely Dojo!
@agile_geek: I know the feeling, I am the only clojurian I know in the North East or Yorkshire
@gjnoonan: I’m working on converting some Scala/Java devs! 😉
morning
ah, using slack with erc as Crom intended
#emacs4life
look at me going back and forth between irc and slack
morning
morning
@otfrom I had trouble setting up slack in erc. Can’t remember issue now, something to do with https I think?
@otfrom: temporal conversation!
Clojurian in Wolverton (north edge of Milton Keynes) here - but I'm working in London, so that's where I am most likely to dojo / drink beer...
Hmm, I should try erc. Maybe if emacs takes over enough of my life, I'll start using it for clojure again :simple_smile:
@agile_geek pretty easy to set up as a function
(defun erc-clojurians ()
(interactive)
(erc-tls :server "http://clojurians.irc.slack.com" :full-name "Bruce Durling" :nick "otfrom" :password "yer password goes here"))
oh dear, sorry about that
good password bruce! :simple_smile:
@otfrom cheers. I’ll give it a go when I’m not in locked down corporate hell!
sup
not much.
k
good evening guys... see you tomorrow.