Today I want to announce sprixel, a new Perl 6 compiler in its early stage of development, written in JavaScript and using the standard Perl 6 grammar STD.pm.

Sprixel (an anagram of perlsix) development was initiated by Matthew Wilson, aka diakopter. It traverses the Abstract Syntax Tree as produced by STD.pm, transforms it into an intermediate JavaScript data structure similar to JSON (but with some enhancements to handle cyclic structures), and has a small, continuation based runloop that executes the JavaScript. Currently the only backend is the V8 compiler and virtual machine - but if/when the STD grammar is implemented, you'll be able to run Perl 6 in your browser.

Currently sprixel supports scalar and list variables, numbers (including bigint), strings, string interpolation, basic control flow, closures, named sub declaration (with parameters), and map.

Sprixel development is optimized for fun, and already picked up some contributors (notably, mberends implemented many infix operators, a makefile, and a test harness). The source code can be found in the pugs repository (but is completely independent of the pugs compiler project). The main communication medium so far has been the #perl6 IRC channel on irc.freenode.net.

Motivation

Why yet another Perl 6 implementation? you might ask. A few reasons actually: