[PD] '$0' in messages again, another proposal? (Was: Pd 0.52 test 2 is out)

Alexandre Torres Porres porres at gmail.com
Thu Dec 2 07:37:36 CET 2021


Em qua., 1 de dez. de 2021 às 17:44, Miller Puckette via Pd-list <
pd-list at lists.iem.at> escreveu:

> I think having a "message" object is a better idea.  Only thing is, it
> does raise some interesting design questions of its own - like, what of
> sending more than one message; how to specify destination names without
> using the ';' separator


Hmm, I don't understand the questions :)

I am using the ";" separator in my external object. It all works inside the
object box just exactly like a message box. So you can also use commas and
separate more than one message.

Now, the idea for my object is that it also works as a message storage
object, that is, like a "float" or "symbol" object, but one that can store
any kinda of message. Then, it can receive messages from messages in the
cold and hot inlet. And we can set ";" and "," by escaping them with "\".

So sending *1 \, 2 \, 3* *1 \, 2 \ , 3* to its hot inler makes it output 3
messages ("1", "2" and "3") and this gets stored.

By the way, I can also escape "$", so if I send it * \;  \$0-x 8 *it sends
"8" to a [receive $0-x] object. If you want to specify a literal "$0", you
can send it "\\$0"...

A "bang" in the left inlet outputs the message, but I also made the objcct
clickable, so clicking on it sends the message.

But then, of course this can be simpler, and just have one inlet, for a
bang, no click, no cold inlet, for starters, what do. you people think?


> and what if we allowed expressions ...
>

what do you mean?

cheers


>
> cheers
> Miller
>
> On Wed, Dec 01, 2021 at 09:34:15PM +0100, Christof Ressi wrote:
> > > what if we introduce double dollar syntax to grab patch arguments?
> > Actually, I already thought about that. The problem is that "$" is only
> > interpreted as a dollar or dollarsym if it is followed by a number. So
> > currently "$$" is not a reserved token, meaning that "$$" is a valid
> symbol.
> > We *could* reserve it, but we risk breaking some patches. Assuming that
> only
> > very few patches will be affected by this change, we might decide that
> > extending the functionality of message boxes is more important.
> >
> > Christof
> >
> > On 01.12.2021 21:22, Alexandre Torres Porres wrote:
> > > I like the idea.
> > >
> > > Em qua., 1 de dez. de 2021 às 17:14, José de Abreu
> > > <abreubacelar at gmail.com> escreveu:
> > >
> > >     I have an idea about $0
> > >
> > >     what if we introduce double dollar syntax to grab patch arguments?
> > >     and then inside messages $$1 would be first abstraction argument,
> > >     while $1 is the the first element of the list (as it already is)
> > >
> > >     this way, $$0 in a message would be what $0 is for an object, $$1
> > >     would be what $1 is for an object, and so on (this would be
> coherent)
> > >
> > >     this way we add the ability to access $0 from an object as $$0 in
> > >     a message and as a bonus make easier to get the patch arguments
> > >     inside a message too.. this makes sense? what do you think?
> > >
> > >     Em qua., 1 de dez. de 2021 16:44, Alexandre Torres Porres
> > >     <porres at gmail.com> escreveu:
> > >
> > >         Context: we have an open PR that allows us to expand '$0' in
> > >         messages. I'd like to know if it's been officially rejected so
> > >         we can close it for good and settle the debate. Then maybe
> > >         think of something else.
> > >
> > >         Miller's response:
> > >
> > >         Em sáb., 27 de nov. de 2021 às 21:29, Miller Puckette
> > >         <msp at ucsd.edu> escreveu:
> > >
> > >             I disagree with the "$0" in message box idea.  Why not $1
> > >             then?
> > >             (Oh, because it already does something different...)
> > >
> > >             It would be interestnig to allow message boxes to access
> > >             canvas creation
> > >             arguments somehow, but not that way.
> > >
> > >
> > >         To which me and Christoph argued things like
> > >         - /$0 is not a creation argument after all, i.e. it is not
> > >         part of "ce_argv". Also, it really //has a different purpose.
> > >         (...) $0 would be a special case either way./
> > >         - /It was also never documented as an 'argument'. (...) under
> > >         a user perspective, we are never aware of it and really expect
> > >         to be able to use it inside message boxes so they can
> > >         communicate to local [receive] objects (..) We also have
> > >         unexpected and weird behaviour in other places. It's all a
> > >         matter of documenting./
> > >         Now, what I actually have come up as a solution for me, so
> > >         far, was designing an external object named "message". It does
> > >         all that messages do, they understand comma and semicolons
> > >         (and act accordingly). The messages can be set via a right
> > >         inlet (with commas and semicolons being possible by escaping
> > >         with "\") and the object also acts as a general message
> > >         storage object. So the idea is to have something like this
> > >         that acts like a message and is an object. Moreover, as an
> > >         object, it can also deal with "$1" ... "$2" ... ect as
> > >         expected, and as also has been considered here as something
> > >         desired.
> > >
> > >         If this idea resonates well, I can try and open a PR for it
> > >         and we can discuss the design details.
> > >
> > >         see screenshot of the object
> > >
> > >         cheers
> > >
> > >
> > >         _______________________________________________
> > >         Pd-list at lists.iem.at mailing list
> > >         UNSUBSCRIBE and account-management ->
> > >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwIDaQ&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=X356gE987R4-v6hM70lWkol4S4SaaoMN6K1GUTwzVOs6vXy64pXeuaSvufiKEdaj&s=oaiog5acgrgvYre_RpIYhOmR4kXfCAvk6whITQhJnyU&e=
> > >
> > >
> > > _______________________________________________
> > > Pd-list at lists.iem.at  mailing list
> > > UNSUBSCRIBE and account-management ->
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwIDaQ&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=X356gE987R4-v6hM70lWkol4S4SaaoMN6K1GUTwzVOs6vXy64pXeuaSvufiKEdaj&s=oaiog5acgrgvYre_RpIYhOmR4kXfCAvk6whITQhJnyU&e=
>
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=X356gE987R4-v6hM70lWkol4S4SaaoMN6K1GUTwzVOs6vXy64pXeuaSvufiKEdaj&s=oaiog5acgrgvYre_RpIYhOmR4kXfCAvk6whITQhJnyU&e=
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20211202/3afede06/attachment.htm>


More information about the Pd-list mailing list