[graalvm-users] RC6 to_s behavior changed
rodrigo.a.botafogo at gmail.com
Thu Sep 13 18:38:25 PDT 2018
Yes, I've read the Interop log, but I didn't quite realize the
consequence. Anyway, this is not really critical, as I can send the
Interop back to R for printing. I don't have yet an idea what the contract
On Thu, Sep 13, 2018 at 12:54 PM Chris Seaton <chris.seaton at oracle.com>
> Hello Rodrigo,
> 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.
> 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.
> What we need is a proper Truffle contract for converting values to strings.
> Let us know what you think it should be.
> > On 13 Sep 2018, at 16:36, Rodrigo Botafogo <rodrigo.a.botafogo at gmail.com>
> > Hello...
> > In rc5 with the following code:
> > p1 = Polyglot.eval("R", 'as.formula').call("medv ~ lstat + age")
> > p p1
> > p p1.to_s
> > I get the following result:
> > #<Truffle::Interop::Foreign at 2a984952>
> > "language(medv ~ lstat + age)"
> > in rc6, the same code prints:
> > #<Foreign [#<Foreign:0x49d979c4>, #<Foreign:0x3ba5c4dd>, #<Foreign
> [#<Foreign:0x47fca3cc>, #<Foreign:0x55746340>, #<Foreign:0x6a0c7af6>]>]>
> > "#<Foreign [#<Foreign:0x49d979c4>, #<Foreign:0x3ba5c4dd>, #<Foreign
> [#<Foreign:0x47fca3cc>, #<Foreign:0x55746340>, #<Foreign:0x6a0c7af6>]>]>"
> > The old behavior is preferred, if possible.
> > Thanks
> > --
> > Rodrigo Botafogo
> > _______________________________________________
> > GraalVM-Users mailing list
> > GraalVM-Users at oss.oracle.com
> > https://oss.oracle.com/mailman/listinfo/graalvm-users
Integrando TI ao seu negócio
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GraalVM-Users