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 . 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.