Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-02-14

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

All times shown according to UTC.

Time Nick Message
01:27 ronsavage left #marpa
17:15 jdurand joined #marpa
17:21 jdurand_ joined #marpa
17:23 jeffreykegler joined #marpa
17:24 jeffreykegler Phase 4 is done.
17:25 jeffreykegler I've uploaded a developer's release -- https://metacpan.org/release/JKEGL/Marpa-R2-2.079_015
17:26 jeffreykegler And I finally managed to get in visible value-added -- cheap forgiveness aka efficient LATM.
17:26 jeffreykegler LATM = Longest Acceptable Tokens Matching
17:27 Topic for #marpa is now Logs: http://irclog.perlgeek.de/marpa/today Nopaste: http://scsys.co.uk:8002/marpa Stable release: https://metacpan.org/pod/Marpa::R2 Developer release: https://metacpan.org/release/JKEGL/Marpa-R2-2.079_015 Source: https://github.com/jeffreykegler/Marpa--R
17:27 jeffreykegler This is one of those nice improvements, that just "drops in" -- if you using the forgiving adverb, you get the improvement automatically.
17:28 jeffreykegler lucs: Thanks!
17:29 Topic for #marpa is now Logs: http://irclog.perlgeek.de/marpa/today Nopaste: http://scsys.co.uk:8002/marpa Stable release: https://metacpan.org/pod/Marpa::R2 Developer release, 2014-02-14: https://metacpan.org/release/JKEGL/Marpa-R2-2.079_015 Source: https://github.com/jeffreykegler/Marpa--R2
17:29 lucs A bit better :)
17:29 lucs (better /topic that is)
17:30 jeffreykegler LATM offers many advantages over LTM (Longest Token Matching): is is more efficient, easier to use, more powerful and even is a slight improvement in error reporting.
17:31 jeffreykegler I'd make it the default if I had it to do over, but here again backward compatibility will triumph.
17:34 jeffreykegler More efficient: with the new LATM, the lexer only looks for lexemes that might be accepted, saving the overhead of looking for lexemes it will not use.  The resulting parser is usually simply, often much simpler and sometimes ridiculously simple.  For example, if a colon ':' is the only acceptable input at some point, the only lexeme looked for is that constant one-character-long string.
17:35 lucs Aha, nice.
17:37 jeffreykegler Easier to use: One of my intentions with LTM was that, since it was traditional (and resembles the longest match discipline of regexes) it would have the advantage of familiarity.  In fact, it seems in the Marpa context, people expect their lexer to be "smart", and only take into account those lexemes the parse can accept.  (The traditional method, developed for the much less powerful traditional parsers which do not kn
17:39 jeffreykegler More powerful -- With LATM Marpa can now parse some grammar/lexer mixes that previously it required events and external processing to parse.
17:40 jeffreykegler Finally, improved error reporting: the most evident feature of LTM was that, if it recognized an unacceptable token, it abended the parse, reporting that unacceptable token as the error.  This usually was at one remove from the intuitive idea of the actual error.
17:41 jeffreykegler Caveat: testing of the new LATM has been done on only a few, short examples.
17:41 lucs jeffreykegler: These remarks would make a useful blog entry, eh.
17:41 jeffreykegler Your testing is always appreciated, but especially so with this release.
17:42 * jeffreykegler might certainly want to put them in more careful form and post them to the mailing list.
17:43 jdurand_ jeffreykegler: waouh - what are the few example files in the distrib ?
17:44 jeffreykegler I especially encourage folks who've been wanting to use the forgiving adverb as the default in their grammars to do so.
17:45 jeffreykegler jdurand: several of the cases in t/sl_gia.t test LATM, thanks to Ruslan Zakirov and Peter Stuifzand.
17:45 jdurand_ ok thx. in adiition, i have not followed exavlty the latest decs - can i start cpretty wih th requirement shat a grammar xould sane unrexhanle lexemes and g1 rules
17:45 jdurand_ "devs"
17:46 jeffreykegler judrand: the last came thru garbled
17:46 jdurand_ "a grammar should start" with unreachable lexemes and g1 rules - sorry swiss keyboard habits has token over my azerty -;
17:47 jdurand_ "taken over" grrr
17:47 jeffreykegler jdurand: I think you can start even narrower than that ....
17:48 jeffreykegler only g1 non-lexemes, and only a "reasonable" top-level subset of those.
17:49 jeffreykegler Entire blocks and functions, obviously, and lists of same.
17:49 jeffreykegler Also single statements and lists of same.
17:49 jeffreykegler As a first cut, you could subset this further.
17:50 jdurand_ ok will try - have to test the global forgiving as well on C sources
17:50 jdurand_ have to be AFK sorry
17:50 jeffreykegler As one rule of thumb, if it's a construct without balances parentheses/braces, (such as half of for loop), you probably never should bother with it.
17:51 jeffreykegler jdurand: Goodbye!
17:51 jeffreykegler jdurand: By the way, I am sticking with GNU format as the "Marpa standard"
17:52 jeffreykegler 2-space indents was the deciding factor -- makes it worth putting up with the emacs conventions.
18:00 jeffreykegler As one big test, I've just converted Marpa's own self-grammar, metag.bnf, to LATM, and it passes the test suite.
18:01 jeffreykegler That means the SLIF will use LATM, unless I back the change out because of qualms about backward compatibility.
18:02 jeffreykegler Some error messages will change, but I don't think there'll be any change in the grammars accepted or rejected.
18:05 jeffreykegler [ The backward compatibility issues for adding LATM to a specific grammar, such as the SLIF's metagrammar, are much more limited than the issues raised by making LATM the new default across the board. Making LATM the new default across the board will cause some SLIF scripts which currently are rejected to be accepted, and that is *not* always a good thing. ]
18:06 jeffreykegler * "some SLIF scripts" -> "some inputs which currently are accepted by existing SLIF scripts"
21:33 jdurand joined #marpa
21:35 shadowpaste "jdurand" at 88.160.190.154 pasted "Test of global forgiving adverb on C grammar applied to marpa.c via c2ast: OK" (4 lines) at http://scsys.co.uk:8002/305597
22:15 ronsavage joined #marpa
22:16 ronsavage Marpa::R2 V 2.079015
22:16 ronsavage Counts: Tests: 542. Modules: 8. Passes: 8. Fails: 0
22:16 ronsavage Duration: 1 minute and 37 seconds
22:20 jdurand Good - also I appreciated the error message "Adverb "forgiving" not allowed in G1 default rule" - my mistake did not pass Marpa strictness -;
22:22 jdurand MarpaX-Languages-ECMAScript-AST test suite ok as well
22:47 jeffreykegler joined #marpa
22:55 jeffreykegler jdurand: Thanks!
22:55 jeffreykegler ronsavage: Thanks!

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