Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-08-01

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

All times shown according to UTC.

Time Nick Message
00:18 ronsavage joined #marpa
00:22 ronsavage ceridwen: Re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10984657. Thanx!
00:39 ronsavage pzcarn: Re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10983372. Thanx. It's now Q28 in the Marpa Paper's FAQ (Chapter 3), under Papers on Parsing Theory:
00:39 ronsavage http://savage.net.au/Perl-modules​/html/marpa.papers/chapter3.html
03:09 ceridwen Hi, I'm catching up with the backlog.  Re: http://irclog.perlgeek.de/​marpa/2014-10-17#i_9522653  Can you explain in a bit more detail about the difference between bit vectors and arrays here?
05:24 jeffreykegler joined #marpa
05:26 jeffreykegler cerudweb: The backlog link you reference sends me to a passage with no reference to arrays vs. bit vectors, that I can find.
06:12 jeffreykegler ceridwen: Sorry about the name.  Screwy keyboard.
07:54 lwa joined #marpa
10:06 pczarn joined #marpa
10:08 pczarn everyone interested in pretty printing should see https://github.com/google/yapf
10:15 rns jeffreykegler: re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10986889 -- this one perhaps -- http://irclog.perlgeek.de/​marpa/2014-12-01#i_9742942
10:17 pczarn "Each formatting decision has a cost associated with it." And they search for a path with a minimal cost
10:38 jdurand joined #marpa
10:39 rns pczarn: yapg looks interesting, esp. modifiable styles.
10:39 rns s/yapg/yapf/
10:41 jdurand Re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10986847 - this grammar is very probably only for pure ANSI C - good in theory, usable on so many pieces of code nowadays
10:44 jdurand and it is cleary outdated v.s. latest ISO-C. I suggest you search for ISO-C 2011 standard. Or you can take my grammar at https://github.com/jddurand/MarpaX-Lang​uages-C-AST/blob/master/lib/MarpaX/Lang​uages/C/AST/Grammar/ISO_ANSI_C_2011.pm and remove the MSVS + GCC extensions
10:45 jdurand Re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10982360 - I had in mind a generic layer on topr of Marpa using Grammar::Formal -;
10:46 jdurand Coming back on C grammar, it contains knows holes that you will maybe discover while testing...
10:49 jdurand Re http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10986909 - thx Jeffrey, but nowadays I am much more tired than before + family constraints always win...
10:50 jdurand (I meant "unusable" in my first phrase - sorry)
11:02 jdurand joined #marpa
11:03 jdurand Re http://irclog.perlgeek.de/​marpa/2014-10-17#i_9522660 - yes, I was thinking to ASF to implement a user-level "exclusion" in Marpa's BNF - as in EBNF. I mean: X = Y - [character-class] for example. Not sure this would work with rules instead of [character-class], but ahem why not
11:15 rns jddurand: my take on exclusion was to set up a 'before' event on <not X> lexeme, form a lexeme that would be a negation of X (e.g. negate the character class), and then lexeme_read() it.
11:19 rns this would require checking if the input actually matches <not X> of course.
11:37 koo7 joined #marpa
11:40 rns Also, SLIF allows negated character classes, so using events for it would probably be overkill.
11:49 jdurand joined #marpa
11:50 jdurand rns: for character-classes yes, this can probably work
12:43 rns jdurand: I wonder what is the semantics of negation for non-lexemes: - <X> == any grammar symbol but <X>?
12:47 koo7 joined #marpa
12:52 rns jeffreykegler, ronsavage -- lua-l thread: http://lua.2524044.n2.nabble.com/Lua-parse​r-enhancement-request-td7668853.html#none -- looks like the lua community would benefit from an extensible lua parser.
12:59 ceridwen jeffreykegler, ronsavage: Oh, oops, somehow the wrong link copied.  Here's the right one, on bit vectors and arrays: http://irclog.perlgeek.de/m​arpa/2015-07-31#i_10982533
13:06 rns ceridwen: re http://irclog.perlgeek.de/m​arpa/2015-08-01#i_10989076 -- my point was that bit vectors can be used to implement transitive closure, which can be used for predictions/completions in Earley parsing more efficiently than javascript arrays in purmou's case.
14:03 pczarn joined #marpa
15:53 djns joined #marpa
15:55 djns joined #marpa
16:19 ceridwen Some general comments: I've been doing some reading on pretty printing problem, I can't say I'm particularly deep into it yet but there are some ideas that ought to make it possible to unparse using similar approaches to parsing.  In general, most programming languages (distinct from binary formats) are not one-to-one, so a pretty-printer will produce a highly-ambiguous SPPF without additional disambiguation restrictions.
16:20 ceridwen Likewise, I have some papers on error reporting if anyone is curious, though most of my research has focused on Richter's non-correcting error reporting because that's what I want to implement.
16:21 ceridwen rns, Can you explain a bit more about what transitive closure means in this context and how bit vectors are more efficient than JS arrays?
16:23 ceridwen Does anyone know if there's been anything done on persistent/immutable SPPFs or GSSes?  I've been trying to figure out how best to implement cycles in SPPFs lately with immutable linked lists.
17:18 koo7 joined #marpa
18:22 rns ceridwen: Earley parsing needs prediction matrix, AFAIKT purmou used JS arrays to implement it, while Aria used bit-vectors, see https://github.com/aredridel/lo​tsawa/blob/master/index.js#L36 and below. I think that the latter is more efficient.
18:25 mvuets joined #marpa
18:41 purmou joined #marpa
18:45 purmou re http://irclog.perlgeek.de/m​arpa/2015-08-01#i_10988913 - I will definitely use this grammar instead of the one I had in mind! thanks for the link!
18:47 purmou re http://irclog.perlgeek.de/m​arpa/2015-08-01#i_10989626 - I can't even wrap my head around how a bit vector would work here. like I said, first time writing a parser...just had to google "lexeme," heh
18:48 purmou rns: I did have to write an implementation of a set in JS. ECMAScript 6 has a Set object, so I might reimplement it in es6
18:51 rns Aria wrote bitmv -- https://github.com/aredridel/bitmv -- JS lib for bitvector operations, you might find it useful.
18:56 rns Or, perhaps, just read her code (it's rather clear and well-commented) and, perhaps, contribute instead of rolling your own. Entirely up to you, obviously, just wanted to point to an opportunity.
19:01 ernimril for my prediction set I use shared sets (since they never change). I think that uses less memory than the somewhat large bit sets I would need for my work (many tokens, many rules)
19:03 purmou I'm not totally getting how it works...does an index in the bit array correspond to a rule in the grammar? =/
19:04 pczarn joined #marpa
19:05 purmou rns: is this the one you're talking about? https://github.com/aredridel/​lotsawa/blob/master/index.js
19:06 rns purmou: yes, that's the parser.
20:07 jeffreykegler joined #marpa
20:08 jeffreykegler rns: As if on cue, from the lua-l list
20:08 jeffreykegler "It is my hope that one day I will have new (alternative) parser /
20:08 jeffreykegler compiler infrastructure for Lua that generates ASTs and allows all
20:08 jeffreykegler kinds of tooling & optimizations."
20:08 jeffreykegler "Lua's existing parser is designed
20:08 jeffreykegler for speed and memory efficiency - so it is harder to extend it."
20:09 jeffreykegler "In
20:09 jeffreykegler fact I have not yet seen an independently implemented parser / byte
20:09 jeffreykegler code generator for Lua - everyone seems to just port and enhance the
20:09 jeffreykegler official versions."
20:09 jeffreykegler rns: If you are not ready to announce-announce, one of us should definitely pre-announce in the next 24 hours, don't you think?
21:14 koo7 joined #marpa
21:51 Aria jeffreykegler: I don't recall seeing a paper on indentation languages. Perhaps!
21:53 jeffreykegler Aria: rns caught this one earlier -- http://michaeldadams.org/papers/​layout_parsing/LayoutParsing.pdf
21:57 Aria Collected!
23:15 ronsavage joined #marpa

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