[PD-dev] argc&argv and dollarexpansion

IOhannes m zmoelnig zmoelnig at iem.at
Wed Aug 23 09:26:05 CEST 2006

Mathieu Bouchard wrote:
> On Tue, 22 Aug 2006, IOhannes m zmoelnig wrote:
>> which basically means, that [$#( is redundant, as soon as there is a 
>> [list lenght]. the latter would be more robust regarding incoming 
>> messages. i just did it for completeness.
> What does "completeness" mean here, considering that if [$#( is 
> redundant, then the feature that it represents is already "complete" 
> under another form?

"completeness" in my sense is not to be understood in gödel's sense.
it is rather an emotion.

as for redundance: i see that [list length] is not yet in 
pd-0.40.0test3, so there is no "native" (as "built into pd") redundance 
however, the behaviour of $# expansion can be implemented by simple 
[object]s, as soon as there is a $@ (or whatever it is called)

>> which makes me think, that $@ is really a MUST.
> What about a variation on $@ that passes all the arguments starting with 
> one of your choice? I would like to be able a non-dynamic abstraction 
> that can take some fixed number of arguments and then take the rest of 
> its arguments as the contents of an objectbox. e.g. if I write:
> [about 42 blah blah blah]
> it could be equivalent to:
> [- 42]
>  |
> [blah blah blah] <- variable number of arguments taken starting with $2
>  |
> [+ 42]
> does that sound useful?

well kind of.
however to a limited extent, you could mimick this behaviour with

        [list append $@]
|      |
[- $1] [list split 2]
|                   |
[$2                 ]
[+ $1]

(obviously this does not work for several stacked abstractions with 
similar behaviour)

but then i was always for a really havy beast like ${} which would allow 
to stack $-expansions and/or do operations on the arguments before they 
get expanded. (e.g. [f ${${1}/2}] or something...)

i have been convinced that this is bloated at the least.


More information about the Pd-dev mailing list