August 2012 Archives

Perl courseware for the web using client-side perl

This is an idea I've discussed with Gabor (szabgab++) during the last conferences - we could use perlito as a tool to write educational pages about perl, that would embed executable code that can be modified by the reader.

There is a possible alternate implementation, use remote execution in the server. But I like the idea of running the code in the browser.

This perl in the browser would be a "full" perl implementation (not necessarily fast), with I/O redirected to local variables or even local storage. Modules would be loaded from a remote "l…

Playing with Perl5 syntax

At some point in YAPC::Europe I was showing the perlito5 compiler to stevan++, and we discussed how it could be used to prototype grammar extensions to Perl5.

Perlito grammar is mostly written in simple perl, without extensions (in some places there are still remains of the original perl6 grammar, but these are being cleaned up.)

I've shown stevan++ how named arguments were implemented in perlito6, and how to port the feature to perlito5. We also discussed how to run perlito5 over perl5 using a source filter, in the same way that "" works.

Later, leont++ on #p6p5 …

Perl in small devices

I’ve participated in some discussions about running perl on small devices during the Perl Reunification Summit and YAPC::Europe.

The targets would be java/dalvik, objective-c/ios, and arduino. There is some work going on by Martin Berends (mberends++) on arduino, and Claes Jakobsson (claes++) on the jvm. Claes is working on reading and writing .class files.

We’ve discussed how they could use one of the Perlito parsers to implement a prototype, using either the ast-perl5 or ast-perl6 output:

$ node perlito5.js -Cast-perl5 -e ' print "hello, World!\n" ' > hello.ast5

Reini Urban (rurban++) showed me how to add type information to perl5 code:

$ perl -e '$int::; my int $x'

Type information would help the generated code to perform better and use less memory.

About Flávio S. Glock

user-pic I blog about Perl.