The transducers doc suggests transduce works with standard reducing
functions, but then transduce makes a one-argument call to the function.
The code docs for transduce say the reducing function must support a
one-argument call, but don't give any information about what that call
should do.
It
Are there any docs on transducer parallelism? I had the impression, from
various sources, that they could operate in parallel, but in doing some
benchmarks over a largish collection (counting character frequencies in
1.3M strings), transduce never uses more than one thread. Is this expected?
If
If you want parallelism, you'll want to use fold [0] or async's pipeline
[1].
Personally, I've found Rich's talk the best way to help me understand how
transducers were added to the language. [2]
You may also want to look at cgrand's xforms library [3]. For example, it
allows you to express fr
A transducer produces a reducing function, which processes in serial. You
can manually divide up the work into sections if you have some way of
combining the results at the end, however. I believe the
clojure.core.reducers namespace will work with any reducing function that
doesn't need a finalizer
Hi Brian,
It's not quite what you asked but https://github.com/aphyr/tesser will make
a locally and remotely running parallel TF/IDF easy and fun :)
lvh
On Fri, Jan 25, 2019 at 4:19 PM Brian Craft wrote:
> Are there any docs on transducer parallelism? I had the impression, from
> various sourc
The 1-argument form of a reducing function is called at the end of the
reduce. So for example:
(defn mean
"Transducer that returns the mean average."
([] [0 0])
([[sum count]]
(/ sum count))
([[sum count] value]
[(+ sum value) (inc count))
On Fri, 25 Jan 2019 at 22:19, Brian Craft
The ‘completing’ function can be used to add the missing arity to a reducing
function that is missing it.
http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/completing
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
>From the docs:
r/fold takes a reducible collection and partitions it into groups of
approximately n (default 512) elements. Each group is reduced using the
reducef function. The reducef function will be called with no arguments to
produce an identity value in each partition. The results of tho
Looks like it's something that's changed over different clojure releases.
On Friday, January 25, 2019 at 3:35:58 PM UTC-8, Brian Craft wrote:
>
> From the docs:
>
> r/fold takes a reducible collection and partitions it into groups of
> approximately n (default 512) elements. Each group is reduced
Which docs are you reading? The docstring for r/fold says this – with no
indication of calling (reducef) with no arguments (well, unless you do not
supply combinef – in which case reducef will be used for that, so (reducef)
would be called to seed the reductions):
"Reduces a collection using a
So I got to the bottom bottom of the problem here.
This is a scenario:
1) Library A depends on library B and Clojure 1.10
2) Library B must be AOTed due to a gen-class, but depends on Clojure 1.9
3) Library A does not work, because it is now using the Clojure core spec
1.9 compiled transitively
Okay, so after reading through the linked issue here:
https://dev.clojure.org/jira/browse/CLJ-322 I'm not sure, as a tool
builder, what is the ideal path forward.
This is what I seem to understand would be ideal, let me know if I'm wrong:
1) AOT compile everything. So basically, always AOT ever
12 matches
Mail list logo