[PD] Finding "$0" and dealing with it in messages

IOhannes m zmoelnig zmoelnig at iem.at
Sun Nov 15 17:16:58 CET 2009


IOhannes m zmölnig wrote:
> Hans-Christoph Steiner wrote:
> 
> iirc, my final conclusion was that it would be best to not allow $@
> expansion at all for dollsyms, but just as solitary $@ which will always
> expand to a list.


i guess this is the main source of misunderstanding.

with "dollsym" i really mean what Pd internally understands as
A_DOLLSYM, that is a symbol constructed with a dollar+number and
something else, e.g. "$1_bla" or "/foo/$2/bla"
but not an A_DOLLARG, which is a a dollar+number, e.g. "$1".

A_DOLLSYM will always expand to symbol, whereas A_DOLLARG will expand to
an atom of the type of the referenced listelement.
e.g.
[10 20 30(
|
[$2(

will give you the float "20".

whereas
[10 20 30(
|
[/$1(

will give you the symbol '/20'

now in the current implementation we have:

[10 20 30(
|
[$@ $@(

which gives you a 6 element list "10 20 30 10 20 30".

but what is this supposed to give me?


[10 20 30(
|
[$@/$@(


either its a 5 element list "10 20 30/10 20 30" (with 4 floats and a
symbol inbetween) or it is a single symbol '10 20 30/10 20 30'.

i don't like the former very much, because it generates both symbols and
other atoms in a hard to predict matter, and is kind of out of sync with
pd's ordinary behaviour.

i don't like the latter very much, because it suddenly allows easy
creation of symbols with spaces, and i think Pd is not really ready for
that.

symbols with spaces is not something one cannot live without.
(we all have learned to do this by now).
even if we can live with a symbol-with-spaces approach, this wouldn't
allow for "just" symbol with spaces (the thing [l2s] does), opening
another can of worms.

therefore my conclusion was that it was better *for now* to only support
A_DOLLARG "$@" but not in A_DOLLSYM.
i don't even know whether i have implemented this conclusion or whether
i just went with one of the 2 options.

read the code.

fgmadsr
IOhannes





More information about the Pd-list mailing list