Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-05-03

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

All times shown according to UTC.

Time Nick Message
01:34 jeffreykegler joined #marpa
01:36 jeffreykegler lwa: re http://irclog.perlgeek.de/m​arpa/2015-05-02#i_10537778
01:37 jeffreykegler Reading https://metacpan.org/pod/Marpa::R​2::Scanless::R#semantics_package ,
01:37 jeffreykegler https://metacpan.org/pod/Marpa::R2::​Semantics#The-per-parse-constructor and
01:37 jeffreykegler https://metacpan.org/pod/Marpa::R2​::Semantics#The-semantics-package
01:39 jeffreykegler It's looks like your object's new() constructor is invoked because your object sets the semantics package, and by default your object sets the semantics package.
01:40 jeffreykegler Explicity setting the semantics package with a named argument overrides this, and you can pick a semantics package without a new() constructor.
01:41 jeffreykegler This also changes where Marpa looks for the semantics.
01:41 jeffreykegler Caveat -- this is from reading the docs -- I haven't tested.
01:48 ilbot3 joined #marpa
01:48 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
02:02 ronsavage joined #marpa
02:26 ronsavage joined #marpa
02:46 jeffreykegler Reading closely, I think the behavior you describe differs from that in the docs, which I read as saying that if you specify an argument to $recce->value, that should be the per-parse argument.
02:46 jeffreykegler In which case this would be a bug.
02:48 * jeffreykegler intends the above two lines to continue his response to lwa's http://irclog.perlgeek.de/m​arpa/2015-05-02#i_10537778 -- the bot omitted them from the log and Jeffrey had to re-enter them
02:56 jeffreykegler I've just re-read Leo's 1991 and it is a *difficult* paper.  Among the obstacles to the modern reader, the algorithm is presented in ALGOL.
03:00 jeffreykegler The central logic uses a recursive subroutine whose results are passed back, in part, as side effects to global variables.  I still have trouble following how Joop's original lazy implementation was supposed to work from the ALGOL.
03:07 jeffreykegler Joop's original version was "lazy" in the sense that he only added the memoizations for right-recursion when they were needed.
03:08 jeffreykegler Marpa's version is "eager" -- the memoizations needed to shorten right recursion are added without waiting to see if they will be used.
03:08 ceridwen I forgot to mention earlier, but thanks for the link to the python CFFI libmarpa bindings, that's where I was thinking of starting anyways if that's the direction I decide to go.
03:09 jeffreykegler "python CFFI libmarpa bindings" was that me?
03:10 jeffreykegler If so, you're quite welcome. :-)
03:10 ceridwen rns, I think :).  But thanks for your help, too.
05:33 ronsavage joined #marpa
06:23 rns A question to the channel: SLIF supports literals and symbols as sequence separators, but the new Kollos interface (LUIF) would potentially add support separators which can be a character class or even a very large nested structure.
06:23 rns Will such support be useful? The opinions are appreciated.
07:22 jeffreykegler rns is asking the above question on this channel at my request -- it's a request for comment on the design of Kollos -- in this case, a specific issue.
07:23 jeffreykegler Marpa::R2 is quite restricted in what it allows as a separator, and will stay that way.  With Kollos, we can reopen the question however.
07:25 jeffreykegler IMHO using anything but what is allowed in Marpa::R2 is probably shooting yourself in the foot, but perhaps that is best decided by the user for herself.
08:34 lwa joined #marpa
11:33 lwa re: http://irclog.perlgeek.de/m​arpa/2015-05-03#i_10538283 – in case this $recce->value($object) behaviour is a bug, I filed slightly ranty writeup as a GH issue, so that more thorough discussion can take place: https://github.com/jeffreyk​egler/Marpa--R2/issues/254 . Does anyone have any thoughts regarding this?
11:49 lwa rns: re http://irclog.perlgeek.de/m​arpa/2015-05-03#i_10538441 – if the separator can be any symbol, allowing arbitrary rule expressions for the separator would only be a purely syntactic change, provided that some rule name for the separator can be gensym'd. That should be possible.
11:50 lwa I would have use for such a feature and it would make Marpa conceptually simpler, but it's not something I strictly need. Since it's safe to add later, I would omit non-symbol separators from a minimum viable first LUIF release.
11:52 rns lwa: thanks for your opinion, point taken.
11:53 rns re http://irclog.perlgeek.de/m​arpa/2015-05-03#i_10538994 -- the problem looks specific to recce->value()?
11:54 rns I saw cases e.g. http://savage.net.au/Perl-modules/h​tml/marpa.papers/chapter3.html#q23 when Moo and in the recent Jean-Damien's M4 module, Moops is used ok with recce constructor.
11:57 rns On a related nore, Jeffrey's job can be made simpler by suppying a separate runnable test case showing the problem, which BTW you nearly did in the issue text, but a separate gist could be useful, I think.
11:59 rns s/nore/note/
13:45 hobbs joined #marpa
14:29 ceridwen rns, I use character classes as separators sometimes, usually in parsing formats intended to be read by humans, not computers.
14:32 rns ceridwen: thanks, duly noted.
14:35 ceridwen (Bibliographic citations come to mind, for instance.)
14:48 rns Yes. With charclasses (and perhaps regexes) used as separators, sequence rules will work like perl's split() function (libmarpa keeps separators by default).
15:27 jeffreykegler joined #marpa
15:28 jeffreykegler Re sepators, another question is whether to allow them to be nullable.
15:29 jeffreykegler That is, items in a sequence cannot be nullable, because the point of sequences is counting the items it contains, and someone asking for a count of things that where the count includes empty strings
15:30 jeffreykegler is not thinking straight.  (If it's really what they want they can use BNF rules, and specify precisely what they *do* mean.)
15:31 jeffreykegler But nulling separators, while they have a similar potential for trouble, would allow a separator to be optional, which is something that is done a lot in languages.
15:32 jeffreykegler Marpa::R2 bans nulling separators, and that won't change.  But the question is open in the case of Kollos.
15:34 jeffreykegler lwa: re http://irclog.perlgeek.de/m​arpa/2015-05-03#i_10539023 -- in coding, it's almost more effort to restrict the separators than to let them be anything.  So there is really no "add it later", it'd be closer to "substract the restriction later".
15:35 jeffreykegler The difference in coding effort is in any case so small I believe it's not a factor.
15:36 jeffreykegler As for adding restrictions later, Kollos will start out alpha and experimental.  We will, if we think it improves the design, disallow something that was already working.
15:37 jeffreykegler At some point, Kollos will change and backward-compatibility will become a concern.  But that day is not close.
15:51 hobbs joined #marpa
22:55 ronsavage joined #marpa
23:03 ronsavage Re http://irclog.perlgeek.de/m​arpa/2015-05-03#i_10538440. There have been times when I wanted to specify [,;] as a separator, specifically for parsing the DOT language, so I see this increased flexibility as advantageous in some cases. And yes, dangerous in some cases, too.

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