about 'use v6.d'

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
0
mt1957
12/13/2019 9:08:54 AM
perl.perl6.users 1384 articles. 0 followers. Follow

8 Replies
64 Views

Similar Articles

[PageSpeed] 35

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.=20

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

Best regards,
Vadim Belman

> On Dec 13, 2019, at 4:08 AM, MT <mt1957.2@gmail.com> wrote:
>=20
> Hello all,
>=20
> In the light of renaming to Raku I was wondering if the statement 'use =
v6.*' is still useful.
>=20
> 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').
>=20
> 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.
>=20
> So I must warn potential users of the software to install the newest =
Raku version, otherwise the programs/modules will run into problems.
>=20
> 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.
>=20
> Regards
> Marcel
>=20
0
vrurg
12/13/2019 2:32:29 PM
--000000000000853cb7059996ef9a
Content-Type: text/plain; charset="UTF-8"

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 <mt1957.2@gmail.com> 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
>

--000000000000853cb7059996ef9a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">There should probably be a way to require a minimum versi=
on of the compiler.<div dir=3D"auto"><br></div><div dir=3D"auto">=C2=A0 =C2=
=A0 use rakudo v2019.07;</div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Fri, Dec 13, 2019, 3:14 AM MT &lt;<a href=
=3D"mailto:mt1957.2@gmail.com">mt1957.2@gmail.com</a>&gt; wrote:<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">Hello all,<br>
<br>
In the light of renaming to Raku I was wondering if the statement &#39;use =
<br>
v6.*&#39; is still useful.<br>
<br>
First there is no version 6 of Raku (should be version 0, but that&#39;s <b=
r>
another story) and the &#39;use v5&#39; in the past used for perl5 is also =
not <br>
used anymore (I think) (it is, I believe, more common to &#39;use <br>
Inline::Perl5&#39;).<br>
<br>
Also the &#39;d&#39; of the Diwali version is a nice touch but my experienc=
e is <br>
that this is not accurate enough. I&#39;ve used some new things of Raku <br=
>
introduced somewhere in summer 2019 but the version is still 6d. Also <br>
many bugs are fixed which requires newer versions to run right.<br>
<br>
So I must warn potential users of the software to install the newest <br>
Raku version, otherwise the programs/modules will run into problems.<br>
<br>
It would be nice to have this version extended, or maybe better, the <br>
version spec in META6.json so that the zef module installer could hold <br>
back the installation if the users Raku version is older. It is not <br>
enough to let tests fail on something the Raku compiler cannot handle <br>
because it is does not show that the compiler is too old when zef is <br>
installing modules.<br>
<br>
Regards<br>
Marcel<br>
</blockquote></div>

--000000000000853cb7059996ef9a--
0
b2gills
12/13/2019 2:46:53 PM
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
0
tobs
12/13/2019 3:49:00 PM
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.
0
mt1957
12/13/2019 4:44:08 PM
On 2019-12-13 01:08, MT wrote:
> In the light of renaming to Raku I was wondering if the statement 'use =

> v6.*'=C2=A0is=C2=A0still=C2=A0useful.

Hi MT,

If I am not mistaken, `use v6` is only useful if you have more than one=20
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=20
Perl6, so take what I say "lightly".

:-)

-T

Pretty good with the "weasel" words, huh!
0
perl6
12/13/2019 6:46:17 PM
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.=20

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 =
<perl6-users@perl.org> wrote:
>=20
> 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.
>=20
> Hi MT,
>=20
> 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.
>=20
> I personally make sure I only run one version.  But I am a newbie to =
Perl6, so take what I say "lightly".
>=20
> :-)
>=20
> -T
>=20
> Pretty good with the "weasel" words, huh!
>=20
0
vrurg
12/13/2019 7:14:32 PM
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
0
perl6
12/13/2019 7:19:52 PM
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
0
perl6
12/13/2019 7:23:58 PM
Reply: