Mon, 01-Feb-2016 by
We have received the following Perl 6 Ian Hague Grant Application. Before we vote on this proposal we would like to have a period of community consultation for 10 days. Please leave feedback in the comments or if you prefer send email with your comments to karen at perlfoundation.org.
**Name:** Paweł Murias
**Benefits to to Perl 6 Development:**
- Upload rakudo-js to npm and CPAN.
- Write a simple REPL in Perl 6 that will run in a modern browser.
After reviewing the initial draft of this grant proposal Jonathan Worthington pointed out that implementing gather/take proved to be tricky on other backends. To reduce this risk I added basic continuations support to the backend. This was enough to run a basic form of gather/take: [https://github.com/perl6/nqp/blob/master/t/js/continuations.t#L76](https://github.com/perl6/nqp/blob/master/t/js/continuations.t#L76) . I implemented this using a CPS transform with a trampoline (to work around the lack of tail call optimization).
Most of Perl 6 is built from smaller building blocks. This will mean that a large part of the effort will be needed before I get to the point where the test module compiles and the first test passes. On the other hand when the needed building blocks are implemented correctly I will be able to reuse the quality work that went into Rakudo and the setting.
- Cleanup the array handling in nqp-js.
- Finish up serialization of closures in the nqp-js-running-on-js.
- Go through the MoarVM opcode list and where it's possible write tests for untested opcode and implement them in nqp-js
- Do the obvious speedups for the code generated by nqp-js.
- Compile the meta-model and bootstrap support with nqp-js.
- Implement a bunch of p6 specific ops.
- Get rakudo to compile on nqp-js.
- Get rakudo compiled to js to correctly compile nqp::say("Hello World").
- Get the rakudo setting to compile.
- Get rakudo compiled to js to correctly compile say("Hello World").
- Get Test.pm to correctly compile.
- Pass a first test.
- Go through roast test fixing bugs and implementing missing things to make them pass.
- Get continuations support fully functional. Get nqp-js to pass test all test in full CPS mode.
- Pass the part of roast we focus on node.js.
- Be able to run tests in the browser.
- Pass the part of roast we focus on in a browser.
- Polish up source maps support.
- Upload rakudo-js on npm.
- Write a simple Perl6 REPL that should run in modern browser.
- Put the REPL on try.perl6.org when the community views it as good enough.
- Write a tutorial that describes how to use the backend.
- Make sure our source map support works correctly and integrates well with browsers.
- Fix issues that early adopters will encounter.
- Fix the most obvious performance issues.
- Rakudo-js released on npm
- Rakudo-js passes our chosen subset of roast
- A simple Perl 6 REPL running in a modern browser (for evaluation purposes a modern version of Google Chrome)
**List of tests we want to pass:**
We want to pass tests from the official Perl 6 Test Suit "Roast". It can be found on github.com/perl6/roast.
We want to pass the tests in the following subdirectories of roast:
The project is expected to take 4 months of full time effort. I will begin work as soon as the grant gets accepted. Based on the progress of previous backends most of the effort will be needed to get to the point where all the basic building blocks are working and we start passing tests.
The plan for the months of the grant is:
- Getting to the point where can begin compiling the CORE setting.
- Correctly compile and load the setting.
- Fixing inevitable bugs that cause failing tests and implementing missing bits of functionality. After this steps we should be passing the roast test suit.
- Working on making the backend easy to install and use. This will include writing a tutorial, fixing issues that early users find, tweaking source maps, improving obvious performance problems.
I will report on the progress of the grant on a blog at least every two weeks, preferably more often. I will also keep the #perl6 channel updated on my progress.
The backend code will be hosted at github.com/perl6/nqp. Any required modifications to rakudo will be hosted at github.com/perl6/rakudo. (Work on rakudo itself will intially be done in either a branch or a github fork).
**Grant Deliverables ownership/copyright and License Information:**
All the work produced as a result of this grant will be licensed under the Artistic License Version 2.0. I will send in the CLA and if required transfer the copyright to The Perl Foundation.
**Things not addressed by the scope of the grant:**
**Amount Requested:** $10000.
+1 browser-side Perl 6 would provide huge boost to the language.
+1, pmurias is the perfect fit for this task.
+1, pmurias is the best choice for this grant to success.
This would be awesome
+1 I think that would be a great boost to the language and I am eager to reimplement my frontends with perl6.
+1: pmurias has already been working on the JS backend for NQP for quite some time, and has *greatly* expanded the NQP test suite as he did so. He's got a proven track record and is by far the best choice for this grant -- and having full Rakudo working on both node.js and Chrome would be a huge win.
Perl 6 needs this (and more like this) to show the world how awesome it is (it already is, and this will make it even more awesome). So, please:
+1: I am so psyched about this that I will make an additional (small :) ) donation to TPF if it goes forward! This will open us up to some very interesting experiments.
I think node's strength is the ability for frontend devs to code backends, without a need to learn a new language.
This project will create a niche for the Perl 6 language to become one that can be used in the backend as well as the frontend, possibly increasing its adoption.
The monetary amount requested, however, is very small for the amount of work to be done, so my vote on this is +0.4
A lot of the trick dart2js seem potentially very helpful to us.