Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread shlomivaknin
@Kevin, yes, I did just that to test coll-reduce, thanks for helping me out! @Alex, thanks for the detailed response, it sure demystified this error and gave a bunch of different solutions, awesome! On Monday, March 7, 2016 at 5:17:45 PM UTC-8, Alex Miller wrote: > > Iterator, seqs, and

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread Alex Miller
Iterator, seqs, and chunking is indeed the key to this issue. The change in question is http://dev.clojure.org/jira/browse/CLJ-1669, which made iterator-seq's chunked. In general, this should not be problematic with most Java iterators, however there is a iterator implementation pattern where

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread Kevin Downey
you can still structure you computation as a reduce, even if it is side effectful. (reduce (fn [sink record] (emit sink record) sink) sink source) There is also a function introduced in 1.7 called "run!" which is for processing a collection using reduce for side effects. On 03/07/2016 04:49 PM,

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread shlomivaknin
Thanks for your reply, ArchiveReader is actually an Iterator for ArchiveRecord (see https://github.com/iipc/webarchive-commons/blob/master/src/main/java/org/archive/io/ArchiveReader.java#L51). I also tried to explicitly do (iterator-seq (.iterator warc-value)) but got the same "got 0"

Re: Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread Kevin Downey
Hard to say, I can't think of a change that would directly change how the shaed code would work. The "ArchiveReader" type hint on "warc-value" seems to be incorrect, because it is used as a seq by "doseq". Assuming this is the correct ArchiveReader

Strange problem with input stream starting clojure 1.7.0-alpha6

2016-03-07 Thread shlomivaknin
Hey clojurians, I am using a java library that reads WARC files (an internet archive format) to use with hadoop. I was recently motivated to upgrade this project's clojure from 1.6 to 1.8 (to be able to use the recent (wonderful!) cider), and I got quite a strange behavior, that I managed to

Re: [ANN] Ubergraph 0.2.0

2016-03-07 Thread Mark Engelberg
Just issued a quick bugfix release, version 0.2.1, for an issue with `find-edges` reported and patch provided by github/lomin. Thanks lomin! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

clojure .hashCode tests failure with ibm java.

2016-03-07 Thread Alex Miller
This is a known issue and we agree that the error is in the tests. However, we have not prioritized fixing it as it affects so few users (very few people run the Clojure build itself on the IBM jdk). You can see more on the ticket http://dev.clojure.org/jira/browse/CLJ-1678 -- You received

Re: Doing matrix arithmetic with complex numbers

2016-03-07 Thread Al Matthews
+1 On Sat, Mar 5, 2016, 22:12 Mars0i wrote: > You might want to post this on the Numerical clojure group as well or > instead. I've never tried using complex numbers with core.matrix. > > > -- > You received this message because you are subscribed to the Google > Groups

clojure .hashCode tests failure with ibm java.

2016-03-07 Thread raminder sodhi
Hi, I was trying to build clojure with ibm versions of java and noticed that the following tests fail. To debug i wrote the following program: import java.math.BigInteger; public class testHash { public static void main(String[] args) { BigInteger i = new BigInteger("1");

Re: Prismatic Schema - Why is "both" deprecated?

2016-03-07 Thread Jason Wolfe
Yes, that use case (two different non-predicate schemas) is no longer supported. While superficially simple, it added a fair bit of complexity and had corner cases that are not present with `conditional` or `constrained`. Moreover, in our experience the primary use case for `both` by far was