cyrille henry wrote:
hello,
[symbol /home/thomas/qt/regnbueromskip.mov] | [read $1 < |
Aha! Thanks a lot! I will try this when I get back to my other laptop...
But I'm still wondering about the string-thing. Like, how to divide "symbol /home/thomas/qt/regnbueromskip.mov" into separate outlets by space and "/". Anybody know a quickie?
.thomas
Thomas Sivertsen wrote:
cyrille henry wrote:
hello,
[symbol /home/thomas/qt/regnbueromskip.mov] | [read $1 < |
Aha! Thanks a lot! I will try this when I get back to my other laptop...
But I'm still wondering about the string-thing. Like, how to divide "symbol /home/thomas/qt/regnbueromskip.mov" into separate outlets by space and "/". Anybody know a quickie?
don't know exactly what you need. the first part of the message (e.g.: "symbol" or "read") is "special" as it defines the content of the rest of the list (it is a so called "selector" while the rest is a list of "atom"s)
spaces are used to separate atoms from each other. to get individual atoms out of a list, either use [unpack] or [$2(, [$3(,... (note that you cannot get the selector with [$0( or whatever)
to parse a symbol like "/home/thomas/qt/regnbueromskip.mov" into a list "home thomas qt regnbueromskip.mov" you could use [s2l] (zexy)
mfg.as.dr IOhannes
IOhannes m zmoelnig wrote:
don't know exactly what you need.
Well, an object that will take any string/message and separate/divide it by a criterium. Insertion of characters would be nice too. :-)
I am pretty sure I've done this in Max... (pd =! max :-))
the first part of the message (e.g.: "symbol" or "read") is "special" as it defines the content of the rest of the list (it is a so called "selector" while the rest is a list of "atom"s)
Yeah, I figured it was something special about it.
spaces are used to separate atoms from each other. to get individual atoms out of a list, either use [unpack] or [$2(, [$3(,... (note that you cannot get the selector with [$0( or whatever)
unpack doesn't behave, for some odd reason. It keeps the message as is. Must have been a brqainfart or something. I'm quite familiar with pack and unpack from my 4 years of using Max...
to parse a symbol like "/home/thomas/qt/regnbueromskip.mov" into a list "home thomas qt regnbueromskip.mov" you could use [s2l] (zexy)
I will check that out. It is exactly what I am looking for! Thanks!
.thomas
Thomas Sivertsen wrote:
IOhannes m zmoelnig wrote:
spaces are used to separate atoms from each other. to get individual atoms out of a list, either use [unpack] or [$2(, [$3(,... (note that you cannot get the selector with [$0( or whatever)
unpack doesn't behave, for some odd reason. It keeps the message as is. Must have been a brqainfart or something. I'm quite familiar with pack and unpack from my 4 years of using Max...
well, "my" [unpack] behaves perfect. i really don't know what you want. if you have a message [symbol /bli/bla/bo(, then the message contains a single symbol (as is denoted by the selector "symbol") named "/bli/bla/bo" again: the symbol does *not* consist of 2 parts ("symbol" and "/bli/bla/bo") but only of one typed part "/bli/bla/bo".
with [unpack] you can extract atoms of "lists". example: your message is [list 1 2 3(; again "list" is just a type-selector (to state that the one or more atoms ("1" "2" and "3") of the message form a list. now if you send the message [list 1 2 3( (or only [1 2 3( which is just an abbreviation(!) for [list 1 2 3() to [unpack 0 0 0] you will get the numbers "1" "2" and "3" out of the outlets. the numbers are messages too: "1" is really [float 1( (and not just [1(, which again can be used as an abbreviation(!)).
confused ?
mfg.ad.sr IOhannes
IOhannes m zmoelnig wrote:
well, "my" [unpack] behaves perfect. i really don't know what you want.
I must have done something wrong or expected something I couldn't get. I don't have the patch in front of me, so I really can't say what specifically I did wrong. I think it was [prepend] that was causing the problem (see below).
if you have a message [symbol /bli/bla/bo(, then the message contains a single symbol (as is denoted by the selector "symbol") named "/bli/bla/bo" again: the symbol does *not* consist of 2 parts ("symbol" and "/bli/bla/bo") but only of one typed part "/bli/bla/bo".
Ah, yes. I get this. The weird thing is happening in [prepend] then, because it does not handle the symbol as an identifier for the data, but as part of the data. Now, which version/incantation of [prepend], you may ask? It coulad also have been [playlist] which output a weird symbol identifier... I don't know until tomorrow... :-)
with [unpack] you can extract atoms of "lists". example: your message is [list 1 2 3(; again "list" is just a type-selector (to state that the one or more atoms ("1" "2" and "3") of the message form a list. now if you send the message [list 1 2 3( (or only [1 2 3( which is just an abbreviation(!) for [list 1 2 3() to [unpack 0 0 0] you will get the numbers "1" "2" and "3" out of the outlets. the numbers are messages too: "1" is really [float 1( (and not just [1(, which again can be used as an abbreviation(!)).
confused ?
Well, not as long as [unpack] is also capable of processing symbols... :-) I get this.
Thanks!
.thomas
Hallo, Thomas Sivertsen hat gesagt: // Thomas Sivertsen wrote:
Ah, yes. I get this. The weird thing is happening in [prepend] then, because it does not handle the symbol as an identifier for the data, but as part of the data. Now, which version/incantation of [prepend], you may ask?
The prepend from Cyclone does not do this. Maybe you are using the one from IEMlib? Or the one in Ggee or prepend2 or ... We have to agree on one and only one prepend sooner than later. Please someone make Cyclone's prepend a built-in object. ;)
Frank Barknecht _ ______footils.org__
On Tue, 29 Jun 2004, Frank Barknecht wrote:
The prepend from Cyclone does not do this. Maybe you are using the one from IEMlib? Or the one in Ggee or prepend2 or ... We have to agree on one and only one prepend sooner than later. Please someone make Cyclone's prepend a built-in object. ;)
This would be one solution, the main problem with including prepend I see in the fact that it is working completely differently from the builtin append object. This would introduce inconsistency into the system.
The better solution would be to include it into the external collection on CVS (which I am going to do now, if its possible).
Guenter
Hallo, guenter geiger hat gesagt: // guenter geiger wrote:
This would be one solution, the main problem with including prepend I see in the fact that it is working completely differently from the builtin append object. This would introduce inconsistency into the system.
But [append] belongs to a whole other family of objects as it deals with data structures and pointers, something [prepend] can not work with. A prepend for pointers wouldn't be useful anyways, as the order of graph objects isn't really known (well, it is known to Pd, but it would require a lot of work to keep track of the order for a user).
I think, [prepend] would be important as a Max-compatibility object, and it's also very useful for dealing with lists. I don't believe the inconsistency would be a real problem.
The better solution would be to include it into the external collection on CVS (which I am going to do now, if its possible).
This also is a good solution, and I'd be very grateful if you did this, but it still wouldn't solve the problem that occurs if someone loads a library which includes another [prepend] like IEMLib. Well, I already use IEMLib in single externals format after Hans did it that way in the CVS.
Having prepend built-in would notallow it to be overwritten, would it? Of course making it built-in would have to be decided by Miller for the next official version. It would be very wrong to have this addition in the devel-version only.
Frank Barknecht _ ______footils.org__
Frank Barknecht wrote:
Hallo, Thomas Sivertsen hat gesagt: // Thomas Sivertsen wrote:
Ah, yes. I get this. The weird thing is happening in [prepend] then, because it does not handle the symbol as an identifier for the data, but as part of the data. Now, which version/incantation of [prepend], you may ask?
The prepend from Cyclone does not do this. Maybe you are using the one from IEMlib? Or the one in Ggee or prepend2 or ...
the problem i see is, that it often makes sense to prepend another identifier to "anythings".
eg: i have a message [play myfile.wav( ("play" being an identifier) and want to transmit this message via [netsend] so i have to prepend a "send" identifier to get [send play myfile.way(. one could argue, that "symbol" should be handled in a different way, but probably i would like to transmit a symbol "mobo" via netsend: if i would substitute the "symbol" by "send" (e.g: [send mobo() i would receive an identifier "mobo" on the [netreceive] side, which i cannot just convert with [symbol] if i also want to send things like [play myfile.wav( over the same [netsend]/[netreceive] connection (because it would strip down to a symbol "play" without the "myfile.wav")
so what to do ? a) make pd's message-type system more consistent (will probably break quite everything) b) use [a2l] (bias!!) or something similar with a standardized (as you suggested) [prepend]
probably it would be a good idea to make [a2l] built into pd too (maybe [trigger list] should be enhanced to convert anythings to lists)
and of course günter is right, when he points out the inconsistency between [append] and [prepend] but there is really not very much we could do about it (apart from renaming all the datastructure-stuff to something more specific)
mfg.asd.r IOhannes
On Jun 29, 2004, at 4:50 AM, Frank Barknecht wrote:
Hallo, Thomas Sivertsen hat gesagt: // Thomas Sivertsen wrote:
Ah, yes. I get this. The weird thing is happening in [prepend] then, because it does not handle the symbol as an identifier for the data,
but as part of the data. Now, which version/incantation of [prepend], you may ask?The prepend from Cyclone does not do this. Maybe you are using the one from IEMlib? Or the one in Ggee or prepend2 or ... We have to agree on one and only one prepend sooner than later. Please someone make Cyclone's prepend a built-in object. ;)
I think it makes the most sense to leave [prepend] out of the CVS
externals collection, and just have it as part of cyclone. For the
Windows and MacOS X installers, that would mean that cyclone's
[prepend] would be the default since cyclone is included in both. For
Debian, you would have to install pd-cyclone to get [prepend].
FYI cxc's [prepend] is included in the CVS externals collection as
[cxc.prepend].
.hc
Using ReBirth is like trying to play an 808 with a long stick. -David Zicarelli
On Mon, 28 Jun 2004, IOhannes m zmoelnig wrote:
(note that you cannot get the selector with [$0( or whatever)
Isn't that a nice feature request?
Mathieu Bouchard http://artengine.ca/matju