MiniPerl6 (mp6) is a subset of Perl 6, which was designed as a light
bootstrapping language. The initial bootstrap used v6.pm and was then
self-hosted in Perl 5.
MiniPerl6 is now self-hosted both in SBCL Lisp and in Perl 5.
A developer can modify the compiler source code (written in MiniPerl6)
and recompile either with the Perl 5 or with the SBCL backend. The
backends can cross-compile to each other.
MiniPerl6 can be downloaded from the Pugs repository:
$ svn checkout http://svn.pugscode.org/pugs pugs
$ cd pugs/v6/v6-MiniPerl6
You can create an executable binary using these commands:
$ sh lisp-util/create-core-image.sh
$ sbcl --load mp6-lisp-create-core-image.lisp
$ chmod +x mp6-lisp
$ ./mp6-lisp -e ' class Main { say "hello, World!" } '
... lisp compiler warnings
hello, World!
The bootstrapping procedure for both "perl" and "lisp" backends can be
tested with:
$ sh perl5-util/bootstrap-perl5.sh
$ diff -r lib5 lib5-tmp # should show no differences
$ sh lisp-util/bootstrap-lisp.sh
... lisp compiler warnings
$ diff -r liblisp liblisp-tmp # should show no differences
Links:
2006.11.04
MiniPerl6 compiler structure
http://pugs.blogs.com/photos/visiolization/mp6bootstrap.html
2006.11.02 - MiniPerl6 design
http://pugs.blogs.com/pugs/2006/11/miniperl6_and_u.html
2007.10.19 - KindaPerl6 in Lisp (KindaPerl6 is a Perl 6 compiler
written in MiniPerl6)
http://pugs.blogs.com/pugs/2007/10/kindaperl6-now-.html
v6.pm (Perl 6 in Perl 5)
http://search.cpan.org/dist/v6/lib/v6.pm
- Flávio S. Glock
Thread Next