Computer and Information Technology
Current Position : HOME > Operating system > "make perl6" on OS X

"make perl6" on OS X

POST:2008-07-22 01:14:28  

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 makerealclean and makeperl6 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 makespectest_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.


1 Vote

Popular

Recent

Radom commend