Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
If you want to build and run Perl 6 today, you first check out parrot:
svn co https://svn.perl.org/parrot/trunk parrot
A basic incantation for then building Perl 6 would be as follows (doing this from memory, so let me know if I've goofed):
$ cd parrot/
perl Configure.pl && make test
cd languages/perl6
make perl6 &&./perl6 -e 'say "Hello, World!"'
I was getting plenty of strange failures with make perl6 until chromatic pointed out that I likely had a previous parrot installed on my system. Sure enough, a few locates, greps and rms later, I did a make realclean and make perl6 and everything worked beautifully.
And then my very first program failed.
sub fact (Int $n) {
if 0 == $n {
return 1;
}
else {
return $n * fact($n - 1);
}
}
say fact(5);
Even though Perl 6 understands types, I'm told that $n - 1 is returning a Num, not an Int, thus causing a runtime exception. They're working on it.
That being said, I'm quite impressed with how much actually works. If you really want to see more, you can type make spectest_regression and that will check out the tests from Pugs (remember Pugs?) and run them. Lots of them pass and you can search through the tests to see the impressive amount of code which actually works. Perl 6 is coming along nicely. Big shout-outs to chromatic, Patrick Michaud, Jonathan Worthington, Moritz Lenz and far too many other people to list. There is light at the end of the tunnel.
And if "make perl6" fails... (Score:1)
If "make perl6" fails, try this instead:
cd languages/perl6/ ../../parrot perl6.pbc -e 'say "hi"'
make
That doesn't build an executable, just a bytecode file (perl6.pbc). It's not so easy to run, but it works more reliably.
(The executable is really just as wrapper that links parrot and contains the byte code. Sadly that wrapper isn't very table yet)
Re: (Score:1)
It's almost exactly the same code as the
parrotexecutable, with two differences. First, it doesn't load external bytecode. Second, it performs a full shutdown of the Parrot interpreter when the process exits.The latter occasionally finds memory management errors. I enabled it for that reason -- but these are rare. I've seen (and fixed) one in the past two months.
Gener
Re: (Score:1)
If the executable wrapper mostly reveals underlying problems, and doesn't
cause too many on its own, maybe we should use it for running the tests.
I already get some memory management failures (at least sometimes) in the
rakudo tests, it would be a good idea to expose them.
Re: (Score:1)
Add the
--leak-testflag toparrotfor the same effect; that option enables the same internal option as the fakecutable.spectest_regression runs official, not pugs tests (Score:1)
more accurately put, the spectest_regression target runs a subset of the official perl 6 test suite, which is stored in the pugs repository. those tests known to be passing are in the spectest_regression target, so the rakudo implementors can make sure their changes have not broken any existing code.
the official perl 6 test suite lives under http://svn.pugscode.org/pugs/t/spec/ [pugscode.org]. the pugs repository is a good fit for the official test suite because of the liberal commit policy there. anybody can get a commit
Of course, the right way to write that... (Score:1)
… is like this:
(I’ve no idea if that actually works in the current state of Rakudo.)
Re: (Score:2)
No, the right way to write that is:
:)
Re:Of course, the right way to write that… (Score:1)
(Actually, that should be :-))
>=– factorial is defined for zero.Re: (Score:1)
Hmm, except
1 .. 0won’t work right, so then it needs to be[*] 1 .. min( 1, $n ), which is a little uglier, though manageable.Re: (Score:1)
Re: (Score:1)
Err, yes.