Re: [PD] confused about $1 in messages

2014-01-22 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 2014-01-21 22:35, Jonathan Wilkes wrote:
 On 01/21/2014 04:02 AM, IOhannes m zmölnig wrote:
 On 01/20/2014 10:01 PM, Jonathan Wilkes wrote:
 It might help some if the selector inside a message box were
 visually distinct from the rest of the message.
 +1
 
 You could also have different colors for built-ins vs. custom
 selectors.
 -1
 
 Hm... care to explain your votes?  Is it the word colors that got
 a -1, or the idea of visually distinguishing between the two
 groups?
 

the latter.

how the selector differs from the atoms should be a matter of
user-definable preferences.
and i'd like to have a way to distinguish atoms (with potential
whitespace characters) from the whitespace atom-separator.

fgamsdr
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJS34aeAAoJELZQGcR/ejb4TO0P/0Y3xEjCf9z8XZtlwGc99vgp
58fXtG5jKEEIdmVcHonhQwFpXAza7B+3Zb+jAe30MazZ5s3GldT7MPnoCGTkCgL+
8j4tZwoSVAzcwMC1eE+383F7yhu1hLj4jddWk0V7SQj/NH6848MG/dqzUnHQWEpJ
52cfDK1yg5B4d1WLlCYUaA3JE1oXwGasVkmW4wIMn+u1+Y05JJDq4x7UuTt3oE12
6nPrgQ/WPes8kWM4vO0+Yd4Kg80gLqSI0+ZxMVp6X/cj4jsQejsj5coq8AG0vxNe
l3zEdDXqAwHR+v6MbGy/IJhm9rs+pq55Eye5NMY/l9DByNODK+aJN/WouMhTJRQN
H5WumjsGl0dzqIXHb73bTbO82f5EpL36gXL3GNSmHe8rfYd6/6Ff1kHOdKM8rEt7
a1MSyMtblchntflviwdHUe1JQF5tuQqT1JapDZipBIfPd5cYGAHGVtBVK7hMMM7F
Rc1fZNNjG7RrFaXW3Ks5I0sdvbCTniyK28AaGoqAGflXRgfZOJombqfSGu11iE4H
mk3VnQOe9hDvZ88e9p60VQ1VVkgbTd2SYRcyzrInipfTprbtzJ5hruSh4xLPaDyF
0QOZ6qoe/lH+t5mh9VHu3YspOUej6QQVc/enhpf3dnizPrY7hkl+AxaCKsf4fnBQ
JBf/NQpy0TSc27nhB4Um
=BzNs
-END PGP SIGNATURE-

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


Re: [PD] confused about $1 in messages

2014-01-21 Thread IOhannes m zmölnig
On 01/20/2014 10:01 PM, Jonathan Wilkes wrote:
 
 It might help some if the selector inside a message box were visually
 distinct from the rest of the message.

+1

 
 You could also have different colors for built-ins vs. custom selectors.

-1

gfmadsr
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] confused about $1 in messages

2014-01-21 Thread Funs Seelen
On Mon, Jan 20, 2014 at 7:30 PM, Jonathan Wilkes jancs...@yahoo.com wrote:

 I'm not sure why the people replying to you are feigning ignorance on how
 this situation could possibly be confusing.


I'm not aware of feigning or having feigned ignorance. I was just pointing
out about the same as you did, although I must say that your explanation
was a bit more elaborate. Where I used the word indicator I meant
selector of course.

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


Re: [PD] confused about $1 in messages

2014-01-21 Thread Jonathan Wilkes

On 01/21/2014 04:02 AM, IOhannes m zmölnig wrote:

On 01/20/2014 10:01 PM, Jonathan Wilkes wrote:

It might help some if the selector inside a message box were visually
distinct from the rest of the message.

+1


You could also have different colors for built-ins vs. custom selectors.

-1


Hm... care to explain your votes?  Is it the word colors that got a 
-1, or

the idea of visually distinguishing between the two groups?

-Jonathan



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


Re: [PD] confused about $1 in messages

2014-01-21 Thread Jonathan Wilkes

On 01/21/2014 11:07 AM, Funs Seelen wrote:




On Mon, Jan 20, 2014 at 7:30 PM, Jonathan Wilkes jancs...@yahoo.com 
mailto:jancs...@yahoo.com wrote:


I'm not sure why the people replying to you are feigning ignorance
on how this situation could possibly be confusing.


I'm not aware of feigning or having feigned ignorance.


Sorry, I didn't see your reply there when I wrote that, just Jack's and 
IOhannes'.  I have a hard time believing they were unable to use their 
knowledge of Pd to deduce with great certainty that the OP thought [one 
two three([$1 $2([print] would output one two.


In fact when I looked back at rolf's ASCII art and did the data flow in 
my head my brain initially flashed one two erroneously.


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


[PD] confused about $1 in messages

2014-01-20 Thread rolfm

dear list,

i'm confused about the $1 replacement in messages.

[one two three(
|\
| \
|  [list split 1]
|  /
| /
|/
|   /
|
[;
[this $1 $2(

[r this]
|
[print this]

output:
this: two three
this: two three

why?

rolf


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


Re: [PD] confused about $1 in messages

2014-01-20 Thread Funs Seelen
Hi Rolf,

Try prepending the word list
 to make it a list
. I
assume $1 skips the first word as an indicator
 (if not a number; e.g. float, symbol, list)
, while [list split] automatically makes lists and symbols out of the
input.

On Mon, Jan 20, 2014 at 3:34 PM, ro...@dds.nl wrote:


 output:
 this: two three
 this: two three


I think your output was just a little different:

this: two three
this: list two three

It will become ...

this: one two
this: list two three


... when you change your three words to a list like this:

[list one two three(

Regards,
Funs
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] confused about $1 in messages

2014-01-20 Thread IOhannes m zmoelnig
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 2014-01-20 15:34, ro...@dds.nl wrote:
 dear list,
 
 i'm confused about the $1 replacement in messages.
 
 [one two three( |\ | \ |  [list split 1] |  / | / |/ |
 / | [; [this $1 $2(
 
 [r this] | [print this]
 
 output: this: two three this: two three
 
 why?

why not? what did you expect?

fgamsdr
IOhannes
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJS3UUnAAoJELZQGcR/ejb4/wsP/17YCnqNwVSdHsgxaOkeIkCV
CeMIUqEfL+OvlwwFg8f/V68w84g9vDx05ItXb8z5QuwxC/VcYhSx7bP9858buNbE
n+bBlP4q46tFmhRGgixdvqAEYOFxlPmbVJ2YYBsodJpJ+lP8oZrdRYXjijwrCLXP
K4BlmfBvsMS38CM6xfiIzHa86Y6JUJMbgkFTIEej6pMjju6PTQwqGK2oLN4DpzIk
TkhCLh3k5uA2MluJn4m6Ds+4cqtt02/atFom9t3vkbVDeJAiwghyWx1vVcNZwJcm
EuMjV9rq+zjax132Peuwu/juLTCoFVIP7hWFg2fcqGq3dVBqrZb3XDEhFWxYuIWC
EO5FcxrQpaFpVV88np1nxy2hk0OoUZVVIg+ovTuZpojT1rCIN4nEud+RPd9wpWjO
WFpsiOtwNORgRW9GVFCabtXnb6vYWriOPXui2KAZv8NHsXjetUDbiuQdWckM3pu5
qXYEbPseikffJJYEBm4JmFxesBINaX0d1w8COVWK7qQedauwlOKV8x/8OxidtP7+
0s+W3W5yVffRn42IlfEfWkwi4PMNO2yTDKCEnlabaJAwPTEJcwIYf1VfdkWQDjlt
kXn68uSJd6n5MijLqC+zmKJLU2xQlWHohrWPFhdZ+ve9uZSHcQbhCo59DyDcTlHl
n84EKeau8adPNblX23oJ
=ikUG
-END PGP SIGNATURE-

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


Re: [PD] confused about $1 in messages

2014-01-20 Thread Jack
Le 20/01/2014 15:34, ro...@dds.nl a écrit :
 dear list,

 i'm confused about the $1 replacement in messages.

 [one two three(
 |\
 | \
 |  [list split 1]
 |  /
 | /
 |/
 |   /
 |
 [;
 [this $1 $2(

 [r this]
 |
 [print this]

 output:
 this: two three
 this: two three

 why?

 rolf


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

[one two three( is not a list.
[list one two three( is a list.
So what you get is *maybe* the normal behavior ?
But, yep, what did you expect ?
++

Jack



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


Re: [PD] confused about $1 in messages

2014-01-20 Thread Jonathan Wilkes
I'm not sure why the people replying to you are feigning ignorance on how this 
situation could possibly be confusing.  You're chopping off the word one with 
[list split] and leaving it intact on the other message; yet the dollarsign 
substitution gives you the same output in both cases.  Furthermore, if you use 
[list length] on each message you will find the two message have a different 
number of elements.

What you don't see, however, is that [list] objects like [list split] interpret 
incoming messages as list messages-- that is, they add the word list to the 
beginning of the message.  Also, they prepend a list selector to the messages 
they send out (except for [list trim], of course).

But we're not done.  The selectors list, float, and symbol are special 
and do not get counted as elements with [list length].  Yet inside message 
boxes they _do_ get counted as the selector (i.e., the very first symbol atom 
in a message) when variable substitution is involved.

Once you know those two details it gets a little easier to grasp.

This is all further complicated by the fact that there is no dollarsign 
variable in Pd that can get the selector of an incoming message.  So for list 
two three you can't get list with a dollarsign variable, and likewise for 
one two three you can't get one with a dollarsign variable.  That's a real 
sticking point for new users, especially because they've no doubt already seen 
how seamlessly everything works when only numbers are involved.

So I'd suggest everyone have a look at the help patch for [list], especially 
the subpatch labeled [pd about-lists].  In it, Miller Puckette-- the guy who 
designed and implemented this part of the language-- describes what is 
happening in some detail.  In his explanation he questions his own design, even 
going so far as calling the very distinction you point out here ugly.  It's 
not the easiest part of Pd to understand, and it's the reason why you're having 
a problem in the patch example you gave.

But if you learn to use the [list] family objects when dealing with data 
messages it can makes things a lot easier.  Since you know those objects will 
output messages with a list selector, then for everything other than a bang 
you're guaranteed that [$1( will work properly.

-Jonathan




On Monday, January 20, 2014 11:33 AM, Jack j...@rybn.org wrote:
 
Le 20/01/2014 15:34, ro...@dds.nl a écrit :
 dear list,

 i'm confused about the $1 replacement in messages.

 [one two three(
 |\
 | \
 |  [list split 1]
 |      /
 |     /
 |    /
 |   /
 |
 [;
 [this $1 $2(

 [r this]
 |
 [print this]

 output:
 this: two three
 this: two three

 why?

 rolf


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

[one two three( is not a list.
[list one two three( is a list.
So what you get is *maybe* the normal behavior ?
But, yep, what did you expect ?
++

Jack




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


Re: [PD] confused about $1 in messages

2014-01-20 Thread Spencer Russell
Thanks Jonathan for the detailed response and pointer to the docs. As a
longtime (but somewhat sporadic) PD user this list behavior still becomes a
bit fuzzy to me sometimes, and this helps make it much more clear.

-s


On Mon, Jan 20, 2014 at 1:30 PM, Jonathan Wilkes jancs...@yahoo.com wrote:

 I'm not sure why the people replying to you are feigning ignorance on how
 this situation could possibly be confusing.  You're chopping off the word
 one with [list split] and leaving it intact on the other message; yet the
 dollarsign substitution gives you the same output in both cases.
 Furthermore, if you use [list length] on each message you will find the two
 message have a different number of elements.

 What you don't see, however, is that [list] objects like [list split]
 interpret incoming messages as list messages-- that is, they add the word
 list to the beginning of the message.  Also, they prepend a list
 selector to the messages they send out (except for [list trim], of course).

 But we're not done.  The selectors list, float, and symbol are
 special and do not get counted as elements with [list length].  Yet inside
 message boxes they _do_ get counted as the selector (i.e., the very first
 symbol atom in a message) when variable substitution is involved.

 Once you know those two details it gets a little easier to grasp.

 This is all further complicated by the fact that there is no dollarsign
 variable in Pd that can get the selector of an incoming message.  So for
 list two three you can't get list with a dollarsign variable, and
 likewise for one two three you can't get one with a dollarsign
 variable.  That's a real sticking point for new users, especially because
 they've no doubt already seen how seamlessly everything works when only
 numbers are involved.

 So I'd suggest everyone have a look at the help patch for [list],
 especially the subpatch labeled [pd about-lists].  In it, Miller Puckette--
 the guy who designed and implemented this part of the language-- describes
 what is happening in some detail.  In his explanation he questions his own
 design, even going so far as calling the very distinction you point out
 here ugly.  It's not the easiest part of Pd to understand, and it's the
 reason why you're having a problem in the patch example you gave.

 But if you learn to use the [list] family objects when dealing with data
 messages it can makes things a lot easier.  Since you know those objects
 will output messages with a list selector, then for everything other than
 a bang you're guaranteed that [$1( will work properly.

 -Jonathan


   On Monday, January 20, 2014 11:33 AM, Jack j...@rybn.org wrote:
  Le 20/01/2014 15:34, ro...@dds.nl a écrit :
  dear list,
 
  i'm confused about the $1 replacement in messages.
 
  [one two three(
  |\
  | \
  |  [list split 1]
  |  /
  |/
  |/
  |  /
  |
  [;
  [this $1 $2(
 
  [r this]
  |
  [print this]
 
  output:
  this: two three
  this: two three
 
  why?
 
  rolf
 
 
  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
  http://lists.puredata.info/listinfo/pd-list

 [one two three( is not a list.
 [list one two three( is a list.
 So what you get is *maybe* the normal behavior ?
 But, yep, what did you expect ?
 ++

 Jack




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



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


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


Re: [PD] confused about $1 in messages

2014-01-20 Thread Jonathan Wilkes

On 01/20/2014 02:07 PM, Spencer Russell wrote:
Thanks Jonathan for the detailed response and pointer to the docs. As 
a longtime (but somewhat sporadic) PD user this list behavior still 
becomes a bit fuzzy to me sometimes, and this helps make it much more 
clear.


-s



It might help some if the selector inside a message box were visually 
distinct from the rest of the message.  Like the little tag widget in QT 
that's often used in email apps to show someone's nickname and hide the 
addy.  It's basically a rounded rectangle in a pastel color around some 
text.


You could also have different colors for built-ins vs. custom selectors.

-Jonathan

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