Today is the first day that I feel my
imaginary perl6 adoption timeline may not be that far off.
The big news is that Pugs 6.0.7 is out, with examples/life.p6 and examples/mandel.p6 ported from the parrot tree; both runs just fine!
Also thanks to hcchien, we now have a beginning of synopsis-based unit tests in t/ (most tested using eval ""), which should grow into a more comprehensive acceptance test suite.
Another big news is that I'm moving I/O primitives and mutable variables forward on the schedule. I still want to do a purely functional ("Featherweight") evaluator inside Perl6, maybe as "func { ... }" instead of "sub { ... }", but popular feedback convinced me that getting something to work in the Real World is a better idea.
To that end, today I have finished:
- The "time", "open", "close" and "<>" primitives
- Errors are propagated upward using shiftT.
- Postfix ++ and --
- Ternary ?? ::
- Assignment to mutable variables and to array slices
- "loop", "for" and "if" constructs
There were also large number of lexer and evaluator tweaks to get life.p6 and mandel.p6 running at a reasonable speed.
Also, I've just been talking with Patrick Michaud (the perl6 compiler guy) on IRC #perl for a couple hours. Some interesting notes:
- Both Patrick and Larry are seriously considering learning Haskell. Yay!
- PGE (the Perl6 Rule Engine) can be built separately from the parrot tree, and hence can be inlined in Pugs for Perl6 Grammar support, by compiling down (via Haskell FFI) to Parsec primitives.
- The official svn.perl.org repository may host Pugs tomorrow, with me becoming a committer.
- Various parsing and rules-related corner cases are discussed, with many happily resolved.
- Patrick also explained P6Rules' new quantified capturing semantics to me (a repetition marker other than '?', following a capturing group, will cause it to quantify and return a list of matches instead of just a match object), which actually makes sense. Hopefully the full detail can make to S05 soonish.
So. Lots of interesting developments. Stay tuned!
Wow! (Score:1)
Autrijus, you are amazing!
thank you and some questions (Score:1)
it seems you have transitioned perl6 development from 'smoldering' to 'blazing'... the invigorated discussions on the language list would be accomplishment enough, but clearly this is only a start...
lucky for me, the 2 languages at the top of my list to learn for some time have been haskell and perl6 (in no particular order). your recent work has inspired me to work harder to realize this(i see the PUGS code base as a great way for me to kill 2 birds with one stone
Re:thank you and some questions (Score:1)
http://www.haskell.org/ghc/docs/latest/html/users_guide/template-haskell.html
no time to absorb it just yet, but will sleep on it for now
jeff
Re:thank you and some questions (Score:1)
The use of $ is not Template Haskell... The binary operator
($)simply means "apply function";f $ gis equivalent tof g.The use of$in Haskell code is for fixing precedence. For example, to calculate f(g(3)), one can writef $ g 3, or using the function composition, as(f . g) 3, butf g 3will not work, as it means f(g, 3)."Yet Another Haskell Tutorial" is a fine online tutorial. The books I'm currently reading are: