Re: with-open pattern

2017-05-04 Thread Ghadi Shayban
Hi Brian, Both plain seqs or reducibles can be consumed without realizing the whole thing in memory, especially important (as you note) when the whole thing is humongous and dwarfs available memory. To do it with a lazy seq, as in clojure.java.jdbc, you have to care of a few things. You must ov

Re: with-open pattern

2017-05-04 Thread Brian Craft
It's definitely the same problem, but I don't think it helps me. This part, in particular: "If you treat this object like a sequence, it will fully consume the input stream and fully realize the decoded data in memory." I'm specifically trying to avoid realizing the full collection in memory,

Re: with-open pattern

2017-05-04 Thread Josh Tilles
I think the “reducible streams” approach described by Paul Stadig here has potential. It might not cover all of the scenarios you’re thinking of, though. On Thursday, May 4, 2017 at 1:35:48 PM UTC-4, Brian Craft wrote: > > The with-open st

with-open pattern

2017-05-04 Thread Brian Craft
The with-open style is used a lot in the jdbc lib, and elsewhere. It's pretty simple when data is very small, as you can just evaluate the entire result with doall, etc. How do you deal with larger data, where you need to evaluate iteratively? If there's only one with-open it can be reasonably

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-05-04 Thread Steve Miner
> On May 3, 2017, at 7:37 PM, Alex Miller wrote: > > A newer version (0.1.108) of spec.alpha is available that fixes the issue. > Note that this kind of update is exactly why the jars are split - you can > update the libs more frequently than the Clojure version. Thanks. The updated spec.alph

[ANN] spec-tools 0.1.0

2017-05-04 Thread Tommi Reiman
Spec-tools is a small Clojure(Script) utility library on top of clojure.spec, with the following features: * spec records * dynamic runtime validation & transformation * tools for spec transformations including to JSON Schema * (simple data-specs) the lib: https://github.com/metosin/spec-tools b