Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-07-30

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

All times shown according to UTC.

Time Nick Message
00:00 jeffreykegler pczarn -- you might want to get into reading papers on parsing -- even when you can reinvent a field, it is much better to understand the traditions and conventions that preceded you.
00:02 djns hi
00:03 djns Can Marpa parse an "unrestricted grammar" and a "context sensitive grammar"
00:11 jeffreykegler joined #marpa
00:11 jeffreykegler djns: No.
00:14 djns Are they just too difficult to parse
00:14 djns Would it be hard to write such a parser
00:14 jeffreykegler That's an open question.
00:15 jeffreykegler A few years ago, folks said general context free (CFG) parsing was too hard for practical use.
00:15 jeffreykegler A lot of folks are still saying that, in fact.
00:16 jeffreykegler Perhaps somebody on this channel will be the one to solve the CSG problem.
00:23 djns maybe so
01:00 jeffreykegler joined #marpa
02:33 ceridwen joined #marpa
03:14 ronsavage Re CSGs: One of my modules, https://metacpan.org/release/GraphViz2-Marpa, switches between grammars during a single pass of the input :-). Does that count?
03:18 jeffreykegler Depends who is counting :-)
03:19 jeffreykegler I know some people in describing PEG's tendency to do wierd things with your BNF specification would call this the ability to parse CSG's ...
03:19 jeffreykegler but to my mind it was like taking selling a used car with bad suspension and tricky steering by describing it as an off-road vehicle
03:56 djns My understanding is that the Left Hand Side contains a sequence of rules to be replaced by the right hand side, in the BNF code of the parser itself,when using a CSG? So, the BNF code modifies itself?
03:57 djns In other word, the code already defined previously in the set of rules that matches the left hand side is replaced by the right hand side
03:57 jeffreykegler No, the BNF is not self-modifying.
03:58 jeffreykegler It remains static and a string of symbols is repeatedly rewritten according to the BNF rules
03:58 djns i see
05:57 ronsavage joined #marpa
07:32 ronsavage jk: Re http://irclog.perlgeek.de/marpa/2015-07-30#i_10975648. Well, if no-one else is counting, I'll count for myself........
07:48 pczarn joined #marpa
08:40 purmou joined #marpa
09:16 pczarn that's right, until now I've been reading papers only to learn details, not conventions
09:19 pczarn parsing is different
09:22 pczarn My rewrite of libmarpa started a little late
09:24 pczarn there are a few parser combinator libraries and even a LALR parser in Rust
09:41 pczarn and this rewrite is moving along so slowly I might as well stop writing for now
12:43 koo7 joined #marpa
13:00 pczarn joined #marpa
13:05 djns hi
13:19 pczarn hi
16:11 idiosyncrat joined #marpa
16:16 idiosyncrat rns, ronsavage: Do you think MarpaX::Languages::Lua::Parser is ready to announce on the Lua mailing list?
17:22 pczarn joined #marpa
17:54 lwa joined #marpa
17:59 mvuets hi!
18:15 idiosyncrat joined #marpa
18:16 idiosyncrat This article "Have a theory" from Aria's twitter feed -- http://whilefalse.blogspot.com/2015/07/have-theory.html
18:16 idiosyncrat I mention it here because I think it's very important in programming.
18:17 idiosyncrat Always know *why* you think what you are doing will work ...
18:17 idiosyncrat or if it is an experiment, what it is that you are testing.
18:18 Aria Yes!
18:18 idiosyncrat The theory need not be right -- there's no way of guaranteeing that.
18:18 idiosyncrat But with no theory you may not realize you are wrong, and if you are wrong you certainly won't know in what way you are wrong.
18:19 idiosyncrat Have a theory -- do *not* just hack.
18:21 idiosyncrat Einstein (with his assistant Infeld) wrote a combined history of physics and scientific autobiography ...
18:21 idiosyncrat called _The Evolution of Physics_, and it repeatedly makes this point.
18:22 idiosyncrat Theory (for Einstein) is far more important than experiment ...
18:23 idiosyncrat without a theory the experiment may not get carried out and, in any case, won't be able to be interpreted.
18:24 rns joined #marpa
18:24 idiosyncrat It's an important book, much neglected, I suspect because it's message is so different from the current outlook.
18:41 rns idiosyncrat: re http://irclog.perlgeek.de/marpa/2015-07-30#i_10978829 -- can't really say no, but AFAIK, currently it can hardly offer something the Lua community doesn't already have.
18:54 idiosyncrat rns: You can always say no :-)
18:55 idiosyncrat It would alert them to our interest in Lua, and may draw their interest to Marpa.
18:55 idiosyncrat Also, I don't think they really have a good "luatidy", and the best one is, in fact, in Perl.
18:56 idiosyncrat So
18:56 idiosyncrat MarpaX::Languages::Lua::Parser may in fact fill a real need.
19:01 koo7 joined #marpa
19:01 rns Well, from what I've been reading on lua-l, they can benefit from what I'd call luafmt/luafix, a-la gofmt/gofix of Go lang -- luafmt to ensure consistent formatting/style (though they are not much into that, IFAIK, more into checking, e.g. luacheck) and luafix to apply AST-transform-based compatibility fixes between 5.1, 5.2, and 5.3.
19:02 rns So smth. like luatidy is an opportunity, yes.
19:04 rns idiosyncrat: BTW, perhaps you can take a look at https://github.com/ronsavage/MarpaX-Languages-Lua-Parser/issues/2 if/when you have time -- the example is from Lua 5.1 test suite.
19:04 mvuets after my Monday talk someone came to me and asked where did i manage to find proper documenation for Marpa
19:05 mvuets in fact documentation did seem complex to me at first too. but after constantly approaching it multiple times i realized it's actually very good
19:05 mvuets comprehensive and well written
19:06 idiosyncrat mvuets: Thank you
19:06 idiosyncrat The documentation is intended to be "expert-friendly" first, newcomer-friendly second.
19:07 idiosyncrat So if I have a choice between stating something exactly, vs. less formally, but more clear.
19:07 idiosyncrat I go the first way.
19:08 idiosyncrat These days I don't have time to do both, and my thinking is that my first priority is to make it possible for somebody who's already well-informed to understand Marpa.
19:08 idiosyncrat Hopefully, he will go out and give talks, etc., and help the others. :-)
19:09 idiosyncrat A lot of Perl docs just give a rough idea of what's going on, and leave it to the user to find out the details by experiment, etc.
19:10 idiosyncrat That may work OK for other applications, but my feeling with a tool like Marpa, you need a *precise* and full specification ...
19:10 idiosyncrat even if that means it is not an easy read.
19:14 idiosyncrat rns: re http://irclog.perlgeek.de/marpa/2015-07-30#i_10979866 -- Thanks.  I'll take a peek
19:29 mvuets re docs: on the other hand, the calculator example is a bit boring (-:
19:30 idiosyncrat mveuts: you might say it was chosen for that reason.
19:30 idiosyncrat It *is* familiar, and in doing Marpa docs, I'm desperate for anything that roots what I am saying in things the reader already knows.
19:31 idiosyncrat rns: Yes, change the precedence to match Lua's behavior, even if that conflicts with its reference manual.
19:40 idiosyncrat rns: Actually, on experiment, Lua's behavior is strange.  I've added a comment to the issue.
19:47 rns FWIW, lua's exponentiation precedence is really higher than unary minus -- lua -e 'print(-2^2)' says -4 and so does perl -M5.010 -e 'say -2**2', BTW.
19:49 rns Problem is, MarpaX-Languages-Lua-Parser parses 2^-2, but fails at chained unary minuses - -2 — in -2^- -2.
19:57 rns chained unary minuses in the exponent, that is.
20:14 idiosyncrat joined #marpa
20:16 idiosyncrat Actually, the precedence seems to be a difference in the RHS of an exponentiation ('^') from its LHS
20:17 idiosyncrat The most elegant solution might be to make an exponent special kind of expression ...
20:17 idiosyncrat on which has its own (much smaller) precedenced statements
20:18 idiosyncrat Here is something we'd bring to Lua that will truly *add value* -- for the first time, there will be a proper BNF grammar of Lua ...
20:18 idiosyncrat and not only that that, but it will come in a form that allows them to check it ...
20:18 idiosyncrat and even experiment with revisions and extensions.
20:29 idiosyncrat Have to run errands -- AFK
22:57 ronsavage joined #marpa
22:57 ronsavage jk: Re http://irclog.perlgeek.de/marpa/2015-07-30#i_10978829. Yes, it's on CPAN, and ready to be used. And I can (presumably!) fix any issues which arise.

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