Re: per 5 converter?

2017-02-12 Thread Moritz Lenz
Hi, What's the use case for converting Perl 5 to Perl 6 automatically? If you want to use Perl 5 code from within your Perl 6 code, you can do that through Inline::Perl5. But automatic translation (if it works at all) typically doesn't produce good or idiomatic code, so you should try to stay aw

[perl #130763] [BUG][LTA] Weird error in anonymous class value in Hash

2017-02-12 Thread via RT
# New Ticket Created by # Please include the string: [perl #130763] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=130763 > Hi, I was trying to make an array of hashes which had one member an anonymous class for some tests, s

[perl #130763] [BUG][LTA] Weird error in anonymous class value in Hash

2017-02-12 Thread Zoffix Znet via RT
Golfed a bit: m: { foo => class {} }() rakudo-moar 266f34: OUTPUT«When invoking 1 '', provided outer frame 0x322f4e0 (3 '') does not match expected static frame 0x322f5e8 (2 '')␤ in block at line 1␤␤»

Re: [perl #130763] [BUG][LTA] Weird error in anonymous class value in Hash

2017-02-12 Thread Timo Paulssen
This is caused by the way we differentiate between anonymous blocks and hashes; we just parse it as a block first, and if at the end it turns out it should be a hash instead, we change it around. I suppose at that point the class will already have been defined and its stuff will point at the "not a

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 06:34 AM, Moritz Lenz wrote: Hi, What's the use case for converting Perl 5 to Perl 6 automatically? If you want to use Perl 5 code from within your Perl 6 code, you can do that through Inline::Perl5. But automatic translation (if it works at all) typically doesn't produce good or

Re: per 5 converter?

2017-02-12 Thread yary
There's Rosetta Code to compare short programs in different languages. Not as handy as what you are asking for, still it is educational To try it out I started at http://rosettacode.org/wiki/Category:Perl_6 to find all the pages that have P6 examples. I chose "String Case" and then clicked on Perl

Re: per 5 converter?

2017-02-12 Thread Brandon Allbery
On Sun, Feb 12, 2017 at 7:48 PM, ToddAndMargo wrote: > The case is, if I can't figure out the syntax in Perl 6, white a > quickie in Perl 5, translate it and see what I did wrong. > Translators are infamous for producing gobbledygook no self-respecting programmer would write -- brandon s a

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 05:00 PM, yary wrote: There's Rosetta Code to compare short programs in different languages. Not as handy as what you are asking for, still it is educational To try it out I started at http://rosettacode.org/wiki/Category:Perl_6 to find all the pages that have P6 examples. I chos

Re: per 5 converter?

2017-02-12 Thread ToddAndMargo
On 02/12/2017 05:02 PM, Brandon Allbery wrote: On Sun, Feb 12, 2017 at 7:48 PM, ToddAndMargo wrote: The case is, if I can't figure out the syntax in Perl 6

Re: per 5 converter?

2017-02-12 Thread Darren Duncan
On 2017-02-12 5:08 PM, ToddAndMargo wrote: I presume my eyes would tell where I made the boo-boo. Lets hope! I am real tired of Perl 5's stone age subs declarations. @_, oh brother. In principle there is nothing wrong with @_ at least from the perspective that it is quite useful to be able t

Re: per 5 converter?

2017-02-12 Thread Brock Wilcox
Also http://perldoc.perl.org/perlsub.html#Signatures for perl5 signatures. Use it everywhere! Promote it to be on by default! Go team! On Sun, Feb 12, 2017 at 8:12 PM, Darren Duncan wrote: > On 2017-02-12 5:08 PM, ToddAndMargo wrote: > >> I presume my eyes would tell where I made the boo-boo. L