Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-12-31

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

All times shown according to UTC.

Time Nick Message
00:16 ronsavage Thanx!
02:20 Idiosyncrat commit fd9b4f8f4553c9f9b9663b7421a969e4a7fb1f92 is a documentation fix.
02:20 Idiosyncrat Given that Marpa::R2 is in a deep freeze, this may take a very long time to make its way into a release.
03:59 ronsavage JK: Is there some reason you don't comment directly on blogs.perl.org? I'm very tempted to do so and to refer to your comments here, but of course you could do that directly.
04:00 ronsavage I'm guessing you (also) don't want to be too negative, but if anyone pushes Perl6 + grammars, it looks like they are just creating unrealistic expectations, and that IMHO should be countered.
04:08 Idiosyncrat These thoughts eventually make their way into my Ocean of Awareness blog posts, which are cross-announced on blog.perl.org.
04:08 Idiosyncrat I try them out here first because I get useful feedback.
04:09 Idiosyncrat ronsavage: And, yes, I am feeling that it's pretty clear the more ambitious hopes for Perl 6 grammars are backed by neither theory or experience ...
04:09 Idiosyncrat they are just hopes.
04:11 Idiosyncrat That's not totally unlike the rest of Perl 6, but the problem is that in the close of the parsing, they are fighting the mathematics ...
04:11 Idiosyncrat and you don't win that one.
04:12 Idiosyncrat s/in the close/in the case/
04:13 Idiosyncrat Initially with Marpa, years ago, I went on a serious yacc-bashing campaign, thinking that was my main competition.
04:14 Idiosyncrat I had good company in the delusion, Terence Parr's ANTLR is a kind of acronym for ANTi-LR parser.
04:15 Idiosyncrat I hoped to kill yacc, but basically it was dead when I got there, and top-down parsing rapidly took over.
04:16 Idiosyncrat I then went into a phase, where I basically refrained from criticizing alternative parser for three reasons:
04:16 Idiosyncrat 1.)  To be polite
04:17 Idiosyncrat 2.) Figuring what with both a theory paper and an implementation, Marpa's merits would carry the day.  (Naive, I know.)
04:18 Idiosyncrat 3.) To do a proper job, it means doing a lot of research and becoming more of an expert on these parsers than most of the people who actually use them.
04:19 Idiosyncrat Reason 1.) is still somewhat valid, but as to 2.) I should have known better after all these years
04:21 Idiosyncrat The turning point was my PEG post, which went very negative on a very popular approach.
04:21 Idiosyncrat No more negative than I could justify from the literature, but definitely negative.
04:22 Idiosyncrat Or as one guy put it on reddit, he thought I was "annoying, but has a point
04:22 Idiosyncrat "
04:24 Idiosyncrat ronsavage: re Nigel's GEDCOM problem --
04:24 ronsavage Yes?
04:24 Idiosyncrat Since I think you are calling the parser ...
04:24 Idiosyncrat I think you may have to catch the error in the input and report them from your module.
04:25 Idiosyncrat s/error/errors/
04:25 Idiosyncrat unless I misunderstand what is happening
04:25 ronsavage That's what I'm doing.....
04:25 Idiosyncrat So he's getting a pointer to the location where the parse failed?
04:26 ronsavage He's talking about line 9 of https://gist.github.com/ronsavage/e5bdb206243a98839cf7
04:27 Idiosyncrat And what is being returned is 0, right?
04:28 ronsavage I've just commented on the issue about the FAQ Q 17: http://savage.net.au/Perl-modules/html/marpa.faq/faq.html#q17. Does this still apply after such a failure?
04:28 Idiosyncrat As in "Call to ambiguity_metric() returned 0", right?
04:28 ronsavage Actually, I check for <= 0.
04:29 Idiosyncrat OK, where I'm going is that you might want to catch the error back on line 3 of the above linked gist.
04:30 ronsavage The catch() will do that. He's getting the error from line 9, which is not specific enough.
04:31 Idiosyncrat Exactly, which is why I think you might want to check for "No parse" just after line 3
04:32 ronsavage Errrr. Ok. Which method tells me that?
04:32 ronsavage And, does 'No parse' say more that 'Parse failed'?
04:33 Idiosyncrat If you expected a parse and didn't get one, then the parse failed.
04:34 ronsavage But surely you always expect a parse!
04:35 Idiosyncrat Right, but you're not getting one, which is waht the 0 returned by ambiguity_metric() says.
04:36 ronsavage Hmmm. Now, I seem to remember some time ago he suggested he was reusing the G::G::D object. Perhaps I could recommend he destroys and re-creates it.
04:36 Idiosyncrat (I may be the one who is confused here, but perhaps not.)
04:37 Idiosyncrat Also, is it possible that an event is being returned from read()?
04:39 Idiosyncrat Otherwise, what's happening is read() is reaching the end of input, but there is no parse ...
04:39 ronsavage I did not see his grammar, so can't say if he's using events. I suspect not.
04:39 Idiosyncrat Wait.  Nigel is specifying the grammar?
04:40 Idiosyncrat I thought your module was specifying the grammar.
04:40 ronsavage Sorry. The BNF thereof.
04:40 ronsavage I create the recce object.
04:40 Idiosyncrat Nigel is specifying the BNF?
04:40 ronsavage Ahhhh. My mistake. No, it's my BNF too.
04:41 Idiosyncrat Right, OK.
04:41 Idiosyncrat Anyway, picking up the thought from above ...
04:41 ronsavage Back to my comment in the issue. After such a failure, does $recce -> line_column() still work?
04:41 Idiosyncrat "such a failure"?
04:42 Idiosyncrat we've been jumping around a bit, so remind me
04:42 ronsavage The one he's getting, which comes from line 9 of that gist.
04:42 Idiosyncrat right, OK.
04:42 Idiosyncrat Yes.
04:42 Idiosyncrat Anyway, let me continue the thought from above ...
04:43 Idiosyncrat "Otherwise, what's happening is read() is reaching the end of input, but there is no parse ..."
04:43 ronsavage So what if I expand the code to call line_column() when ambiguity_metric() returns 0 or <=0. Then I can expand the error msg to be much more specific.
04:43 ronsavage Yes, go on :-).
04:43 Idiosyncrat but read() does not know that there is not more input ...
04:44 Idiosyncrat so it does not report an error ...
04:44 Idiosyncrat but it does not have a parse either ...
04:44 Idiosyncrat which is what ambiguity_metric() sees and why it returns 0.
04:45 Idiosyncrat So, yes, I think you can call line_column when ambiguity_metric returns 0.
04:45 ronsavage I just scanned the code. There are no events. So that means read() is being called just once.
04:45 Idiosyncrat But what it should report is that you are at the end of input.
04:45 ronsavage Could he be supplying an empty string as input?
04:45 Idiosyncrat (Assuming no events)
04:45 Idiosyncrat You tell me. :-)
04:46 Idiosyncrat An empty string is a legal input.
04:46 ronsavage Ahh, so no error but no parse in that case (empty input)?
04:47 Idiosyncrat Sure.
04:47 Idiosyncrat It'd be just another case of reaching end of input.
04:47 Idiosyncrat Except in this case you reach the end after reading 0 characters.
04:48 Idiosyncrat Depending on the grammar, the empty input might have a valid parse.
04:48 Idiosyncrat But often it will not.
04:49 ronsavage Effectively, then, the code /assumes/ length(Input) > 0. I could check for that, since I can no longer hope every user checks for it......
04:50 Idiosyncrat Special-casing the zero length input is one approach yes.
04:51 Idiosyncrat Note I am being careful in my language because there are applications/grammars where an zero length input is 100% OK.
04:51 ronsavage There are no empty input strings in the 4 big test files :-(.
04:52 ronsavage Yes, sure. I'll have to think about what data structure to return upon empty input before I release a patch.
04:52 Idiosyncrat Indeed.
04:52 ronsavage Thanx!
04:53 Idiosyncrat Internally, btw, libmarpa special-cases 0 length inputs -- but that is invisible at your level.
04:53 Idiosyncrat So we are OK, at least for the moment?
04:53 ronsavage BTW: My link to the pod for Marpa::R2 has a trailing (), but MetaCPAN does not. Perhaps they changed their convention on that. I'll have to scan the FAQ.
04:55 ronsavage Yes, no need /for you/ to spend any more on this. And... It's 15:55 here now, so shortly: Happy New Year!
04:55 Idiosyncrat Wait, it's still the 30th here, so the 31st there?
04:56 Idiosyncrat OK, I see I'm late on the 30th, and you are deep into Dec 31st.
04:57 Idiosyncrat Anyway, any more questions, give me a holler.
04:58 Idiosyncrat And Happy New Year!
05:00 hobbs it just became the 31st in America/New_York... now.
05:02 Idiosyncrat joined #marpa
05:04 Idiosyncrat Yes, I'm still at 9:03 PM on the 30th.
05:04 Idiosyncrat But Ron is way ahead of us both, deep into the afternoon of the 31st
05:05 ronsavage Yep. As always. Hahahahaha.
05:05 Idiosyncrat I've always liked that about living in CA, you let the rest of the world checkout each day first, to see if it's OK or not.
05:05 ronsavage Sorry. I see I did not explicitly say it's the 31st, but it is.
05:06 ronsavage But does the world come with a comprehensive set of regression tests?
05:07 Idiosyncrat No, but if the day is too much of a bummer, we can just spend it surfing.
05:36 ronsavage Or do 'git reset --hard'.
08:31 koo7 joined #marpa
08:57 Ulti joined #marpa
09:05 Ulti left #marpa
09:44 kaare_ joined #marpa
17:53 Idiosyncrat joined #marpa
21:44 ronsavage joined #marpa
23:52 Idiosyncrat joined #marpa
23:54 Idiosyncrat joined #marpa

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