On Feb 6, 2006, at 4:27 AM, IOhannes m zmoelnig wrote:
Hans-Christoph Steiner wrote:
For data types, I think its easiest to look to [route], [trigger], and [select], three Pd objects whose core function is to interpret data types. And this will give some perhaps surprising results. For
example:[word( | [select symbol]
this tells us "error: select: no method for 'word'", therefore [word( is not a symbol.
very empiristic indeed.
btw, i don't know why you consider these results as "surprising". i think people with _no_ knowledge of pd will think it very surprising if [select symbol] would select anything _but_ "symbol" (like "word") people who are used to pd should be surprised about this any more
(since they are used to it)[...]
Sorry, it wasn't the most clear example. This may be clearer:
[word( | [select word]
which gives the same error: "error: select: no method for 'word'"
This error message seems to tell us that [word( is not a symbol also.
right. nobody said that "word" is a symbol.
but nevermind...
Actually, you are wrong, and that is one of the key problems I am
trying to clear up. From 2.3.1 in the Pd manual:
http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s3.1
"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. The arguments may be
symbols or numbers."
So, by that definition [word( is a message with a selector and no
arguments. It quite clearly says "The selector is a symbol", but these
quite clearly disagree:
[word( [word( [word( | | | [select word] [route symbol] [trigger symbol]
This gives no output on either outlet. Instead [select word] says
"error: select: no method for word", [route] outputs on the right
outlet, and [trigger symbol] says "error: trigger: can only convert 's'
to 'b' or 'a'".
bang float (== numeric element) list (== list series) pointer symbol symbolic element selector series
Here are some attempts at definitions:
list: a series of 2 or more elements whose first element is either
the selector "list", or a float, which causes the "list" selector to bei think this is a bad start. implying "list" or "float" is an exception and should be handled as such: at the very end of the documentation! if people would use [float 1( instead of [1(, then i think that there would be less confusion. so we should get people to _think_ [float 1(, even though they _write_
[1(.
First, the PdDefinitions page isn't meant to learn from, but instead
for us to work out the details of this issue. Second, I agree, things
are much clearer if people use the "float" selector, and mentally think
it too. But that is only part of the problem.
symbol: a symbol is a two element series where the first element is
the "symbol" selector and the second element is a symbolic element. But any series with a selector of "symbol" with more than two elements is automatically converted to a symbol by truncating all other symbolic elements but the "symbol" selector and the second element.isn't the 3rd argument of [list 1 two drei( a symbol too?
That's what the docs say, but that is not what [select], [route], and
[trigger] say. We need to document what is actually happening, not
follow the docs and ignore what is actually happening.
The 3rd argument of that list is only a symbol if it has a "list" or
"symbol" selector. Consider this patch:
[list 1 two drei( | [list split 2] | [list trim]
The output of [list trim] is not a symbol. [symbol drei( is a symbol,
[list drei( is a symbol. [drei( is not a symbol.
selector series: a series of 2 or more elements whose first element is neither the selector "list" nor a numeric element. But it needs a better term.
how about "anything" (just joking)
numeric element: any element which is a functional representation of a number. In Pd, a numeric element is the same as a float.
symbolic element: any element which is not a functional representation of a number, usually in the form of words
and don't forget "pointer element".
I think that bangs and pointers are clearly defined, I feel no need to
try to redefine them.
apropos, isn't "element" a synonym for "atom"?
An atom is a float or a symbol, right?. [word( is not float or a
symbol, so it is therefore not an atom. But it is an element in a
message, in this case, its used as a selector. And from what I see,
"atom" is not a useful distinction when you view things from Pd.
Instead, it is part of the implementation.
We could use the word "atom" instead of "element", but it is currently
not clearly defined. From 2.1.2 of the manual:
http://crca.ucsd.edu/~msp/Pd_documentation/x2.htm#s1.2
"The text is divided into atoms separated by white space." "Atoms are either numbers or symbols..."
By the first definition, atoms and elements are the same thing. But
not according to the second.
.hc
Man has survived hitherto because he was too ignorant to know how to
realize his wishes.
Now that he can realize them, he must either change them, or perish.
-William Carlos
Williams