Fork me on GitHub

ah thanks chaps.


I was wondering if there are techniques to keep a main alive in case of my threads all being daemon, I am stuck with spawning (.setDaemon (Thread.) false) but there must be a better way (Apache Commons Daemon?)...


I know, what I am doing is so ugly nobody dares anwering 😄


I have done that sort of thing, usually by parking the main thread by derefing a promise that is never delivered to, but I don't particularly like it, it is not very neat, I prefer to have the main thread actually parked waiting on the end of execution of any worker threads


Hi all, I'm new to clojure and would be highly appreciative if someone could help me with a question regarding VisualVM: While playing around with it, I noticed that while the sampler is running, it shows completely different function calls than when I take a snapshot and look at the "Hot Spots" (selecting the repl thread). I was looking around on the internet but couldn't find any answer.


(I'll be afk for about an hour)


(I didn't set up any JMX Connection)


Hi, anyone can point me to examples of unit tests for riemann? I managed to write some very basic tests (basically that my where clause does its job). I’d like to test some expected side effects on events reception. Thanks in advance.

Dustin Getz14:05:59

I am trying to convert between component notation and entity notation (both directions) for datomic entities, Here is my first attempt based on Bobby Calderwood’s datomic helper gist from a few years ago, I am searching for a cleaner way any ideas?


Hey guys using clj-http and ring. Need to detect when a client is no longer around to send the HTTPResponse back. (We have a long running server process that we want to kill so we dont waste server resources) In GoLang, I could response.CloseNotify(). I there anything similar I could use in Clojure


with ring it would be much more convoluted, it would likely be less so with an abstraction that isn't so synchronous. you could do it with ring by returning a custom inputstream as the body, with the custom inputstream signaling on close


@darwin I saw this. Moving kind of slow on this project, so … I’ll definitely look soon.


@arrdem I’ve contributed to rewrite-clj. The parser is… painful. Overcomplicated. I don’t think it can be cleaned up.


Hi! Is there a function like map, but for nested maps (the data structure)? I imagine something like map-leaves that would apply a transformation to every leaf in a tree. Asking just in case, otherwise I'll bring out the old friends loop and recur...


A lot of people seem to reach for records a lot sooner than I do. I often wonder if this is hold-over from OOP, or if there are other reasons.


@codemartin: You mean like clojure.walk?


@eraserhd: I don't think it's that bad personally. Far better than at any rate. As to records, for something perf sensitive like a reader they're kinda a must unless you want to write a bunch of Java.


Hi! Anyone knows a good stubbing library?


observation: Clojure is much easier to install than Mathematica


I am calling an api asynchronously, and want to avoid a call if one of the parameter is null...I tried (string/blank? var) But this did not work as per expectations. There is an exception thrown 'No implementation of method: :take! of protocol' .. Any idea when do we get this exception.. Am I doing anything wrong? would checking with (null? var ) help.. I have no way of checking this code in test, so not able to figure if it would work or not


@payal can you paste the code into a snippet or on a paste site and give us the link? Will be easier to give you suggestions if we can see the code.


i remember reading once that libraries shouldn’t return core.async channels from functions, but rather take a callback instead. i can’t seem to find where i read this, or the reasoning behind this


returning a core.async channel makes your client depend on core.async as well?


This runs absolutely fine when I send a not-null id..


jstokes: i recalled seeing that discussed in the google group:


cascada-io: thanks!


Is it possible to use prismatic's schema.coerce to coerce to a Record? I get (not (instance? MyRecord a-clojure.lang.PersistentArrayMap)).