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

Hans-Christoph Steiner hans at at.or.at
Sat Sep 10 06:02:02 CEST 2011


On Sep 9, 2011, at 6:29 PM, Mathieu Bouchard wrote:

> On Tue, 6 Sep 2011, Frank Barknecht wrote:
>
>> I'm not sure what "appears in the patch" should mean. 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.
>
> I proposed such a syntax in the past... 2006-2007, I think.
>
> It would take care of :
>
> "15" = \15 but looks less weird
>
> "" = really an empty string (just like the &s_ given by A_DEFSYMBOL,  
> that you nearly can't produce otherwise)
>
> "hello      world" = hello\ \ \ \ \ \ world but less annoying to type.
>
> "hello   " = hello\ \ \  but at least it wouldn't be confusing like  
> ending a symbol by backslash space and then immediately using a  
> space separator.
>
> ";" = \;
>
> "," = \,
>
> but it means :
>
> " would be syntax error
>
> \" would mean double-quote char
>
> "\"" too
>
> Those conventions are very similar to Tcl and Bash.
>
> However, I don't know what "$1" would do, nor why it's a good idea,  
> or a bad idea.
>
> Also, how do we quote ";" when writing to a file ? a literal  
> semicolon in a messagebox would be written as \;, which has to be  
> written \\\; in the file, but if a user were to write ";", what will  
> the messagebox write to the .pd file ?


I agree the "" style would match other languages and things quite well  
and might be clearer, but breaks backwards compatibility, though not  
horribly.  We could start with the \ method, and if that is too  
painful, add a "" method.  They would be complimentary.  Certainly  
most syntaxes that have "" also have \ escaping.  Internet search  
input is one notable exception.

.hc




----------------------------------------------------------------------------

"It is convenient to imagine a power beyond us because that means we  
don't have to examine our own lives.", from "The Idols of  
Environmentalism", by Curtis White







More information about the Pd-list mailing list