<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><br><div><hr id="stopSpelling">From: hans@at.or.at<br>To: martin.peach@sympatico.ca<br>Date: Tue, 6 Sep 2011 15:57:32 -0400<br>CC: pd-list@iem.at<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><br>Martin<br><br></div>                                               </div></body>
</html>