Re: ClojureDocs example management?

2017-06-19 Thread Mars0i
> I think part of it is that examples are easy to edit, so if there are small > easily fixed mistakes, often someone will. Ah, I didn't realize that anyone can edit others' examples. The two cases in which I've seen complaints about bad community help/examples/etc. concerned very popular

Re: defn with inline specs?

2017-06-19 Thread Alex Miller
A spec is a commitment about what the function accepts and returns. Over time, the function may grow (by requiring less in the args or by providing more in the return). By combining the function and spec, it sends the message that you can and should change both together, rather than thinking

Re: Stubbornly eager results in clojure.java.jdbc

2017-06-19 Thread James Reeves
This might be a bug in java.jdbc. The code that passes the result set seq to the function is: (^{:once true} fn* [rset] ((^{:once true} fn* [rs] (result-set-fn (if as-arrays? (cons (first rs) (map row-fn (rest rs)))

Re: Stubbornly eager results in clojure.java.jdbc

2017-06-19 Thread Luke Burton
Anyone have any insights here? Really the most important thing I'm trying to learn is 2) how to identify when a lazy seq head is being retained, other than waiting for it to become bad enough that your program OOMs. > On Jun 16, 2017, at 6:14 PM, Luke Burton wrote: > >

Re: defn with inline specs?

2017-06-19 Thread Daniel Compton
> We think there is a lot of value in having them independent. I agree that there's value in having them independent, and I'm not suggesting that fdef is taken away, but it seems like there's also value in having the ability to make them inline? It makes the code more concise and readable, and

defn with inline specs?

2017-06-19 Thread Alex Miller
No, we don't plan to add that. We think there is a lot of value in having them independent. Rather than add it to the guide, I would prefer to add a section to the FAQ page. I've been to do so, but haven't gotten around to it yet. -- You received this message because you are subscribed to the

defn with inline specs?

2017-06-19 Thread Daniel Compton
Currently I don't think it's possible to include a spec inline with a function definition. If you want to spec a function, it needs to come afterwards in an s/fdef. Is it planned for defn to have an extension to allow inline specs, similar to how pre and postconditions are defined in defn? I

[ANN] com.walmartlabs/lacinia 0.18.0

2017-06-19 Thread Howard Lewis Ship
Lacinia is an open-source implementation of Facebook's GraphQL specification, in Clojure. GraphQL is an outstanding approach to getting diverse clients and servers exchanging data cleanly and efficiently. The GitHub repository is https://github.com/walmartlabs/lacinia Documentation:

Re: Seeking a function to partially parallelize collection processing

2017-06-19 Thread Didier
So, if I understand correctly, you need to have one function sequentially and lazily split the stream, then you want each split to be sequentially processed, but you'd like different splits to be processed in parallel. I think for splitting, you could use (reductions), and then you could (pmap)

Re: Seeking a function to partially parallelize collection processing

2017-06-19 Thread Tom Connors
Thanks Jose and Sam for the suggestions. I'm having some trouble figuring out the lifecycle for the channels created for each return value from the splitter function. I'll post my code once I have something I think works in case it's interesting to anyone in the future. -- You received this

Re: [ANN] Miraj: functional, idiomatic Clojure web programming, including web components

2017-06-19 Thread Gregg Reynolds
On Mon, Jun 19, 2017 at 1:37 AM, Jiacai Liu wrote: > Cool. > One question: Is miraj compatible with https://github.com/ > weavejester/hiccup ? > If you mean mixing Hiccup and Miraj source code, I doubt it, the approach is completely different. I believe Hiccup translates

Re: [ANN] Miraj: functional, idiomatic Clojure web programming, including web components

2017-06-19 Thread Jiacai Liu
Cool. One question: Is miraj compatible with https://github.com/weavejester/hiccup ? On Mon, Jun 19, 2017 at 2:29 AM, Gregg Reynolds wrote: > Hi folks, > > The goal of the Miraj project is to support web programming, including > definition and use of web components