Run Perl 6 Today: Pugs 6.0.11 released 97
autrijus writes "I am delighted to announce that Pugs 6.0.11 is released, with experimental pugscc support to turn Perl 6 programs into stand-alone executables, as well as many new features. Pugs is an implementation of Perl 6, written in Haskell. For more information, see Pugs Apocryphon 1 and this perl.com interview."
Re:is Perl 6 already standardised? (Score:5, Informative)
Has Perl 6 been specified? [perl.org]
By December 2004, most of Perl 6 has been specified as a series of Synopses. Although not considered final, it is now stable enough to be implemented. Many of the Synopses are based on Larry's Apocalypses. Sometimes the design team releases Exegeses, which explain the meaning of Apocalypses. Pugs adheres to the Synopses, referring to Apocalypses or Exegeses when a Synopsis is unclear or imprecise.
---Still doesn't answer what the Perl6 folks are waiting for...
Developers Needed (Score:4, Informative)
Re:perl6 is a mistake (Score:1, Informative)
Of course, Perl 6 makes this sort of thing much easier and has a built-in Parse::RecDescent feature within regexes, but the overall complexity of the language is quite scary. I'm looking at OCaml, which is higher level than Perl (though with some features in modules and less syntactic sugar) and almost as fast as C/C++. It's also functional and OO, more details on my OCaml page [donkin.org]
Re:perl6 is a mistake (Score:1, Informative)
If you use Parrot implementations of Ruby or Python in the future, you'll be able to freely mix Perl 5, Perl 6, Ruby, Python, Tcl, et al. Which means that:
Things I love about Perl that I'll be sorry to walk away from:
- CPAN; an amazing resource
You will have access to any CPAN module from any supported language using your language of choice native syntax.
- for 100 line scripts, the ability to code as quickly as I can type, with few errors when I try to run for the first time
You will be able to write those pieces in Perl 5 or Perl 6 without losing any interoperability with other supported languages.
- Perl's ability to bolt stuff together that was never meant to be bolted together
You will be able to use Perl 5 or Perl 6 for that, or other languages in case Parrot itself inherits said ability to your satisfaction.
- DBI model; it's so simple and elegant
Using Parrot implementation of Python, you will be able to write:
dbh = Perl.DBI.connect("dbi:Pg:dbname=yourdb", "user", "pass")
and have a Perl object referenced by your Python variable, with correct DBI semantics but with native Python syntax.
- regular expressions; don't know why, but Perl's regex's seem to be more natural than any other language's equivalent
Perl 5 regular expressions, as well as Perl 6 rules, will be both available directly in Parrot.
I am a die-hard Perl guy, I will use Perl 6, but I am glad that no one will have to use it to cooperate with me. You will be able to write in Python, someone else in Ruby, another guy in Perl 5 and me in Perl 6, and still we'll be able to write our own CPAN module together and everyone will be able to use it not even thinking about the languages it was written in. This is something like
Length is gone (Score:0, Informative)
As Larry said in Apocalypse 12 [perl.org], "The length() function is gone [perl.org]" because "[it] has been deemed to be an insufficiently specified concept, because it doesn't specify the units."
In other words, is $x.length the length of $x in characters and @x.length the number of elements in @x? What if $x is an array reference? What if we want to know the number of characters in @x, as is often useful when the array in question is the output of other program, or stdin? We could use a hyper [perl.org] version of the length method or junctions [perl.org], or map, or loop, or...
But simple things should be easy, and the length method would be ambiguous. So there is no %hash.keys.length in Perl 6. There is %hash.keys.chars and %hash.keys.elems, or just %hash.elems. The references to container data types are automatically dereferenced, so $hashref.elems does what you need without the need to explicitly dereference anything.
Summarising, the correct version of (keys %hash).length in grandparent post should be %hash.elems and (keys $hash{"key"}).length should be %hash{"key"}.elems which seems quite straightforward if you ask me.
If it makes too much sense then you certainly shouldn't read the rest of Apocalypses [perl.org], Exegeses [perl.org] and Synopses [perl.org]. You have been warned.