Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-06

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

All times shown according to UTC.

Time Nick Message
01:17 qu1j0t3 joined #marpa
01:26 jeffreykegler joined #marpa
01:27 jeffreykegler jdurand: I read the Lua/SWIG doc.  Good choice!
01:58 jeffreykegler Everybody: I've written a Kollos roadmap: https://github.com/jeffreykegler/Marpa--R2/blob/master/plans/kollos/roadmap.md
02:00 flaviu1 joined #marpa
03:39 ronsavage joined #marpa
03:41 CQ_ joined #marpa
07:22 lwa joined #marpa
07:46 lwa joined #marpa
08:17 CQ_ joined #marpa
08:22 CQ_ anyone around to answer questions? I have a problem getting actions to work... I can pastebin code.
08:22 CQ_ a plain tasktoken       ::= comment => do_list_line  ...is giving an error   Rejected lexeme #0: Lexer "L0"; '=>'; value="=>"; length = 2
08:41 rns joined #marpa
08:42 rns CQ_: you need to add *action* adverb to the rule, like this:
08:42 rns tasktoken       ::= comment action => do_list_line
08:42 CQ_ rns thanks, I got that figured out... I had an example somewhere where it worked wihtout as well.
08:43 rns That was Marpa doing his magic for you. :)
08:44 CQ_ http://blogs.perl.org/users/jeffrey_kegler/2012/08/domain-specific-languages-made-simpler.html
08:44 CQ_ that was the example I looked at
08:45 CQ_ thats the problem with magic, you never know when its magic and when it's the technology ;)
08:46 rns Oh, I see — that's 2012 and things must have changed.
08:47 rns Only for "sufficiently advanced technology", whatever that means. :)
08:48 CQ_ yep :)
08:48 rns jeffreykegler: re http://irclog.perlgeek.de/marpa/2014-10-06#i_9460977 — sounds good, can it be useful if I start doing Lua parser in Marpa::R2 SLIF?
08:49 CQ_ maybe jeffrey can update that example... he doesn't seem to be online though
08:50 rns CQ_: Well, Marpa::R2 has reference doc that's supposed to be the primary source.
08:51 rns The development was rather active before the recent feature chill with new features and changes, etc.
08:52 rns And the maintenance burden is high, AFAICS.
08:53 rns So, I'd suggest using Marpa::R2 doc as the ref and Marpa::R2 test suite for code examples. Just grep t/sl_*.t files for keywords — it helped me a lot.
08:53 CQ_ ok
08:54 CQ_ what is the state of marpa develkopment,
08:54 CQ_ development, is it still being actively worked on, or is it in a bugfix-mode for the time being, or ...
08:55 rns As for Marpa::R2, NOTICE to CONTRIBUTORS in https://github.com/jeffreykegler/Marpa--R2/tree/master pretty much nails it.
08:56 rns As for the future, it's with Lua — https://github.com/jeffreykegler/Marpa--R2/blob/master/plans/kollos/roadmap.md
09:00 rns jeffreykegler: re http://irclog.perlgeek.de/marpa/2014-10-06#i_9461836 — Lua parses assuming only basic SLIF — e.g. handling precedence without prioritized rules.
09:03 rns Overall, the roadmap looks interesting, I'll be in touch and chime in when I can.
09:05 CQ_ is it intended to be able to use MARPA from Lua, or what is the work being done there?
09:11 CQ_ rns is there an accepted way to do error handling? If I spit out the MARPA errors when reading my tasklist noone will understand... I would want to spit out line number (which I track anyway), and a human-readable error msg
09:13 rns CQ_:  I really don't know everything. Jean-Damien Durand is going to do a Lua wrapper for libmarpa using SWIG, as seen in the backlogs of this channel — http://irclog.perlgeek.de/marpa/today — which are rather helpful, I must say.
09:14 rns re http://irclog.perlgeek.de/marpa/2014-10-06#i_9461947http://stackoverflow.com/questions/25698167/does-the-marpa-parser-library-support-error-recovery esp. Jeffrey's comment.
09:21 rns CQ_: and if you're going to use events for error recovery, the event doc https://metacpan.org/pod/distribution/Marpa-R2/pod/Event.pod has been rewritten recently, with code examples.
09:24 CQ_ thanks
09:45 rns jeffreykegler: http://irclog.perlgeek.de/marpa/2014-10-06#i_9461836 — now I see that for a pass-through (no semantics) parser we don't need precedence anyway. So, it can be done with BNF (lhs :: rhs) and single-quoted strings and charclasses, which can be moved to external scanning.
09:51 rns lhs ::= rhs
09:53 rns BTW, lua has rather extensive test suites — http://www.lua.org/tests/
11:20 lwa joined #marpa
14:14 jeffreykegler joined #marpa
14:15 jeffreykegler rns: re http://irclog.perlgeek.de/marpa/2014-10-06#i_9461836 -- doing a Lua parser in Marpa::R2 would be great -- we could then translate it once the wrapper and tracer are ready.
14:19 rns joined #marpa
14:21 rns jeffreykegler: Great, I'd take it as MarpaX-Languages-Lua-AST. Am I right guessing that I'd better not to use prioritized and sequence rules and replace literals and charclases with external scanning?
14:25 jeffreykegler rns: you mean for convenience in translating to Libmarpa calls?
14:25 jeffreykegler Libmarpa understands sequence rules, so those can be used.
14:26 jeffreykegler Avoiding prioritized rules would save one translation task.
14:26 rns Yes. prioritized and sequence rules and literals and charclases will not be available at roadmap phase 3 (Lua parser), won't they?
14:27 jeffreykegler And, yes, if you don't start with an external scanner, you'd need to convert to one.
14:27 jeffreykegler rns: re http://irclog.perlgeek.de/marpa/2014-10-06#i_9463582 -- correct.
14:28 rns Lua 5.1 or 5.2? Ditto for tests — didn't yet look if/how much they are different. My guess is 5.1.
14:28 jeffreykegler Correct, that is, except for sequence rules, which are in the Libmarpa API.
14:28 jeffreykegler 5.1 so we can use the Luajit.
14:29 jeffreykegler Also, I didn't see any mention of 5.2 support in the doc for Lua/SWIG, just 5.1
14:30 jeffreykegler Apparently *a lot* of Lua tools are holding at 5.1, and do *not* plan to upgrade.  And most of the Lua user base seems to be following suit.
14:31 rns Ok, so 5.1 (and its text suite), external scanning, no prioritized rules (and thus precedence), sequences.
14:31 rns Oh sorry, sequence rules are ok.
14:32 jeffreykegler Yes, if you write your own precedence it will be easier to translate to use with the wrapper.
14:32 jeffreykegler rns: Thanks for taking this on.
14:33 rns My pleasure. Do we really need to precedence? I mean for a pass-through parser, no semantics, just serialize a parse tree?
14:33 rns i.e. need precedence
14:34 jeffreykegler I don't remember.  Lua had expressions, so I think it had precedence.
14:35 jeffreykegler IIRC correctly the BNF Lua gives ignores precedence.
14:36 jeffreykegler You'll recall I've mention the dangers of standards BNF.  With no Marpa to keep things honest, modern standards BNF usually "cuts corners".
14:37 jeffreykegler Yes, see 2.5.6 in http://www.lua.org/manual/5.1/manual.html
14:37 rns Sure. Yes, Lua BNF refers to description of precedence to another section. But what I'm getting at is that for a passthrough parser ("No semantics, just create a tree and then serialize it back into Lua code") we hardly need to handle precedence? Or do we have to?
14:38 jeffreykegler rns: Interesting point.
14:40 jeffreykegler Golng forward the BNF statement will allow actions, and I think the LUIF processing will have to "understand" the structure of the expressions in at least those.
14:41 jeffreykegler But precedence might be skip-able on a 1st pass, now that you point it out.   I'll leave this up to you.
14:41 jeffreykegler Easy enough to fix if you get it wrong. :-)
14:41 rns Well, yes, hopefully. :)
15:31 rns jeffreykegler: started at https://github.com/rns/MarpaX-Languages-Lua-AST — any early feedback is appreciated. Now I'm converting Lua 5.1 grammar.
15:47 rns The plan is to achieve the passing of tests which parse and serialize the Lua 5.1 test suite (http://www.inf.puc-rio.br/~roberto/lua/lua5.1-tests.tar.gz) files, then delete SLIF features going to barebone SLIF.
16:49 jeffreykegler rns: Sounds good.
16:49 jeffreykegler rns, jdurand: Thanks!
17:41 lwa joined #marpa
19:39 jdurand_ joined #marpa
19:40 flaviu1 joined #marpa
19:49 jdurand_ Jeffrey, is trigger_events() doing something else but triggering events ? Is other words, suppose that we know in advance that the grammar has no event at all (I do not talk about inactive event): would it be safe to remove the call to trigger _events ?
20:02 jeffreykegler joined #marpa
20:03 jeffreykegler jdurand: re http://irclog.perlgeek.de/marpa/2014-10-06#i_9465377 -- is trigger_events() costly?
20:07 jeffreykegler Once we've got a Lua parser in kollos we have a good comparison case for benchmark (the native Lua parser) and can really do a decent job on optimization.
20:08 jeffreykegler Right now my guess is that any optimization we could do on trigger_events() would be not be measurable.
20:23 flaviu1 joined #marpa
21:20 ronsavage Under Debian 7.6, 'aptitude search lua | wc -l' outputs 309 lines, so it's popular. I only installed lua5.1. But will that be sufficient to test MarpaX :: Languages :: Lua :: AST?
22:24 flaviu1 joined #marpa
23:33 flaviu1 joined #marpa

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