|more useful options|
[perl6] More Inline::Perl5 musingsby syphilis (Bishop)
|on Mar 17, 2016 at 11:59 UTC||Need Help??|
syphilis has asked for the wisdom of the Perl Monks concerning the following question:
Inline::Perl5 is probably not the recommended entry point to perl6.
But it's, so far, the only aspect of perl6 I've come across that has piqued my interest in perl6 - and it looks like it's going to become *my* entry point (for that given reason).
Nevertheless, I'm happy to apologise for this unorthodoxy on my part if that's deemed appropriate.
(Blame Doug Hunt on the PDL mailing list for having mentioned Inline::Perl5 on the PDL-dev mailing list ;-)
So ... I have a perl5 module named Math::Float128. Basically, it does __float128 arithmetic, and it builds fine on most platforms if you use a recent port of the gcc compiler.
As an exercise, I thought it would be interesting (for me) to access that module and its functionality from perl6.
On Ubuntu 14.04 I have:
And, after muddling my way through the installation of Inline::Perl5 (with the assistance of a number of patient monks), I've come up with this perl6 script (which works fine):
That correctly outputs:
Based on that it seems to me that the perl5 overloading of "" is being correctly accessed - as that's the only way I can think of that both
would render correctly.
Is that assessment correct ? (That's my first question).
Inspired by the success of
But that just outputs:
Why ? (That's my second question).
Is there a better way to access __float128 arithmetic using perl6 ? (My third and last question ... for tonight ;-)