Re: [PD-dev] proposed new "list" object

Georg Holzmann grhPD at gmx.at
Wed Jul 20 10:47:51 CEST 2005


Hallo!

>     list append - append a list to another
>     list prepend - prepend a list to another
>     list cat - build a list by accumulating elements
>     list serialize - spit out elements of a list one by one
>     list first - output first n elements
>     list last - output last n elements
>     list length - output number of items in list
>     list reverse - permute elements of a list back to front
>     list pack - synonym for 'pack'
>     list unpack - synonym for 'unpack'
>     list selector - change selector of a list
>     list <no args> - "prepend" the selector list to non-list messages

just some more suggestions (these objects are often the reason why I have to
use externals in simple patches):

1) a storage object for lists would also be useful in main-pd (like "lister"
from zexy - maybe the easiest way would be to make a 2.inlet at the "list"
object (to have the same behaviour as "symbol" or "float" ...) ?

2) get a specific element from a list (like "packel" from zexy) - so it's
easier to handle dynamic length list (if you know which atoms you want and
don't know the exact length)
don't know a good name, maybe "list get" or "list packel" (IOhannes: why
packel?)
(also I don't if it is a good idea to count the elements from 1 and not from
0 - like in packel ...)
-> maybe also a "list set", where you can set a specific element in a list
without unpack - repack everything (which is not possible if you don't know
the exact size ...)

> All of these would expect the "list" selector at the head of messages,
with
> the exception of plain "list"; all of them would output "list" messages
except
> "list selector".  These would work as follows:
Hm - I see, but what is the advantage of only handle messages with
list-selector (beside that you can use the name "list" for the objects ...
:) ?
This means you often have to:

|
[list]  - add a list selector
|
do something like [list reverse]
|
[list selector]  - remove again the list selector
|

(should it also be possible to remove the list selector at all with "list
selector" ?)


But, just some thoughts ...

LG
Georg

-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl




More information about the Pd-dev mailing list