We now have built-in YAML parsing support with eval_yaml($str)
. The amazing libsyck and Haskell FFI made it possible for me to code this in under an hour. Anyone wants to try writing the emitter as well? :-)
With my newly aquired FFI-fu, PGE (the Perl 6 Rules Grammar Engine) is now embedded within Pugs. Using rx//
and s///
now emits some random PIR code. Rumour has it that Patrick will release his new PGE later today; I will promptly update our Text.PGE
module to the newest code, so courageous lambdacamels can try hooking it up to Pugs.Rules
while the rest of us continue to get the OO model done.
Sol Foster wrote in to say that his Erastothenes Sieve implementation, while indeed 10x faster than Pugs 6.2.1 at first, gradually slows down to a crawl. This is because array storage was using a List; I have quickly swapped it into using IntMap, allowing O(1) access for smaller arrays. Now the sieve program runs much faster.
shapr reports that Simon Peyton-Jones, father of GHC, grants us the permission to derive our subcontinuation code from the A Monadic Framework for Subcontinuation paper. I'm honoured at these words from SPJ:
Actually, we're rather impressed at the sophistication of the programming techniques that Autrijus and you and the other Pugs folk are deploying. Subcontinuations, GADTs, what next?Hmm, Template Haskell and STM, of course -- Pugs already uses them profitably. :-)
Some other notable developments today:
~/bin/
to Perl 6, and hacked in system($cmd, @list)
support, as well as exec($cmd, @list)
.
:todo
attributes; I pointed to him that sub ok(Bool $cond is lazy, +$todo) {}
can delay evaluation for $cond
, which may be what we want when the error is untrappable.
make pugs.prof
.
for
loops, e.g. for @list.values -> $num is rw
.
make smoke
; he also added more #line
tests; I made them pass shortly after.
for (@list_q): sub {...}
form, as used in the current test, should not work; the colon should be a comma. I fixed the parse accordingly, too.
Since I am already past deadline for $work
, this week I'll focus on it instead of Pugs. I trust the lambdacamels will keep it well-fed, though, so I'm not too worried. See you tomorrow!