[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban] Magic Words work-in-progress repository



On Fri, Aug 26, 2011 at 08:42:33PM -0300, Jorge Llambías wrote:
> On Fri, Aug 26, 2011 at 4:48 PM, .alyn.post.
> <alyn.post@lodockikumazvati.org> wrote:
> > I'm working on implementing Lojban's Magic Words in PEG, as part
> > of formalizing the PEG grammar for Lojban.  Based on a conversation
> > on IRC today, I have uploaded my work-in-progress:
> >
> >  https://github.com/alanpost/magic-words
> 
> ;;; vajni porsi    - Magic words are processed in order of precedence,
> ;;;                  or vajni porsi.  This precedence determines which
> ;;;                  magic word is used to create a jufpau valsi.
> 
> What's the advantage of having complex precedence rules over the
> simple and without exceptions "first come first served" rule? It seems
> to me that what you are proposing is a step backwards.
> 
> I see that you are also reverting to the old "SA + selma'o" rule,
> which means that 80% of the grammar has to be devoted to SA handling.
> 
> mu'o mi'e xorxes
> 

This case convinced me that we needed precedence rules:

  broda bu zei brode bu

Under strict LTR, that is:

  (bu-clause (zei-clause (bu-clause (gismu-clause "broda") "bu")
                         "zei"
                         (gismu-clause "brode"))
             "bu")

Which makes me uncomfortable because bu's scope changes depending
on whether it is on the left or right hand side of zei.  I propose
this parse tree instead:

  (zei-clause (bu-clause (gismu-clause "broda") "bu")
              "zei"
              (bu-clause (gismu-clause "brode") "bu"))

With the principle being that if ZEI matches something on the left,
the same rule is used to match the right.  That, however, requires
a precedence table.  The *essential* property of LTR is preserved
in this magic words work, but I think the above case demonstrates
that LTR doesn't make sense in every case: that more complex rules
result in easier to understand and parse (by humans) texts.

I think your term "complex precedence rules" does not accurately
reflect the ground truth of the above code.  Admitting a precedence
table simplifies the number of cases in the parse, per my example
above.

I caution you against reading comments; they have the least amount
of truth in the above code.  I wrote them before implementing many
of the grammar rules, and have not yet corrected some breathtakingly
incorrect statements in them.

I would also like to improve the quality of any discussion around
Magic Words, for which many years, many viewpoints, and many words
have been spent debating.  I don't have the skill or desire to
exceed the debaters who have come before me.

It is my hope, in preparing this code, that I can change the
nature of that debate from discussing individual cases and ideas
around Magic Words to "there is a bug on line 100, here is a patch,
and here is the list of test cases that changed and as well the
justification for why those changes are valid."  I believe that it
is too easy, in discussing this topic, to focus on what we want out
of a single case without realizing the repercussions that has for
the remaining body of this work.

This code is not ready to support that level of debate; it is still
a work in progress.  It will be, when it is complete, all I have to
say on the topic--I will expect at that point to discuss this problem
with patches, rather than prose.

Please accept this reply, then, an apology for not being
ready to answer your concerns.  I deeply value and am grateful for
your experience, perspective, and work you've put into this topic.
Please accept this reply as a demonstration of the respect I have
for the time and energy you're spent on this topic.

I hope that I am able to deliver a working grammar from which I will
graciously receive from you any improvements that you would care to
offer.

.i mu'o mi'e .alyn.
-- 
.i ma'a lo bradi cu penmi gi'e du

-- 
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.