Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-08-05

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

All times shown according to UTC.

Time Nick Message
02:11 rgrinberg joined #marpa
04:26 idiosyncrat_ Good night!
06:02 ronsavage joined #marpa
07:34 ronsavage joined #marpa
08:45 pczarn joined #marpa
10:52 kaare_ joined #marpa
10:57 ronsavage joined #marpa
11:09 pczarn joined #marpa
12:28 rgrinberg joined #marpa
15:01 rgrinberg joined #marpa
16:45 harovali joined #marpa
21:24 harovali I could make the grammar work ! , thanks a lot ,
21:24 harovali with what I'm having problems is with the ampersand folowed by letters  literal
21:28 harovali [&\w]+  works perfectly , but [&][\w]+  does not work
22:13 choroba joined #marpa
23:28 idiosyncrat_ joined #marpa
23:31 idiosyncrat_ http://blogs.perl.org/users/_vikas_kumar/2016/08/perls-pegex-module-a-great-way-to-parse-files-by-creating-grammars.html
23:32 idiosyncrat_ An blogs.perl.org post with comments including by me and ronsavage
23:32 idiosyncrat_ I think Matt must have missed the point of the example he cites, which is that the PEG expression
23:33 idiosyncrat_ A ::= a A a | a a
23:33 idiosyncrat_ is non-intuitive in what it matches.
23:33 idiosyncrat_ If it were BNF or a regex, it would match any string with an even number of "a"s.
23:34 idiosyncrat_ And in PEG it does match "aa", "aaaa" and 8x"a".
23:34 idiosyncrat_ But it does *not* match 6 "a"s: "aaaaaa"
23:35 idiosyncrat_ The PEG rule also does not match 10x"a"
23:36 idiosyncrat_ If you analyze (which in the literature involves formulating a recurrence and solving it), the PEG rule matches n x "a", whenever n is *power* of 2:
23:36 idiosyncrat_ That is 2,4,8,16,32,64, etc.
23:38 idiosyncrat_ Most likely Matt either missed it when I said "power" instead of "multiple", or thought I was stating the "obvious" a bit carelessly.
23:39 idiosyncrat_ But it drives home a point -- a lot of what seems "obvious" about what a PEG specification matches is in fact, false.
23:41 idiosyncrat_ That is, most programmers will read a PEG spec as if it were BNF or a regex, which is incorrect ...
23:43 idiosyncrat_ and reading it as PEG is next to impossible ...
23:44 idiosyncrat_ usually you don't really know exactly what your PEG spec parses and does not.
23:44 idiosyncrat_ But it's almost certainly not what its BNF equivalent would parse.
23:49 ronsavage joined #marpa

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