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 to have a single variable or keyword to represent 
the entire argument list as a single value.  Logically, a single value is what 
an entire argument list is anyway, with individual arguments being components of 
that. -- Darren Duncan


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, 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
  
  

  


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.

-- 
~~~
Having been erased,
The document you're seeking
Must now be retyped.
~~~
  



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 chose "String Case" and 
then clicked on Perl, which got me to the P5 example, and right after 
it was the Perl 6 since each page is alphabetical by language!


(That site is screaming to be fed into a 
machine-learning-code-translator!)


Thank you!

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


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, which got me to the P5 example, and right after it was the
Perl 6 since each page is alphabetical by language!

(That site is screaming to be fed into a machine-learning-code-translator!)


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 idiomatic code, so you should try to stay away from it.

Cheers,
Moritz


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.

:-)

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


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 away from it.

Cheers,
Moritz

On 12.02.2017 07:47, ToddAndMargo wrote:
> Hi All,
> 
> I know I asked this once before and I had though I'd written it
> down, but do you have any favorite Perl5 to Per6 converters?
> 
> Many thanks,
> -T
> 

-- 
Moritz Lenz
https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/