Fork me on GitHub

I have a server side app with components(like from the component framework) which need to talk to each other, thinking of setting up some sort of an event bus, over which the components can deliver messages to each other, both one way and request-response events are needed. Any suggestions into where I should start would be of great help! can do some sort of core.async pub/sub but just wanted to know of any other viable options out there.

Alex Miller (Clojure team)05:07:48

the thought of people pouring effort into Stackoverflow Docs about Clojure rather than adding to (or worse, copying from it) depresses me more than it probably should


@alexmiller: do you want a sincere view on from the users perspective and why many would even consider Stackoverflow?


@alexmiller: I’m not that interested in adding docs on SO Docs, but considering my experience with stackoverflow, I do expect that to be relatively painless. My expectations regarding adding docs on can be summed up as “probably not worth even trying, if possible at all"


My expectations may be completely unwarranted, but the site (like clojure.core) does not present itself as a particularly friendly place for new contributors.


The clojure.core contributors seem like a pretty close small group of people who really want to focus on getting a few things (simplicity, performance…) exactly right. Right now I’m thinking that that might just necessarily clash with a wish for “pouring [lots of] effort” from more people. As a non-core-contributor, it looks like the chances of my efforts never resulting in anything or taking ages to show up are too high - especially if I “only” want to improve some documentation. This extends to the site.


Even if for online clojure documentation, quantity (especially examples) might be more needed than quality.


i feel that SO doc's added value is more like a community wiki / cookbook. i think it can be a great way for beginners to get up to speed quickly for the type of information that's currently fragmented over a gazillion of blogs, and doesn't necessarily compete with's documentation. having said that, i do fear that this will lead to even more increased fragmentation.

Nicolas Boskovic14:07:14

I've got a task I'd like some input on how to handle

Nicolas Boskovic14:07:44

Essentially I'd have to watch a file for updates and process it to get the last lines

Nicolas Boskovic14:07:11

I'm aware of the clojure-watch library, but what would a good way be to only get the last changes with clojure's io?


@verma: @ztellman's has an Event Bus helper utility, and Manifold's fundamental Streams structure (analogous to core.async channels) have interop capabilities with core.async


The addition of examples makes clojuredocs and stack overflow so useful


Is there a library (or it is even possible to write a library) to make it so invalid statements in namespace calls are more apparent? I just wasted 20 minutes due to a missing colon on an :as.


I don’t know enough about macros and name fighting vs clojure core to know if it’s possible to do it even


you can run lein check


or just try to load the namespace


it doesn’t crash on load, it crashes only when you’re trying to use one of those items in the failed require statement


which could happen days apart in work


trying lein check


lein check will report the error


btw, this is something stack overflow excels at btw. The sentence a lost person writes is what gets indexed at google due to wonderful SEO about that term. and the expert answerer points to the correct google term. And that’s why I wish we put more clojure questions up there


well it's not really open, what if they put this behind paywall tomorrow


It looks like lein run would have found the error


but lein check did too


@mpenet same problem with clojure


anyone can always take their toys and go home


not really, it's open source, anyone can fork it


Stack overflow can be entirely downloaded by topic, but you are right about redistribution


some already did


Not saying “stack overflow is awesome” just this “noob question -> great answer/terms” mapping is super valuable!

Alex Miller (Clojure team)14:07:46

@joost-diepenmaat: picking up your earlier comment, yes, interested in hearing about how to make contribution better. is at and takes PRs, which I typically merge within minutes for simple changes. Yes, you have to sign a CA, but that’s a one-time thing and many contributors already have one.

Alex Miller (Clojure team)14:07:03

there are plenty of requests that need work that could be done by the community


If anyone else is confused about the CA: your name is generated from the input you make when signing


You can’t manually enter it first.

Alex Miller (Clojure team)14:07:25

you mean the contributors page?


If the person who updates such forms is reading this, on my internal contracts that do this, I put the “printed name” after the signature for this reason


made from adobe sign

Alex Miller (Clojure team)14:07:57

if you have a modification to your name, feel free to submit a PR to the contributors.csv file


naw, just almost abandoned because I couldn’t get the field to work ;D

Alex Miller (Clojure team)14:07:19

oh, I know what you’re referring to


thanks @artiavis taking a look!

Nicolas Boskovic18:07:37

'I've got a task I'd like some input on how to handle [11:01] Essentially I'd have to watch a file for updates and process it to get the last lines [11:02] I'm aware of the clojure-watch library, but what would a good way be to only get the last changes with clojure's io?' Anyone?


@nnbosko are you asking how to get the last changes with just clojure io?

Nicolas Boskovic18:07:08

Or with a library, if there are any that specialize in that specific task


looks like most of the libraries for clojure are using java filewatcher,


you can use and that’s what tower does so you can check that code out

Alex Miller (Clojure team)18:07:04

I think watchtower uses the old facilities which are known to have some issues whereas clojure-watch uses the newer and better nio2 stuff added in java 7


in Clojure 1.9, is there an intentional change being made to destructuring and type hints? to avoid reflection, I’m seeing the following (faked class names):

;; works under 1.8, but not 1.9
(extend-type clojure.lang.APersistentMap
  (execute [{:keys [^RawConnection connection]} ^RawQuery query]
    (.query connection query)))

;; works under 1.9
(extend-type clojure.lang.APersistentMap
  (execute [{:keys [connection]} ^RawQuery query]
    (.query ^RawConnection connection query)))


under 1.8 the type hint could be added in the destructuring, in 1.9.0-alpha10 that appears to have no effect


Is there a way in clojure.test to get a report of how long each individual deftest took to run in a large run kicked off, say, by lein test?

Alex Miller (Clojure team)20:07:55

@semperos that’s a regression in the namespaced key destructuring (so dates to alpha8), I’ve already built a patch for it that will be in the next alpha

Alex Miller (Clojure team)20:07:25

(and added a test so we won’t miss it next time)


if I have a function that takes a value and function fn' as an optional argument and uses a threading macro to transform the value, how do I apply fn’ (if it exists) inside that threading macro?


Could you use a multi-arity function?

(defn sample
  ([x] (-> x inc))
  ([x fn'] (sample (fn' x))))


oh.. right I completely forgot about multi-arity!


but I still would like to find answer to my question, just curious is there a way for noop kind of thing inside a threading macro


The only thing I can think of is 's ->/when macro.


Thanks @dg I’ll check that


@ag - check out cond-> as well, it is amenable to conditional application of threading steps.