Re: [PD] [list length] counts unusual

2006-11-01 Thread Miller Puckette
Hmm, I think the design is, in fact, wrong.  But should I now fix it
(incompatibly)?  drat.

M

On Tue, Oct 31, 2006 at 11:10:57PM +0100, Roman Haefeli wrote:
 On Mon, 2006-10-30 at 23:04 +0100, Frank Barknecht wrote:
  Length in list-len.pd in the traditional way is calculated by
  serializing the list using [list split 1] and [list append], which
  drive a counter. I embedded it into the attached example as a
  subpatch. Here the conversion of meta-messages to list-messages is
  happening automatically as well, so this construct counts unlike [list
  length] as well.
 
 finally i understand, what you [list length] want to behave like. and in
 my eyes it makes a lot of sense now. from what you are saying i would
 also expect, that any [list]-object (besides [list trim]) prepends the
 list-selector to the incoming messages, but it doesn't here for whatever
 reason.
 
 roman
 
 
 
 
   
 ___ 
 Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
 
 
 ___
 PD-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [list length] counts unusual

2006-11-01 Thread Frank Barknecht
Hallo,
Miller Puckette hat gesagt: // Miller Puckette wrote:

 Hmm, I think the design is, in fact, wrong.  But should I now fix it
 (incompatibly)?  drat.

I think you should. I don't think many people have used the length
operation of [list] so far, as 0.40 still is quite new and there isn't
a pd-extended version of 0.40, so I'd guess it's not widely in use
yet. In fact, only those users, who explicitly wanted to count
*without* meta-selectors will have to adapt their patches and I guess
the number of users who wanted this is even smaller. So now's the
time for change!  ;)

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [list length] counts unusual

2006-11-01 Thread Marius Schebella

Frank Barknecht schrieb:


I guess
the number of users who wanted this is even smaller. 


Or to say it in other words... the number is 1.

m.

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [list length] counts unusual

2006-11-01 Thread Mathieu Bouchard

On Wed, 1 Nov 2006, Miller Puckette wrote:


Hmm, I think the design is, in fact, wrong.  But should I now fix it
(incompatibly)?  drat.


I think you should change it, because I doubt that anyone has found a use 
for the behaviour of [list length] that would be changed.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [list length] counts unusual

2006-10-26 Thread Frank Barknecht
Hallo,
Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:

 I think this logic makes sense, but I haven't played with it yet.

You don't need to play with it much, it's a decision to make: Do you
want to have [list length] give the same length for 1 2 3 and a b
c and list a b c or should a b c be one less?

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] [list length] counts unusual

2006-10-24 Thread Frank Barknecht
Hi,

I just found out that the new [list length] from Pd-0.40 counts the
length of messages slightly unusual. Counting the elements in a
meta-message like walk the dog will leave out the first element,
walk in the example, and give a result of 2.  The proper list
message list walk the dog however will count as 3. 

This gets even more confusing with the other example in the
list-help.pd file: 1 x y has a list-length of 3, however x 1 y
only has a list-length of 2.

And it gets quite nasty with an argument-less meta-message like set,
which has a list-length of 0 just like the real empty list: a 
bang-message.

I can see the logic behind this (counting only the arguments to a
message but not the selector).  But as all other [list] objects
besides [list trim] automatically convert incoming meta-messages to
list-messages I think I would expect the same to happen for [list
length]. 

Ciao
-- 
 Frank Barknecht _ __footils.org_ __goto10.org__

___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] [list length] counts unusual

2006-10-24 Thread Mathieu Bouchard

On Tue, 24 Oct 2006, Frank Barknecht wrote:

I just found out that the new [list length] from Pd-0.40 counts the 
length of messages slightly unusual. Counting the elements in a 
meta-message like walk the dog will leave out the first element, 
walk in the example, and give a result of 2. I can see the logic 
behind this (counting only the arguments to a message but not the 
selector).


This seems consistent with how messageboxes handle it. (This doesn't mean 
that it's a good idea)


But as all other [list] objects besides [list trim] automatically 
convert incoming meta-messages to list-messages I think I would expect 
the same to happen for [list length].


I consider this to be a bug in pd. In the meanwhile, use a dummy [list] 
before every use of [list length] in order to force a cast.


 _ _ __ ___ _  _ _ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada___
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list