develooper Front page | perl.perl6.announce | Postings from January 2012

Announce: Niecza Perl 6 v14

Stefan O'Rear
January 30, 2012 21:00
Announce: Niecza Perl 6 v14
Message ID:

    Announce: Niecza Perl 6 v14

This is the fourteenth release of Niecza Perl 6, as usual scheduled on
the last Monday of the month.  I'm on winter break now, which means lots
of time for improvements.  Muahahaha.  This month hasn't seen much of a

With this release, Niecza now passes a similar number of spectests as
Rakudo.  (Note that they are not the same tests, and as such the test counts
are not completely comparable.)  Solomon Foster has begun efforts to port
panda to niecza, with the goal of designing a multi-implementation ecosystem.

You can obtain a build of Niecza from [1].  This build contains a
working compiler as a set of .exe and .dll files suitable for use with
Mono or Microsoft .NET.  If you wish to follow latest developments,
you can obtain the source from [2]; however, you will still need a
binary for bootstrapping, so you gain nothing from a "source is
better" perspective.

Niecza is a Perl 6 compiler project studying questions about the
efficient implementability of Perl 6 features.  It currently targets
the Common Language Runtime; both Mono and Microsoft .NET are known to
work.  On Windows, Cygwin is required for source builds only; see the
README for details.

    List of changes

[Breaking changes]

Multiple dispatch has been changed to reject all cases of ambiguity using
an explicit list of conflictors; some ambiguous cases were formerly accepted.

List iteration has been modified to throw an exception when the list generator
tries to access the unreified part of the list.  The previous code exhibited
undefined behavior that some code actually relied on.

Parameters like @foo and %foo now insist that their arguments be Positional and
Associative respectively.

Rat and Complex stringification has been substantially changed.

Niecza now enforces "trusts".

&nextwith and CallFrame.args now conspire to hide the invocant parameter.  If
you are calling nextwith directly, you no longer need to - and must no longer -
pass a self argument.

|$foo capture parameters now capture the logical "current" capture, rather
than the "initial" capture.  In particular, 'method (|$foo)' no longer results
in $foo containing self.

[Major features]

END blocks are now suppported.

The subroutine entry process has been significantly modified to allow
signatures to reference variables and anonymous code blocks.

Roles have been overhauled to much more closely match the Rakudo nom behavior.
Importantly, roles now have a $?CLASS parameter, and role blocks are not run
until that is available.  Role composition at compile time is now supported,
as is role summation, attributes in roles, role conflict detection, type
checking against roles, etc.  &infix:<does> and &infix:<but> now support
much more of specced behaviors.

Accompanying that, the old tag and mixin classes CommonEnum, IntBasedEnum,
StrBasedEnum, Callable, Positional, Associative, Numeric, and Real have been
converted into roles.

Major signature improvements: Added support for sub-signatures, where blocks,
proper MMD with subtypes, values used as types.  Parameter and Signature
objects are now reified into Perl 6 space and support a subset of the Rakudo
nom introspection API.

Niecza now supports constant folding!  If you mark a sub 'is pure' and call
it with sufficiently constant arguments, it will be replaced at compile time
with the result of the call, provided said call does not throw an exception.
What constitutes "sufficiently constant" is not documented, poorly defined,
and subject to change.

Niecza now keeps attributes from different classes in different namespaces,
so you can have $!x in both a parent and a child class without issues.
Additionally, the sigil is part of the name, so you can now have both $!x
and @!x.

val() is now supported, and is used automatically on <> lists.

MAIN is now supported.

STD-imported syntax changes: \foo and |foo parameters no longer require a
sigil.  my \foo = ... works to declare a "raw" variable.  Initializer
assignment now binds tightly to the declarator, so that e.g. (5 + my $x = 3)
does something more useful.

.WHICH has been added, and === does the correct thing with value types now.

Perl 5 interop improvements: can now be used from any directory and builds
much more robustly.  Also supports more pass and return cases.  (Paweł Murias)

[Minor features]

No more pseudo-evaluators - all constructs which contain code that logically
is run at BEGIN time to produce a value, is now actually run rather than
attempting a static evaluation.

Binding to attributes is now supported.

Class attribute forms such as my $.foo, and the aliasing form has $foo, are
now supported.

Within a named 'anon sub', the name is visible, allowing for nicer recursion.

* now properly ignores assignments.

$obj.Foo::bar, $obj.::("Foo::bar"), and /<::("Foo::bar")>/ are now accepted.

You can now set 'is iffy' and 'is diffy' for fully custom operators.

Type adverbs :_ :U :D :T are now accepted.

Signatures like (Int, Int) are now allowed.

Phaser handling has been improved, and support added for CHECK.

Aliasing forms like <foo=$bar> are now allowed.

Version information is now embedded into the build, allowing for --version
and $?PERL support.

Printing of unhandled exceptions uses .gist.

Multiple dispatch now handles junctions.

Exporting multisubs from modules now approximately works.

Added ".Bridge" support. (Solomon Foster)

Attribute-binding parameters (:$!foo) now implemented.

:16() syntax is now supported.

Defaults and type constraints that are constants are now saved as such,
avoiding an unneeded block.

Str.perl now escapes special characters.

CLR interop now supports calls to shadowed and hidden methods, like
$obj.CLR::System::IDisposable.Dispose().  Note that this can NOT be used to
call overriden methods (callvirt semantics are used).

LTM processing ignores arguments and dispatchers forward the arguments to
multi regexes.

infix:<cmp> supports pairs, ±Inf (Solomon Foster)

Hash.perl sorts the output to be slightly more useful.

New setting things:
Cool.polar, Cool.roots, &roots, Array.delete, &infix:<minmax>, &rotate,
CommonEnum.pick, CommonEnum.roll, Any.min, Any.max, Any.minmax, Str.trans,
&elems, Any.reduce, &reduce, &shell, &categorize, &cwd, &chdir, $*CWD,
&printf, IO.copy, IO.chmod
(Solomon Foster)

Hash.push (Moritz Lenz)

Int.base, Array.splice, &splice (Will Coleda)

Set, Bag (Larry Wall, Solomon Foster)

&prefix:<sleep>, Mu.clone, &undefine, $*OS, Order, $*OUT, $*ERR

split and comb now support limits of Whatever (Solomon Foster)

Range coerces values to numbers according to spec (Solomon Foster)

&sort accepts a Callable first argument (Solomon Foster)

Added limit to &lines, :r and :rw to &open (Solomon Foster)

min and max support arbitrarily many arguments (Solomon Foster)

Changed sleep to return a value (Will Coleda)


Daniel Ruoso is attempting an implementation of concurrent feeds.

    Getting involved

Contact sorear in #perl6 or via the sender address of
this mailing.  Also check out the TODO file; whether you want to work
on stuff on it, or have cool ideas to add to it, both are good.

    Future directions

Next month is likely to see fewer tuits in general.  The only concrete plan
I have is to continue with 6model convergence, hopefully reaching a point
where user-defined metaclasses are possible.

[2] Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About