Bugs item #2026128, was opened at 2008-07-23 17:02 Message generated for change (Comment added) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2026128...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Hans-Christoph Steiner (eighthave) Assigned to: Miller Puckette (millerpuckette) Summary: [list trim] outputs mystery type after conversion
Initial Comment: If you start with a symbolic atom in a symbol message, then run it thru a [list trim], you end up with a mystery type that is just a numeric atom, but does not work as a float message.
see attached patch for an example
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2008-07-24 23:24
Message: Logged In: YES user_id=27104 Originator: YES
This discussion is going quite far afield from the original issue. I can see no reason why there should be such a mystery type, given the current type system. So either it should be fixed or documented.
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2008-07-24 02:20
Message: Logged In: YES user_id=569446 Originator: NO
Oh, and logically the negation of "Anything that is not a valid number is considered a symbol." is not: "Everything that looks like a valid number is a float." Numeric symbols created with makefilename aren't valid numbers.
Besides that, the sentence you quote is in chapter "2.1.2. object boxes" and only deals with how Pd reads the content of object boxes, not with the general type system of Pd. Pointers or gemstates wouild be example of "not a valid number"s which still aren't symbols. But pointers cannot be used in object boxes neither.
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2008-07-24 02:09
Message: Logged In: YES user_id=569446 Originator: NO
Then you should report that "inconsistency" and not something else. The behaviour you dislike has nothing to do with [list trim] nor with conversions nor mysteries.
The only problem here is, that certain symbols cannot directly be represented in Pd's patch format. This includes symbols with a pure numeric content - which Pd reads as numbers in a patch file - but also many other symbols like those for whitespace characters (SPACE, TAB,...), the backslash etc. To use these, you have to create them with something like [makefilename], but after that, they get treated correctly by all builtin objects, especially [select] or [list].
See attached example. File Added: numeric-symbol.pd
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2008-07-24 00:40
Message: Logged In: YES user_id=27104 Originator: YES
This is a question of how should Pd behave, now how it currently does. If there is supposed to be such a thing as "a symbolic atom that is a number, but without a symbol selector", then it should be fully supported and documented. But this is the current definition of a symbolic atom (Pd manual 2.1.2):
"Anything that is not a valid number is considered a symbol."
By taking the converse of the above rule, "1234" looks like a valid number so it should be a float. That inconsistency is the bug that I am trying to highlight.
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2008-07-23 19:38
Message: Logged In: YES user_id=569446 Originator: NO
I hope even with all my spelling mistakes you can understand my previous post ... Is it possible to edit posts?
----------------------------------------------------------------------
Comment By: Frank Barknecht (fbar) Date: 2008-07-23 19:36
Message: Logged In: YES user_id=569446 Originator: NO
Yeah, these "mystery types" can be confusing, but in reality they are just ordinary symbols with a pure numeric data part. Note that these numeric symbols are not numbers or floats!
[list trim] removes the selector, so after that you have a "1234" string without selector (or with "symbol 1234" as selector, but minus the "symbol" part. You can covert this back to a Pd-symbol with a [symbol] or [list] object. However as you cannot represent numberic symbols in a saved Pd patch, you cannot use [select 1234] or [route 1234] to select or route them.
However you can use [select -DUMMY-] and prime that with a numeric symbol created with [makefilename %d] construct to its left inlet to select numeric symbols. The same "trick" is used to select backslashes or other for example split a symbol at any other "unusual" symbol using [list2symbol]. Try 92---[makefilename %c] to split at backslashes, for example.
Anyway, there's nothing mysterious about numeric symbols, they are just unusual in Pd. I think, we had similar confusions before in the bug tracker, but I didn't check.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2026128...