Announce: Rakudo Perl 6 compiler, Release 2019.07.1

2019-07-28 Thread Aleks-Daniel Jakimenko-Aleksejev
On behalf of the Rakudo development team, I'm announcing an
out-of-schedule release of the Rakudo Perl 6 compiler.
Rakudo is an implementation of Perl 6 on the Moar Virtual Machine[^1].

This release is a point release in addition to the regular
releases. Rakudo 2019.07 (note: no .1) was discovered to have some
issues with the build system that affected packaging. Moreover, this
release comes with a corresponding MoarVM point release which has some
important stability and reliability fixes.

The tarball for this release is available from
.

Please note: This announcement is not for the Rakudo Star
distribution[^2] — it’s announcing a new release of the compiler
only. For the latest Rakudo Star release, see
.

The changes in this release are outlined below:

New in 2019.07.1:
  + Build system:
    + Fixed issues when installing into `/usr` [f41db044]
    + Fixed unnecessary use of `git` in release tarballs
[540926bf][e18b4f3b]
    + Fixed intermittent failures in one of the performance tests [bd29d3f6]

The following people contributed to this release:

Patrick Böker, Aleks-Daniel Jakimenko-Aleksejev, Timo Paulssen,
Jonathan Worthington, Stefan Seifert, Samantha McVey

If you would like to contribute or find out more information, visit
, , ask on the
 mailing list, or ask on IRC #perl6 on freenode.

Additionally, we invite you to make a donation to The Perl Foundation
to sponsor Perl 6 development: 
(put “Perl 6 Core Development Fund” in the ‘Purpose’ text field)

The next release of Rakudo (#132), is tentatively scheduled for 2019-09-21.

A list of the other planned release dates is available in the
“docs/release_guide.pod” file.

The development team appreciates feedback! If you’re using Rakudo, do
get back to us. Questions, comments, suggestions for improvements, cool
discoveries, incredible hacks, or any other feedback – get in touch with
us through (the above-mentioned) mailing list or IRC channel. Enjoy!

Please note that recent releases have known issues running on the JVM.
We are working to get the JVM backend working again but do not yet have
an estimated delivery date.

[^1]: See 

[^2]: What’s the difference between the Rakudo compiler and the Rakudo
Star distribution?

The Rakudo compiler is a compiler for the Perl 6 language.
Not much more.

The Rakudo Star distribution is the Rakudo compiler plus a selection
of useful Perl 6 modules, a module installer, Perl 6 introductory
documentation, and other software that can be used with the Rakudo
compiler to enhance its utility.




signature.asc
Description: OpenPGP digital signature


while(<>){...} analog?

2019-07-28 Thread Joseph Brenner
I was just wondering if there's some direct analog in perl6 to the
perl5 construct:

  while(<>){ ... }

If I'm planning on passing a filename on the command-line, I can just
get it out of $*ARGFILES easily enough, but what if I also wanted it
to work on lines passed in via standard input?


Re: while(<>){...} analog?

2019-07-28 Thread Bruce Gray



> On Jul 28, 2019, at 6:20 PM, Joseph Brenner  wrote:
> 
> I was just wondering if there's some direct analog in perl6 to the
> perl5 construct:
> 
>  while(<>){ ... }
> 
> If I'm planning on passing a filename on the command-line, I can just
> get it out of $*ARGFILES easily enough, but what if I also wanted it
> to work on lines passed in via standard input?


`lines` , as a sub instead of a method, and no arguments.

See: https://docs.perl6.org/routine/lines#(Cool)_routine_lines
Without any arguments, sub lines operates on $*ARGFILES, which defaults 
to $*IN in the absence of any filenames.

For example:
perl6 -e 'say .join("\t") for lines().rotor(4);' path/to/file.txt

Hmmm. I would expect that to be in the Perl 5 to Perl 6 Migration Guides, but I 
do not see it there.

— 
Hope this helps,
Bruce Gray (Util of PerlMonks)


Re: while(<>){...} analog?

2019-07-28 Thread Joseph Brenner
> Hmmm. I would expect that to be in the Perl 5 to Perl 6 Migration Guides, but 
> I do not see it there.

Exactly, I was just looking there, and I ended up playing around with
the method form of lines, and didn't think to try the function
form of it.

To summarize, if the goal is to write a "simple_echo" script that
can work with a file name or with lines on standard input:

   simple_echo lines.txt
   cat lines.txt | simple_echo

The perl5 version would probably be:

  #!/usr/bin/env perl
  while(<>){
 print;
  }

The perl6 version would be something like:

  #!/usr/bin/env perl6
  use v6;
  for lines() {
  say $_;
  }


The kind of thing I was playing with was:

  #!/usr/bin/env perl6
  use v6;
  my @lines = $*ARGFILES.IO.lines;
  say @lines;

That works for lines from a file, but not from standard input, and  the
error message isn't tremendously helpful:

  No such method 'lines' for invocant of type 'IO::Special'




On 7/28/19, Bruce Gray  wrote:
>
>
>> On Jul 28, 2019, at 6:20 PM, Joseph Brenner  wrote:
>>
>> I was just wondering if there's some direct analog in perl6 to the
>> perl5 construct:
>>
>>  while(<>){ ... }
>>
>> If I'm planning on passing a filename on the command-line, I can just
>> get it out of $*ARGFILES easily enough, but what if I also wanted it
>> to work on lines passed in via standard input?
>
>
> `lines` , as a sub instead of a method, and no arguments.
>
> See: https://docs.perl6.org/routine/lines#(Cool)_routine_lines
>   Without any arguments, sub lines operates on $*ARGFILES, which defaults 
> to
> $*IN in the absence of any filenames.
>
> For example:
>   perl6 -e 'say .join("\t") for lines().rotor(4);' path/to/file.txt
>
> Hmmm. I would expect that to be in the Perl 5 to Perl 6 Migration Guides,
> but I do not see it there.
>
> —
> Hope this helps,
> Bruce Gray (Util of PerlMonks)
>
>