root/project_planning/TALK

Revision 15246, 7.5 kB (checked in by cmarcelo, 20 months ago)

* Add messages on important project_planning/ files pointing to the

Pugs Trac at http://dev.pugscode.org/

  • Property svn:mime-type set to text/plain; charset=UTF-8
  • Property svn:eol-style set to native
Line 
1The Pugs team is porting all content in this directory to the Pugs Trac
2at http://dev.pugscode.org. Please put new content there ;-)
3
4----
5
6Feel free to use wikipedia Talk style if you know it.
7
8== Purpose ==
9
10This directory was created to address these problems:
11 - No one knows what the current state of the project is.
12 - It is difficult to determine what people are working on.
13 - No one knows what needs to be done.
14 - No one knows how they can help.
15 - No one knows where we are going, or how we are to get there.
16Perhaps this is a slight overstatement.  But only a slight one.
17
18The project management approach of pugs has been anarchistic
19development.  A flooding algorithm for planning (everyone working on
20whatever development path/aspects appeals to them); active and rapid
21development; continuous communication; and a low commit threshold
22("don't worry about breaking the build, just commit, and we'll fix
23it").  This approach worked well when development was rapid, there
24was a clear primary development thrust, and an active community with
25an up to date and detailed organizational memory.
26
27For several reasons (we haven't been able to pay audreyt to work full
28time being a key one), the main thrust has slowed, the overall pace of
29development has slowed, and the community has become smaller, less
30active, and less tightly informed.  This created negative feedback.
31It became harder to tell what to work on, easier to get stuck, and
32harder to be motivated.  Thus further slowing development and
33shrinking the active community.
34
35I created this directory to increase project transparency.  To make it
36easier for people to see what needs doing, and why.  This is not a
37full solution, but will hopefully mitigate the negative feedback loop,
38helping us make less slow progress until things pick up again.
39
40-- putter 2007-01-20
41
42
43== Fix PIL2JS ==
44
45PIL2JS is currently broken.
46It is our second most complete implementation of p6, after pugs.
47
48$ ./pugs -Bjs -e 'say 3;'
49$
50No output.
51"make test-js" fails similarly.
52
53<audreyt> the problem is that JS.pm needs to accomodate statement:cond form
54  which unlike the :if form, takes two arguments as full closures instead of blocks
55  and so will need to do the pil2js equiv of closure apply .()
56  I'm checking in something that doesn't do the .() -- it's 7am here [...]
57
58See r15128.
59perl5/PIL2JS/lib/Prelude/JS.pm
60  register "&statement_control:cond" => sub {...
61
62-- putter 2007-01-22
63
64
65== KP6 on PIL2JS? ==
66
67Could kp6 run on PIL2JS?  If so, then kp6-pil2js would become our
68second self-hosting p6 implementation.  pil2js has good smoke results,
69and so might be a faster way to get kp6 "real" than writing a new
70backend from scratch.
71
72pil2js currently delegates its parsing to pugs, and so can't parse oo,
73but does use oo internally.  so porting kp6 might require hand
74transfering the oo parts to get bootstrapped.
75
76Some things which might be explored:
77 - how much of kp6 can pil2js run now?
78 - can kp6 handle pil2js's p6 code?  (perl5/PIL2JS/lib6/Prelude)
79 - how close is the kp6 ast to the PIL1 ast pil2js uses?
80
81-- putter 2007-01-22
82
83
84== redsix on PIL2JS ==
85-- putter 2007-01-24
86
87Background
88
89PIL2JS uses pugs to generate PIL1 ast, processes it using p5, and has
90a p6+js runtime.  It has been blocked for two years by PIL1 not having
91oo information.
92
93PIL2JS is attractive.  It was our second best (after pugs) backend in
94terms of test coverage.  It's use of p6 and p5 means it is closer than
95pugs to being a p6 bootstrap.  Even some of its js could be rewritten
96in p6, if oo parsing was available.  Its performance, while slower
97than pugs, seemed tolerable.  jsperl5 is a variant of pil2js which
98allows it to use p5.
99
100Redsix, written in ruby, has a p6 parser.  The grammar was derived
101from pugs's.  While buggy, it aspires to completeness.  It uses
102p5-syntax regexps plus rules.  It has a working operator precedence
103parser, though it's non-spec.  Performance is good - it was running
104faster than pugs at one point.
105
106An implementation of p5-syntax regexps plus rules exists for p5.
107Performance is good - it may be faster than the ruby one.
108
109Proposal
110
111Create an alternate p6 parser for pil2js.  Translate the redsix
112grammar and opp to p5.  Write a new emitter for it, based on pil2js's
113PIL1 emitter.  Get pil2js and the new parser working together.
114
115Tweak the new parser until it can handle the pil2js p6 code.
116At that point, pil2js is free to evolve independently of pugs.
117
118Development can then proceed in several directions.
119Improve the new parser to recover test regressions from the switch.
120Add emitting for oo declarations.
121Then:
122Migrate the p5 bits to p6.
123At that point, we have a bootstrapped p6-on-p6, for a large subset of p6.
124
125Disadds/Risks
126
127The emitter backend is new.  Redsix was passing less than 20% of
128tests, so the ability of the grammar to correctly handle the other 80%
129is uncertain/unlikely without more work.
130
131Compared with running kp6 on pil2js, this is a harder and more complex
132approach.  Though one with the potential to more quickly result in a
133relatively complete p6 implementation.
134
135pugs can *already* do parsing and oo.  Faster and better than the
136result of this exercise will be able to until after quite a bit of
137work.  Even then, if you have to move to another, faster backend, you
138might as well have developed on pugs instead, and emitted to the new
139backend from there.
140
141An alternative is to migrate pil2js into a new pil2p6.  Run it on
142pugs.  Then it can be developed in a full p6 dialect, rather than
143playing bootstrap games.  The redsix parser can be migrated to p6,
144full p6, if that still seems the right way to develop a parser.
145Bootstrap happens when it is ready to happen.  The main risk of this
146approach is the possibility of pugsbugs interfering with development.
147
148So the key assumptions of this proposal are that (1) pugs won't be
149able to output an oo ast for pil2js anytime soon; and (2) pugs is
150currently too buggy to develop a pil2p6 on it.  It's not entirely
151clear either of these is true.  If (2) is untrue, a better path to
152p6-on-p6 is pil2p6.  If (1) is untrue, a better path is to wait,
153perhaps filling time by migrating the redsix parser to p6, or fleshing
154out kp6.
155Counter: (1) may turn out to be untrue, but it is certainly a
156plausible hypothesis.  And even if untrue, the only impact is it would
157be better to migraite the redsix parser to p6 instead of p5.  Which
158doesn't seem a deadly issue.  Regards (2), unlike creating an
159alternative parser for pil2js, pil2p6 is setting aside working code,
160and hoping a non-trivial translation to p6 will sort of work too --
161the proposal has more of a "keep working code working" flavor than pil2p6.
162
163
164== Integrating KP6 with the test suite ==
165
166It would be nice to run the test suite against kp6.
167It is easy, and will help make it obvious what is and is not working.
168:Counter argument: it will only show nothing is working, and is thus
169 uninteresting.  I expect only 01-sanity/01-tap.t will pass, as
170 variable assignment doesn't work yet.  -- putter 2007-01-22
171::But keeping an eye on that, and motivating improvement, is exactly
172  what the testing is for.  *Everything* which is a p6 implementation
173  should be able to run the test suite, no?  -- putter 2007-01-22
174
175* Create a friendlier "program api" to kp6.
176  It currently spits p5 on stdout.
177  * Create a run-kp6.pl analogous to mp6's run-mp6.pl.
178* Make ./pugs -Bkp6 call run-kp6.pl.
179  src/Pugs.hs.  Perhaps follow the js code there.
180  Hopefully only one or two lines will be needed.
181* Add a test-kp6 target in Makefile.PL.
182* Make smoke work.
183  * Add a smoke-kp6 target in Makefile.PL.
184  * Tell util/run-smoke.pl about kp6.
185    Just a $ENV{HARNESS_PERL} modification like the other ones there.
186
187-- putter 2007-01-21
Note: See TracBrowser for help on using the browser.