I've just added experimental support to "go routines" to Perlito's Go backend:
$ perl mp6.pl -Bgo -e ' go sub { say 123; say "aaa" }; go sub { say 456; say "bbb" }; say "here"; say "now"; '
here123456
nowaaabbb
Go "Channels" are not supported yet.
Changelog for version 4.0:
- Go backend bootstrap.
The Go backend was updated to the latest Go language spec.
- Perl5 backend optimized; 30% faster
- More library functions, added to all backends
- New 'Eval.pm' module - implements a MiniPerl6 interpreter in MiniPerl6.
This should add some debugging capabilities later on.
- New test suite. See README on how to use 'prove' for each backend.
- New compiler options to create binary executables
- Currently the stable backends are: Perl5, Javascript, JVM, Lisp, Go.
See README for bootstrapping instructions for all backends.
- Removed support for features that are not standard Perl6.
Thanks to pmurias++ for helping test this release.
Version 4.0 can be downloaded from
http://github.com/fglock/Perlito/tree/7f0ac392dfcf04d390ebefe5f4274bb37cbd7b6e
Enjoy!
- Flávio S. Glock (fglock)
MiniPerl6 (mp6) is a subset of Perl 6, which was designed as a light bootstrapping language.
Changelog for version 3.0:
- Go language backend; using Go: http://golang.org/
- Java-class backend; using Rhino: http://www.mozilla.org/rhino
- util/mp6.pl - compiler command line script written in MiniPerl6
- new repository at http://github.com/fglock/Perlito
- new web page at http://www.perlito.org/ created by nferraz (Nelson Ferraz)
Enjoy!
- Flávio S. Glock (fglock)
I've been working on the "Go language" backend for Perlito miniperl6 for about 2 weeks now.
Yesterday I implemented functions and namespaces, and today I've got methods working. With some more work, Perlito should bootstrap in Go.
There is no command line script yet - I'm using this ugly line for tests (this compiles and runs the method tests):
$ perl mp6-go.pl < t/11-bind-method-param.t > x1.go && cat lib/MiniPerl6/Go/Runtime.go x1.go > x.go && time ( rm x.6 ; rm
New urls:
Perlito now has a site http://www.perlito.org, created and maintained by Nelson Ferraz (NFERRAZ).
Yesterday I created a github account. The new Perlito commits are now going to http://github.com/fglock/Perlito
Press the "Execute" button!
"Perlito" MiniPerl6 is an implementation of a small subset of Perl6. There is no error handling, and the web interface I wrote is very simple.
The compiler implements simple classes, grammars with 'token' only, variable binding with ':=' (no assignment), arrays, hashes, strings, integers.
The compiler is entirely written in MiniPerl6. The source code is in:
I've downloaded V8 (the javascript compiler). I was planning to try it out as a MiniPerl6 backend, but I started to play with the parser instead:
--- src/scanner.cc (revision 2877)
+++ src/scanner.cc (working copy)
@@ -858,6 +858,12 @@
bool has_escapes = false;
StartLiteral();
+
+ if (c0_ == '$') {
+ AddChar(c0_);
+ Advance();
+ }
Now I can use perl style var names:
$
V8 version 1.3.10
> $my_var = "hello, World!"; print($my_var);
hello, World!
*update* - I've changed a few more things, and I've got some timings:
$ time
9999999
real 0m0.164s
user 0m0.152s
sys 0m0.008s
$ time perl -e ' my $x = 0; for (my $i=1; $i < 10000000; $i++) { $x++ }; print($x);'
9999999
real 0m1.123s
user 0m1.091s
sys 0m0.008s
MiniPerl6 (mp6) 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 in SBCL Lisp. You can modify the source code and recompile without Perl 5.
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
$
The bootstrapping procedure for both "perl" and "lisp" backends can be tested with:
$ sh perl5-util/bootstrap-perl5.sh
$ sh lisp-util/bootstrap-lisp.sh
I finished the first version of the KindaPerl6 project roadmap, after a whole month of planning, prioritizing, and procrastination.
This version is a filtered out "main development track", extracted from the otherwise anarchistic development structure (somebody called it "genetic programming").
The goal of phases and milestones here is really just to break the project down into bite-sized pieces that regular hackers can get their heads around.
Specifically, the plan doesn't tell people what they should not to do. Small projects are much welcome. You might even get a Perl 6 Microgrant . I'm told that the TPF really wants to give out a couple of kp6/mp6/6STD grants!
The roadmap as html - http://moritz.faui2k3.org/pugs_pod/kp6-roadmap
The roadmap as pod - http://svn.pugscode.org/pugs/v6/docs/kp6-roadmap.pod
These are Perl 6 project ideas that I've been working on:
- Develop kp6-C (started)
- Develop kp6-Parrot, writing new PMCs as-needed
- Finish kp6 closure and coroutine implementation (perl5 backend)
- Implement a lazy Array PMC (is this SoC'able?); coordinate with particle++ work on generators
- Find out how to implement lazy Arrays for pugs; maybe learn some Haskell
- Fix Pugs::Compiler::Rule to current specifications
- Make v6.pm (or kp6?) use the Perl6-STD grammar
- Finish Pugs::Compiler::Rule p5-regex backend, using the new features implemented by dmq++
- Merge some of kp6 ideas to v6.pm; this would help making v6.pm feature-complete
- Help putter++ with pluggable v6.pm