[PD] Re: [PD-dev] Re: prepend w/ set message - ignore

Mathieu Bouchard matju at sympatico.ca
Tue Jan 4 09:06:28 CET 2005


On Mon, 3 Jan 2005, Krzysztof Czaja wrote:

> in Pd, the proper handling seems to be:
> 'bang' -> [prepend test this]: 'test this'
> 'list' -> [prepend test this]: 'test this'
> 'symbol bang' -> [prepend test this]: 'test this bang'
> 'symbol list' -> [prepend test this]: 'test this list'

Ok, since all this [prepend] ties in with how the whole of the Pd
messagesystem is supposed to work, I have a question: if I do something
like:

  [bang( -> [t a a] ->                 [prepend test this]
and
  [bang( -> [t a a] -> [route list] -> [prepend test this]

which one should be produced?

  (a) first 'test this',        second no-op
  (b) first 'test this bang',   second no-op
  (c) both  'test this list 0'
  (d) first 'test this list 0', second no-op

Personally I'd expect either (b), or _maybe_ (a), and actually, replacing
[t a a] with my own [fork] object (which does 99% the same), i get (b).
However, trying the first case with [t a a], I think i get (c), until I
try the second case and the reality is (d) (this behaviour of [route] is
even documented as a _feature_ in route-help.pd)

Conclusion: in Pd,

  1. "anything" really means "anything but bang".

  2. a bang casted to the "anything" type becomes a list of single 0

  3a. a list containing a single number is not a list...

  3b. ... except for exceptions, which aren't that exceptional,
      and easy to come up with, even accidentally, in particular
      when coding an external.

How should I perceive Pd so that the above sounds normal, sane, and
wellbehaved ?



PS: (*please* don't say "you know, pd is not a programming language...")

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju





More information about the Pd-list mailing list