Perl5 to Java compiler - week 100 - bootstrapping

It's been a 100 weeks since the Perl5 to Java compiler started.

The compiler is now "good enough" to translate itself to Java.

# grab a copy of the project
$ git clone ; cd Perlito

$ make clean

# create the "" file
$ perl --bootstrapping -Isrc5/lib -Cjava src5/util/ >

# compile to ".class"
$ time javac -J-Xms2000m -J-Xmx2000m -J-Xss2000m -source 7
[ scary warnings ]

# create the perlito5.jar file
$ jar -cfe perlito5.jar Main *.class

# quick check
$ java -jar perlito5.jar -v
This is Perlito5 9.021, an implementation of the Perl language.

# run a test
$ java -jar perlito5.jar --bootstrapping -Isrc5/lib -Cjava t5/unit/array.t > ; javac -source 7 ; java Main
[ scary warnings ]
ok 1 - create array
ok 2 - set element

# test the bootstrapping
$ java -jar perlito5.jar --bootstrapping -Isrc5/lib -Cjava src5/util/ >
$ diff
[ no differences ]

The "--bootstrapping" flag tells the compiler that eval-string is not available. Eval-string is not yet implemented.


it is completely crazy, but you deserve some big congratulations for such amazing things.

What dominix said. This is *fantastic*!


Wow. Java is finally useful! Lol.

Seriously, though, I'd love to see a presentation on this. Kudos.

Leave a comment

About Flávio S. Glock

user-pic I blog about Perl.