[PD] (breaking symbols) was Re: find a list of numbers in a text file

Jonathan Wilkes jancsika at yahoo.com
Tue Sep 6 19:11:01 CEST 2011





----- Original Message -----
> From: Frank Barknecht <fbar at footils.org>
> To: "pd-list at iem.at" <pd-list at iem.at>
> Cc: 
> Sent: Tuesday, September 6, 2011 3:44 AM
> Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file
> 
> On Mon, Sep 05, 2011 at 11:41:53PM -0700, Jonathan Wilkes wrote:
>>  I think my proposal of having Pd automagically make floats out of 
>>  selectors that look like numbers solves half of the problem, as well as 
>>  being consistent with what's written in the last paragraph of 2.3.1.  
> The 
>>  other half is already solved by [makefilename %d], and could be made 
>>  more consistent by having message boxes automagically convert $1 
>>  in "symbol 15" to a symbol-atom.  Possibly the same for the arg 
>>  to [symbol].
> 
> While I tend to agree and think this sounds sensible, it could clash
> with this part of the manual (first paragraph of 2.3.1) that hints at
> problems with numerical symbols as selectors: 
> 
> "Messages contain a selector followed by any number of arguments. The
> selector is a symbol, which appears in the patch as a non-numeric string
> with no white space, semicolons, or commas."

That already clashes with the Vanilla implementation:

[5(
|
[makefilename %d]
|
[set, addsemi, add2 $1 127, bang(
|
[ (

[vsl] <-- receive-name is '5'

> 
> I'm not sure what "appears in the patch" should mean.

Then keep reading the manual:
"When a message is passed to something (which is often an inlet of 
a box but could be anything that can receive a message)..."

It clearly means (at least) anything that "appears in the patch," which is 
at odds with the example I gave above.  Anyway, the title of the section 
is "Anatomy of a message", not "Anatomy of how things you type in 
an object box get interpreted."

> It definitly 
> means
> that numercial-symbol selectors don't get shown and cannot be written
> into a patch, so you cannot use them in the editor where "real"
> selectors should be written, like in [route]: There's no [route 
> "15"] in
> Pd, where "15" should mean a numerical symbol. And if you allow [s 
> 15],
> should [table 15] also be allowed? And would 15 be a symbol or a float
> then?

The '15' in [s] and [table] isn't a selector, it's a float argument, and the help 
files would be adjusted accordingly to say that you can give either a symbol 
or float argument to give a name to the symbolic-receiver.

> 
> It seems to be fine if [symbol 15( would act like [15(->[makefilename %d], 
> but who really needs the former when you already have the latter? And what
> about symbols with whitespace, like [symbol My Documents/Drum Loop.wav]?
> 
> Additionally numbers inside messages or object boxes have so many
> special meanings in Pd (i.e. they turn "1 two three" into a list
> message, they change the mode of [select] or [route],

[select] doesn't need modes, and [route] is poorly designed and should 
really be two separate objects.

> they make [15] be
> [f 15] etc.),

None of your three examples would change under my proposal.

> that it seems to me that some small changes here could
> open a Pandora's Box and the sole reason for this IMO is legalistic
> pedantry.

Ha!  It's obviously not the "sole reason" we're discussing this.  Look at the 
title of the thread-- would you have been comfortable writing that as the first 
response to the OP?

> Numbers maybe already are overloaded with automagic.
> 
> However I would like to see some proper quoting mechanism in the editor.

That could be a way to go.
How do you do it in a way that doesn't open a Pandora's box and that doesn't 
break patches going forward?

-Jonathan

> 
> Ciao
> -- 
> Frank
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>



More information about the Pd-list mailing list