On Nov 24, 3:03 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:>
> Speculating about inefficiency without a concrete counter-proposal is
> not productive. While there could no doubt be some higher-performance
> vector constructor/reducers, producing vector-returning versions of
> the sequence ops is no
On Nov 24, 2:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Nov 24, 12:41 am, "Kevin Downey" <[EMAIL PROTECTED]> wrote:
>
> > I don't think you understand. clojure data structures are IMMUTABLE.
> > every call to conj, or anyother function returns a "new" object. To
> > optimize ther
On Nov 24, 12:41 am, "Kevin Downey" <[EMAIL PROTECTED]> wrote:
> I don't think you understand. clojure data structures are IMMUTABLE.
> every call to conj, or anyother function returns a "new" object. To
> optimize there is sharing of structure.
In the particular case at hand, i.e. calling vec on
I don't think you understand. clojure data structures are IMMUTABLE.
every call to conj, or anyother function returns a "new" object. To
optimize there is sharing of structure.
On Sun, Nov 23, 2008 at 4:38 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> On Nov 23, 1:23 am, Rich Hickey <[EMAI
On Sun, Nov 23, 2008 at 2:34 PM, André Thieme
<[EMAIL PROTECTED]>wrote:
>
> On 23 Nov., 13:38, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I have agents whose state is a vector (used as a buffer) of messages.
> > There are a couple of transformation functions, e.g. tagging messages,
> >
On Nov 23, 1:23 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I still don't understand your expectation here. If the filter does any
> filtering, it won't return everything in the vector, so the new result
> will have fewer items. Do you want a vector with fewer items? Then
> you'll have a new vect
On 23 Nov., 13:38, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I have agents whose state is a vector (used as a buffer) of messages.
> There are a couple of transformation functions, e.g. tagging messages,
> removing messages from the vector etc. which are implemented with map
> and filter.
On Nov 23, 1:23 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I still don't understand your expectation here. If the filter does any
> filtering, it won't return everything in the vector, so the new result
> will have fewer items. Do you want a vector with fewer items? Then
> you'll have a new vect
On 23 Nov., 01:23, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Nov 22, 4:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
> I still don't understand your expectation here. If the filter does any
> filtering, it won't return everything in the vector, so the new result
> will have fewer item
On Nov 22, 4:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Nov 22, 9:48 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> > map and filter don't modify anything. What does it mean to filter a
> > vector?
>
> Yes yes, I know that. Still in English its sometimes easier to be
> sloppy and
On Nov 22, 10:59 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> [...] Still in general my
> issue seems to be that data strucutres turn into seqs and this can
> cause subtle issues as for instance the different behaviour of conj
> and a simple rule such as calling vec on the seq seems to b
On Nov 22, 9:48 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> map and filter don't modify anything. What does it mean to filter a
> vector?
Yes yes, I know that. Still in English its sometimes easier to be
sloppy and pretend that I modify something even though I get another
vector.
> In any case,
On Nov 22, 1:07 pm, [EMAIL PROTECTED] wrote:
> In one of my data structures I have a vector as a buffer where things
> are appended to. In addition the things in that buffer sometimes get
> modified using map or filter. Now as map and filter return sequences I
> wonder how to get a vector back e
On Nov 22, 7:31 pm, "Christian Vest Hansen" <[EMAIL PROTECTED]>
wrote:
> With (vec) I think:http://clojure.org/api#toc508
That's not really efficient as it copies the whole seq. It seems that
relative to sequences the other data structures are second class
insofar as when you use the sequence lib
With (vec) I think: http://clojure.org/api#toc508
On Sat, Nov 22, 2008 at 7:07 PM, <[EMAIL PROTECTED]> wrote:
>
> In one of my data structures I have a vector as a buffer where things
> are appended to. In addition the things in that buffer sometimes get
> modified using map or filter. Now as ma
In one of my data structures I have a vector as a buffer where things
are appended to. In addition the things in that buffer sometimes get
modified using map or filter. Now as map and filter return sequences I
wonder how to get a vector back efficiently. I need a vector in order
for conj to append
16 matches
Mail list logo