Will Coleda wrote:
Thanks to Matt Diephouse, partcl (parrot on tcl) is now able to run
part of tcl's cvs-latest test suite. We don't run enough of tcl at the
moment to run the tests natively, but by pulling the tests out of the
tcltest framework and converting them (sanely, we hope), we are now
passing > 10% of tcl's test suite. (discounting tests for [clock],
which are rather numerous. =-). As we build up enough speed, the plan
will be to drop the test conversion and simply run them natively.
Cool! Doing clock should actually be mostly fairly easy as it is largely
implemented in Tcl. It might be easier to focus next on getting things
complete enough that you can use the tcltest framework though. That's
actually a useful fraction of the language, and will also allow you to
leverage everybody else's work without the problems of accidentally-
introduced bloopers...
Perl6 is introducing a few new features, at least one of which I think
might be worth stealing into Tcl. For now, the easiest way to get these
is to implement them in partcl, where we'll basically get them for free.
Good idea. However, there are a couple of things that we really will
hold the line on very strongly. They are:
1) strict left-to-right evaluation, and
2) strict immutability of values as seen at the Tcl script level. (You
can change what value is in a variable, but you can't change the
value itself.)
3) Tcl's super-late binding would be nice to retain, but it's hard to
do any optimization under its conditions; feel free to ignore that
principle for now (and possibly indefinitely.)
But apart from these items, you can steal anything that's not nailed
down. ;^D
In Perl6, regular expressions (will) have been updated to rules. This
is not something I can simply summarize in this email, but some
examples and explanations have already been developed:
http://dev.perl.org/perl6/doc/design/apo/A05.html :: Apocalypse 5
(Initial Design Info)
http://dev.perl.org/perl6/doc/design/exe/E05.html :: Exegesis 5
(Explanation)
http://dev.perl.org/perl6/doc/design/syn/S05.html :: Synopsis 5
(Summary of changes from Perl5)
These rules (and the grammars they can be combined into) are already
(partially, at least) available directly in parrot, so wrapping them
with a bit of Tcl syntax would be straightforward.
Whoosh! That's a lot of changes. Some of which make sense from a Tcl
perspective and some of which don't (e.g. the difference between bytes
and characters). It will be interesting to see what you wrest out of it.
If anyone would like to take the time to figure out an appropriately
Tcl-like syntax (add more options to regsub? create a new builtin? Put
this all in a namespace/ensemble itself?), I'd be happy to add the
prototype command to partcl. Perhaps the TIP process would be the best
way to approach this (with the thought that this wouldn't be considered
for the actual core, at least not at first.)
In process-terms, producing a new RE engine as an extension package
requires no permission from anyone at all, let alone a TIP. Just do it
and please report on what you've achieved; I'm sure we'd be very
interested to hear more details (I'd suggest a paper in the Tcl
conference, but you've probably slipped even the real-deadline after the
official-deadline for this year).
Please interpret this message as encouragement and an interest in how
things turn out; it is intended as such. (Can't help though; I'm over-
committed to other projects.)
Donal.