Re: about 'use v6.d'

2019-12-13 Thread ToddAndMargo via perl6-users

On 2019-12-13 11:14, Vadim Belman wrote:

Totally wrong. `use v6` specified Raku (formerly Perl6) code and initially 
thought to be used to distinct perl5 code from perl6. For now I consider it 
mostly as a decoration except for test files where .t extension is shared 
between languages.

With regard to multiversioning, rakudo currently supports all language releases 
available so far. So, if one specifies a particular language version like `use 
v6.c` it means that the code in the file will be compiled using 6.c. It will be 
done by the same compiler and it has nothing to do with 'multiple versions 
installed'.

Best regards,
Vadim Belman



Hi Vadim,

One of the things I found was that P6 would pick up my
.pm modules from P5 before to would look for .pm6.
The solution was to put my pm6 modules in a p6lib and
and pm modules in p5lib.  It was annoying as I
had to correct a log of stuff.

-T


Re: about 'use v6.d'

2019-12-13 Thread ToddAndMargo via perl6-users

On 2019-12-13 11:07, Mark Senn wrote:

If I am not mistaken, `use v6` is only useful if you have more than
one version of Perl6/Raku loaded on your system.  I could be wrong
though.


I think the main purpose is so that if somebody tries to run a Raku
program with Perl 5 they will get an error message.

Every Raku program I write now gets a
 use v6.d;
statement.  That's a note to myself for which language specification I
used when I wrote it and will provide a clue if I need to debug
something later because of version problems.

(I read the note from someone about a finer grained control is necessary
and agree with that.)

-mark



Hi Mark,

I have Perl 5 and Perl 6 both installed on my Linux systems.
Usually I only have Perl 6 installed on Windows computers I service.  I 
have never had a conflict on either.


On my Linux system, I run Fedroa and that uses the Red Hat
Package Manager (RPMs).  As long as you stay with the repo's
and RPM there will not be a mix up.

My first line in all my Linux programs is
 #!/usr/bin/end perl6

On the Windows side, I run my programs with
 perl6 xxx.pl6

The main issue I have come across, is when I am testing code
on the Linux side and type `perl` instead of `perl6` and wonder
why it looks so weird.  I can be a bit of a klutz that way.

Perl 5 compiles a lot faster that does Perl 6 and Perl 5's
libraries are much more mature.  That being said, Perl 6
is my go to language.  Perl 5's sub declarations drive
me nuts.  If you are not careful with Perl 5, it can become
a `write only` language, but that can be said of any language.

-T


Re: about 'use v6.d'

2019-12-13 Thread Vadim Belman


Totally wrong. `use v6` specified Raku (formerly Perl6) code and initially 
thought to be used to distinct perl5 code from perl6. For now I consider it 
mostly as a decoration except for test files where .t extension is shared 
between languages. 

With regard to multiversioning, rakudo currently supports all language releases 
available so far. So, if one specifies a particular language version like `use 
v6.c` it means that the code in the file will be compiled using 6.c. It will be 
done by the same compiler and it has nothing to do with 'multiple versions 
installed'.

Best regards,
Vadim Belman

> On Dec 13, 2019, at 1:46 PM, ToddAndMargo via perl6-users 
>  wrote:
> 
> On 2019-12-13 01:08, MT wrote:
>> In the light of renaming to Raku I was wondering if the statement 'use v6.*' 
>> is still useful.
> 
> Hi MT,
> 
> If I am not mistaken, `use v6` is only useful if you have more than one 
> version of Perl6/Raku loaded on your system.  I could be wrong though.
> 
> I personally make sure I only run one version.  But I am a newbie to Perl6, 
> so take what I say "lightly".
> 
> :-)
> 
> -T
> 
> Pretty good with the "weasel" words, huh!
> 


Re: about 'use v6.d'

2019-12-13 Thread ToddAndMargo via perl6-users

On 2019-12-13 01:08, MT wrote:
In the light of renaming to Raku I was wondering if the statement 'use 
v6.*' is still useful.


Hi MT,

If I am not mistaken, `use v6` is only useful if you have more than one 
version of Perl6/Raku loaded on your system.  I could be wrong though.


I personally make sure I only run one version.  But I am a newbie to 
Perl6, so take what I say "lightly".


:-)

-T

Pretty good with the "weasel" words, huh!


Re: about 'use v6.d'

2019-12-13 Thread Marcel Timmerman

On 12/13/19 3:32 PM, Vadim Belman wrote:

Hello Marcel,

You make certain assumptions, then you make them something like facts and 
proclaim things based on these. Please, don't!

Sorry that I did, apologies for that.


Re: about 'use v6.d'

2019-12-13 Thread Tobias Boege
On Fri, 13 Dec 2019, Brad Gilbert wrote:
> There should probably be a way to require a minimum version of the compiler.
> 
> use rakudo v2019.07;
> 

As I understand it, this would do something quite different from `use v6`,
which is probably your point(?).  A single Raku compiler would strive to
support `use v6.x` for many x, which Rakudo does by keeping around a setting
for each language version.  The `v6` pragmas can be changed per compunit
under the same compiler, so different parts of the same process can run
under different Raku versions.  (You probably know that more accurately
than me, so please correct me if I'm wrong.)

What Rakudo doesn't do is include a setting for every release, so the effect
of a `use rakudo v2019.07` would be closer to a *dependency* rather than a
pragma: it doesn't change the way your code is executed, it will abort it
altogether if your compiler is not recent enough or not Rakudo.  My under-
standing is that META6.json would be the natural place to declare dependencies,
although I couldn't tell how to properly declare a compiler dependency there,
as the compiler is not a module (right?).

Otherwise such a rakudo pragma is probably as easy to implement as

  --8<-- rakudo.pm6 
  sub EXPORT (Version:D $ver) {
  given $*PERL.compiler {
  die "This compiler is not Rakudo"unless .name eq 'rakudo';
  die "Rakudo version ≥ $ver required" unless .version ≥ $ver;
  }
  %( )
  }
  --8<--

Regards,
Tobias

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


Re: about 'use v6.d'

2019-12-13 Thread Brad Gilbert
There should probably be a way to require a minimum version of the compiler.

use rakudo v2019.07;

On Fri, Dec 13, 2019, 3:14 AM MT  wrote:

> Hello all,
>
> In the light of renaming to Raku I was wondering if the statement 'use
> v6.*' is still useful.
>
> First there is no version 6 of Raku (should be version 0, but that's
> another story) and the 'use v5' in the past used for perl5 is also not
> used anymore (I think) (it is, I believe, more common to 'use
> Inline::Perl5').
>
> Also the 'd' of the Diwali version is a nice touch but my experience is
> that this is not accurate enough. I've used some new things of Raku
> introduced somewhere in summer 2019 but the version is still 6d. Also
> many bugs are fixed which requires newer versions to run right.
>
> So I must warn potential users of the software to install the newest
> Raku version, otherwise the programs/modules will run into problems.
>
> It would be nice to have this version extended, or maybe better, the
> version spec in META6.json so that the zef module installer could hold
> back the installation if the users Raku version is older. It is not
> enough to let tests fail on something the Raku compiler cannot handle
> because it is does not show that the compiler is too old when zef is
> installing modules.
>
> Regards
> Marcel
>


Re: about 'use v6.d'

2019-12-13 Thread Vadim Belman
Hello Marcel,

You make certain assumptions, then you make them something like facts and 
proclaim things based on these. Please, don't!

Raku versioning is the same as it was for Perl6. Backward compatibility is the 
primary concern of the language development. 

Certain considerations about future language versioning are still possible. But 
the final decision will not affect backward compatibility – see above.

Best regards,
Vadim Belman

> On Dec 13, 2019, at 4:08 AM, MT  wrote:
> 
> Hello all,
> 
> In the light of renaming to Raku I was wondering if the statement 'use v6.*' 
> is still useful.
> 
> First there is no version 6 of Raku (should be version 0, but that's another 
> story) and the 'use v5' in the past used for perl5 is also not used anymore 
> (I think) (it is, I believe, more common to 'use Inline::Perl5').
> 
> Also the 'd' of the Diwali version is a nice touch but my experience is that 
> this is not accurate enough. I've used some new things of Raku introduced 
> somewhere in summer 2019 but the version is still 6d. Also many bugs are 
> fixed which requires newer versions to run right.
> 
> So I must warn potential users of the software to install the newest Raku 
> version, otherwise the programs/modules will run into problems.
> 
> It would be nice to have this version extended, or maybe better, the version 
> spec in META6.json so that the zef module installer could hold back the 
> installation if the users Raku version is older. It is not enough to let 
> tests fail on something the Raku compiler cannot handle because it is does 
> not show that the compiler is too old when zef is installing modules.
> 
> Regards
> Marcel
> 


Re: modules and subsets

2019-12-13 Thread Todd Chester via perl6-users




On 2019-12-13 01:06, Fernando Santagata wrote:

our $pi is export = 4.13;



Thank you!


about 'use v6.d'

2019-12-13 Thread MT

Hello all,

In the light of renaming to Raku I was wondering if the statement 'use 
v6.*' is still useful.


First there is no version 6 of Raku (should be version 0, but that's 
another story) and the 'use v5' in the past used for perl5 is also not 
used anymore (I think) (it is, I believe, more common to 'use 
Inline::Perl5').


Also the 'd' of the Diwali version is a nice touch but my experience is 
that this is not accurate enough. I've used some new things of Raku 
introduced somewhere in summer 2019 but the version is still 6d. Also 
many bugs are fixed which requires newer versions to run right.


So I must warn potential users of the software to install the newest 
Raku version, otherwise the programs/modules will run into problems.


It would be nice to have this version extended, or maybe better, the 
version spec in META6.json so that the zef module installer could hold 
back the installation if the users Raku version is older. It is not 
enough to let tests fail on something the Raku compiler cannot handle 
because it is does not show that the compiler is too old when zef is 
installing modules.


Regards
Marcel


Re: modules and subsets

2019-12-13 Thread Fernando Santagata
On Fri, Dec 13, 2019 at 6:48 AM Todd Chester via perl6-users <
perl6-us...@perl.org> wrote:

> On 2019-12-12 00:22, Fernando Santagata wrote:
> > On Thu, Dec 12, 2019 at 3:46 AM Todd Chester  > > wrote:
>
> Can I export any other variable and constants the same way:
>
>   my $pi = 4.13 is export;
>
> -T
>

Not like that. A "my" variable cannot be exported and the syntax is
slightly wrong.
Try:

our $pi is export = 4.13;

-- 
Fernando Santagata