Perl 5 + Perl 6 = Perl 11
perl11.org
perl11.org
There are some really cool things happening in the specific projects on the linked page, if you're into compilers and VMs.
This seems like a heavy, Java-esque solution. 50 lines of Perl does a lot, let alone 1000. Not sure I want to see 20,000 lines of mixed Perl 5 and Perl 6.
Syntax blocks also allow easier ffi and sql interaction, { use syntax "C"; c declarations ... } being a nice FFI language, compared to "extern { c decls; ... }", which is also nice.
We want to use efficient signatures, methods, classes, tasks, coros, promises, hyper operators, types, lazy lists and so in perl, regardless if you call it p5, p6 or p2.
This is literally impossible: http://www.perlmonks.org/?node_id=663393
http://www.modernperlbooks.com/mt/2009/08/on-parsing-perl-5....
That being said, I still contend that a Perl 5 parser is still inextricably separable from the runtime. Any parser that wants to be fully compatible with Perl 5 will need to be able to also run Perl 5 code. That is, the parser will need to be coupled with the runtime.
A consequence of the parser needing to be able to execute arbitrary code is that the parser is undecidable. This follows from the halting problem, which is the point of the article I posted and is also pointed out in the one you posted.
As a sidenote, I find the distinction between "static" and "dynamic" parsing to be rather silly. The only people I've ever heard make that distinction are Perl apologetics. No need to be so defensive: parsing is allowed to be ambiguous, and it is allowed to be undecidable -- but it's not considered ideal.
"Dynamic parsing problems" such as solving the halting problem, by e.g. changing the prototypes or eval'ing code in BEGIN blocks are just small practical problems. In practice the parser only has to be GC-safe, which needs a few days work.
| BEGIN b:block { p2_eval(P, b) }
On the other hand the "dynamic vs static parsing" on perl11.org talks about compiling and extending parser rules at run-time, which needs a fast vm to do this. To be able to support macros.
Not perl5, perl6 or nqp. Efficiency should be near the C level, but you shouldn't be forced to go the rakudo way with its insane bootstrapping and serialization overhead just to support BEGIN blocks in its stdlib and support run-time parsing.
The JVM or .NET could do that, but I don't buy the overhead, esp. when you look at fast parser combinators in lua, lisp or look at maru, which is basically a jitting parser, bootstrapping itself.The author
In some Lisps, such as Common Lisp, macros are simply functions from syntax tree to syntax tree. Since these execute at compile time, you can still run into the same types of problems you get with Perl's BEGIN. Scheme's syntax-rules macros are more limited: they cannot execute arbitrary code, but they can do pattern matching and substitution on syntax trees. Despite this limitation, syntax-rules covers the vast majority of macro use cases. The term rewriting systems in Haskell and Cat are reasonably similar.
My point to all of this is that macros are no justification for "dynamic" parsing. The only distinction I can find of the two kinds of parsing is that a "dynamic" parser sometimes needs to execute bits of the program before it is able to progress. This is not necessary for macros!
As far as parser combinators go, I conjecture that they will not be powerful enough to deal completely with Perl's grammar. In general, they're limited to LL(k) grammars. Still, you may be able to jump through some hoops to get what you want out of them.
(see also: http://books.google.com/books/about/Learning_Perl.html?id=va... )
FTFY
The next version should be 5 + 6 + 7 = 18, not 17.
v(1) = 6
v(2) = 11
v(3) = v(1) + v(2) = 17
In general sequences, especially short ones, can have many ways to be generated, but I imagine this is the one the GP meant.
Wow, Winamp.
Great python minds think alike?
Having said that it would be pointless to go simply rewrite existing Perl 5 code to Perl 6. A good deal of Perl 5 libraries will be ported to Perl 6. And then Perl 6 will be well suited for a lot of big projects.
Perl 6 has a very nice type system, packed with all the goodies of a enterprise object oriented language,it has powerful functional programming features, and with all that it stays true to its scripting roots.
The right way to look at it is, Perl 5 and 6 will co exist for much of their individual lifetimes.
I gave up trying to find out a while ago.
Seems like a lot of trendy changes that weren't needed to the language. There are some great changes (especially in the OO realm), but also a lot of weak ones.
The design of Perl 6 is to ensure you can incrementally evolve the language to be whatever the trends are at that time.
Personally I'm most excited about perlito (which features perl 5 compiled to javascript, among other things) and p2, which promises to be a super-speedy rendition of Perl 5 based on why the lucky stiff's last public project, the Potion language/VM.
The idea, as I understand it, is that if both Perl 5 and Perl 6 are running on the same VM, they can share library code on the level of that VM's bytecode.
All of that said, perl the runtime remains actively maintained and improved. End Perl users are just going to have some choices, much as Ruby users have had for a while (JRuby vs MRI, for example).
And some people still claim we're stuck at Perl10...
P.S. I love Perl. Above said with affection.
Blender uses Python 3 for scripting and the protobuf code generator and libraries only support Python 2.x. The same for Apache Thrift. Both are very well maintained, they are just not planning to move to Py3 any time soon.
It kinda sucks from a PR standpoint since Perl 5 has been under active development the entire time and had been importing a lot of the good ideas from Perl 6.
And 2 as the next perl, because it should solve the p5 problem, being not extendable and improvable. And the p6 vm problem being not fast enough, and being tied to inadequate vm's and mops.
This is the idea at least.
Even though it's a perl project and not perl itself, making it sound like version numbers can only serve to confuse things further, when Perl is already suffering problems from version numbers.