Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-01-26

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

All times shown according to UTC.

Time Nick Message
00:04 jeffreykegler joined #marpa
01:36 ronsavage joined #marpa
02:47 ilbot3 joined #marpa
02:47 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Pastebin: http://scsys.co.uk:8002/marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today
02:51 Aria Heck yes.
02:51 jeffreykegler Aria: re the Google group post on copyright assignment, I suppose
02:51 Aria Yeah.
02:52 Aria The MIT licensing, anyway. That'll only draw ire from the Free Software Must Remain Free camp. Not sure if any are present.
02:53 jeffreykegler Actually, the FSF is quite moderate wrt following community standards -- for Perl modules, for example, they suggest the standard dual Perl-5 license.
02:53 jeffreykegler Here part of the motivation is to align with the Lua community.
02:54 jeffreykegler And I already was LGPL anyway, so I've already been spotted as not being a purist
02:56 Aria Hehe, struth.
03:46 Aria Aye. I so want a paper juuuust between marpa.w's output and recce.pdf.
03:47 Aria More practical-detail inclusive than recce.pdf. But more high-level conceptual than the other.
03:47 jeffreykegler You've absorbed recce.pdf?
03:47 Aria A good portion.
03:48 Aria I keep squinting at it when terminology seems to mismatch the implementation.
03:48 Aria Things like Postdot(dr) vs PIM
03:48 jeffreykegler Which at this point is lots of places.
03:48 Aria Yeah.
03:49 Aria The restrictions of cweb and C89 aren't helping me any either.
03:49 Aria (the set of types and abbreviations is juuust bigger than I can remember)
03:50 jeffreykegler Are you more interested in the middle layer SLIF stuff, and a middle ground in Libmarpa between theory and code
03:50 jeffreykegler It's way bigger than I can remember
03:50 jeffreykegler I have to keep looking stuff up.
03:50 jeffreykegler * and a middle ground -> or a middle ground
03:51 Aria Middle ground.
03:52 Aria My goal is to get a minimal port of the marpa algorithms in pure JS.
03:52 jeffreykegler One option may be to co-author a paper.
03:52 Aria I've got bit vectors made efficient-enough to be useful.
03:52 Aria Heh. The thought has crossed my mind a bit.
03:53 jeffreykegler You'd have to do most of the drafting, but I'd correct stuff.
03:55 Aria I may just have to start writing notes and running them past you.
03:56 jeffreykegler Would this be a paper without the correctness & completeness proofs?
03:56 Aria Yeah.
03:56 Aria The recognizer paper does that quite nicely. I'm definitely more interested in the practical.
03:56 jeffreykegler Just a description of the ideas and pseudo-code?
03:56 Aria Yeah. Data structures, the 'how to make this efficient'.
03:57 Aria Things like the YS-by-PIM index are what I'm fussing with now.
03:57 jeffreykegler Right, I could help you bridge that gap.
03:58 jeffreykegler Would the format be TeX?
03:59 jeffreykegler It has to be, if we are going to be taken seriously by academics.
03:59 Aria Yeah. Though I usually write for industry. Markdown suffices so nicely so much of the time.
04:00 jeffreykegler Was that a "yes" to LaTex?  Or "no" or "maybe"?
04:01 Aria That was a maybe.
04:02 jeffreykegler We'd do this in public on Github, I take it.  So others could participate?
04:03 Aria Sounds good to me.
04:03 jeffreykegler I guess we might as well start with Markdown.
04:05 Aria I find it's easier to start there and get more complicated if needed.
04:05 jeffreykegler OK.  Next question is which version of Libmarpa.  There are 3.
04:06 jeffreykegler 1.) [ Which I am against spending more time on. ] The original LR(0) state based algorithm as described in recce.pdf.
04:07 jeffreykegler 2.) The recce.pdf algorithm without the LR(0) states, which is the present Libmarpa algorithm,
04:08 jeffreykegler 3.) My next algorithm, which is 50% smaller, because it relies on some additional grammar rewrites to simplify the grammar before the parse engine sees it.
04:09 jeffreykegler 3.) is where Kollos is going.
04:09 Aria 3.
04:10 jeffreykegler The choice is, with 3., you're a guinea pig, with 2.) you deal with a lot of devilish complications only to have your work obsolete almost as soon as it is done.
04:10 Aria I've no interest in backward compatibility, and the rewrites to simplify are a _great_ place to start -- one can work with demo grammars already in that form, so you can show off the minimal kernel.
04:10 jeffreykegler 3. is what I was hoping you would pick
04:10 Aria And my interest is always in minimal.
04:11 jeffreykegler And rns is doing a lot with 3.)
04:11 jeffreykegler He may be interested in this paper.
04:14 jeffreykegler https://github.com/jeffreykegler/kollo​s/blob/master/notes/design/rewrite.md
04:14 jeffreykegler Those are my current notes toward the rewrite.
04:15 jeffreykegler https://github.com/jeffreykegler/kollo​s/blob/master/notes/design/simplify.md
04:16 jeffreykegler That describes some of the simplifications planned for Libmarpa.
04:16 Aria Oh! Some of this is new since I looked last!
04:16 jeffreykegler That whole directory contains design stuff, very much in transition, so be careful with it.
04:17 Aria Just the kind of stuff I want.
04:17 jeffreykegler Good.
04:17 jeffreykegler So the design docs for Kollos can kind of double as your design docs.
04:18 Aria Quite. Parity and similarity are secondary goals, but things I care about.
04:18 jeffreykegler You may want to follow or watch or whatever that Github repo.
04:18 jeffreykegler Parity?
04:18 Aria Feature parity between kollos and whatever JS I write.
04:19 jeffreykegler Oh, right.
04:19 jeffreykegler For me packaging writing has just been a means of getting new algorithms out there.
04:20 jeffreykegler So what you do with feature parity and simularity is up to you and your users.
04:20 Aria Yup.
04:21 jeffreykegler Also, by their natures, a Lua-driven and a JS-driven version have different goals and target different users.
04:21 jeffreykegler It'd be a little surprising if they were 100% the same.
04:22 Aria Yeah. They're remarkably similar languages in some ways. But different too.
04:23 jeffreykegler Maybe invite rns to co-author?  I don't know if it fits his agenda/plans.  But he's delved as deeply into Libmarpa and the SLIF as anyone at this point.
04:24 Aria Certainly.
04:25 jeffreykegler I thnk perhaps keep the co-authors to that list.  I don't usually like to be exclusive, but since this is a paper, not a software project in this case I think it makes sense.
04:25 Aria Mmm. I've no care about credit -- my goal is a working parser ;-)
04:26 jeffreykegler Not like Agammenon to find your Homer and live forever?
04:26 jeffreykegler :-)
04:29 jeffreykegler So maybe start with a Github repo, where the 2 or 3 of us have commit bits.  Some appropriate CC license for docs -- the one I used for my paper.
04:29 Aria Definitely.
04:30 jeffreykegler rns backlogs and we will find out if he is interested.
04:30 jeffreykegler You could start by doing an LR(0)-less version of my recce.pdf pseudo-code, then copy in my rewrite stuff ...
04:31 jeffreykegler the result will be a total mess, but we can try to turn it into something real from there.
04:31 jeffreykegler I'll be curious to see how you do pseudo-code in Markdown.
04:34 jeffreykegler Wrt using stuff from Libmarpa, which I happen to be trying to hack up at the moment ...
04:34 jeffreykegler I'd think you can work top-down from the Kollos design docs and recce.pdf, and where you need stuff from Libmarpa, just ask me to pull it out.
04:34 Aria https://github.com/aredridel​/kollos-implementation-paper
04:39 jeffreykegler Great -- apologies in advance for the state of those design notes in my Kollos directory.
04:40 Aria Such is life!
04:40 Aria Have you dropped cweb at this point?
04:40 jeffreykegler No.
04:41 jeffreykegler Libmarpa needs CWeb because I have to mix math notes in with the code if I'm to have any chance of understanding what I was doing.
04:41 jeffreykegler And I don't know another good way to do that.
04:48 * Aria nods.
04:49 jeffreykegler CWeb is not necessary at higher levels, though, and it *is* a pain, so I've no plans to expand its use.
04:49 jeffreykegler I'll wait for the Marpa-driven literate programming system that replaces it. :-)
04:49 Aria Makes sense. I was just surprised to not see the .w file in the kollos repo
04:51 jeffreykegler I just copy enough to compile.  .w is for hacking, and you are not intended to touch the Libmarpa sources in the Kollos repo, except to copy in new revs.
04:53 Aria Ah, alright.
04:54 jeffreykegler That's for now.  How Kollos proceeds next is up in the air.  In particular, rns is doing a MetaLua replacement, which may make a good base for Kollos.
05:00 jeffreykegler Aria: re the Github repo.  Does it have to be created as a group repo to have multiple maintainers/owners?
05:00 Aria It does. But collaborators can be added to any.
05:01 Aria Can easily be moved to an org.
05:03 jeffreykegler OK.  Looks like collaborators have sufficient permissions.
05:03 Aria Yeah.
05:03 jeffreykegler Could you add me as one?
05:04 jeffreykegler And rns if he wishes.
05:04 Aria You are.
05:06 Aria So I suppose I should ask what I was intending earlier: when scanning alternatives, the PIM list is essentially a list of every rule that that alternative begins?
05:07 jeffreykegler No, not quite.
05:08 jeffreykegler It's a data structure by postdot symbol (IIRC) indexing into the Earley sets.
05:09 Aria Hm. Modified as parsing progresses? Or a lookup table built before hand?
05:09 jeffreykegler This is probably an optimization you can leave until a late phase of the paper -- or until never.
05:10 Aria Mmm. I'm actually banging on an implementation right now, but I'd made a mistake in that part of the algorithm. Was trying to refer to what you'd done.
05:10 jeffreykegler Probably not the best approach
05:10 jeffreykegler Certainly not easiest
05:11 jeffreykegler The PIM are for looking up stuff in prior Earley sets, right?
05:11 Aria Mmm. That makes sense, now, looking.
05:12 jeffreykegler That is, if I have completed an <X> starting at Earley set 42 ...
05:12 ronsavage joined #marpa
05:12 jeffreykegler I need an Earley item with postdot item <X> in Earley set 42.
05:12 jeffreykegler So I look in the data structure that indexes Earley set 42 by postdot item.
05:13 Aria Ah! Okay, that makes sense.
05:13 jeffreykegler My advice for the moment.
05:13 jeffreykegler Just don't bother with indexing -- scan the Earley set.
05:13 jeffreykegler Figure out what (if any) optimization you need later.
05:14 jeffreykegler That's the trouble with reading Libmarpa ... there are lots of optimizations that (at most) make sense when you are writing in C.
05:17 jeffreykegler I sometimes picture the Libmarpa CWeb document as Exhibit A at my insanity hearing. :-)
05:17 Aria haha.
05:20 ronsavage Are you guys going to need a Markdown to Tex converter :-)?
05:20 Aria Hehe. Maaaaybe!
05:23 Aria Do terminal symbols drive the prediction? Or just non-terminals?
05:24 jeffreykegler Predictions are of rules, although I'm not really sure that is directly responsive to your question.
05:24 Aria Heh. Yeah, not quite.
05:24 jeffreykegler Because the postdot symbol in any non-completion can be either a terminal or a non-terminal.
05:25 jeffreykegler Note btw that Libmarpa does not distinguish the two, unlike in the usual model.
05:25 Aria Yeah. I was noticing that.
05:26 jeffreykegler I was thinking of someday using that as a feature, back when I overestimated the field's capacity to run with new parsing hacks. :-)
05:26 Aria Hehe.
05:27 jeffreykegler Think for example of subgrammars, or of tricky kinds of debugging, where you "short circuit" rules.
05:27 Aria Yeah...
05:27 jeffreykegler But right now the main effect is to confuse folks.
05:28 jeffreykegler Am I getting anywhere near answering your question, btw?
05:28 Aria Close.
05:29 jeffreykegler I think the answer is both do.
05:29 Aria Right now, my demo grammar is  start ::= A; A ::= A 'a'; A ::= 'a'.  I think I've got prediction down, (though not sure), but I'm going to confirm the entries in that first early set. Confirming the last rule A::= 'a' (terminal 'a') is of course easy, since the terminal is the input.
05:30 jeffreykegler Perhaps a start to the paper is explaining to the audience a little bit of the Earley algorithm?  Or will you assume that, the way recce.pdf does?
05:30 Aria but to keep the time down, there is a shorter way than having A ::= A 'a' (that is, left-recursive) confirm that it matches by running through all the A rules, avoiding recursion?
05:30 Aria I think I'd explain it.
05:32 Aria My prediction matrix is non-terminals-over-non-terminals though.
05:32 Aria That also doesn't seem quite right.
05:32 jeffreykegler Don't really understand the question.  Is this following the recce.pdf pseudo-code?
05:32 jeffreykegler Prediction matrix?
05:34 Aria Mmm. No, this is reading into libmarpa.
05:34 Aria 513. ⟨ Initialize the prediction nsy by nsy matrix 513 ⟩ ≡
05:36 jeffreykegler Umm.
05:36 jeffreykegler How about we do this via top-down pseudo-code?
05:36 Aria Sounds good. However, I think I may have just reached my limit for a work night.
05:37 jeffreykegler Good night!
05:37 Aria Good night!
06:12 jeffreykegler Aria: I assume you are asleep, but will backlog.
06:14 jeffreykegler Marpa's logic assumes no fundamental distinction between non-terminal and terminal.  This feature has not yet seen use, but undoing it complicates the translation at the price of complicating efforts.
06:15 jeffreykegler Distinguishing between terminals and non-terminals makes life *a lot* easier if you are proving theorems.  But my experience so far in implementing is that it is unnecessary additional bookkeeping.
06:16 jeffreykegler So the NSY-by-NSY prediction matrix IMHO should include all symbols.
06:16 jeffreykegler To compute it, don't bother reading the Libmarpa code.
06:17 jeffreykegler Remember Warshall's?  Create the matrix, initialize it with all cases where one symbol directly predicts another, and then compute the transitive closure.
07:09 basiliscos joined #marpa
09:56 basiliscos joined #marpa
09:59 basiliscos joined #marpa
10:03 basiliscos joined #marpa
10:06 basiliscos joined #marpa
10:10 basiliscos joined #marpa
10:12 basiliscos1 joined #marpa
13:30 koo5 joined #marpa
14:00 lwa joined #marpa
15:41 koo5 joined #marpa
16:17 Aria Yeah. I was just realizing that that was the most direct path from what I've written.
16:18 Aria I just need to make it NSY by NSY, not rule-by-rule.
17:49 rns joined #marpa
17:52 rns jeffreykegler: re http://irclog.perlgeek.de/​marpa/2015-01-23#i_9992576 -- nope, academia.edut doesn't insisit on academic affiliation, I was able to skip this step and register as independent.
17:52 rns Here is what they have about parsing -- https://www.academia.edu/people/se​arch?utf8=%E2%9C%93&amp;q=parsing
17:55 rns jeffreykegler, Aria: re http://irclog.perlgeek.de/m​arpa/2015-01-26#i_10003929 -- looks interesting.
17:58 rns Feel like I still need to (re-)read recce.pdf some more to feel more confident though. But what I can do, I'd gladly will. :)
17:59 rns Aria: I've been writing some bindings for libmarpa recently -- https://github.com/rns/libmarpa-bindings using libffi and regarding javascript found this thing -- https://github.com/node-ffi/node-ffi
18:00 rns And this thing -- https://github.com/higgsjs/Higgs/wiki/FFI-Library
18:05 rns So, a libffi binding to libmarpa doesn't look like very difficult. Can such a lightweight binding (grammar_spec + token_spec = parser) be useful, I mean, without the almighty SLIF behind it? :)
18:12 Aria Oh neat, rns!
18:13 Aria Though I want to use this in the browser, not just node. (and node's FFI is still annoyingly unstable for a bit -- the V8 API is wack.)
18:16 koo5 joined #marpa
18:17 jeffreykegler joined #marpa
18:17 rns Aria: Thanks for enlighening me (I'm very newbie on js).
18:17 rns And Higgsjs looked somehow better -- https://tach4n.wordpress.com/2013/​09/19/higgs-ffi-calling-c-from-js/
18:17 Aria Yeah. Node's will improve. Just not a place that has been stable yet.
18:18 Aria But I do want that browser-usable parser!
18:19 rns And in the browser you are js-only, I right? Hence the interest in Earley's pseudocode.
18:19 rns s/I right/am I right/ :)
18:20 jeffreykegler rns: I've registered on academia.edu.  I'll look at their agreement and recheck that they let me retain copyright before uploading.
18:20 Aria Yeah, browser is js only
18:20 jeffreykegler But apparently they've attracted a lot of academics already.
18:21 Aria unless you want expensive-to-run C-to-JS transpilation.
18:21 Aria (which, by the way, can run libmarpa)
18:21 Aria (But it's SLOW)
18:21 rns yeap, I remember that asm.js feat, Impressive, BTW.
18:22 Aria Yeah. Which handles Firefox. It'd be faster there.
18:22 Aria Chrome handles asm.js, but not as consistently fast.
18:23 rns I see.
18:24 rns jeffreykegler: re http://irclog.perlgeek.de/m​arpa/2015-01-26#i_10007110 -- Glad to hear, hope it'll work for you, they have very good press. :)
18:24 jeffreykegler rns: Could you point me at some of the press?
18:26 rns Sure, here is their's collection -- https://www.academia.edu/press
18:27 rns and here are them from the inside -- https://medium.com/job-portraits/academia​-edu-is-reimagining-research-93e3ab1a3c95 -- especially the beginning where they talks about their vision.
18:29 Aria Wow. academia.edu is really neat.
18:31 rns Totally. BTW -- some first hand account -- of 2011, but hopefully still applies -- http://homecookedtheory.com/arc​hives/2011/06/27/academia-edu/
18:34 rns He notices a great number of non-English-speaking content and members and that led me into thinking about translating recce.pdf into Russian -- not an easy or fast thing, and most Russian-speaking mathematicians read very well English, but just out of curiosity and for the sake of studying it. :)
18:34 jeffreykegler rns: They'll be an updated Marpa Theory paper someday -- you may want to wait to translate that.
18:35 jeffreykegler I do notice that Marpa gets many mentions on Russian language sites.  Particularly I remember Moscow.pm.
18:43 rns Great, I don't have much cycles for this immediately, so would start (re-)reading the paper.
18:43 rns re Moscow.pm -- yes, Ruslan Zakirov talked there about Marpa and how he used it with his Repa lexer.
18:44 jeffreykegler Aria, rns: OK to add rns as a collaborator on the paper?
18:44 rns Well, I received an email saying I was added, that was a nice thing to hear, I must say.
18:48 Aria Heck yes.
18:50 jeffreykegler https://independent.academi​a.edu/JeffreyKegler/Papers
18:50 rns Frankly, not much cycles to spare for it right away, unfortunately, but I'll certainly keep an eye and chime in.
18:51 rns jeffreykegler: Great, you have one follower. :)
18:54 jeffreykegler Now two, thanks Aria!
18:55 jeffreykegler rns: From your interests, you are probably another fan of King Alfred.
18:57 rns :)) Well, I started from an article in Russian saying why berserkers seem to be a thing scientists red into sagas, like horned helmet and look what's followed.
18:59 rns But I was a fan of Harold Godwinson briefly after reading some Bulwer-Lytton. :)
18:59 rns s/scientists red/scientists read/
18:59 jeffreykegler No berserkers!  I am disappointed.
19:00 jeffreykegler :-)
19:01 rns :) Well, it was more of a synopsys, but a troubling one.
19:02 rns Sorry, have to go AFK, need to finish that fine translation still. :)
19:02 jeffreykegler An advantage of academia.edu is that I will get statistics on downloads, which I do not from Google Drive.
19:02 jeffreykegler rns: bye!
19:03 rns Yep and they have analytics too, or so they say. :) Bye!
19:03 rns AFK
19:16 * jeffreykegler is starting an update on his doings.
19:16 jeffreykegler The "discard events" work has taken me on a few detours.
19:18 jeffreykegler The current one is that I've found some issues in event handling, focused on a set of "corner cases", that involve location 0 and trivial grammars.
19:19 jeffreykegler A "trivial grammar" (my term) is a grammar which only recognizers the null (zero-length) string.
19:20 jeffreykegler Fixing these issues has me working with the Libmarpa code.
21:12 ronsavage joined #marpa
22:06 rns "MarpaX::Import, which provides a convenient interface to Marpa::R2" used in Verilog-based hardware design language -- http://research.ifmo.ru/file/s​tat/247/kirill_a._bulygin.pdf
23:23 rns left #marpa

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