Perlito - reviewing some older code

Today I've finally updated the Perlito compiler ChangeLog, this covers a little more than a year of commits.

The most significant update was the new Perlito5-to-Java backend, which is work-in-progress. It covers a lot of ground, but there is a lot more.

There were also some interesting new Perlito5-to-Javascript features, such as regex /e modifier, and file operators support in nodejs.

The Perl6 backends have not been updated, but things still work.

While reviewing the README-perlito6 file, I've found some interesting stuff that I haven't touched in a while - here is a piece of generated code that goes through 3 different languages:

Perl5 to Java compiler is 1 month old, and we have a hackathon

We are having a hackathon at work, and Bosko, John and I have hacked together a working Perl script that executes in a Java environment (HBase).

a perl5 to Java compiler - first benchmark

I've written a small performance test. And it is not bad!

First perl:

$ time perl misc/Java/benchmark.pl
done 64000000

real    0m3.964s
user    0m3.963s
sys     0m0.004s

And then Perl-in-Java:

$ touch Test.class ; rm Test.class ; perl perlito5.pl -Isrc5/lib -I. -It -Cjava misc/Java/benchmark.pl > Test.java ; javac Test.java ; time java Test
done 64000000

real    0m0.840s
user    0m0.584s
sys     0m0.302s

a perl5 to Java compiler - week 3

The compiler now has a small test suite. The main additions in the last 10 days were implementing global variables, better support for references, data structures, string interpolation, and a few new subroutines in the CORE namespace and operators.

a perl5 to Java compiler - work in progress

I've been adding support for Java in Perlito5 in the last few days.

This is what it does so far: