Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-11-25

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

All times shown according to UTC.

Time Nick Message
01:19 koo5 joined #marpa
01:27 flaviu joined #marpa
01:39 jeffreykegler joined #marpa
02:21 ronsavage joined #marpa
05:02 ronsavage Anybody know of a grammar for PDF?
06:16 rns joined #marpa
06:18 rns ronsavage: re http://irclog.perlgeek.de/​marpa/2014-11-25#i_9715747 — Short answer is there is none.
06:19 rns Longer answer — https://github.com/dwarring/perl6-PDF-Grammar/ partially implements PDF, and at at http://stackoverflow.com/questions/1101​6192/grammar-of-pdf-1-7-bnf-or-variant
06:21 rns they say that it can appear in PDF 2.0. Overall, seems to be the same case as with commonmark, to an extent — people think no parser could handle such a grammar because it's too context-sensitive and thus see no need to write it.
06:28 ronsavage rns: Oh. Thanx.
08:39 lwa joined #marpa
10:54 koo5 joined #marpa
14:28 koo5 joined #marpa
14:33 sivoais hmm, a PDF stream parser would be useful indeed
14:40 sivoais There was a posting on the Ometa mailing list just a week ago about using Ometa to create a PDF parser. <https://twitter.com/joshmarina​cci/status/516819647187144704>
14:41 sivoais ah, here we are <http://mailman.vpri.org/pipermail/ometa_m​ailman.vpri.org/2014-November/000010.html>
14:41 sivoais there was also talk about Marpa in that thread <http://mailman.vpri.org/pipermail/ometa_m​ailman.vpri.org/2014-November/000009.html>
15:24 koo5 joined #marpa
16:19 koo5 joined #marpa
17:00 koo5 joined #marpa
17:23 koo5 joined #marpa
17:44 sivoais This is interesting: "Running Ometa Parsers Backwards for Source to Source Translation" <http://www.vpri.org/pdf/m2008001_parseback.pdf>
19:05 lwa joined #marpa
20:20 ronsavage sivoais: Thanx! And looks like someone may be re-inventing Marpa: http://mailman.vpri.org/pipermail/ometa_m​ailman.vpri.org/2014-November/000001.html
20:59 jeffreykegler joined #marpa
21:07 koo5 joined #marpa
21:08 sivoais hehe :-)
21:09 sivoais I might try my hand at that PDF parser. I am sadly familiar with the spec. :-P
21:09 jeffreykegler ronsavage: re http://irclog.perlgeek.de/​marpa/2014-11-25#i_9719775 -- thanks for letting me know about this.
21:09 jeffreykegler I've seen Loup tutorials & postings.
21:10 jeffreykegler He does seem unaware that you can mix procedural logic with Marpa.
21:10 jeffreykegler ... although he does know about Marpa
21:15 ronsavage Yes, I'd seen the name before, but he's clearly determined not to join us :-(
21:16 jeffreykegler I don't read it as necessarily that way.  Folks getting into the territory often like to play with the ideas on their own.
21:17 ronsavage sivoais: The reason I ask s that yester day (it's 8:20 am here now) the question of scraping PDFs (as a means of importing data - obviously) came up in a meeting. But I won't hold you to it.
21:17 ronsavage 's' -> 'is'
21:17 jeffreykegler It is a huge help, I know from experience, before reading someone's approach, to try to solve the same problem even if you fail.
21:18 ronsavage Sure - studying ideas and code can be a marvellous help. I often have to do it myself, but there comes a point where adopting code rather than reinventing it is the major decision.
21:18 jeffreykegler By the way, he mentions a Roberts 2009 paper: "Earley Parsing for Context Sensitive Grammars"
21:19 jeffreykegler I know for example, that while I had glanced at the G&J account of Joop Leo's work, it was not until tried on my own to tackle the problem that Joop tackled ...
21:19 ronsavage And suddenly it's complex, because if you have a history of not trusting people (e.g. after childhood trauma) you will inevitably reinvent code. That's a famous 'Design Pattern', of the worst sort.
21:20 jeffreykegler That I went back to G&J, read about Joop's work and then contacted him.
21:20 ronsavage Ahh. And how did he respond?
21:20 jeffreykegler He sent me a copy, which leads to another point ....
21:20 jeffreykegler I don't know how to get the Roberts paper.
21:20 ronsavage A copy of his paper I assume?
21:21 ronsavage Searches fail?
21:21 jeffreykegler Yes, and we've been in regular contact since.
21:21 ronsavage I delighted to hear he's on-side.
21:21 jeffreykegler Joop, btw, is now a philosopher, and has forgotten much of his previous work.
21:21 ronsavage Gee - how old would he be, guessing?
21:22 ronsavage Perhaps he sees you as taking over from him. Some people are happy with that, and some take it as a threat.
21:23 jeffreykegler Joop is still an academic, and I am promoting his previous work, so I believe he's quite happy with what he's doing.
21:23 jeffreykegler Btw, at this point, I've heard from a number of people in the field, sometimes in private communications,
21:23 sivoais hmmm, and Earley is now a psychologist... What's going on?  :-P
21:23 jeffreykegler and they are invariably cordial, even when we can be seen as competitors.
21:24 ronsavage OK. AFK.
21:25 jeffreykegler And there's a guy who published on lexing named Eric Schmidt, who also went on to do something else, I believe.
21:25 jeffreykegler Anyway, back to the Roberts paper ...
21:25 jeffreykegler https://github.com/dannyroberts/earley-csg
21:26 jeffreykegler ... are the examples from his paper.  Glancing, I think they could all be implemented in Marpa.
22:07 flaviu joined #marpa
23:20 jeffreykegler Folks had asked for resources to help the notation-averse to learn Leo's 1991 algorithm:
23:20 jeffreykegler https://github.com/jeffreykegler​/kollos/blob/master/misc/leo.md
23:33 ronsavage joined #marpa
23:37 ronsavage It's good to see resources are available.
23:38 jeffreykegler Yes, I don't know if they'll be enough to really help notation-averse folks learn Leo's 1991, but you never know if you don't try.
23:45 jeffreykegler daxim: [ and anybody else who cares ]
23:46 jeffreykegler I looked up the data structures I used for the Earley sets.
23:46 jeffreykegler An Earley set starts in a dynamic array, which I call the "work area".
23:47 jeffreykegler The actual Earley items live in an obstack, which is a GNU-invented storage allocation area, very, very fast and cheap.
23:48 jeffreykegler The dynamic array just stores pointers.
23:49 jeffreykegler Once the Earley set is complete, an index to it, by postdot symbol is created.  It's also at this point the Leo items are created, and they live in the same index.  The index is an array of linked lists, with pointers to the Earley items in the linked lists.
23:50 jeffreykegler Once the index is ready, the dynamic array "work area" is cleared, and can be re-used to build the next Earley set.
23:52 jeffreykegler The index by postdot symbols in also created in its own work area, but once complete it is copied to a fixed size array, which again lives on the obstack.
23:57 jeffreykegler Also, at the point where the number of Earley items in an Earley set is first known, the "Earley item work area", is copied over into a fixed length array.
23:57 jeffreykegler Again, only pointers are kept in these arrays, the actual Earley items live on the obstack.
23:58 jeffreykegler The fixed length array where the pointers to the Earley items end up also lives on the obstack.

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