Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-11-08

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

All times shown according to UTC.

Time Nick Message
03:03 jeffreykegler joined #marpa
07:50 lwa joined #marpa
10:02 koo6 joined #marpa
15:04 pczarn joined #marpa
17:17 jeffreykegler joined #marpa
17:26 jeffreykegler Slides for the talk jluis (I assume) gave this morning at Barcelona.pm: http://workshop.barcelona.​pm/barcelona2014/talk/5822
17:27 pczarn hello
17:27 jeffreykegler They are live-streaming right now: https://www.youtube.com/watch?v=​SQmA8w6TOgU&feature=youtu.be -- I'd have watched the Marpa talk, but didn't realize they were live streaming.
17:27 jeffreykegler pczarn: hi
17:30 pczarn I have two general questions. First, what do I need to know to understand marpa? I think it's some knowledge of parsing theory and familiarity with Earley parsing
17:30 pczarn if I recall correctly
17:31 jeffreykegler You need to be able to read & write BNF
17:31 jeffreykegler IIRC correctly understanding the wikipedia article is enough.
17:31 pczarn I meant, the internal details too
17:32 jeffreykegler OMG
17:32 jeffreykegler Yes, you'd need to know Earley's -- also I have a theory paper, which is linked from our web sites.
17:33 jeffreykegler It cites sources, and another paper by Joop Leo is very important.
17:34 jeffreykegler By internal, I assume you mean understand fully how the algorithm itself actually works.
17:34 pczarn your paper from June, 2013? I have it printed out, but I definitely need some experience with Earley's to understand it
17:35 jeffreykegler Right, the first thing to do would be learn Earley's
17:35 pczarn some... well, quite a bit
17:35 jeffreykegler Have you looked at my annotated list of blog posts?
17:36 jeffreykegler "quite a bit" -- sorry, didn't follow.
17:36 pczarn ..of experience with parsing and Earley's in particular
17:37 jeffreykegler Oh, good
17:37 pczarn no, no
17:38 jeffreykegler My apologies if I assumed you didn't know much parsing theory -- most people these days don't know any parsing theory, even highly proficient programmers and sometimes even CS graduates from excellent schools.
17:40 pczarn I understand http://loup-vaillant.fr/tutori​als/earley-parsing/recogniser, but that tutorial is 'todo' atm
17:41 jeffreykegler IIRC Loup covers the stuff already in Jay Earley, and does not reach the part I took from Joop Leo.
17:42 jeffreykegler pczarn: are you good at math?
17:42 pczarn well, moderately
17:42 jeffreykegler Like reading parsing theory papers, is what I mean.
17:42 pczarn I'm really not
17:43 jeffreykegler Then you might want to treat the Marpa algorithm, at first, as a kind of "black box".
17:44 jeffreykegler If I may ask, what are your goals.  A reimplementation?  Curiousity?
17:44 pczarn first, I'd like to write bindings
17:44 jeffreykegler An application?
17:44 pczarn and perhaps a reimplementation
17:44 jeffreykegler Bindings, like to Python, etc.?
17:44 pczarn yes
17:45 jeffreykegler You can do bindings without understanding the internals, and that will give you a good context from which to move on to the internals ...
17:45 jeffreykegler is my suggestion.
17:46 jeffreykegler That way you're building on what you know, instead of diving straight into what is, even for the experts, pretty heaving going.
17:46 jeffreykegler Have you seen us talk about Kollos?
17:47 pczarn I didn't
17:47 pczarn and thank you.
17:48 jeffreykegler The trouble with bindings currently is a lot of the cool upper layer stuff is in Perl/XS, and so your binding has to duplicate that upper layer which is large ...
17:48 jeffreykegler and frankly (I wrote it) the code you'd have to clone is not the most beautiful ever seen.
17:48 jeffreykegler Kollos is Libmarpa (the core parse engine) plus a Lua layer ...
17:48 jeffreykegler which others can bind to.
17:50 koo6 and which doesnt exist
17:50 pczarn ok, I'm not sure how the engine is structured, I know there are thousands of lines of both C and Perl
17:50 jeffreykegler Kollos in the design phase. :-)
17:51 jeffreykegler Yes, I'd hoped to solve the parsing problem with a small, elegant algorithm ...
17:51 jeffreykegler that didn't happen. :-)
17:51 koo6 lol
17:52 jeffreykegler Libmarpa is larger than Lions book UNIX, and just as hard -- not tricky hardware stuff, but it's 100% mathematical coding.
17:54 koo6 this is my first venture into parsing, and the libmarpa api makes perfect sense so far
17:54 pczarn my Lua is rusty, but I used to be quite good at it and its C API, FWIW
17:54 jeffreykegler pczarn: by the way, koo6 apparently has done a Python blnding
17:55 koo6 yeah, im meddling with it
17:55 jeffreykegler pczarn: That means you're probably better at Lua coding than I am.  But don't tell anyone. :-)
17:57 pczarn I'll have a look, koo6
17:59 koo6 theres not much there
18:00 koo6 and not very good:)
18:03 koo6 and, i dont yet know what im missing in the perl layers
18:03 pczarn jeffreykegler: another question: would it be possible to efficiently call out to a recursive descent parser? I'm not sure if it would be efficient to clone instances of that recursive descent parser, or start parsing at some arbitrary point
18:04 koo6 except lexing, i now see im missing that:)
18:05 jeffreykegler pczarn: yes, depending on what you mean by efficiency, and at what level you would implement (C/Libmarpa vs. Perl/Marpa::R2)
18:06 jeffreykegler koo6: my suggestion: start with hand lexers, or lexers found elsewhere -- just a do standard lexing interface.
18:07 jeffreykegler pczarn: it is possible to stop and resume Marpa parsing, and during the pauses you can feed Marpa lexemes from another parser.
18:08 pczarn I mean, do I have to make that recursive descent aware of Earley items or anything?
18:08 pczarn because it's greedy
18:08 jeffreykegler pczarn: no
18:09 jeffreykegler pczarn: the recursive descent would not have to be aware that it's operating as part of Marpa, but ...
18:09 koo6 i will give it a try jeffreykegler
18:10 pczarn ouch, lost connection
18:10 jeffreykegler you can also call back to Marpa and get information about the parse -- what rules are complete, what tokens are expected next, etc., so that you can make your recursive descent "smart" using the information Marpa has.
18:12 jeffreykegler The only thing you can't ask Marpa to do is backtrack -- if your recursive descent decides to back up, you won't be able to back up past where the recdescent logic kicked in.
18:12 pczarn my use case is macros by example for a language
18:12 jeffreykegler Btw, I think you'll find much better ways to do this than RecDescent, but I make it a practice to try to answer questions as asked.
18:13 pczarn joined #marpa
18:14 jeffreykegler pczarn: (I assume you're backlogging) -- there are too many forums out there where you ask a question and you get back some lecture about why you should not have asked that question, and should be asking some other.
18:15 pczarn sure, in this case, it's not my choice what is used in a project
18:16 jeffreykegler pczarn: there is also that.  We don't always get to choose our tools or even our methods -- sometimes they come with the environment.
18:16 jeffreykegler AFK for a few minutes -- I will backlog
19:03 pczarn (I really like Lua. I might have forgotten almost everything I hated about Lua, though)
19:14 jeffreykegler joined #marpa
21:22 ronsavage joined #marpa

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