<div dir="ltr"><div>Hi Chris,</div><div><br></div><div>Yes, I&#39;ve read the Interop log, but I didn&#39;t quite realize the consequence.  Anyway, this is not really critical, as I can send the Interop back to R for printing.  I don&#39;t have yet an idea what the contract should be...</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 12:54 PM Chris Seaton &lt;<a href="mailto:chris.seaton@oracle.com">chris.seaton@oracle.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Rodrigo,<br>
<br>
The old behaviour worked because to_s called Java’s toString. We changed that to call Ruby’s inspect instead. It was decided across all Truffle languages that we shouldn’t be relying on Java’s toString behaviour, because there’s no contract on what that should be for Truffle languages.<br>
<br>
I think this change was part of the proposed interop change log I sent you on the 24th for your opinions, but I wouldn’t blame you for missing it as it was a long list and it’s hard to see how they all apply to your codebase.<br>
<br>
What we need is a proper Truffle contract for converting values to strings.<br>
<br>
Let us know what you think it should be.<br>
<br>
Chris<br>
<br>
&gt; On 13 Sep 2018, at 16:36, Rodrigo Botafogo &lt;<a href="mailto:rodrigo.a.botafogo@gmail.com" target="_blank">rodrigo.a.botafogo@gmail.com</a>&gt; wrote:<br>
&gt; <br>
&gt; Hello...<br>
&gt; <br>
&gt; In rc5 with the following code:<br>
&gt; <br>
&gt; p1 = Polyglot.eval(&quot;R&quot;, &#39;as.formula&#39;).call(&quot;medv ~ lstat + age&quot;)<br>
&gt; p p1<br>
&gt; p p1.to_s<br>
&gt; <br>
&gt; I get the following result:<br>
&gt; <br>
&gt; #&lt;Truffle::Interop::Foreign@2a984952&gt;<br>
&gt; &quot;language(medv ~ lstat + age)&quot;<br>
&gt; <br>
&gt; in rc6, the same code prints:<br>
&gt; <br>
&gt; #&lt;Foreign [#&lt;Foreign:0x49d979c4&gt;, #&lt;Foreign:0x3ba5c4dd&gt;, #&lt;Foreign [#&lt;Foreign:0x47fca3cc&gt;, #&lt;Foreign:0x55746340&gt;, #&lt;Foreign:0x6a0c7af6&gt;]&gt;]&gt;<br>
&gt; &quot;#&lt;Foreign [#&lt;Foreign:0x49d979c4&gt;, #&lt;Foreign:0x3ba5c4dd&gt;, #&lt;Foreign [#&lt;Foreign:0x47fca3cc&gt;, #&lt;Foreign:0x55746340&gt;, #&lt;Foreign:0x6a0c7af6&gt;]&gt;]&gt;&quot;<br>
&gt; <br>
&gt; The old behavior is preferred, if possible.<br>
&gt; <br>
&gt; <br>
&gt; Thanks<br>
&gt; -- <br>
&gt; Rodrigo Botafogo<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; GraalVM-Users mailing list<br>
&gt; <a href="mailto:GraalVM-Users@oss.oracle.com" target="_blank">GraalVM-Users@oss.oracle.com</a><br>
&gt; <a href="https://oss.oracle.com/mailman/listinfo/graalvm-users" rel="noreferrer" target="_blank">https://oss.oracle.com/mailman/listinfo/graalvm-users</a><br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Rodrigo Botafogo<br>Integrando TI ao seu negócio<br>21-3010-4802/11-3010-1802</div>