Re: core.async/close! locks on chans with pending transforms

2017-07-04 Thread Vitalie Spinu
>> On Mon, Jul 03 2017 21:18, Timothy Baldridge wrote: > This means, if you want to execute take correctly you must ensure that only > one thread executes the take instance at one time, since channels already > operate via a channel-level lock, it makes sense to run the transducer > inside the ch

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Ralf Schmitt
Sean Corfield writes: > A new function, reducible-query, has been added that accepts a db-spec > and a SQL/parameters vector, and returns a “reducible collection”. The > query doesn’t actually run until you reduce it. At that point, it sets > up the PreparedStatement, runs the query, and processe

Re: Spec's not being checked on macro expansion

2017-07-04 Thread Stuart Sierra
Hi Ed, I could not reproduce the behavior you described with Leiningen. Here is my test script: https://gist.github.com/stuartsierra/ca2b9bd7072224e099beb8b95b49b69c This issue might be caused by some pre-compiled files on the classpath when you run `lein test`. Since macros are evaluated durin

Re: topic-fn returning more than one topic

2017-07-04 Thread Stuart Sierra
Hi Oded, I think you would have to implement your own message-routing to achieve this. Create one "output" mult for each topic, subscribe to them with `tap`, and route the messages to the channels as they arrive. Pseudo-code: (go-loop [] (when-some [message (! topic-ch message))) This is qui

Re: Simultaneous development of a clojure project and an internal util library

2017-07-04 Thread Stuart Sierra
Hi Istvan, I often work with multiple source directories by temporarily adding them to the :source-paths in a Leiningen profile

RE: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Sean Corfield
Did you try this: (jdbc/with-db-connection [conn config/db] (.setAutoCommit (jdbc/db-find-connection conn) false) (into [] (take 2) (jdbc/reducible-query conn query {:fetch-size 500})) (I don’t have your sort of data set to test on with PostgreSQL) Sent from Mail for Windows 10

Re: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Ralf Schmitt
Sean Corfield writes: > Did you try this: > > (jdbc/with-db-connection [conn config/db] > (.setAutoCommit (jdbc/db-find-connection conn) false) > (into [] (take 2) (jdbc/reducible-query conn query {:fetch-size 500})) > > (I don’t have your sort of data set to test on with PostgreS

RE: [ANN] clojure.java.jdbc 0.7.0 Beta 1

2017-07-04 Thread Sean Corfield
> The required steps to setup streaming are different from database to > database and I guess they may change with the driver version being used. This is really the crux of the problem here – I’m not sure what java.jdbc can do generically to make this much easier. Reviewing the code, you have fo

[ANN] clojure.java.jdbc 0.7.0 Beta 4

2017-07-04 Thread Sean Corfield
[org.clojure/java.jdbc “0.7.0-beta4”] is available! It fixes reflection warnings, it passes opts correctly from reducible-query to the underlying prepare-statement, and it completes the optional specs (compared to Beta 1), as well as correctly supporting the docstring contract of reduce. Sean C