Perl6 - PUGS

Well there doesn't seem to be a plethora of Perl fans here (I hear Python this and Ruby that...) but I thought I'd mention Pugs. Pugs is an implementation of Perl6, written in Haskell.

While, as mentioned in other recent articles some languages are moving away from powerful abstractions, Perl continues to suck them in. One of the more interesting things they are putting into Perl6 are junctions (which I like to think of as quantum superpositions). Things like that, along with formalization of the object system and other cleanups should make Perl6 a language which gets mentioned here much more often.

The Pugs implementation (in progress) is being written at breathtaking speed. Check it out and lets hear your thoughts!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ha ha ha

Perl 6 reminds me of Groovy, in a bad way. For example, the following two expressions parse differently:

$obj.method ($x + $y) + $z  # means $obj.method(($x + $y) + $z)
$obj.method($x + $y) + $z   # means ($obj.method($x + $y)) + $z

Also, the language spec is so complex it would be a wonder if it is ever fully implemented.

Finally, the Parrot VM is rather baroque; there are instructions for string operations, factorial function, etc. Why are these instructions and not library functions?

Re: Ha ha ha

For example, the following two expressions parse differently

Like in Ruby. I don't like this either; Perl always chooses conciseness over consistency.

Why are these instructions and not library functions?

Probably because they are faster when they are compiled.

Instrinsic bytecodes -vs- library

Probably because they are faster when they are compiled.

How so? If the language that parrot VM is written in is that much faster than the Parrot bytecode itself, perhaps Parrot's native code compiler needs work. Or do they not even have a native compiler? Is this a toy?

Parrot JIT

I googled for Parrot JIT and found http://cpan.uwinnipeg.ca/htdocs/ponie/jit.html

Incorrect -- the first one does not parse.


pugs> :d $obj.method ($x + $y) + $z
*** unexpected "("
    expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
    at  line 1, column 14

One cannot omit parens around method call arguments in Perl 6 anymore than in Perl 5.