Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Alexandre Torres Porres
2018-04-02 15:55 GMT-03:00 Roman Haefeli :

>
> By implementing that, you would once forever prohibit the proper way to
> expand $0 which is expanding to the selector of the message.


I agree it would make sense for $0 to expand to the message selector. But
that doesn't happen...



So I don't see your point here. Do you mean we should propose "$0" to
expand to message selectors? I'd be down with that!

cheers
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Alexandre Torres Porres
2018-04-02 16:02 GMT-03:00 Miller Puckette :

> Well, I've been trying to stay out of this, but here's a thing... someone
> could implement a "msg" object that you could invoke like
> [msg 1 $0 3] to get a message with a 'true' $0 built into it.  This would
> also work for $1, etc, so would be much smarter than changing the message
> box semantics.
>
> But then the question is, how would you allow message-box-style $
> substitutions?
> OK, we can do this:
>
> [msg $1 #1]
>
> which would be the exact reverse of Max's #1 convention - #1 could be the
> message-box $1.


> I've shrunk from actually doing this, not just because it makes my teeth
> hurt,
> but also because... shouldn't this be expanded into a full-on scripting
> language?  And what then would be its relationship with the expr family?
> It quickly got too deep for me to figure out what would be a good,
> canonical
> solution.
>

Well... if the idea was to expand Pd's message syntax, why not add #0, #1,
etc... as a way to expand creation arguments in messages? It wouldn't be in
reverse to Max (if that's any positive)... sure, there are backwards
compatibility concerns, but it feels it was a good thing to have.

But yeah, since IOhannes' "no" and me accepting the fact the current
behaviour remains so as the result of a conscious decision, I've started
working on an external, and much inspired by max's message box. But not
being a max user, I did know about "#1" there.

Anyway, by getting my hands dirty on it, I realized how "$1" would
naturally expand to arguments, and hardly would expand to message's input
(maybe possible with some ninja tricks, but maybe not even possible). Then
I thought both ways could useful in a message, so it became this deal not
only about "$0" anymore... and also the fact that, Ideally, there would be
two different prefixes for message expansion and creation argument
expansion.

So I was looking for a syntax to refer to message inputs as well. By
considering the [expr] way of doing such a thing (with "$f#" and stuff), I
thought a generic "$a#" ("a" for "atom", symbol or float). Though I kinda
like the "#1" idea now that you mention it, haha, even though if reversed
if compared to max... but yeah, something like "$a1" looks more "PD-ish",
right?

In any case, I welcome any kind of feedback!

cheers


>
> cheers
> Miller
>
> On Mon, Apr 02, 2018 at 08:55:58PM +0200, Roman Haefeli wrote:
> > yawn.
> >
> >
> > On Son, 2018-04-01 at 17:42 -0300, Alexandre Torres Porres wrote:
> > > Hi, currently, if you want to use $0, you need an object cause it
> > > becomes "0" when it's inside messages.
> > >
> > > Pd-l2ork and Purr Data implemented a way that $0 works in the same
> > > way as in objects than in messages, and I think it is a great
> > > feature, as many patches can be significantly simplified. I guess
> > > most Pd users here know what I'm talking about.
> >
> > By implementing that, you would once forever prohibit the proper way to
> > expand $0 which is expanding to the selector of the message. That's why
> > I oppose your proposition. (Actually, it doesn't matter whether I'm
> > opposing it or not since I don't contribute any Pd code. But I can at
> > least point to the fallacies.)
> >
> > I absolutely see the convenience of your proposition, but there would
> > be no good explanation for it. Consider it a bad coincidence that both
> > kinds of variables use a dollar prefix, there is nothing in common
> > between them (expanding to creation arguments versus expanding to atoms
> > of messages). Personally, I would totally find it convenient if Pi was
> > an integer number, it would make so many things so much easier.
> >
> > Roman
>
>
>
> > ___
> > Pd-list@lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread João Pais

For me, I can't count how many times I had to add a [$0], or a pack
or some extra workaround before a message so that I could send
messages to my variables (I hardly use variables without a $0).


I can't count how many times I had to loop back the outlet of a [+ 1]
to the right inlet of a [f ] to build counter.


You can use [jmmmp/f+], it's prepared to avoid such repetitive tasks. Or,  
you can request for a new object be part of pd vanilla, since this is an  
operation that I would bet 99.999% of users come up to sooner or later.




Apparently, you need to figure out the creation argument first before
you build a message using it. I don't see anything specially tedious
about this process.


You can, but is it really necessary to add more objects for something that  
could be easily solved by the language? The point isn't that something is  
impossible to do now, but that it would make work much easier.




Why is nobody complaining about not being able to use the third
creation argument directly withing a message? What's the fuzz about the
$0?


Maybe because the $3 of a patch is most likely used a fraction of the  
times compared to $0. If your patch doesn't have any abstractions, there's  
no $3 to use.


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Miller Puckette
Well, I've been trying to stay out of this, but here's a thing... someone
could implement a "msg" object that you could invoke like
[msg 1 $0 3] to get a message with a 'true' $0 built into it.  This would
also work for $1, etc, so would be much smarter than changing the message
box semantics.

But then the question is, how would you allow message-box-style $ substitutions?
OK, we can do this:

[msg $1 #1]

which would be the exact reverse of Max's #1 convention - #1 could be the
message-box $1.

I've shrunk from actually doing this, not just because it makes my teeth hurt,
but also because... shouldn't this be expanded into a full-on scripting
language?  And what then would be its relationship with the expr family?
It quickly got too deep for me to figure out what would be a good, canonical
solution.

cheers
Miller

On Mon, Apr 02, 2018 at 08:55:58PM +0200, Roman Haefeli wrote:
> yawn.
> 
> 
> On Son, 2018-04-01 at 17:42 -0300, Alexandre Torres Porres wrote:
> > Hi, currently, if you want to use $0, you need an object cause it
> > becomes "0" when it's inside messages.
> > 
> > Pd-l2ork and Purr Data implemented a way that $0 works in the same
> > way as in objects than in messages, and I think it is a great
> > feature, as many patches can be significantly simplified. I guess
> > most Pd users here know what I'm talking about.
> 
> By implementing that, you would once forever prohibit the proper way to
> expand $0 which is expanding to the selector of the message. That's why
> I oppose your proposition. (Actually, it doesn't matter whether I'm
> opposing it or not since I don't contribute any Pd code. But I can at
> least point to the fallacies.)
> 
> I absolutely see the convenience of your proposition, but there would
> be no good explanation for it. Consider it a bad coincidence that both
> kinds of variables use a dollar prefix, there is nothing in common
> between them (expanding to creation arguments versus expanding to atoms
> of messages). Personally, I would totally find it convenient if Pi was
> an integer number, it would make so many things so much easier. 
> 
> Roman



> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Roman Haefeli
On Mon, 2018-04-02 at 05:01 -0700, Derek Kwan wrote:

> > For me, I can't count how many times I had to add a [$0], or a pack
> > or
> > some extra workaround before a message so that I could send
> > messages
> > to my variables (I hardly use variables without a $0).
> > 
> > Joao
> I do face this too where I use $0 with all my [v]s and [s]s and [r]s
> and
> it does get to be a bit tedious BUT I'm not quite sure if mixing the
> two
> worlds and their rules are worth it...

Yeah! Ideally, there would be two different prefixes for message
expansion and creation argument expansion. THEN you could have it
convenient, #0 would expand to the message selector, $0 to the implicit
ID, $1 to the first creation argument, #1 to the first atom of the
incoming message, etc... And everyone would be happy.

I just see no way to go from here to there...

Roman

signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Roman Haefeli
On Mon, 2018-04-02 at 11:26 +0200, João Pais wrote:
> 
> For me, I can't count how many times I had to add a [$0], or a pack
> or some extra workaround before a message so that I could send
> messages to my variables (I hardly use variables without a $0).

I can't count how many times I had to loop back the outlet of a [+ 1]
to the right inlet of a [f ] to build counter. 

Apparently, you need to figure out the creation argument first before
you build a message using it. I don't see anything specially tedious
about this process. 

Why is nobody complaining about not being able to use the third
creation argument directly withing a message? What's the fuzz about the
$0?

Roman


signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Roman Haefeli
yawn.


On Son, 2018-04-01 at 17:42 -0300, Alexandre Torres Porres wrote:
> Hi, currently, if you want to use $0, you need an object cause it
> becomes "0" when it's inside messages.
> 
> Pd-l2ork and Purr Data implemented a way that $0 works in the same
> way as in objects than in messages, and I think it is a great
> feature, as many patches can be significantly simplified. I guess
> most Pd users here know what I'm talking about.

By implementing that, you would once forever prohibit the proper way to
expand $0 which is expanding to the selector of the message. That's why
I oppose your proposition. (Actually, it doesn't matter whether I'm
opposing it or not since I don't contribute any Pd code. But I can at
least point to the fallacies.)

I absolutely see the convenience of your proposition, but there would
be no good explanation for it. Consider it a bad coincidence that both
kinds of variables use a dollar prefix, there is nothing in common
between them (expanding to creation arguments versus expanding to atoms
of messages). Personally, I would totally find it convenient if Pi was
an integer number, it would make so many things so much easier. 

Roman

signature.asc
Description: This is a digitally signed message part
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] suggestion: $0 in messages

2018-04-02 Thread Nicolas Danet

https://github.com/Spaghettis/Spaghettis

Mainly tested on MacOS for now. Best to open a new thread if you have more 
questions.

- Mail d'origine -
De: Alexandre Torres Porres 
À: Nicolas Danet 
Cc: João Pais , Pd-List 
Envoyé: Mon, 02 Apr 2018 16:18:42 +0200 (CEST)
Objet: Re: [PD] suggestion: $0 in messages

2018-04-02 9:02 GMT-03:00 Nicolas Danet :

>
> I also added that feature in my fork "Spaghettis".


what's and where's that? :)


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Alexandre Torres Porres
2018-04-02 9:02 GMT-03:00 Nicolas Danet :

>
> I also added that feature in my fork "Spaghettis".


what's and where's that? :)
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] suggestion: $0 in messages

2018-04-02 Thread Nicolas Danet

I also added that feature in my fork "Spaghettis". It is very handy. For now i 
have not found any situation that make me regret that "inconsistent" behavior.

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Derek Kwan

> 
> like mostly, i'm opposing.  this has been discussed about 15 years
> ago, and my arguments still stand (mainly: consistency with
> dollar-parsing throughout Pd)

> Yes, but there is no consistency either now. So the question would be:
> is the current inconsistency a productive one (do people benefit from
> having a 0 there), or would people benefit more from having an
> inconsistency that provides them with a new useful feature?


I can see the argument (no pun intended, haha) here where $1 $2 (and $0
included) mean very different things in non-messages (patch arguments
where $0 is the internal/default argument) vs messages and having $0
resolve in messages as it would in objects could be quite confusing
as we're mixing two worlds (and then users would perhaps expect $1 $2
and so on to resolve similarly but they don't). So the matter of
consistency would be in message world and non-message world where $0
is just simply out of range in message world (as $100 would be if your
incoming list doesn't have 100 atoms).

Note that this opens the can of worms of not only message boxes but also
things like [text] where $0 behaves as it does in messages boxes.

>
> For me, I can't count how many times I had to add a [$0], or a pack or
> some extra workaround before a message so that I could send messages
> to my variables (I hardly use variables without a $0).
>
> Joao

I do face this too where I use $0 with all my [v]s and [s]s and [r]s and
it does get to be a bit tedious BUT I'm not quite sure if mixing the two
worlds and their rules are worth it...

-- 
Derek Kwan
www.derekxkwan.com

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] suggestion: $0 in messages

2018-04-02 Thread Matt Davey
even though it is bad practice, i'd support $0 being passed to messages the
same as it is to objects. Just easier that way.
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list