Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-03-05

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:45 jeffreykegler joined #marpa
00:46 jeffreykegler Blixtor: re http://irclog.perlgeek.de/marpa/2015-03-04#i_10220678 -- using -pedantic-errors is a good idea.
02:20 lucs_ joined #marpa
03:25 jeffreykegler joined #marpa
03:29 jeffreykegler Reaction to my PEG post seems quiet so far, which could be a good thing.
03:29 jeffreykegler It's easy to get a post talked about, just put enough flame-bait into it.
03:31 jeffreykegler By the way, it seems to be kind of a rule of the matter that folks are reluctant to say anything bad about a parsing algorithm once it becomes "state of the art".
03:33 jeffreykegler I think what happens is that folks translate the statement that 'the state-of-the-art-algorithm does not work' to '*I* do not know how to properly use the state-of-the-art algorithm' -- when criticizing it, you feel like you are coming across as incompetent.
03:34 jeffreykegler And I believe most people who fail to get yacc and/or PEG projects working just quietly move on.
03:37 jeffreykegler Let's take the case of the Wikipedia page on PEG: http://en.wikipedia.org/wiki/Parsing_expression_grammar
03:39 jeffreykegler At the bottom, it states there is a large grammar done entirely in PEG, for Lojban, an artificial language.  This was perhaps done when the folks starting it imagined it was just a matter of typing in syntax, the way it would be for Marpa, and that success was just around the corner.
03:40 jeffreykegler But click through -- http://users.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/
03:41 jeffreykegler and skip to the end -- "Update 20 Sep 2005: I am no longer so sure that it's possible, but I don't have any good reason; just a change in my gut feeling."
03:44 jeffreykegler I think readers of my post will have more of an idea what they are getting into, and something better than a "gut feeling" of why they seem to hit a point of no returns.
05:01 Aria My team at work appreciated the PEG article.
05:02 Aria So thank you for that.
05:02 jeffreykegler Cool
05:02 jeffreykegler Was much of it new to them?
05:02 Aria Yeah. They were used to thinking "oh, parsing, use PEG, it'll be fine"
05:03 Aria Not that they parse anything complex, but yeah.
05:03 Aria And I just mentioned libmarpa being MIT-licensed and someone got very excited.
05:03 jeffreykegler And, of course, every once in a while, PEG is fine. :-)
05:04 Aria Hehe, yep.
05:06 jeffreykegler What did they think of the examples, the ones I picked from Redziejowski?
05:06 jeffreykegler Did they just skim them, and take my point?
05:11 jeffreykegler Because the article centers on convincing the reader that PEG is the nitroglycerin of parsing.
05:12 jeffreykegler Seemingly the easy approach to the task, but once you have experience with it, you find out it is just too tricky.
05:27 Aria Skimmed, but nodded in an "I think this looks well considered" way.
05:27 jeffreykegler Good.
05:27 Aria Saying 'security' was a good move.
05:27 Aria Also the argument about having to break things to fix it.
05:27 Aria That is what my team is all about.
05:28 jeffreykegler "having to break things to fix it"?
05:28 Aria Having to break users of your language to fix a bug where you parse something unintended.
05:28 Aria (My team are basically thinking backward compatible interfaces all day every day)
05:28 jeffreykegler Oh, yes, right.
05:29 jeffreykegler I really do think the many of the advantages of a parser that actually parses the language described in the BNF are overlooked --
05:30 jeffreykegler somehow when it comes to parsers programmers who would not dream of "living dangerously" in other contexts,
05:30 jeffreykegler find it OK to "just hack it up until it passes the test suite and leave the rest to the maintenance cycle"
05:34 Aria Totally.
05:34 Aria Though I think that went a long way to showing how it fails.
05:34 Aria A lot of it comes to never having seen it.
05:37 Aria Aye. Okay, a few more minutes of trying to understand exactly how to implement leo items, then to bed with me.
05:38 jeffreykegler A hint re understanding the details of Leo items.
05:39 jeffreykegler Work out some examples -- it gets tricky because in undoing them the best order is
05:39 jeffreykegler top, then bottom, then from bottom-to-top
05:40 jeffreykegler So the outer two, then reverse direction and do all the inner ones.
05:40 Aria That makes sense. Though I'm working on doing them in the first place.
05:41 Aria I've identified the rules that recurse, and can spot the items that'd be memoized.
05:41 Aria But still trying to work out exactly what I need to record. The terminology is just obscure enough in the papers to baffle a bit.
05:42 jeffreykegler What sources are you working from.  The treatment in Leo's paper is confusing.
05:42 jeffreykegler [ Which is natural for a 1st description of anything. ]
05:43 Aria recce.pdf and the marpa pdf, mostly.
05:44 Aria I just started re-reading the leo bits of recce.pdf, so I think I'll get clarity there.
05:44 Aria Part of what throws me is that every paper uses a different notation for things.
05:44 jeffreykegler Do I use my new "path" terminology?
05:44 Aria Nope
05:45 jeffreykegler In some drafts, I've started talking about path Leo items, trailheads, and summits.
05:46 jeffreykegler To emphasis that top, bottom and middle must be carefully distinguished.
05:46 jeffreykegler s/emphasis/emphasize/
05:46 Aria Noted.
05:47 jeffreykegler One way of describing it is that Leo discovered that if the path is deterministic ...
05:47 jeffreykegler a trailhead and a summit describe it uniquely.
05:47 Aria Good way to put it.
05:49 Aria Aha. Actually, that helps a lot. Noting where the trailhead is is what I'm missing.
05:49 Aria Found the summit.
05:49 Aria But looking back, nothing to find yet.
05:49 jeffreykegler Also, I do recommend you work it out in your head in both directions -- recording and undoing ...
05:49 jeffreykegler before implementing.
05:50 jeffreykegler An approach might be to use the Marpa diagnostics, and simple grammars, to see what happens.
05:51 Aria i will have to run through the diagnostics.
05:51 Aria I've not done that yet!
05:51 Aria though implementation is pretty lightweight in javascript -- it's simple enough to throw away that I don't mind thinking things through that way.
05:51 jeffreykegler You may have to get to a lower layer of them, because that top layers undo the Leo memoization in order to be "helpful"
05:53 Aria Ah fun.
05:53 Aria Makes sense, but fun.
05:54 Aria Are the trailheads the first items that recurse, at the symbol that recurses, or the place the rule is scanned first that could recurse?
05:54 jeffreykegler Marpa::R2::show_earley_set*
05:55 jeffreykegler Marpa::R2::Recognizer::show_earley_sets
05:55 Aria Awesome. That will be super useful.
05:55 jeffreykegler Those are the low-level undocumented diagnostics -- it will be some trouble to figure out their notation, but probably worth it.
05:56 jeffreykegler Because it will give you the benefit of crafting your own examples.
05:56 Aria Can't be much worse than the notation in mine!
05:57 jeffreykegler re http://irclog.perlgeek.de/marpa/2015-03-05#i_10226113 -- I did not understand the question.
05:59 jeffreykegler By the way, if you find the algorithm in marpa.pdf confusing, imagine what it was like when I was using LR(0) states instead of dotted rules.
05:59 Aria I'll have to rephrase the question when it's not 1 am!
05:59 Aria But I think you helped me narrow my thinking in toward the solutions, so thank you
06:01 jeffreykegler Maybe you will discover some improvements to the descriptions in marpa.pdf in the course of your explorations.
06:01 Aria Possibly!
06:03 jeffreykegler Well, it's even getting late California time.
06:03 jeffreykegler AFK
06:03 Aria Yup. ta!
07:24 lwa joined #marpa
16:40 jeffreykegler joined #marpa
23:55 jeffreykegler joined #marpa

| Channels | #marpa index | Today | | Search | Google Search | Plain-Text | summary