Perl5 in the browser update
Perlito5 is an ongoing implementation of perl5, with a javascript backend. The compiler is written in perl5. It compiles itself to javascript, so it can run in a browser.
The test suite can be run with node.js. It now passes 288 tests. About a hundred of these tests are from the official perl5 test suite.
$ prove -r -e 'node perlito5.js -Bjs' t
t/base/cond.t ...................................... ok
t/base/if.t ........................................ ok
t/base/lex.t ....................................... Failed 37/57 subtests
t/base/num.t ....................................... ok
t/base/pat.t ....................................... ok
t/base/rs.t ........................................ No subtests run
t/base/term.t ...................................... No subtests run
...
Interesting thanks.
Can I ask, what's your motivation for having Perl in the browser?
I can give people a url they can open in their phone. It's fun.
But the project is also about alternate Perl5 backends in general, such as Perl5-to-Perl5 (there are several interesting hacks you can do with this), Perl5-to-Perl6, and exploring what other virtual machines can offer.
Node.js also provides an async mode of execution, which I haven't really tried yet.
Very naive question Flavio:
if i make a website with Perl5 (say, with the Dancer framework), do you think that some day i will just be able to compile it into Javascript with Perlito, and run it in a mobile phone? Or is it more complicated than that?