Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-02-21

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

All times shown according to UTC.

Time Nick Message
03:25 hardmath123_bt joined #marpa
03:26 hardmath123_bt tjvr: what's up?
06:25 jeffreykegler joined #marpa
06:26 jeffreykegler rns++ jdurand++ for their work on the Windows version of Marpa.
06:27 jeffreykegler Latest version is passing all tests on CPANtesters -- and there are now 4 different Windows testers plus 2 different testers on Cygwin.
06:29 jeffreykegler [ For those who don't follow CPANtesters, one of its defects is that testing on Windows and Cygwin can be rare or non-existent. ]
09:12 rns joined #marpa
09:22 rns jeffreykegler: re -- http://irclog.perlgeek.de/m​arpa/2015-02-20#i_10151124 -- Thanks for explaining. For marpa_m_test I use a table of brief error messages (most of the time, mnemonics after s/MARPA_ERR_//, tr/_/ /) linearly searched by mnemonics.
09:31 rns re Parsing Timeline translation -- read it, it's pretty good, only a couple of nits found. They don't allow comments, but I'll try their admin email.
09:31 rns tproger.ru is self-described as a programmer community and seems to mostly social-net (vk.com)-based. They also offer very targeted advertising and refer to a couple of big names as their partners -- http://cdn.tproger.ru/wp-conten​t/uploads/2014/12/partners.png.
09:35 rns It's great they've thought parsing can be an interesting subject.
09:40 rns The translator included a nice, if overly scientese, explanation of BNF.
09:42 lwa joined #marpa
10:13 rns BTW, trpoger's folks have just replied that they'll pass the nits to the editor for fixing -- very good of them.
10:15 rns re http://irclog.perlgeek.de/m​arpa/2015-02-21#i_10152617 -- Great news! The credit is mainly due to Jean-Damien, I was mostly "fixing semicolons" per hobbs saying, but hopefully important ones. :)
10:17 rns left #marpa
10:20 basiliscos joined #marpa
10:40 jeffreykegler joined #marpa
10:41 jeffreykegler rns: I explain about the trivial1.c core dump in commit 2ae3ed0
10:41 jeffreykegler Thanks for suggesting the corrections to the translated blog post.
10:44 jeffreykegler The picture used to illustrate http://tproger.ru/translations/parsing-a-timeline/ is quite clever -- it's a "Parsing Watch", based on the timeline in my article.
10:46 jeffreykegler The "Kegler parsing watch" is special - it starts at 1960, goes up to 2015, then cycles back to 1960.
11:04 pczarn joined #marpa
11:34 rns joined #marpa
11:35 rns jeffreykegler: re http://irclog.perlgeek.de/m​arpa/2015-02-21#i_10152909 -- thanks for explaining, it's clear now.
11:36 rns tprogers folks have updated the article. And yes, parsing time isn't linear at all. :)
11:36 rns left #marpa
12:02 koo7 i have a theory that people who know perl arent looking for an easy-to-learn novel way of parsing, so its all nice but what marpa needs isnt more talk but kollos:)
12:04 koo7 it would be good material for a kickstarter..
12:05 koo7 gsoc?
13:40 pczarn jeffreykegler: re http://irclog.perlgeek.de/m​arpa/2015-02-20#i_10150930 - no, not that kind of unification
13:44 pczarn oh, it's completely not clear what I'm saying
13:47 pczarn I'm implementing lexers in separate modules, and my SLIF can be configured to use any particular lexer
13:48 pczarn so that SLIF creates a grammar and invokes a lexer, which could be SLIF as well
13:53 pczarn Maybe this is what Marpa::R2 already does, I don't know how its code is structured, I can only guess how it works
13:56 pczarn or it doesn't, because it would be slower at run-time
15:01 pczarn I'm also bootstrapping my "racing interface"
15:35 jeffreykegler joined #marpa
15:43 jeffreykegler pczarn: a Marpa parser feeding a Marpa parser is how the SLIF currently work.
15:45 jeffreykegler The ability to switch lexers will be part of Kollos -- though I'll certainly be happier to see it arrive earlier in something else.
17:51 pczarn joined #marpa
18:40 pczarn how many character classes are supported?
18:41 jeffreykegler huh?
18:42 pczarn all shorthand character classes such as \s, \w, \d?
18:43 jeffreykegler Character classes in the SLIF are passed on to Perl.
18:43 jeffreykegler So the answer would be in the docs for whatever Perl you are using.
18:43 pczarn I guess the same number Perl's regular expressions support
18:43 pczarn ok
18:44 jeffreykegler The check is done by callback to Perl -- these callbacks are memoized, so that the efficiency hit of this is not great.
18:47 jdurand joined #marpa
18:48 jdurand Re http://irclog.perlgeek.de/m​arpa/2015-02-21#i_10154274 - this is one thing that I'll might miss with Kolos (?) - pczarn, yes, the full powerof Perl regexp is available - I used that in particular to do user-defined character classes when doing the ECMAScript parser
18:50 jeffreykegler Just to clarify, the full power of Perl regex *character classes* is available -- sometimes beginners look for Perl regexes in the SLIF and they are not there.
18:51 jdurand jeffreykegler: oh yes, important.
18:51 jeffreykegler jdurand: Perhaps Perl users of Kollos will write a lexer that recreates that callback mechanism which the SLIF uses.
18:52 jeffreykegler jdurand: I am looking forward to your M4
18:53 pczarn I wish Lua's string manipulation was better
18:54 jeffreykegler Lua was picked *because* it is minimal -- it's expected that people will find Lua/Kollos programming too restrictive and embed it in other things.
18:55 jdurand jeffreykegler: yep, very soon - it rocks
18:56 jeffreykegler Perl 5 has almost everything you could desire, and in theory is also embeddable like Lua, but Perl is so big, it is just not reasonable to expect a, say, Rust programmer, to embed a Perl every time he wants to use Marpa.
18:58 jeffreykegler Lua is smaller than Libmarpa, and C89 -- basically no more hassle than Marpa's own home grown upper layers would be -- so embedding a Lua interpreter is a reasonable thing to ask of a higher-level language programmer who wants to embed Marpa.
18:59 jdurand I (or we) and I (pr we I hope) do agree
19:00 pczarn and that part of Lua is great. I was going to work on a library for binding Lua, but the Rust compiler is too unstable at the moment
19:00 jdurand "(and we I hope)"
19:32 jdurand About Perl, I wish to not abandon Perl & Marpa - I mean: anybody knows how much work it is to port it officialy (== cleanly) to perl6 ?perl6 claims to be much faster than perl5.
19:36 jdurand lol lunch time -; AFK
19:39 jdurand Re http://irclog.perlgeek.de/m​arpa/2015-02-21#i_10154299 - My M4 stuff sinifhsed, I'll come back to generation of C bindings, and plan to include a generation of callback to userspace
19:40 jdurand "finished"
19:40 jdurand me should not IRC while drinking muscat -;
19:40 * jdurand yes, really
19:43 jeffreykegler Perhaps best to do the Perl 6 port based on Kollos.
19:46 pczarn jeffreykegler: I meant that SLIF could invoke NAIF (maybe twice)
19:46 pczarn or does it already
19:47 jeffreykegler It does already
19:47 jeffreykegler Originally it did it in a "pure" form, using only documented NAIF interfaces.
19:48 jeffreykegler But that's no longer a concern, so that currently the SLIF violates the NAIF interface a lot.
19:48 pczarn what are these undocumented interfaces for?
19:49 pczarn ZWA?
19:49 jeffreykegler I actually don't remember.  Hacks I needed at the time. :-)
19:50 jeffreykegler But you question may be could you duplicate the current SLIF using the NAIF.
19:50 jeffreykegler And the answer is probably not.
19:50 jeffreykegler On the other there is the THIF.
19:51 jeffreykegler Which is a very thin interface to Libmarpa.
19:51 jeffreykegler And the SLIF does *not* violate this.
19:51 jeffreykegler Although it does uses lots and lots of C code in the XS layer.
19:51 jeffreykegler s/does uses/does use/
19:53 jeffreykegler Btw, if *I* were new to Marpa, and wanted to do cool new interface stuff ...
19:53 pczarn it should be possible to reimplement NAIF so that undocumented interfaces aren't needed
19:54 jeffreykegler I'd write it as a layer above the SLIF, or else in C using the Libmarpa API.
19:54 pczarn above?
19:55 jeffreykegler The layer-above-SLIF approach should not be too inefficient.
19:55 jeffreykegler Yes, an interface that produces a SLIF DSL as its output.
19:57 pczarn I was wondering about something like that today: http://irclog.perlgeek.de/m​arpa/2015-02-21#i_10153379
19:57 jeffreykegler In answer to the NAIF reimplementation question -- the NAIF is a dead-end, and creating a clean SLIF-NAIF interface would IMHO be a waste of time.
19:59 pczarn what would SLIF use instead? THIF?
19:59 jeffreykegler Back to the "layer above SLIF" thing -- there are lots of cool concepts out there, I'm convinced, waiting to be discovered.
19:59 pczarn so SLIF G1 can be a layer above SLIF L0
19:59 jeffreykegler SLIF is also being phased out, with Kollos as the eventual replacement.
20:00 jeffreykegler pczarn: no
20:00 jdurand Once upon a time, I found https://metacpan.org/pod/Grammar::Formal interesting
20:00 jeffreykegler I'm talking a MYIF, which is a Marpa program which produces a SLIF DSL, which then is used for the grammar.
20:01 jeffreykegler A *real* higher level language.
20:01 jeffreykegler So that your MYIF is to the SLIF, what C language is to assembler.
20:02 jeffreykegler (Or used to be?  Do C compilers produce assembly code any more?)
20:02 pczarn (when they don't, they use an intermediate representation)
20:03 jeffreykegler Also, still out there (is somebody working on it?) is a Marpa interface which produces C language stuff, kind of on the idea of yacc/bison.
20:04 jeffreykegler Initially, it might lack a lot of features, but it'd be easier to use than yacc/bison, and BLAZINGLY fast.
20:05 pczarn why? how fast libmarpa would be if everything was inlined or written with macros?
20:06 jdurand jeffreykegler: my marpaXml's script bnf2marpa.pl
20:06 jdurand Oups I redo
20:08 jeffreykegler pczarn: thanks to changes in technology and Joop Leo's improvement to Earley's Libmarpa is capable of production compiler speed.
20:08 jeffreykegler Competitive with hand-written compilers
20:08 jdurand jeffreykegler: my marpaXml's script generateMarpaWrapperCode.pl (c.f. https://github.com/jddurand/marpaXml/blob/​master/tools/generateMarpaWrapperCode.pl) is generating thousands of lines oC code
20:09 jdurand and is based on introspection of an EBNF (yet another thing I have never commited... yes, I have a full EBNF parser somewhere) grammar parsed with Marpa
20:09 * jeffreykegler should know by now not to ask "Who has already done this?" -- the answer always is "It's somewhere in Jean-Damien's github repos" :-)
20:09 jdurand Really, Marpa is incredevly powerful; I do not know what is not possible witht it
20:16 pczarn are you familiar with Datalog?
20:24 jeffreykegler I found Datalog in Wikipedia -- I'd never heard of it until now.
20:26 pczarn jeffreykegler: Wikipedia doesn't mention that Datalog uses the Earley algorithm, apparently
20:29 jeffreykegler Hmmm. interesting.
20:43 LLamaRider joined #marpa
22:58 pczarn I have no idea what `MY`IF stands for
23:50 jeffreykegler joined #marpa
23:52 jeffreykegler pczarn: MYIF == "my interface"
23:52 jeffreykegler That is, "MYIF" meant "some cool new Marpa interface of your own invention"

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