@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 chunkin
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 t
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,
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" everyw
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
(http://crawler.archive.org/apidocs/org/archive/i
On 19 Jan, 12:03, joachim wrote:
> On Jan 18, 8:23 pm, Andy Fingerhut wrote:
>
> > I don't have some code lying around to do that, but I might make one. The
> > name strings would require several megabytes of storage, but as long as you
> > don't mind that...
>
> I wouldn't mind, but the code yo
On Jan 18, 8:23 pm, Andy Fingerhut wrote:
> I don't have some code lying around to do that, but I might make one. The
> name strings would require several megabytes of storage, but as long as you
> don't mind that...
I wouldn't mind, but the code your provided is already more than I was
hoping f
I don't have some code lying around to do that, but I might make one. The
name strings would require several megabytes of storage, but as long as you
don't mind that...
In the mean time, I have perhaps the next best thing: a function
escape-supp that replaces these supplementary characters with s
Thanks a lot Andy!
I am using your function now to catch "bad" cases and it works. Not
really a solution as I said, but I am very happy that at least I can
continue now with this problem out of sight :-)
Actually, from reading your response I did think of what would be even
better, namely a funct
On Tue, Jan 17, 2012 at 4:35 AM, Rasmus Svensson wrote:
> You can use this as a temporary workaround:
>
>(require '[clojure.string :as str])
>
>(defn strip-supplementary [s]
> (str/replace s #"[^\u-\u]+" "(removed supplementary
> characters)"))
>
>(strip-supplementary "The
Den 16 januari 2012 16:58 skrev joachim :
> However, when I try the same in an emacs repl, I get "Lisp connection
> closed unexpectedly: connection broken by remote peer". I have no idea
> what is going on or how to deal with this problem. Sometimes during
> development I like to print the strings
> Any ideas?
Perhaps this is what you're after:
https://github.com/technomancy/swank-clojure/issues/57
U
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members a
I don't have enough knowledge to tell you "Oh, just do this, and your Emacs
issues will be solved." but I can give some hints as to what these
characters are, so perhaps others can say, or you can direct your Google
searches in a more focused manner.
I believe those are Unicode characters, and one
Thank you, and you are most correct. I'm getting there w/ remembering
parentheses.
defproject test-csv "0.1"
:description "A clojure-csv test"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[clojure-csv/clojure-csv "1.2.1"]]
:main
It sounds like your project.clj is broken, possibly because it reads
defproject test_csv
...
instead of
(defproject test_csv
...)
But my psychic powers reach no further than that. Maybe you should
paste your project.clj, or even your whole project on github.
On Jun 25, 4:41 pm, octopusgrabb
> So I think the source of the exception is clear, but have you found a
> solution to your original problem? Maybe if you expand on that someone
> can describe a good technique.
I'm using clojure-contrib's ns-utils/ns-vars and find-namespaces/find-
namespaces-on-classpath to discover namespaces a
2010/1/10 Nicolas Buduroi :
> That was it, thanks a lot.
Ah great. My understanding is that type meta data should go on the
object not the var, but that integers for example do not support meta
data as they are java objects. Only things like vectors and hash maps
do. So you can not set an integer
> The macro works fine. The problem is that the REPL tries to print the
> result (which is the var you created) and the print multimethod does
> not know what to do with your custom type, and the default method
> throws an exception.
That was it, thanks a lot.
- budu
--
You received this messag
Hi Nicolas,
The macro works fine. The problem is that the REPL tries to print the
result (which is the var you created) and the print multimethod does
not know what to do with your custom type, and the default method
throws an exception.
user=> (defbar fuz (+ 1 1))
java.lang.ClassCastException: c
19 matches
Mail list logo