Rakudo Perl 6 was released on Christmas

Rakudo Perl 6 was released on Christmas:

On behalf of the Rakudo development team, I’m proud to announce the Christmas release (December 2015) of Rakudo Perl 6 #94 “коледа”. Rakudo is an implementation of Perl 6 on the Moar Virtual Machine.

So, I took it for a spin the morning after Christmas. Using Microsoft Visual Studio 2015 tools, it built without problems from a straight git clone (you might want to wait for the next Rakudo Star distribution release).

nmake test passed all tests. There were only a few failures with the much more extensive nmake spectest:

Test Summary Report
-------------------
t\spec\S02-literals\quoting.t                               (Wstat: 256 Tests: 184 Failed: 1)
  Failed test:  126
  Non-zero exit status: 1
t\spec\S19-command-line\dash-e.t                            (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
t\spec\S19-command-line\repl.t                              (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 1 tests but ran 0.
t\spec\S32-io\IO-Socket-Async.t                             (Wstat: 65280 Tests: 4 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 6 tests but ran 4.
t\spec\S32-io\pipe.t                                        (Wstat: 65280 Tests: 10 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 14 tests but ran 10.

At some point, I’ll come back and actually look into what’s going on with those, but, right now, I am excited to have perl6 on my Windows 10 laptop.

C:\> timethis perl6 --help
TimeThis :  Command Line :  perl6 --help
TimeThis :  Elapsed Time :  00:00:00.861

C:\> timethis perl --help
TimeThis :  Command Line :  perl --help
TimeThis :  Elapsed Time :  00:00:00.298

Of course, there is room for improvement. For example, I got tired of waiting for the n-body benchmark to run to completion.

Still, it is nice to be have access to something that builds reliably and predictably: This is a great leap towards a more perfect Perl6.

Now, understand that I am almost a complete stranger to the Perl 6 world, having mostly stayed away from it except for a few instances I tried to build Rakudo, and the few design documents I read.

As far as I understand, panda is the tool for installing modules. You can find a module directory at modules.perl6.org.

Following the instructions:

git clone --recursive git://github.com/tadzik/panda.git

cd panda

perl6 bootstrap.pl

results in:

==> Bootstrapping Panda
==> Installing panda from a local directory 'C:\Users\sinan\AppData\Local\Temp\panda'
==> panda depends on File::Find, Shell::Command, JSON::Fast
==> Shell::Command depends on File::Find
==> Fetching File::Find
==> Building File::Find
==> Testing File::Find
t/01-file-find.t .. ok
All tests successful.
Files=1, Tests=11,  8 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)
Result: PASS
==> Installing File::Find
==> Successfully installed File::Find
==> Fetching Shell::Command
==> Building Shell::Command
==> Testing Shell::Command
t/02-shell-command.t .. ok
All tests successful.
Files=1, Tests=12,  9 wallclock secs ( 0.06 usr +  0.02 sys =  0.08 CPU)
Result: PASS
==> Installing Shell::Command
==> Successfully installed Shell::Command
==> Fetching JSON::Fast
==> Building JSON::Fast
==> Testing JSON::Fast
t/01-parse.t ...... ok
t/02-structure.t .. ok
t/03-unicode.t .... ok
t/04-roundtrip.t .. ok
All tests successful.
Files=4, Tests=120, 11 wallclock secs ( 0.05 usr +  0.03 sys =  0.08 CPU)
Result: PASS
==> Installing JSON::Fast
==> Successfully installed JSON::Fast
==> Fetching panda
==> Building panda
==> Testing panda
t/builder.t .... ok
t/common.t ..... ok
t/ecosystem.t .. ok
…
t/installer.t .. ok
t/tester.t ..... ok
All tests successful.
Files=5, Tests=28, 37 wallclock secs ( 0.08 usr +  0.00 sys =  0.08 CPU)
Result: PASS
==> Installing panda
==> Successfully installed panda
==> Please make sure that inst#C:\opt\perl6\share\perl6\site/bin is in your PATH

which is a much more rewarding experience than the last time I tried to install panda.

In any case, the last line of that log indicates something funky going on.

The code that prints that line is:

say "==> Please make sure that $prefix/bin is in your PATH";

Looking at the rest of panda’s bootstrap.pl, I am slightly disturbed by the reliance on string manipulation to figure out paths instead of treating them as such. But, that’s neither here nor there, and I am not sure what specifically is causing the funky output.

As an aside, after years of bumbling around (I include myself among the “bumbling around crowd”), Perl now has possibly the most perfect way of dealing with paths among all languages I have tried in Path::Tiny, and it would be nice to see if Perl 6 folks could follow that lead.

Anyway, after:

C:\> set PATH=%PATH%;C:\opt\perl6\share\perl6\site\bin

C:\> pwhich panda
C:\opt\perl6\share\perl6\site\bin\panda.BAT

a simple

C:\> panda --help

takes close to 30 seconds to produce output when it is run for the first time. Again, obviously there is room for improvement. On the second run, the time goes down to 5.8 seconds. Clearly, my old laptop is not a speed demon, but, still …

Anyway, the point of this post is not to complain: I am just noting my observations as I work my way through.

There are already a bunch of cool and useful modules out for Perl 6.

Let’s try one: HTML::Parser:

==> HTML::Parser depends on XML
==> Fetching XML
==> Building XML
==> Testing XML

# Failed test 'set using Boolean.'
# at t/emitter.t line 30
# expected: 'standalone'
#      got: 'True'

# Failed test 'element after set serialized properly'
# at t/emitter.t line 31
# expected: 'The title'
#      got: 'The title'
# Looks like you failed 2 tests of 5
t/emitter.t ...........
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests
t/example.t ........... ok
t/make.t .............. ok
t/namespaces.t ........ ok
t/parser.t ............ ok
t/preamble.t .......... ok
t/proxies.t ........... ok
t/query-methods.t ..... ok
t/query-positional.t .. ok

Test Summary Report
-------------------
t/emitter.t         (Wstat: 512 Tests: 5 Failed: 2)
  Failed tests:  4-5
  Non-zero exit status: 2
Files=9, Tests=118, 21 wallclock secs ( 0.17 usr +  0.01 sys =  0.19 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)
  in sub run-and-gather-output at C:\opt\perl6\share\perl6\site\sources\62E006FAE34066A5958EB7041977E7A7EFB45B2E line 85
  in block  at C:\opt\perl6\share\perl6\site\sources\14DF34DC9AD4C7736FEF271361AB01A662AAB55C line 22
  in sub indir at C:\opt\perl6\share\perl6\site\sources\62E006FAE34066A5958EB7041977E7A7EFB45B2E line 20
  in method test at C:\opt\perl6\share\perl6\site\sources\14DF34DC9AD4C7736FEF271361AB01A662AAB55C line 5
  in method install at C:\opt\perl6\share\perl6\site\sources\19511BA9A26056245114A5AA6F8FBD88D8EEC460 line 141
  in block  at C:\opt\perl6\share\perl6\site\sources\19511BA9A26056245114A5AA6F8FBD88D8EEC460 line 214
  in method resolve at C:\opt\perl6\share\perl6\site\sources\19511BA9A26056245114A5AA6F8FBD88D8EEC460 line 208
  in sub MAIN at C:\opt\perl6\share\perl6\site/resources/1A40016E4374679A536CBEDDB9DF5DDB29522CA0 line 18
  in block  at C:\opt\perl6\share\perl6\site/resources/1A40016E4374679A536CBEDDB9DF5DDB29522CA0 line 150

That seems to be a trivial failure caused by forgetting to update tests after updating code.

So, we do a panda --force install, followed by another panda install HTML::Parser:

C:\opt\perl6\share\perl6\site> panda --force install XML
==> Fetching XML
==> Building XML
==> Testing XML
t/emitter.t ........... ok
t/example.t ........... ok
t/make.t .............. ok
t/namespaces.t ........ ok
t/parser.t ............ ok
t/preamble.t .......... ok
t/proxies.t ........... ok
t/query-methods.t ..... ok
t/query-positional.t .. ok
All tests successful.
Files=9, Tests=118, 20 wallclock secs ( 0.17 usr +  0.02 sys =  0.19 CPU)
Result: PASS
==> Installing XML
==> Successfully installed XML

Wait, are those tests OK because I used --force, or did c3b1cced… just fix it? Do I care?

C:\opt\perl6\share\perl6\site> panda install HTML::Parser
==> Fetching HTML::Parser
==> Building HTML::Parser
==> Testing HTML::Parser
==> Installing HTML::Parser
==> Successfully installed HTML::Parser

Again, none of this is earth shattering, but it does show it is easy for a newcomer with very little prior knowledge to start feeling his way around things.

Looking forward to moving beyond the kicking the tires stage.

Well done, and thank you!

You can comment on this post on /r/perl.