Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

autrijus (1505)

  (email not shown publicly)

Journal of autrijus (1505)

Thursday February 17, 2005
01:57 PM

Day 17: Glider and Mandelbrot

[ #23234 ]
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 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!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Autrijus, you are amazing!

  • first, thank you. thank you. thank you.

    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
    • ok, poking into GHC docs, it seems the answer to the '$' operator question is related to templates, and is discussed at :

      no time to absorb it just yet, but will sleep on it for now ;)

    • Hmm, I sense a need of Perl6::Pugs::FAQ...

      The use of $ is not Template Haskell... The binary operator ($) simply means "apply function"; f $ g is equivalent to f g.

      The use of $ in Haskell code is for fixing precedence. For example, to calculate f(g(3)), one can write f $ g 3, or using the function composition, as (f . g) 3, but f g 3 will not work, as it means f(g, 3).

      "Yet Another Haskell Tutorial" is a fine online tutorial. The books I'm currently reading are:

      • Algorithms : A Functional Programming