<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 6, 2011, at 4:21 PM, &lt;<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>&gt; &lt;<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><br><br><div><hr id="stopSpelling">From:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:hans@at.or.at">hans@at.or.at</a><br>To:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a><br>Date: Tue, 6 Sep 2011 15:57:32 -0400<br>CC:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a        text file<br><br><br><div><div>On Sep 6, 2011, at 1:16 PM, &lt;<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>&gt; &lt;<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>&gt; wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div class="ecxhmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><br><br><div>&gt; Date: Tue, 6 Sep 2011 08:12:15 +0200<br>&gt; From:<span class="ecxApple-converted-space">&nbsp;</span><a href="mailto:fbar@footils.org">fbar@footils.org</a><br>&gt; To:<span class="ecxApple-converted-space">&nbsp;</span><a href="mailto:hans@at.or.at">hans@at.or.at</a><br>&gt; CC:<span class="ecxApple-converted-space">&nbsp;</span><a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>&gt; Subject: Re: [PD] (breaking symbols) was Re: find a list of numbers in a text file<br>&gt;<span class="ecxApple-converted-space">&nbsp;</span><br>&gt; Hi,<br>&gt;<span class="ecxApple-converted-space">&nbsp;</span><br>&gt; On Mon, Sep 05, 2011 at 02:34:30PM -0400, Hans-Christoph Steiner wrote:<br>&gt; &gt;<span class="ecxApple-converted-space">&nbsp;</span><br>&gt; &gt; Then having the patch rely on the "error: float: no method for<br>&gt; &gt; 'symbol'" error that is normally generated in that case.<span class="ecxApple-converted-space">&nbsp;</span><br>&gt;<span class="ecxApple-converted-space">&nbsp;</span><br>&gt; Well, it prints an error because there *is* an error in the patch. The<br>&gt; author should never have converted a float to a symbol and expect to<br>&gt; still do float calculations with it.<span class="ecxApple-converted-space">&nbsp;</span><br>&gt;<span class="ecxApple-converted-space">&nbsp;</span><br><br>Yes, I think it ought to be up to the external to implement its own symbol-to-float converter since there is no universally valid way of doing it.<br>The same pattern will have different meanings in different context and Pd can't be expected to know what is expected in a specific case.<br><br>Martin<br></div></div></div></span></blockquote><br></div><div>That sounds like a recipe for disaster, then we end up with multiple, incompatible ways of doing this. &nbsp;I don't think anyone is proposing that symbols like "four" get converted to 4, but only symbols like 43, 5.22, -234, etc. &nbsp;Things that can be directly converted from a char* to a float with a standard function.</div><div><br></div><br><br>I think someone might well want to make an external that can take 'four' as 4. Or a symbol '4+2' that would become a float 6.0.<br>And obviously Pd should not be doing that all the time because most of the time that is not the right thing to do.<br>The disaster would be if Pd tried to guess what the user intends based on some general idea of what Pd is 'for'.<br>For instance I've been working on an xbee external where I need to specify numbers like 0x0a060123 for the remote address.<br>I do that by interpreting the symbol as a 64-bit integer internally but I would not expect any other external to do this unless it needs to.<br>Otherwise the user would have to manually convert the number (which is conventionally given in hexadecimal form) into a bunch of decimal numbers small enough to be represented as float and then the external would combine them internally.<br><br>Martin<br><br></div></div></div></span></blockquote></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yeah, I agree, I have no problem if someone wants to make an externals that interprets 4+2 or "four" as 4, but it doesn't seem like something that should be in the core.</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">About hex 0x form, that could conceivably fall under the "anything that looks like a number is a float", as least for programmers. &nbsp;In most programming languages, 0x10 is just a number like 16.</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">.hc<br class="Apple-interchange-newline"><div style="font-size: 12px; "><br></div><div style="font-size: 12px; ">----------------------------------------------------------------------------</div><div style="font-size: 12px; "><br></div><div style="font-size: 12px; ">If you are not part of the solution, you are part of the problem.</div><br class="Apple-interchange-newline"></div></span> </div><br></body></html>