Re: Confused about rakudobrew and Rakudo Star

2016-02-03 Thread Brandon Allbery
On Wed, Feb 3, 2016 at 10:30 PM, James E Keenan  wrote:

> I am evidently confused as to the relationship, if any, between the
> 'rakudobrew' utility and the Rakudo::Star distribution.


In short: rakudobrew is for the folks who want to track the rapid
development of Rakudo. Star is for folks who want something stable in order
to play with the language, and includes the Task::Star ecosystem. As Star
was cut earlier today, it's based on the rakudo that was current earlier
today (and still fairly current as there haven't been many commits in the
past few hours).

It's more or less the difference between a Python or Perl 5 release, and
installing either from git HEAD. rakudobrew builds from HEAD; Star is a
release, which happens to be close to HEAD at the moment because it was
just created. HEAD will keep moving; Star will stay stable for a while
(used to be monthly, but they're considering releasing less often now)
before the next release.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Confused about rakudobrew and Rakudo Star

2016-02-03 Thread James E Keenan
I am evidently confused as to the relationship, if any, between the 
'rakudobrew' utility and the Rakudo::Star distribution.


Several weeks ago, when it became apparent that there would be delays in 
the release of a Rakudo Star distribution with the "Christmas" release 
in it, I executed the following commands to install Rakudo Perl 6.


$ rakudobrew install moar
$ rakudobrew install panda
$ panda install Task::Star

IIRC, I found these instructions at several locations, including this 
helpful blog post:


http://friedo.com/blog/2016/01/exploring-perl-6-up-and-running

The results:

[$ which perl6
/home/jkeenan/.rakudobrew/bin/perl6

$ perl6 -v
This is Rakudo version 2015.12-235-g172a92b built on MoarVM version 
2015.12-29-g8079ca5 implementing Perl 6.c.


And off I went to learn Perl 6.

Today, I saw Tobias Leich's message on this list, "Announce: Rakudo Star 
Release 2016.01", as well as Coke's blog post here: 
http://blogs.perl.org/users/coke/2016/02/rakudo-perl-6-compiler---2016011-released.html


So, I thought, oh good, now I can upgrade.  I repeated the above 
commands, with mixed results.  On the one hand, the first two commands 
ran without incident.  But when I said 'perl6 -v', I got the same Rakudo 
version as several weeks ago.  So it appears I didn't upgrade at all.


On the other hand, when I ran 'panda install Task::Star', I got this 
inelegant output:


#
$ panda install Task::Star
==> Fetching Task::Star
==> Building Task::Star
==> Testing Task::Star
==> Installing Task::Star
Task::Star:ver<*>:auth<>:api<> already installed
  in block  at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/C6FEA515A97C45ED8F92BCF5038BA028C9CE9CC0 
line 61
  in sub indir at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/5AEF9DA5AE15E5AB5CB2ADB58A455E007FA7839E 
line 20
  in method install at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/C6FEA515A97C45ED8F92BCF5038BA028C9CE9CC0 
line 42
  in method install at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/9036849E1656E91211D00AB4530B81D29A7D6E82 
line 161
  in method resolve at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/9036849E1656E91211D00AB4530B81D29A7D6E82 
line 234
  in sub MAIN at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 
line 18
  in block  at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 
line 150


Actually thrown at:
  in method install at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/C6FEA515A97C45ED8F92BCF5038BA028C9CE9CC0 
line 44
  in method install at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/9036849E1656E91211D00AB4530B81D29A7D6E82 
line 161
  in method resolve at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/sources/9036849E1656E91211D00AB4530B81D29A7D6E82 
line 234
  in sub MAIN at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 
line 18
  in block  at 
/home/jkeenan/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 
line 150

#

So, I'm confused as to whether I have any version of "Rakudo Star" at 
all.  My guess is that I've actually simply built, via rakudobrew, Perl6 
on Moar twice.  Is that correct?


Thank you very much.
Jim Keenan


Announce: Rakudo Star Release 2016.01

2016-02-03 Thread Tobias Leich

# Announce: Rakudo Star Release 2016.01

## A useful and usable production distribution of Perl 6

On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce
the January 2016 release of "Rakudo Star", a useful and usable production
distribution of Perl 6. The tarball for the January 2016 release is 
available

from http://rakudo.org/downloads/star/.

This is the first post-Christmas (production) release of Rakudo Star and
implements Perl v6.c. It comes with support for the MoarVM backend (all 
module

tests pass on supported platforms).

Please note that this release of Rakudo Star is not fully functional 
with the

JVM backend from the Rakudo compiler. Please use the MoarVM backend only.

In the Perl 6 world, we make a distinction between the language ("Perl 
6") and

specific implementations of the language such as "Rakudo Perl". This Star
release includes release 2016.01.1 
 
of the Rakudo Perl 6 compiler , version
2016.01 of MoarVM , plus various modules, 
documentation, and other resources

collected from the Perl 6 community.

[release 2016.01]: 
https://raw.githubusercontent.com/rakudo/rakudo/2016.01.1/docs/announce/2016.01.md

[Rakudo Perl 6 compiler]: http://github.com/rakudo/rakudo
[MoarVM]: http://moarvm.org/

Some of the new compiler features since the last Rakudo Star release 
include:


+ Chained .grep calls on Supply fixed (RT #127297)
+ Fixed interaction with perl6-debug and precompilation that resulted in an
  endless loop
+ re-enabled warning when smart-matching against a True or False literal
+ Fixed internal error when reporting certain type errors (RT #127207)
+ Fixed rare "duplicate definition of symbol" errors (RT #127107)
+ Fixed interpolating of pairs with non-key strings into signatures
+ Fixed error when smart-matching Seq against a Set (RT #127166)
+ Improved error message when smart-matching against an S///-expression
+ Fixed bad interaction between EXPORTHOW and multiple declarations (RT 
#126566)

+ Fixed various issues regarding precompilation
+ Improved accuracy of Complex.sqrt
+ hyper now preserves order of results, as designed
+ Range.sum on an empty, numeric Range is now 0
+ Fixed Promise.allof() with an empty list of promises (RT #127101)
+ Improved message on premature virtual method call (RT #127097)
+ Better error message for module load failures of types that are part of
  the setting
+ Support for Readline in addition to Linenoise
+ Initial shaped array support
+ \r\n (Carriage Return/LineFeed) is now a single (synthetic) grapheme
+ Unicode support adheres to Unicode Annex #29
+ Unicode quotes are now also allowed in regular expressions
+ Improved newline support with "use newline" and updates to IO::Handle
+ Added List.head, List.tail, List.repeated methods
+ Str.encode now allows :replacement parameter for unencodable sequences
+ Str.split now accepts multiple strings to split on
+ New Range.int-bounds returns first/last value for integer ranges
+ Auto-generated meta-ops vivified by referring to them, instead of 
executing

+ Illegal assignment of different Numeric values now caught at compile time
+ &nextcallee implemented, which returns the routine that nextsame would 
invoke

+ Many speedups

Notable changes in modules shipped with Rakudo Star:

* Bailador: The PSGI module by default now sets p6sgi instead of psgi
* DBIish: Many fixes
* Digest::MD5: Updated to conform to new newline handling
* doc: p6doc -l added. p6doc now works for most non-core docs with pod
* LWP::Simple: Replace "as Int" with proper coercion type to fix build
* Linenoise: Many fixes
* MIME::Base64: Adjust to pack being made experimental
* panda: Large number of precomp and other bug fixes.  Now depends on 6.c
* Template::Mojo: use MONKEY-SEE-NO-EVAL
* Shell::Command: removed "as"

There are some key features of Perl 6 that Rakudo Star does not yet
handle appropriately, although they will appear in upcoming releases.
Some of the not-quite-there features include:

  * advanced macros
  * non-blocking I/O (in progress)
  * some bits of Synopsis 9 and 11

There is an online resource at http://perl6.org/compilers/features
that lists the known implemented and missing features of Rakudo's
backends and other Perl 6 implementations.

In many places we've tried to make Rakudo smart enough to inform the
programmer that a given feature isn't implemented, but there are many
that we've missed. Bug reports about missing and broken features are
welcomed at rakudo...@perl.org .

See http://perl6.org/ for links to much more information about
Perl 6, including documentation, example code, tutorials, reference
materials, specification documents, and other supporting resources.
Perl 6 tutorials are available under the "docs" directory in
the release tarball.

The development team thanks all of the contributors and sponsors for
mak

Re: A practical benchmark shows speed challenges for Perl 6

2016-02-03 Thread Tom Browder
On Wed, Feb 3, 2016 at 9:40 AM, Elizabeth Mattijsen  wrote:
> Is the code available somewhere?  Would love to try some optimizations on it.

Liz, code is in public pastes in Pastebin. Links are here:

1. The master Perl 6 script to run the tests:
  http://pastebin.com/MDmumWq0

2-3. The two file creation scripts (Perl 5 and 6):
  http://pastebin.com/RwizhVLT
  http://pastebin.com/g2VNHQnn

4-5. The two file reader scripts (Perl 5 and 6):
  http://pastebin.com/miY60cP3
  http://pastebin.com/XAkpF7bA

6-7. The smallest test file for a fast start:
  http://pastebin.com/d8ws15qm

Check inside file 1 which is set to just use the zero-gb file.  Near
the top of the file you'll see where you just select one of two Gb
arrays by commenting out one or the other:

#!/usr/bin/env perl6

# test file sizes:
#my @GB = <0 1 2 3 4 5 6 7 8 9 10>;
my @GB = <0>; # a small file for testing this file

Good luck. criticisms and suggestions welcome.

Cheers!

-Tom


Re: A practical benchmark shows speed challenges for Perl 6

2016-02-03 Thread Tom Browder
On Wed, Feb 3, 2016 at 9:40 AM, Elizabeth Mattijsen  wrote:
>> On 03 Feb 2016, at 14:59, Tom Browder  wrote:
>> I use Perl for heavy duty text processing. A question on Perl Monks
>> about Perl 5's handling of a large input file got me wondering how the
>> two Perls compare at the moment.
...
> Is the code available somewhere?  Would love to try some optimizations on it.

Yes, Liz, I'll put it on Pastebin.

It will be a while--wife is dragging me out the door for an appointment...

-Tom


Re: A practical benchmark shows speed challenges for Perl 6

2016-02-03 Thread Elizabeth Mattijsen
> On 03 Feb 2016, at 14:59, Tom Browder  wrote:
> I use Perl for heavy duty text processing. A question on Perl Monks
> about Perl 5's handling of a large input file got me wondering how the
> two Perls compare at the moment.
> 
> I wrote a couple of simple programs, in both languages, to write and
> read a 10 Gb text file filled with identical 100-character lines. The
> reading programs counted total lines and characters of the input file.
> The results on my fastest host show that much optimization is still
> needed for Perl 6.
> 
> I compared read times for file sizes from one to 10 Gb in one-gigabyte
> increments and, in general, Perl 6 takes roughly 30 times longer than
> Perl 5.14 to read the same file.  So far I see no significant
> improvement in Rakudo 2016.01 over 2015.12, but the tests haven't
> quite finished yet.

Is the code available somewhere?  Would love to try some optimizations on it.



Liz


A practical benchmark shows speed challenges for Perl 6

2016-02-03 Thread Tom Browder
I use Perl for heavy duty text processing. A question on Perl Monks
about Perl 5's handling of a large input file got me wondering how the
two Perls compare at the moment.

I wrote a couple of simple programs, in both languages, to write and
read a 10 Gb text file filled with identical 100-character lines. The
reading programs counted total lines and characters of the input file.
The results on my fastest host show that much optimization is still
needed for Perl 6.

I compared read times for file sizes from one to 10 Gb in one-gigabyte
increments and, in general, Perl 6 takes roughly 30 times longer than
Perl 5.14 to read the same file.  So far I see no significant
improvement in Rakudo 2016.01 over 2015.12, but the tests haven't
quite finished yet.

When I use the stats incantation shown by Liz, I get:

$ time perl6 --stagestats read-file-test.p6 large-1-gb-file.txt
Stage start  :   0.000
Stage parse  :   0.160
Stage syntaxcheck:   0.000
Stage ast:   0.000
Stage optimize   :   0.005
Stage mast   :   0.021
Stage mbc:   0.000
Stage moar   :   0.000
  File 'large-1-gb-file.txt' size: 10 bytes
  Normal end.
  For input file 'large-1-gb-file.txt':
Number lines: 1000
Number chars: 10

real 2m8.585s
user 2m5.408s
sys 0m0.968s

It looks to me that there are no stage hotspots, just overall
optimization with improvements to be done.

Without the stats I get for Perl 5 (5.14):


$ time perl read-file-test.pl large-1-gb-file.txt
  File 'large-1-gb-file.txt' size: 10 bytes
  Normal end.
  For input file 'large-1-gb-file.txt':
Number lines: 1000
Number chars: 10

real 0m6.216s
user 0m4.784s
sys 0m0.328s

And for Perl 6 (2016.01.1) I get:
-

$ time perl6 read-file-test.p6 large-1-gb-file.txt
  File 'large-1-gb-file.txt' size: 10 bytes
  Normal end.
  For input file 'large-1-gb-file.txt':
Number lines: 1000
Number chars: 10

real 2m6.687s
user 2m4.216s
sys 0m0.588s

I tried the suggestion from Bart Wiegmans to compile the program:

$ perl6 --target=mbc --output=read-file-test.moarvm read-file-test.p6
$ time perl6 read-file-test.moarvm large-1-gb-file.txt
Error while reading from file: Malformed UTF-8

So I guess precompilation is not yet ready for public testing.  That
will be a nice feature, IMHO!

Cheers!

-Tom


Re: [perl #127330] [SLOW] 10_000 lines with 「say ‘a’;」 take 16 seconds to run

2016-02-03 Thread Bart Wiegmans
Yes, precompilation will help. Although we're not ready to make true or
fake executables yet, you can compile to the moarvm bytecode file:

perl6 --target=mbc --output=print.moarvm print.p6
But, this crashes during deserialization for me, so I'm not sure if that
can be made to work as it stands.
Regards,
Bart

2016-02-03 13:29 GMT+01:00 Tom Browder :

> On Thursday, January 21, 2016, Elizabeth Mattijsen  wrote:
>>
>> > On 21 Jan 2016, at 00:42, Alex Jakimenko (via RT) <
>> perl6-bugs-follo...@perl.org>
>>
> ...
>
>> As you can see, most of the time is spent parsing the file, and then
>> optimizing and then generating the bytecode.
>>
>> This won’t get any faster until we spend time on optimizing grammars in
>> NQP and/or MoarVM performance in general.
>
>
> Wouldn't the coming feature to compile the script into "foo.exe" help,
> even before other major optimization so?
>
> -Tom
>
>>


[perl #127330] [SLOW] 10_000 lines with 「say ‘a’;」 take 16 seconds to run

2016-02-03 Thread Tom Browder
On Thursday, January 21, 2016, Elizabeth Mattijsen > wrote:
>
> > On 21 Jan 2016, at 00:42, Alex Jakimenko (via RT) <
> perl6-bugs-follo...@perl.org>
>
...

> As you can see, most of the time is spent parsing the file, and then
> optimizing and then generating the bytecode.
>
> This won’t get any faster until we spend time on optimizing grammars in
> NQP and/or MoarVM performance in general.


Wouldn't the coming feature to compile the script into "foo.exe" help, even
before other major optimization so?

-Tom

>


Re: run "...", :out forgetting about the exit code?

2016-02-03 Thread Siavash

Nitpick: 'use strict' is the default.

On 2016-02-03 03:07:18 IRST, Peter Pentchev wrote:
> [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false"; say 
> $p.exitcode;'


Re: Finding and fixing Perl 6 bugs

2016-02-03 Thread Timo Paulssen
AFAICT we usually recommend people report bugs via mail to
rakudo...@perl.org

Here's the places i could find (by targeted search, of course) that tell
people to do it like that:

- http://perl6.org/getting-started/ in the "side track",
- http://rakudo.org/tickets/ - rakudo.org -> "bug tracker",
- http://rakudo.org/how-to-help/ - rakudo.org -> "how to help"

Clearly, none of these places are optimal. rakudo.org used to be much
more important and user-facing before the recent-ish changes to
perl6.org to make it so much more useful and prettier to look at, too.

I've opened a ticket in the perl6-user-experience repository for this:

  https://github.com/perl6/user-experience/issues/8

Thank you for your time!
  - Timo


Re: Finding and fixing Perl 6 bugs

2016-02-03 Thread Siavash

On 2016-02-03 06:47:23 IRST, Tom Browder wrote:
> Perl 5 (and I believe 6) uses the weird (to me) rt.perl.org bug system and
> I have so far found no instructions on how to use it.  There is the program
> perlbug for Perl 5 but no reference I can find on using it for Perl 6.  I
> have an account on rt.perl.bug but cannot find anything other than my
> non-existent entries.  There is a public interface so ordinary users can
> see bugs but apparently not do anything about it.

For Rakudo bugs send an email to rakudo...@perl.org
http://rakudo.org/how-to-help/

> The various Perl 6 git repos all have their own issue trackers but so far I
> find no similarity between issue numbers on git and git bug report
> e-mails.  For example,  see those for the ecosystem.  Git shows 2 issues
> open with #136 and #53, but e-mails show something else.

For anything other than Rakudo you can open an issue on GitHub.
https://github.com/perl6

The other issue numbers you mentioned are probably pull requests. For example,
https://github.com/perl6/ecosystem/pulls?q=is%3Apr+is%3Aclosed