Bugs item #2026128, was opened at 2008-07-23 23:02 Message generated for change (Comment added) made by fbar 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: Pending
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: Frank Barknecht (fbar)
Date: 2008-07-25 08:09
Message: Logged In: YES user_id=569446 Originator: NO
I repeat: There is *no* mystery type, please don't invent things without reason. What is there is a symbol with numeric content after [makefilename]. It acts like any other symbol, nothing else, nothing undocumented. [list trim] removes the selector so you're left with the bare symbol. You can get it back with [symbol] or [list]. Without "symbol"-selector it rightfully doesn't match [route symbol] or [select 1234], only to its own selector, which is symbol("1234") that you can create again with [makefilename], as numeric-symbol.pd shows. Pd cannot save these symbols, but never promised to do so.
I'm putting you're report into "Pending" now, it is vague and invalid.
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave) Date: 2008-07-25 05: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 08: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 08: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 06: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-24 01: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-24 01: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...