Starting last week, there's an effort to combining common infrastructure and design for the JavaScript runtime and the Perl5 runtime, headed by iblech and fglock respectively, with plenty of help from putter at both sides.
To that end, putter added a new magical $?PUGS_BACKEND
variable to track the
codegen used. He also added backend-specific make test
targets: `make
test-js,
make test-perl5,
make test-pir, and
make test-all` to run for
all backends. Same applies to make smoke
, too.
If you want to track the progress on all our runtimes, check out iblech's
Pugs Smoke Reports page It's now linked from Pugs's homepage; smoke testers are encouraged to submit smoke.html
there.
Below is a few of selected news on JS and Perl5 backends -- I still had not backlogged
through all relevant changes, let alone other changes in the Haskell runtime...
ext/
modules, Algorithm::TokenBucket now runs correctly in addition to Test.pm
.
&?CALLER_CONTINUATION
works fully, thanks to the codegen's CPS transform, marking the first runtime that support reentrant call/cc correctly.
coro
and yield
.
next
, last
, redo
as well as postfix while
and until
.
=:=
distinguished from object identity test eqv
.
bin/js
and HTML browsers. This allows for mixed Perl6/Perl5 code to work even with the JavaScript codegen.
(1,2,3)
no longer allocates new containers, the way [1,2,3]
does.
bin/js
and browsers.
CALLER::
pseudo package, as well as symbolic deference based on that.
:e exp
, for evaluating an expression in the interactive jspugs.pl shell.
&foo::bar()
no longer autovivify to no-op, as it still is in the Haskell runtime.
&sleep
support by burning CPU, for SpiderMonkey which has no setTimeOut
builtin.
($a, $b) := ($b, $a)
. Full subroutine-param syntax is not yet there.
sub is rw
) emitted as PIL and compiled directly to JS.
temp
and let
declarations.
my $x is readonly; $x = 3
(this replaces the old is constant
trait.)
[ 1, undef x 1_000_000, 2 ]
.
@a = 1..9999999; @a[1..1000000] = @a[1000001..2000000]
would take constant time.
Ref
class, with autodereferncing when pointing to Array or Hash container objects.
Pair
class, with the => constructor and stringification.
Code
class, with Sub
, MultiSub
and Block
exposed as Perl6 classes.
Code
objects in Perl5 now carries over slurpy (i.e. wantarray) context information.
use Inline Pugs => q{ sub intone { say "Hello, $_!" } }; intone('World');
Whew. That was a lot. To be continued tomorrow...