[PD-dev] $0 in messages, was: multiple $arg-expansion

Hans-Christoph Steiner hans at eds.org
Thu Jan 26 18:55:18 CET 2006


On Jan 21, 2006, at 6:27 PM, cdr wrote:

>> But with pd-0.39 this issue is solved thanks to the [list] object,
>
> justa bout every patch i've made (from 0.36 to 0.39) involves :
>
> - an inordinate amount of objects just adding and removing selectors  
> eg turning lists into non-lists and vice-versa

Indeed.  When I work with variable data sets, I generally try to stay  
out of the realm of lists entirely, and use "undefined sets" and  
[prepend].

> - crazy dances to get into get instance variables into messages  
> alongside and mixed with local variables (i was appalled that the  
> documentation suggests using a bunch of [symbol $0] [float $0] and  
> unwieldy chained series of makefilenames (since theres only one  
> substitution per object, and even though youre not making filenames)  
> when later discovering this could all be reduced to a single [sprintf]  
> but this object was never mentioned in the docs)

That's because [sprintf] is a cyclone object, so its an external.

> - similar crazy dances to things like asd-$0 instead of $0-asd, the  
> equivalent of say indices [1..3] of a list but sometimes its [2..5]  
> and simulating nested lists

This is fixed in a patch from IOhannes.

.hc

> - simulating key / value stuff and naming list elements (via fake  
> nested lists) so that you dont have to worry so much about ordering  
> stuff, esp when reusing abstractions in difft places, and to be able  
> to think in terms of named variables instead of rememerbing wtf $3 was
>
> i love Mathieu's idea of a documentation for the similarities that all  
> or most classes share - learning all these peculiarities up front  
> would have removed a big barrier of entry in terms of getting up and  
> running fast..
>
> imo a few additions to the message syntax would solve most of these  
> problems and make it much easier to see what a patch does by glancing  
> at it
>
> who does that best? C's sprintf? "or #{@ruby} " or maybe "ecma"+script?
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>

________________________________________________________________________ 
____

"If nature has made any one thing less susceptible than all others of  
exclusive property, it is the action of the thinking power called an  
idea, which an individual may exclusively possess as long as he keeps  
it to himself; but the moment it is divulged, it forces itself into the  
possession of everyone, and the receiver cannot dispossess himself of  
it."
                                                        - Thomas  
Jefferson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2353 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20060126/c1b07205/attachment.bin>


More information about the Pd-dev mailing list