Sometimes things happen so fast, that you don't have the time to
properly communicate about what's going on. I was talking to obra in
#perl6, and he asked me to write to p6l. So here it is (I think you
meant perl6-compiler, right?).

I'll not to be technical - I'm posting links to the programs, and the
#perl6 conversations are all logged in http://colabti.de - so feel
free to go read the sources.

Audrey has a presentation in which she shows the phases in Perl 6 development:
- Incomprehension
- Wild enthusiasm
- Despair
- Hack, hack, hack
- Hey, what was the big deal?
* http://pugs.blogs.com/photos/visiolization/timeline.html

So today we have got to the "what was the big deal" phase - or "hack,
hack, hack" at least.

Summary of last few weeks of development:

A few weeks ago, putter announced in #perl6 he was starting a project
on a new form of collaboration, which would be more open to hacking
than the "mainstream" Pugs (which is already _very_ open). The project
was named "pX".
* http://svn.openfoundry.org/pugs/misc/pX/Common/README
As a first subproject, putter started hacking in perl5 regex
internals, and we discussed briefly on the possible approaches to
implement rules in perl5. As his approach demanded too much knowledge
of p5 internals, I started my own rule implementation on pure perl5. I
was just testing the algorithm, so I used no CPAN modules.
The rule implementation evolved into a p6 grammar implementation,
which evolved into a p6 compiler, which was announced here a few days
ago.
As we usually do in #perl6, we started to discuss possible ways to
improve this thing, and maybe use it to bootstrap Perl 6. I said
bootstrap could be done if we left the idea of "pureness" and let the
implementation have some quick hacks.
Larry said we should proceed even with hacks, which could be
refactored out later.
After a well slept night, I came up with an easy way to make the
compiler circular, that is, it could compile it's own parser by using
itself - no hacks needed.
And now we have a bootstrapped Perl 6 compiler - that's it - all in
about 3 weeks.

So what to do next?

Yesterday I wrote an invitation to un-split the Perl 6 development. It
was promptly accepted by the Pugs team. I hope it can be equally
welcomed by the Parrot-based Perl 6 team. This is specially aimed to
Patrick and Allison - I hope this is a nice opportunity to synch
projects.
I've pasted that invitation below.

I'm aware that there are things like the multitasking capabilities of
Perl 6 that are not yet blessed, and as such can not be implemented as
final - but Audrey and I started writing an extendable API that allows
for different implementations to coexist.

Thanks for listening :)

- Flavio S. Glock (fglock)

PS: big post. But read on, please.


Notes:
- Putter is working on a Perl5 XS module that will permit switching
the Perl5 "regex" engine with a "rule" engine. He is getting help from
tewk, bsb, and Larry.
- lrep was written from scratch - plain Perl - no CPAN modules (now it
does use some modules, but they all are optional), no Parrot, no Pugs.
It amounts to 40kb of code (maybe more, today).
- pmurias is cleaning up the original lrep code, and has added command
line switches, YAML AST output and more.
- The match engine and it's tests have been ported to p6, and work in
Pugs 6.2.10.
- Juerd named the project "lrep" which stands for "Lister Rubbish
Eclectic Pathologically".
- nothingmuch is guilty of the idea of using "lrep" aim as alpha
version of "the" canonical Perl 6 system.
- Larry also backronim'ed it "Least Recursively Expressed Perl", and
said that the Perl6-Perl5 compiler could be called "lreperl".
- lrep will (soon?) be published to CPAN, as a suite of modules under
Pugs::*, and also as part of the Pugs distribution.

Link:
http://svn.openfoundry.org/pugs/misc/Common/pX/lrep/
* link likely to change, as we re-organize the program in modules -
will move under /lib/Pugs/


Annex:
---- original "Deal.txt" which was sent to #perl6 ----

fglock's braindump - Perl 6 enters the "What's the deal?" phase

Lambdafolks, Parrotfolks and Camelfolks - all have their near-working
implementations of Perl 6 now.
If you look around, all the pieces for an alpha version are already there.

* Long term (>2 weeks) plan - Have a plan for Perl 6 Alpha

Does writing in Pugs help?
- it will not be able to compile itself to Pugs,
- but it can compile to the backends
-- Javascript looks to be the more stable
-- Parrot is "the" target

Types, OO,
- follow Pugs Eval/Val/Syn structure.
- use metamodel
- how is Allison's experience with Punie doing

Self-host.

Reuse PGE.

Migrate Prelude, Prims from Pugs.

Generate PIL/YAML.

Annotate the AST; make OO nodes.

Modularize
- are the compiler modules just linked together, or is there a high
level protocol (plug-ins)

What "The Perl 6 AST" looks like

* Conclusion

Self-hosting in Perl5
- almost there,
- but: proof of concept is done, people should move on to other projects
- there are too many Perl6 implementations already
- not likely to be an Alpha version
-- too many features to add
-- neither Pugs tradition, nor TPF support
- Parrot backend would be added later
- incremental - "works" from day zero
- migrate the self-hosting to Parrot too
- small - might attract more new developers "is that *all* code?"
- can reuse Pugs runtimes

Self-hosting in Parrot
- use Pugs as development platform
-- does Pugs eval() Parrot
-- document each syntax construction used
--- these will need to be implemented first
- modify PGE if needed
-- needs(?) to be self-hosting - written in Perl 6
-- or make PGE an optional module
-- reuse some lrep ideas
- target a specific Parrot version
-- work around any problems in Pugs or Parrot, instead of trying to fix
-- do not try to modify the code for each new Parrot version
- reuse Punie AST
-- how is it different from Pugs AST
- reuse existing Grammar
-- is it correct
- From day zero it would need:
-- pluggable emitter, pluggable grammar engine
-- OO nodes
- Too big, complex project
-- will likely work if at least audreyt, stevan, Allison and Patrick
work together
-- reuse all experience available - no big architecture mistakes ahead
-- How is it better than Perl5/lrep self-hosting

--------------

=cut

Reply via email to