Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-05-30

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

All times shown according to UTC.

Time Nick Message
00:10 idiosyncrat_ I realized that, as I add to the use of Lua, converting it to work w/ Perl threads would become harder and harder.
00:11 idiosyncrat_ So I've bitten the bullet.  Marpa::R3 now supports Perl threads in the way that Marpa::R2 did.
00:12 idiosyncrat_ I don't think anybody really uses this, but spending time supporting this not-really-used feature seemed the best of several bad options.
00:13 idiosyncrat_ Also
00:14 idiosyncrat_ I did look at compiling Lua via '#include' statements, instead of as a library, but there are conflicts of variable names.
00:14 idiosyncrat_ These can be worked around, but what I was already doing -- renaming the Lua methods, so that lua_gettop() was marpa_lua_gettop(), etc. ...
00:15 idiosyncrat_ now seems the best of the available options.
00:32 idiosyncrat_ Threading, of course, is one of the "Three temptations of Marpa": https://irclog.perlgeek.de/marpa/2015-05-19#i_10624305
00:35 idiosyncrat_ I think it's pretty clear that Perl 5, had it diverted the brain-power spent on threading to other tasks, would be immensely better off.
01:48 ilbot3 joined #marpa
01:48 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
04:40 idiosyncrat_ Good night!
06:22 ronsavage joined #marpa
06:53 shadowpaste "rns" at 217.168.150.38 pasted "test failures/diagnostics under cygwin and windows" (3146 lines) at http://fpaste.scsys.co.uk/520114
06:56 rns idiosyncrat: full_test.out is pasted above -- search for -- t/00-load.t to jump to the start -- hope that's not too premature.
07:06 rns both perls are threaded -- MULTIPLICTY defined -- multiple interpreter instances in the same process.
07:56 Cheery_ joined #marpa
08:46 ronsavage joined #marpa
10:13 idiosyncrat_ joined #marpa
10:13 idiosyncrat_ rns: Thanks!
10:13 idiosyncrat_ Worth knowing.  The results are as I would hope.
10:14 idiosyncrat_ My code in the commit lines, btw, you've largely guessed, but here it is
10:14 idiosyncrat_ t+ for test suite passes
10:15 idiosyncrat_ t++ for test suite passes, and the SLIF grammar self generates successfully.
10:15 idiosyncrat_ t-1 for one test passes (as in this case)
10:16 idiosyncrat_ s/passes/fails/
10:16 idiosyncrat_ t-N (integer N) for N tests fail.
10:17 idiosyncrat_ diags (or some such) means that there are diagnostic messages, which I intend to remove -- I'm probably going to abbreviate that to "D" going forward.
10:18 idiosyncrat_ It's not unusual for me to mislabel a commit, alas. :-(
10:18 idiosyncrat_ This one should have been
10:19 idiosyncrat_ t-1, D
10:19 idiosyncrat_ which is what you see.
10:46 kaare_ joined #marpa
10:49 rns idiosyncrat: That's really helpful, thanks.
15:28 maybekoo2 joined #marpa
16:01 idiosyncrat_ rns: fixed in commit 134703616c86cbf4fc7d16854b08266f91c74c18: "Allow shared Lua interpreters: t++, diag" ...
16:01 idiosyncrat_ and this time the testing tag is right. :-)
18:37 gleki_ Hi, sorry for this probably ideologically stupid question but is tere an earley parser with lookahead operators?
18:48 rns idiosyncrat: re http://irclog.perlgeek.de/marpa/2016-05-30#i_12572139 -- confirmed, on both counts, under cygwin and windows xp.
18:54 rns gleki: hi, with Marpa::R2 you can use events -- https://metacpan.org/pod/distribution/Marpa-R2/pod/Event.pod -- to set a marker, analyze the input and read the lexeme based on the analysis as e.g. in https://github.com/ronsavage/MarpaX-Languages-Lua-Parser/blob/master/lib/MarpaX/Languages/Lua/Parser.pm#L211 or https://gist.github.com/rns/962fdb4f30d0681cc07d
18:58 rns libmarpa also has (untested) zero-width assertion (zwa) methods -- http://jeffreykegler.github.io/Marpa-web-site/libmarpa_api/stable/Zero_002dwidth-assertion-methods.html#Zero_002dwidth-assertion-methods
19:04 choroba joined #marpa
20:10 idiosyncrat_ gleki: hi
20:11 idiosyncrat_ Earley's original paper incorporated lookahead, so it's very far from a stupid question.
20:12 idiosyncrat_ Marpa does not use lookahead per se, but as rns points out at http://irclog.perlgeek.de/marpa/2016-05-30#i_12573315, events can amount to the same thing.
20:13 idiosyncrat_ Also, you can use events to stop anywhere in a Marpa::R2, do whatever lookahead you want, and change the input accordingly.  Marpa allows you full knowledge of everything to left, so you're in fact better off than with most lookahead schemes.
20:14 idiosyncrat_ So the answer is "No, but usually really yes"
20:15 idiosyncrat_ There's more lookahead-ish stuff in the pipelines -- I'm current adding a Lua interpreter to Marpa, and part of the reason is to allow convenient additional processing, including lookahead.
20:16 idiosyncrat_ Re's the zwa's -- http://irclog.perlgeek.de/marpa/2016-05-30#i_12573331-- they are used internally and are available via the libmarpa interface, but they are very, very "bleeding edge"
20:49 idiosyncrat_ This may be an opportunity for a few comments on lookahead & why it was dropped from later versions of Earley's including Marpa.
20:50 idiosyncrat_ Most parsers are deterministic -- you have to commit, token-by-token, to a specific parse, and if the decision is made wrong, the parser fails.
20:51 idiosyncrat_ Since these parsers also are, unlike Marpa, not left-eidetic, that is, they don't remember a lot of what has previously happened, that means they are starved for information about the parse.
20:52 idiosyncrat_ For parsers like this, lookahead can not just useful, but essential.  Top-down parsers, in fact, simply cannot work without it.
20:53 idiosyncrat_ Earley parsers track *all* possibilities, so the need to guess right at every point is not there.  Earley parsers simply do not have the same need for lookahead.
20:54 idiosyncrat_ The only advantage lookahead might offer an Earley parser, is speed/space savings.  But experience has shown that, on average, lookahead doesn't pay for its cost.
20:55 idiosyncrat_ Now, for certain specific grammars, lookahead might help with Earley's.  In these cases, the user can program it in using events.
22:03 LLamaRider joined #marpa

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