Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-02-25

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

All times shown according to UTC.

Time Nick Message
01:42 Idiosyncrat joined #marpa
01:44 Idiosyncrat I'll probably ask this question again when it comes closer to the time but, re the Marpa book ...
01:44 Idiosyncrat When I've finished the theory and am about to start on the pseudo-code, I have a choice ...
01:45 Idiosyncrat I can stop, re-check my stuff so far (about 60% of it by page count), and create an interim version with the theory "stable" and the pseudo-code and later stuff still in "early draft" ...
01:45 Idiosyncrat or I can just forge ahead into the pseudo-code.
01:46 Idiosyncrat The pseudo-code section will be the part of most interest to the most people, and moving straight into it makes it come out faster.
01:47 Idiosyncrat But moving straight into the pseudo-code means all the theory stuff does not get a pre-release before the pseudo-code is ready.
01:49 Idiosyncrat If I don't hear from folks interested in an early look at the theory, I will assume (by default) that folks want me to forge straight ahead into the pseudo-code.
02:32 ronsavage joined #marpa
03:47 idiosyncrat_ joined #marpa
03:49 idiosyncrat_ Re doing math in HTML, the very ambitious Stacks Project is interesting -- http://stacks.math.columbia.edu/
03:50 idiosyncrat_ It's a web site, and also available as LaTeX and PDF.  It's the product of a team, and not all that well documented AFAICT, though what's online is impressive.
03:50 ronsavage JK: Just curious. I assume the book will have many diagrams, but will your current authoring tool be able to produce all diagrams, or do you need to use external software?
04:17 idiosyncrat_ Actually just 2 figures so far, and no plans for more.  I use LaTeX's tikz package, which is full featured, and fairly useable for a TeX package.
04:18 idiosyncrat_ I'll put an PDF on-line, and I expect that to be "self-contained" -- any PDF viewer will show the figures.
04:20 idiosyncrat_ I had planned no figurs, but I found I couldn't keep track of the relationships between Earley items and Leo memos myself, unless I drew them ...
04:20 idiosyncrat_ s/figurs/figures/
05:32 ronsavage joined #marpa
06:19 ronsavage OK. Thanx.
07:32 Idiosyncrat joined #marpa
07:35 Idiosyncrat good night!
09:01 koo7 joined #marpa
11:47 kaare_ joined #marpa
17:08 Idiosyncrat joined #marpa
17:09 Cheery Idiosyncrat: how's the paper?
17:09 Idiosyncrat Coming along well but slowly.
17:12 Cheery ok. :) I hope you've got stuff going well. If not, I would gladly expend few hours to help you out anytime.
17:21 Idiosyncrat Thanks so much!
17:22 Idiosyncrat What folks can do for Marpa is to use it for something, and publicize that fact.
17:23 Idiosyncrat As we saw in the recent ycombinator discussion, large blocks of users still live in a world where "parsing has to be hard"
17:24 Cheery https://github.com/cheery/chartparser#origins
17:25 Cheery the first project where I really used that though: https://github.com/cheery/vkstruct
17:25 Idiosyncrat Cool.
17:27 Cheery and lever will have a chartparser module too
17:31 Cheery oh and on lever itself.. there's maybe something cool you'd like to see.
17:32 Cheery wondering if I could get history of one single file with github..
17:34 Cheery https://github.com/cheery/lever/commit/​20c55c2a93539c566b46d144aa0d45f3ef502e0​6#diff-5d9ef31e64bb8e8924cfb913b9827a46
17:34 Cheery https://github.com/cheery/lever/commit/​ba37a9fa044427dc4b957bf5438a4c4ca780531​8#diff-5d9ef31e64bb8e8924cfb913b9827a46
17:34 Cheery https://github.com/cheery/lever/commit/​5628f3c13d3816204228efc18098186f5bf0893​8#diff-5d9ef31e64bb8e8924cfb913b9827a46
17:35 pczarn joined #marpa
17:36 pczarn Idiosyncrat: Are you getting any new insights into the implementation from theoretical work?
17:36 pczarn When will be the right time to bikeshed about terminology?
17:36 Idiosyncrat yes
17:37 Idiosyncrat yes -- i am getting new insights
17:37 Idiosyncrat pczarn: do you mean the terminology in the paper?
17:37 pczarn yes
17:38 Idiosyncrat While folks are free to criticize and suggest ...
17:38 Idiosyncrat at this point the terminology is pretty much set, in the sense I'd be unlikely to change it.
17:40 Idiosyncrat In working on the paper, I see how terms work out, so that for every term I often used several alternatives and failed.
17:40 Idiosyncrat Which means that with the ones I've decided on, I am in no hurry to change.
17:41 Idiosyncrat But no doubt there will be lots of things in the "final" version of the paper than can and should be changed.
17:42 Idiosyncrat Lots of mistakes will remain.
17:42 Idiosyncrat And in many cases there will be ways to improve the wording and presentation.
17:43 Cheery I've start to see that lever pivots on the idea that it's not complete at any point.
17:44 pczarn I see the bocage isn't mentioned in the paper
17:45 pczarn anyway, I tried a few alternative terms for glade and symch
17:45 pczarn Finally settled on sum node and product node
17:47 Cheery that's perhaps one outcome of the mobility
17:49 pczarn Cheery: what does NNF stand for?
17:49 Cheery nihilistic normal form
17:50 Cheery it's from the paper that eliminates null rules from the grammar.
17:51 Cheery interesting thing.. not generating null rules during parsing actually extends the meaning of grammar.
17:52 Idiosyncrat re + and * vs. glade and symch -- that is an interesting idea.
17:53 Cheery you got some special handling for "more than one" and "zero or more" ?
17:53 pczarn also, I think "*" on two grammars would concatenate their start symbols to create a new grammar
17:54 Idiosyncrat Cheery: just so readers of this are clear, the null rules should be in the external grammar -- it's just that an rewrite eliminates them ...
17:54 pczarn Cheery: the idea is that the number of trees in a forest is multiplied by concatenation and summed by alternative
17:54 Idiosyncrat so that the parse engine does not have to deal with them ...
17:54 Idiosyncrat and another rewrite adds them back afterwards.
17:54 Cheery yeah. I got a way to create that rewrite too.
17:55 Idiosyncrat Cheery: I thought you did ...
17:55 Idiosyncrat but wanted to add context for others
17:56 pczarn I don't see the need to undo any rewrites, even for tracing
17:57 pczarn well, not in the recognizer -- just like binarization can be done in the bocage if necessary
17:58 Idiosyncrat pczarn: in the external grammar, null rules and symbols can be essential.
17:59 pczarn null rules aren't essential for parsing though.
18:00 Cheery I find it's nice to let user decide how he interprets null
18:01 Cheery so you talk about this in terms of internal and external grammars..
18:01 pczarn yes, I'll do that in the high-level layer
18:01 Cheery external grammar can have situation where null production can cause other rule to be null also.
18:01 Cheery but the author may not have thought about that situation, or doesn't want to.
18:02 Cheery if there's no null-ambiguity, rewriting back the null rules may make sense, so the user doesn't have to care.
18:04 Cheery but if there's null ambiguity present, letting the user decide what goes to the blanks will actually let him to extend the meaning of grammar.
18:04 Idiosyncrat Cheery: from Aycock&Horspool I took the idea of rewriting out "null-ambiguity" -- proper nullables
18:05 Idiosyncrat so that Marpa::R2 already does that rewrite.
18:05 Idiosyncrat Re the handling of null subtrees, where null rules make other rules null ...
18:06 Idiosyncrat for that the Marpa project claims an innovation:
18:06 Idiosyncrat After agonizing how to handle these, especially in terms of the semantics ...
18:07 Idiosyncrat I settled on simply pruning the trees back to their topmost nulling node and ignoring the null descendant nodes ...
18:07 Idiosyncrat Simple as this is, it turns out the users have no problem with this ...
18:07 Idiosyncrat Marpa has does things this way for a long time, and I have *never* had anybody confused about or unhappy with this solution.
18:08 Idiosyncrat Most don't even notice it's being done (though it is in the docs)
18:09 Idiosyncrat So in Marpa a nulled subtree has the semantics of its topmost nulled node -- do that and the users will be happy is our experience.
18:09 pczarn A parser generator could inline semantics of null rules without performance loss.
18:10 pczarn But it's not a big deal as you said
18:10 Idiosyncrat pczarn: yes
18:11 Cheery there's been the first days when I've actually preferred lever over python for technical reasons.
18:11 Idiosyncrat and in fact Marpa::R2's events can be defined in terms of null symbols -- this has to be translated into internal grammar terms ...
18:11 Idiosyncrat and back again for every event, and that is fast and works just fine.
18:12 Cheery compared to python lever's pretty much like shreds of partially implemented stuff.
18:12 Idiosyncrat Is lever a Python extension
18:12 Idiosyncrat ?
18:12 Cheery nope. It's a new language implemented in pypy's rpython
18:14 Cheery I think lever does module/resource handling and C FFI better than python
18:14 Cheery I got idiom: dir ++ "filename"
18:14 Cheery that lets module access anything relative or bundled along the module itself
18:15 Cheery I also have a concept I call "module scoping"
18:16 Cheery every module isn't cached in same scope, rather. there's a chain of module caches
18:16 Cheery I can create and invalidate items in such scopes.
18:17 Cheery on FFI I gain because the lever itself is non-established and its FFI can be upgraded for usecases I spot.
18:17 pczarn Cheery: do you have item privacy?
18:18 Cheery I did thought about it. I ended up to drop them for now.
18:23 Cheery or do you mean something else than class private / public -declarations?
18:23 Cheery the problem in that concept for dynamic language is that you can't easily tell between observers
18:24 Cheery and possibly do not want to.
18:24 Cheery oh and today I'm possibly implementing yet another feature that makes me to prefer lever over python.
18:25 Cheery in python I get TypeError if object does not support some method of interaction
18:25 Cheery but say.. AttributeError otherwise.
18:26 Cheery in lever I've thought to associate exceptions with actions
18:26 Cheery so getattr will always return AttributeError if it fails.
18:27 pczarn ah, I forgot how languages work without compilation
18:27 Cheery getitem will always return KeyError
18:27 Cheery etc.
18:28 Cheery complex behavior in exceptions, I think it will actually make them harder to use right.
21:32 koo7 joined #marpa
21:38 ronsavage joined #marpa

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