Thanks for all the interest in this. With one thing and another I've been
otherwise occupied over the last couple of weeks, but I'll be back onto it
next week. I'll try to get a public beta set up next week and let everyone
know.
Thanks,
Colin
On 25 August 2013 12:18, Mark Mandel
wow! very interesting stuff as always Zach...quick question:
I don't see Tuple implementing clojure.lang.Associative, so 'get' won't
work right?
Jim
ps: I've got a project where I 'm working with a lot of 2-element
vectors...I can't wait to try this out :)
On 25/08/13 03:38, Zach Tellman
Hi,
Is there a function builds a function that returns always the same value?
In coder words, this sort of function:
(defn always
[v]
(fn [ _] v))
If this function exists already, I prefer use it rather than reinvent the wheel
:)
Christian
--
--
You received this message because you
Hi,
(constantly 5)
will return a function that takes any number of args and always returns 5.
See http://clojuredocs.org/clojure_core/clojure.core/constantly.
Las
2013/8/25 Christian Sperandio christian.speran...@gmail.com
Hi,
Is there a function builds a function that returns always the
Thanks, exactly what I want :)
Le 25 août 2013 à 13:40, László Török ltoro...@gmail.com a écrit :
Hi,
(constantly 5)
will return a function that takes any number of args and always returns 5.
See http://clojuredocs.org/clojure_core/clojure.core/constantly.
Las
2013/8/25
(constantly x), I think, accepts various arities including unary.
user= ((constantly 3) 5)
3
user=
On Sun, Aug 25, 2013 at 7:34 AM, Christian Sperandio
christian.speran...@gmail.com wrote:
Hi,
Is there a function builds a function that returns always the same value?
In coder words, this
There is also identity, which returns what it was passed, which seems
closer to what you described initially.
= (identity foo)
foo
(2013/08/25 20:41), Christian Sperandio wrote:
Thanks, exactly what I want :)
Le 25 aoűt 2013 ŕ 13:40, László Török ltoro...@gmail.com
Thank you :)
--
--
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 are moderated - please be patient with your
first post.
To unsubscribe from this group,
Not really.
The identity function returns the value. I want to have the function that
returns the value.
constantly is the good answer for my needs.
Le 25 août 2013 à 13:57, Dave Della Costa ddellaco...@gmail.com a écrit :
There is also identity, which returns what it was passed, which seems
Hi,
I continue improving the Gemini matching library.
I added the possibility to define the authorized validator with :all. Thus,
instead of doing :authorized {:inv 1 :sub 1 :delete 1 :insert 1} you can write
:authorized {:all 1}
And, I created a new namespace gemini.extended that provides
I don't think so, even the existence of all the Tuple* types are an
implementation detail, and you'd need to hint it as the right one to get
sane performance. (nth t n) has good performance, you should prefer that.
On Saturday, August 24, 2013 8:15:40 PM UTC-7, Ben wrote:
Are the element
in my microbenchmarks I've found it to be consistently faster to unroll a
fixed number of elements rather than iterate over them. The difference
might not be large enough to matter for many people's use cases, but the
stated goal is to make a fast collection, so it's worthwhile to use the
Hi,
A distinctive feature of reducers is that reducing is a one-shot thing.
The common understanding is that reducers are fast for cases where you want
to process whole collection at once, but for infinite and lazy seqs, you
have to use good old seqs.
With core.async, it is now easy to create
I'm somewhat new to clojure and trying to understand mapcat, so apologies
in advance if this is an embarrassingly elementary question.
mapcat's signature is (f colls) which indicates to me I should be able to
so something like (mapcat #(list (inc %)) [1 2 3] [4 5 6]). That is,
doesn't the
On Aug 25, 2013, at 5:42 PM, ngieschen wrote:
mapcat's signature is (f colls) which indicates to me I should be able to
so something like (mapcat #(list (inc %)) [1 2 3] [4 5 6]). That is, doesn't
the indicate that I can pass in a variable number of colls? However, if I
do, it crashes
That's what I get for posting late on a Sunday. I see now I misread
your request as a desire for a function that always returns its
argument, but it's clear now what you were looking for and constantly is
exactly it.
Sorry for the noise!
(2013/08/25 21:02), Christian Sperandio wrote:
Not
On Aug 25, 2013, at 2:43 PM, ngieschen nickgiesc...@gmail.com wrote:
I'm somewhat new to clojure and trying to understand mapcat, so apologies in
advance if this is an embarrassingly elementary question.
mapcat's signature is (f colls) which indicates to me I should be able to
so
Now that https://github.com/technomancy/leiningen/pull/454 is resolved,
what's the right way to have lein generate a pom.xml that Maven can build?
Is https://github.com/pallet/zi the way to go? How do I configure my
project.clj so that it adds the plugin to the pom's build section,
instead of
Good stuff Zach - I've certainly wanted something like this on various
occasions.
Some comments:
- core.matrix will also work with clj-tuple (because they support ISeq)
- If you made the tuples support IPersistentVector I think they would be
even more useful: it's helpful I think to see tuples
Nice idea Jozef!
Hmmm this is another example of why nil-as-end-of-channel is a slightly
problematic design decision for core.async: it makes this kind of code much
more fiddly.
On Monday, 26 August 2013 01:47:14 UTC+8, Jozef Wagner wrote:
Hi,
A distinctive feature of reducers is that
Here is something similar pulled from bagotricks 1.5.2, using Java's
linked blocking queue;
https://github.com/thebusby/bagotricks/blob/master/src/bagotricks.clj#L204-L238
It uses fold instead of reduce to run in parallel, so has a slightly
different use case than above.
On Mon, Aug 26, 2013 at
Hey, i am the current maintainer of tools.cli - i have very little time to
make any changes to it at the moment (kids :) ). I'm not sure what the
process is for adding you as a developer or transferring ownership etc but
if I'm happy to do so as I have no further plans for working on it.
Thanks,
Although this looks like it might work, it's not exactly a good idea. Look
at what you're doing inside the reducer, a call to !! will block a OS
level thread until someone takes from the channel. Since reducers use
fork-join pools, I wouldn't be surprised if it caused some serious
side-effects.
On Mon, Aug 26, 2013 at 1:37 PM, Timothy Baldridge tbaldri...@gmail.comwrote:
Since reducers use fork-join pools,
Reducers use multiple threads and fork-join pools when called with fold
on vectors (anything else?), not reduce.
By making the single producer thread of the reducer block on
24 matches
Mail list logo