<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule">

<channel>
<title><![CDATA[Perl 6: Sprixel]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?sprixel</link>
<description></description>
<pubDate>Sun, 07 Mar 2010 21:44:12 -0000</pubDate>
<webMaster>synedra@gmail.com</webMaster>
<generator>Socialtext Workspace v2.14.7.2</generator>

<item>
<title><![CDATA[Sprixel]]></title>
<link>http://www.perlfoundation.org/perl6/index.cgi?sprixel</link>
<description><![CDATA[<div class="wiki">
<p>
The name is a cute anagram of &quot;Perl six&quot;. There is an existing but dormant version, and a radically different to-be-released version.</p>
<p>
Matthew Wilson (diakopter) has prototyped several Perl 6 implementations. His fourth one started out being called &quot;vijs&quot;, because it connected the <a href="http://www.perlfoundation.org/perl6/index.cgi?viv" title="(38 months) The viv utility is a Perl 5 based way to experiment with [STD.pm], the still evolving official Perl ...">viv</a> language parser to a runtime interpreter written in <a target="_blank" title="(external link)" href="http://en.wikipedia.org/wiki/JavaScript">JavaScript<!-- wiki-renamed-hyperlink "JavaScript"<http://en.wikipedia.org/wiki/JavaScript> --></a>. Along the way it got renamed to &quot;Sprixel&quot;. The JavaScript is executed by the <a target="_blank" title="(external link)" href="http://code.google.com/apis/v8/">V8<!-- wiki-renamed-hyperlink "V8"<http://code.google.com/apis/v8/> --></a> Just-In-Time (JIT) compiler and runtime, the one that makes the Google Chrome browser so fast. Sprixel runs in text only mode, or with any web browser.</p>
<p>
The main Sprixel program is written in Perl 5. It embeds <a href="http://www.perlfoundation.org/perl6/index.cgi?viv" title="(38 months) The viv utility is a Perl 5 based way to experiment with [STD.pm], the still evolving official Perl ...">viv</a> and calls that to convert a Perl 6 program to an <a target="_blank" title="(external link)" href="http://en.wikipedia.org/wiki/Abstract_syntax_tree">Abstract Syntax Tree<!-- wiki-renamed-hyperlink "Abstract Syntax Tree"<http://en.wikipedia.org/wiki/Abstract_syntax_tree> --></a>. Viv stores the AST in a data structure of nested Perl 5 hashes and arrays. A Sprixel module strips that AST to the bare essentials and serializes it to JSON format. Sprixel then starts the V8 JavaScript processor, passing it runtime code and the AST-in-JSON text. The runtime code loads the AST, and then interprets the code it contains.</p>
<p>
So the Sprixel currently available at <a target="_blank" title="(external link)" href="http://svn.pugscode.org/pugs/src/perl6/sprixel">http://svn.pugscode.org/pugs/src/perl6/sprixel</a> is an AST interpreter, but a fairly quick one when run on V8.</p>
<p>
Development of this version of Sprixel stalled because implementing the complex features of Perl 6 in JavaScript became increasingly difficult. Also, diakopter wanted more speed than viv was ever going to give.</p>
<p>
After several months of experimentation diakopter settled on C# as the new implementation language, to run on both the <a target="_blank" title="(external link)" href="http://en.wikipedia.org/wiki/Mono_%28software%29">Mono<!-- wiki-renamed-hyperlink "Mono"<http://en.wikipedia.org/wiki/Mono_%28software%29> --></a> and the .<a target="_blank" title="(external link)" href="http://en.wikipedia.org/wiki/.NET_Framework">NET<!-- wiki-renamed-hyperlink "NET"<http://en.wikipedia.org/wiki/.NET_Framework> --></a> virtual machines. The <a target="_blank" title="(external link)" href="http://code.google.com/p/csmeta/">new Sprixel<!-- wiki-renamed-hyperlink "new Sprixel"<http://code.google.com/p/csmeta/> --></a> will embed a utility called <a target="_blank" title="(external link)" href="http://sourceforge.net/projects/runsharp/">RunSharp<!-- wiki-renamed-hyperlink "RunSharp"<http://sourceforge.net/projects/runsharp/> --></a> to dynamically generate bytecode that gets JIT compiled to native machine code before being executed. It will also contain its own regex and grammar engine, and will probably have its own derived variant of <a href="http://www.perlfoundation.org/perl6/index.cgi?std_pm" title="(32 months) is the Standard Perl 6 grammar and more or less part of the specs [Specification]. Its a program, wr...">STD.pm</a> for the Perl 6 language definition. The microbenchmarks published in #perl6 so far promise extremely fast parsing and execution performance.</p>
</div>
]]></description>
<author>Herbert Breunung</author>
<guid isPermaLink="true">http://www.perlfoundation.org/perl6/index.cgi?sprixel</guid>
<pubDate>Sun, 07 Mar 2010 21:44:12 -0000</pubDate>
</item>

</channel>
</rss>