Blogs

GSoc progress report

All tests in nqp/t/nqp with the exception of test 49 are passing.

Test 49 among other things requires compiling regexes at runtime.

Example:
my $regex := "a+";
"aaaaa" ~~ /<$regex>/;

This is easy to do after bootstraping (when we have the whole compiler avaliable at runtime) or a bunch of crafty hacks.
After attempting to quick hack a workaround (which would involve starting up a new parrot process to cross compile a regex) it turned out our current cross compiling solution won't work. I decided to avoid waisting time on that and leave it to after the boostrap.

t/nqp directory in the nqp repository contains all the tests for the NQP language features.
There are also tests in t/qregex which are really a whole bunch of regex and their expected results on a suplied string.
(in a tab separated format + a harness).
And 3 tests in t/serialization which would involve a boring translation of serialization code from a different backend.

What seems to be a good direction is to get all the tests qast tests (which were written by Jonathan while porting nqp to the jvm) under JavaScript. They test the backend without requiring a parser. Doing that has uncovered a number of bugs in nqp-js. Major things like multi methods seem to work correctly but I have encoutered many small bugs. Which seems to imply that the nqp test suit needs to be more exaustive.
A few examples of those and their fixes:

nqp::null() was tested for truthfullness is some places, we are currently doing that using a .Bool method so I had instead of using a native javascript null switch to using a custom singleton for that.
https://github.com/pmurias/rakudo-js/commit/896e597f1358a3a51d64a955eb4d...

Objects being false by default caused if $slurp {...emit some code for slurp...} not to work
https://github.com/pmurias/rakudo-js/commit/580829d2ea337c57fad19273d232...

\n not being implemented in regexes caused subst(/\n/,"\\n",:global) to loop infinitly:
https://github.com/pmurias/rakudo-js/commit/868b4bdd36cca93287b21e18ebf9...

Currently in nqp-js I'm using JavaScript arrays as nqp arrays (with a bunch of methods monkey patched on top of them).
That caused a problem as JavaScript alread has a push and unshift methods (hinting that it was somewhat inspired by Perl 5).
The tests thus far where using the nqp::push op for adding elements to arrays.
However QAST::Compiler::JavaScript uses the .push method
Example: nqp::push(@foo,$value) vs @foo.push($value).

My current calling convention is that $foo.bar(:a("named"),1) is translated to $foo.bar(ctx,{"a":"named"},1).

Which ended up in strange things being added into arrays (Which resulted in some fun debugging).

app-parrot-create weekly report

A few last weeks, I'm working to support build system with different languages. Such as PIR, NQP, Winxed and Perl5. At this day a build system supported PIR, NQP and Winxed languages with pmc, ops and doc optioms each other.
https://github.com/letolabs/app-parrot-create/commit/ce014947aa0dc7222e7... shows a changes which need to support a build system with nqp language.
https://github.com/letolabs/app-parrot-create/commit/c6dbb7fd378e2bd52f3... shows a changes which need to support a build system with winxed language.

app-parrot-create weekly report

At this week I'm working with different deploy systems.
Such dotCloud, gnu Compile Farm. I'm changing my project for that deploy systems.
As a result of this work is http://gcc20.fsffrance.org:3000/

So I can continue my work for providing a different build and test system on my project.
I'm going to continue my work on support a winxed build and test system on my hll template file.

Progress Report

While trying to get QASTNode.nqp to compile I noticed a strange error claiming that some code refs where missing from the serialization context.
By binarysecting the file (deleting line till the error goes away) it turned out that roles in modules where causing problems. Serializing roles requires serializing a closure, and modules are special that they require to be compiled twice, both to JavaScript and PIR (that is untill we are fully boostraped).
The thing that turned out to be causing trouble is that the JavaScript backend is using a slightly different bootstraping procedure.

app-parrot-create weekly report

At this week I start to deploy my project on real server.
My project is going to deploy on parrot.org and dotCloud servers.
The stable version will deploy on parrot.org. The development version will deploy on dotCloud machine.
For this I've updated dependencies of my project.
These changes are shown on https://github.com/letolabs/app-parrot-create/commit/4b9e2f70558033b43c4... that commit.
At this week I'm going to continue my work on support a winxed build and test system on my hll template file.

app-parrot-create weekly report

At this week I've continued work to be engaged in the creation of hll template file.
I'm working on support a winxed build and test system.
This commit is showing that
https://github.com/letolabs/app-parrot-create/commit/9af8163b3c9558eb3dd...

I will plan to finish that work in the next couple of weeks.
I'm going to use a winxed build system file from already done project such as:
https://github.com/letolabs/parrot-libgit2/blob/master/setup.winxed
https://github.com/leto/parrot-lapack/blob/master/setup.winxed

Weekly GSoC progress report

I have finally implemented the closure deserialization correctly.
It required changing the way static lexicals are handle. (Static lexicals are the one declared by a QAST::Var node with a decl equal to 'static', which means they are bound to a serialized object and we are free to assume they don't get bound to at runtime). Previously for every code ref which was a part of a serialized object (but not a closure) I have emited code to recreat all the static lexicals for all of it's outer context. Needless to say the resulting code was long and ugly.

GSoC weekly raport - my rakudo breaking adventure

I tried to mimick the way subroutines are wrapped on rakudo and make test passed on parrot I commited the code.
And it broke nqp on the jvm. And I realised that rakudo on the jvm uses the HEAD revision on nqp and not a version specified in tools/build/NQP_REVISION. And after my commit make test broke on nqp.
I reverted the commit, and Jonathan Worthington figured out that I misunderstood what p6capture_lex did.

app-parrot-create weekly report

At this week I've done an API for work with high level language template file. I used the Perl template toolkit to create that file.
http://search.cpan.org/~abw/Template-Toolkit-2.24/lib/Template.pm
These changes is showing on this commits
https://github.com/letolabs/app-parrot-create/commit/9f36d8b4306d74122e5...
I've done tests for the respective modules.

The next step is supporting different build and test system on hll template file.
The project is supporting a PIR build system and Perl 5 test system.

GSoC weekly raport.

The thing I'm currently working is proper deserialization of closures.

If we create closures at compile time (example in Perl 6 syntax), like:

my $count = 0;
sub foo {
my $id = $count++;
-> {
$id++;
}
}
my $sub = BEGIN foo();

we need to be able to save them between compilations.

Syndicate content