hi all,
today i experienced one of the weirdes things i ever did when working with pd ...
i've got the following setup:
|inlet| | |value xyz| |
both the inlet and the value are connected to a print object. when i send a bang message (from a gui object), it prints only print: bang on the console... when i'm using a normal bang, it prints both the bang and the value ...
i don't want to blame toxy (i'm using tow to read a popup menu, but i'm not sure, what could cause such a behaviour at all...
if it might be helpful to track this down, i could send my patch ...
cheers... tim
hi Tim,
you seem to be sending an empty list -- check if this is the case with an explicit 'list' message. This is usually a synonim for 'bang' (e.g. if sent to a [print]), but not always (e.g. not for a [v], which ignores it).
Krzysztof
Tim Blechmann wrote: ...
both the inlet and the value are connected to a print object. when i send a bang message (from a gui object), it prints only print: bang on the console... when i'm using a normal bang, it prints both the bang and the value ...
you seem to be sending an empty list -- check if this is the case with an explicit 'list' message. This is usually a synonim for 'bang' (e.g. if sent to a [print]), but not always (e.g. not for a [v], which ignores it).
wait ... if i understand it correctly, a bang is represented by either an empty list or a "bang" message, the function class_addbang is only working for the message bang... "print" is also using the class_addlist function that's working for empty lists, too...
for me that's a bug in the _language_ pd ... since it can take hours to figure that out ...
anyway, thanks for the explanation ... tim
I think the behavior should be that Pd always treat an empty list as identical to a "bang" message -- I'll try fixing pd_list() to do this. Because this is so central to Pd's implementation this might break stuff in unexpected places... so I'll leave 0.37 alone and do this for 0.38.
cheers Miller
On Sat, Jul 24, 2004 at 06:49:45PM +0200, Tim Blechmann wrote:
you seem to be sending an empty list -- check if this is the case with an explicit 'list' message. This is usually a synonim for 'bang' (e.g. if sent to a [print]), but not always (e.g. not for a [v], which ignores it).
wait ... if i understand it correctly, a bang is represented by either an empty list or a "bang" message, the function class_addbang is only working for the message bang... "print" is also using the class_addlist function that's working for empty lists, too...
for me that's a bug in the _language_ pd ... since it can take hours to figure that out ...
anyway, thanks for the explanation ... tim
-- mailto:TimBlechmann@gmx.de ICQ: 96771783
After one look at this planet any visitor from outer space would say "I want to see the manager." William S. Burroughs
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Jul 24, 2004, at 9:49 AM, Tim Blechmann wrote:
you seem to be sending an empty list -- check if this is the case with an explicit 'list' message. This is usually a synonim for 'bang' (e.g. if sent to a [print]), but not always (e.g. not for a [v], which ignores it).
wait ... if i understand it correctly, a bang is represented by either an empty list or a "bang" message, the function class_addbang is only working for the message bang... "print" is also using the class_addlist function that's working for empty lists, too...
for me that's a bug in the _language_ pd ... since it can take hours to figure that out ...
I agree that this behavior is problematic because its counter-intuitive
plus I don't see much or any benefit to having an empty list
interpreted as a bang. Does anyone have any killer examples to
convince us?
.hc
There is no way to peace, peace is the way.
-A.J. Muste
for me that's a bug in the _language_ pd ... since it can take hours to figure that out ...
I agree that this behavior is problematic because its counter-intuitive plus I don't see much or any benefit to having an empty list interpreted as a bang. Does anyone have any killer examples to convince us?
interpreting empty lists as bangs, is at least a decent way to solve this, although i would try to figure out, where empty lists appear (e.g. route) and try to replace them with bangs... maybe there is a way to forbid that objects can send empty lists at all...
cheers ... tim
On Wed, 28 Jul 2004, Tim Blechmann wrote:
interpreting empty lists as bangs, is at least a decent way to solve this, although i would try to figure out, where empty lists appear (e.g. route) and try to replace them with bangs... maybe there is a way to forbid that objects can send empty lists at all...
There are many algorithms that rely on empty lists, for example, to indicate the end of the computation, when removing elements one after the other, or as a starting case, when adding elements.
Therefore I cannot approve anything like getting rid of empty lists. I already have trouble digesting that Pd doesn't want to make a difference between a one-float list and a plain float.
Mathieu Bouchard http://artengine.ca/matju
On Jul 28, 2004, at 10:00 AM, Mathieu Bouchard wrote:
On Wed, 28 Jul 2004, Tim Blechmann wrote:
interpreting empty lists as bangs, is at least a decent way to solve this, although i would try to figure out, where empty lists appear
(e.g. route) and try to replace them with bangs... maybe there is a way to forbid that objects can send empty lists at all...There are many algorithms that rely on empty lists, for example, to indicate the end of the computation, when removing elements one after
the other, or as a starting case, when adding elements.
Ok, so are there any other algorithms that could do this without using
empty lists? I think that the list behavior is very confusing to
learn, and so far, I haven't seen any real benefit besides syntactic
sugar. Do you have any examples? I am writing a all_about_lists...
help file so it would be helpful.
Therefore I cannot approve anything like getting rid of empty lists. I already have trouble digesting that Pd doesn't want to make a
difference between a one-float list and a plain float.
This is a perfect example of the confusing behavior of lists. Here's a
little example: try to summarize the complete behavior of Pd lists in
one sentence. Its quite difficult since there are a number of caveats.
.hc ________________________________________________________________________ ____
There is no way to peace, peace is the way.
-A.J. Muste
On Sat, 24 Jul 2004, Tim Blechmann wrote:
today i experienced one of the weirdes things i ever did when working with pd ... i've got the following setup: |inlet| | |value xyz| | both the inlet and the value are connected to a print object. when i send a bang message (from a gui object), it prints only print: bang on the console... when i'm using a normal bang, it prints both the bang and the value ...
Use [rubyprint] from GridFlow. It discerns more variations than just [print] and will tell you *exactly* what it gets.
Mathieu Bouchard http://artengine.ca/matju