Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-02-24

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

All times shown according to UTC.

Time Nick Message
00:16 ronsavage joined #marpa
00:43 jeffreykegler joined #marpa
00:43 jeffreykegler I'm having a hard time interpreting the announcements, but I think another step in the retreat from LALR has been made.
00:44 jeffreykegler I believe that the Go projects has announced they've phased out the bison-based gccgo,
00:45 jeffreykegler but I'm not sure and would be happy to hear from anyone with better information.
00:46 jeffreykegler The gccgo approach was already as step away from LALR, in that while the front-end was bison-powered, gcc converted to recursive descent some time ago.
00:46 jeffreykegler And I believe Go lang's other (main?) compiling approach, gc, is a direct compiler that is recursive descent powered.
00:48 jeffreykegler Or did I get this backwards? -- http://golang.org/doc/faq#What_compiler_technology_is_used_to_build_the_compilers
02:15 flaviu joined #marpa
02:35 hobbs I don't think gccgo is going away either, what announcement did you see?
02:35 jeffreykegler Something on twitter, I'll try to find it again.
02:37 jeffreykegler https://twitter.com/_rsc/status/569980747160920064
02:39 hobbs got it
02:40 hobbs that's not about gccgo at all, they've rewritten the non-GCC one (Gc) from C into Go :)
02:41 jeffreykegler Do you know anything about the relative roles the two compilers play?
02:41 jeffreykegler Is there one which could be called the "main" one or flagship compiler?
02:42 hobbs Gc is, I believe
02:46 jeffreykegler And so gccgo is kind of a backup or 2nd choice?
02:46 hobbs yeah
02:46 hobbs from what I've heard, Google encourages gccgo because they want a "second source" for respectability
02:46 jeffreykegler But anyway, I stand corrected about the announcement, then.
02:46 hobbs and it actually has some advantages
02:46 jeffreykegler Which does not indicate any movement away from or toward LALR.
02:46 hobbs right
02:46 jeffreykegler The reason for my special interest is that I'd like to say that all its greatest proponents have totally abandoned LALR.
02:46 hobbs yeah, understood
02:46 jeffreykegler Among greatest proponents, I number Larry Wall; whoever is doing the flagship C compiler (now GNU); and Ken Thompson.
02:48 ilbot3 joined #marpa
02: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
02:48 hobbs but Google might not show an interest any longer
02:49 jeffreykegler hobbs: Thanks for clearing this up for me.
02:49 hobbs no problem
02:50 hobbs did you happen to see what I posted yesterday about the bit of progress I made on a grammar with counted repeats?
02:50 jeffreykegler I did see it, but did not follow up.
02:51 hobbs I'm somewhat happy with it, but what bugs me about it is that it's not composable. If someone wanted to incorporate my grammar into theirs they would have to incorporate the "driver" with the event handlers too
02:52 jeffreykegler This would be in general an issue with event-driven parsing, I'd think.  Or do I miss the point?
02:52 hobbs maybe, just wondering what could be done to make it better
02:53 jeffreykegler Some time ago I did some work on counted repeats,
02:53 jeffreykegler which I planned to resume in Kollos.
02:53 hobbs I still have Randal's question running through my head a little bit, about whether Marpa can match Perl 6 for extending and subclassing grammars
02:53 jeffreykegler Briefly, the idea is that you write the repeats as BNF rules, ...
02:54 jeffreykegler but you binarize them to keep the number of rules limiited.
02:55 jeffreykegler hobbs: I do not know of anybody actually really doing things with Perl 6 grammars.
02:55 jeffreykegler With the possible exception of parsing Perl 6 itself.
02:56 hobbs that may be, I can't say
02:56 jeffreykegler The last two Perl 6 advent posts about parsing were very minimal -- not really parsing problems at all.
02:57 jeffreykegler And as far as noticing what can be done with Marpa, and trying to reproduce that, the idea does not seem to cross their minds.
02:57 hobbs to be clear, what I'm thinking about isn't only "competition" with Perl 6
02:58 hobbs what I'm thinking about is that we're getting a collection of Marpa parsers on CPAN
02:58 hobbs and it would be an advantage, in my opinion, if you could take one of those and "drop it in" to a surrounding grammar, some way or another
02:59 hobbs I think Perl 6 realistically offers that, I think p5 regexes even kind of do with packages like Regexp::Common
02:59 jeffreykegler With regexes, yes, they are composable.
02:59 hobbs I don't know what it would take to make that feasible for Marpa but I think it's a good way to get mileage out of CPAN
03:00 hobbs just a musing though
03:00 jeffreykegler I don't think Perl 6 grammars actually compose in general, because of all the special top-down hackery that any substantial Perl 6 grammar requires to work.
03:01 jeffreykegler That is, they don't compose, for the same reason PEG grammars do not compose.
03:01 jeffreykegler It'd certainly be possible to create a layer above the SLIF that takes SLIF grammars and composes them.
03:02 jeffreykegler It would have to be restrictive on the amount of external hackery that is used.
03:02 jeffreykegler Marpa's advantage is that you need that kind of hackery a lot less.
03:03 jeffreykegler I believe that the Perl 6 2013 advent post on parsing mentioned that it's grammar would not actually compose.
03:04 hobbs interesting
03:05 jeffreykegler To compose nicely, you've got to get as close to pure BNF as you can.
03:06 jeffreykegler And top-down approaches in general rely on custom procedural logic -- which to be sure might compose, but which there is no reason to expect *should* compose.
03:06 jeffreykegler Composability is a promising line of inquiry, but somebody else would have to have enough interest to drive the effort.
03:07 jeffreykegler At this point, I guide my priorities by trying to guess what is most "enabling" -- that is, what can I do that makes Marpa more useable for other folks to do stuff.
03:08 hobbs yeah, I'm just making wishes here without necessarily knowing what I'm talking about
03:08 jeffreykegler I started Marpa without knowing what I was talking about, ...
03:08 jeffreykegler and learned.
03:09 jeffreykegler Btw, the other issue for composability ...
03:09 jeffreykegler is discards and lexing.
03:10 jeffreykegler For perfect composability, you either have to assume a common lexing among all the languages to be composed ...
03:10 jeffreykegler or move the lexing and discarding into the BNF itself.
03:10 hobbs mhmm
03:10 jeffreykegler hobbs: my thought exactly
03:11 jeffreykegler Now, about moving  the lexing and discarding into the BNF itself, there are two issues, neither insuperable ...
03:12 jeffreykegler one is efficiency in the current implementation -- one earley set per character is expensive ...
03:13 jeffreykegler the other is the interface -- even programmers who want composability find the separation of lexing and parsing natural --
03:13 hobbs first one is understandable, that was the inefficiency of my super-brute-force lexer
03:13 jeffreykegler after all, we are now in this conversation using words where we stick spaces in between for readability.
03:13 hobbs second one might just be stockholm syndrome :)
03:15 jeffreykegler Btw, strand parsing will address some of the space/efficiency issues with one Earley set per character.
03:15 jeffreykegler And with it, the parsing phase of Marpa will actually become constant space in practice and in theory.
03:16 hobbs basically by being able to discard state once it can't have an effect on the future, right?
03:17 jeffreykegler Yes -- memoizing those parts of the Earley sets which are on the "right edge" and can affect the future,
03:18 jeffreykegler Note that *evaluation* is done in that scheme as you proceed, and that evaluation is usually *not* constant space.
03:19 hobbs btw, funny coincidence but I was editing a contribution to oeis.org today, and it was previously edited by Russ Cox
03:19 jeffreykegler But I don't count that, because the semantics in theory could be constant space, and I'm focusing on the *parsing*.
03:19 hobbs who is the author of that tweet you linked
03:19 hobbs right, if your behavior isn't constant space that's your business, but if it is then O(1) + O(1) = O(1)
03:20 jeffreykegler hobbs: Exactly.  I just made the point so that other readers seeing my claim of constant *parsing* space, will not over-interpret my words.
03:21 hobbs fair enough
03:22 jeffreykegler Over-claiming has been a *big* problem with new (and not so new) parsing algorithms, ...
03:22 jeffreykegler and it is a tradition I try to honor in the breach. :-)
03:22 jeffreykegler With all I've written, I've probably over-claimed somewhere about something, but I work hard at avoiding it.
03:25 hobbs I understand.
03:34 hobbs I'm off to bed. Good night, thanks for chatting.
03:34 jeffreykegler Bye!
04:21 ronsavage jdurand: I'm trying to install Marpa/MarpaX-Languages-XML-AST, When I run 'dzil test --all', I get  2 lines of output:
04:21 ronsavage [DZ] building distribution under .build/xjnuIdwklx for installation
04:21 ronsavage (reading log message from standard input)
04:21 ronsavage What am I supposed to do next?
04:23 hobbs that's messed up, I think some git-related dzil plugin is misfiring
04:23 hobbs I would suggest typing some random thing, pressing enter, and then ^Z
04:24 ronsavage hobbs. Thanx. That resulted in '[1]+  Stopped                 dzil test --all', so I typed fg and it echoed 'dzil test --all' and has hung again.
04:25 hobbs oh, I hallucinated you saying something about Windows
04:25 hobbs ^D instead of ^Z then
04:25 ronsavage I did get plugin errors, but I manually installed the ones I noticed were missing.
04:26 ronsavage Ah, this time I get: [Run::BeforeBuild] executing: perl GenerateLowLevel.pl --bnf bnf/xml10.bnf --prefix xml10 --outputc xml10.c --outputh xml10.h
04:26 ronsavage [Run::BeforeBuild] executing: git add xml10.c xml10.h || true
04:26 ronsavage [Run::BeforeBuild] fatal: Not a git repository (or any of the parent directories): .git
04:26 ronsavage fatal: Not a git repository (or any of the parent directories): .git
04:27 ronsavage I'm working with a *.zip d/l-ed from github. Perhaps I need to work within a fork!?
04:27 hobbs yes I think so
04:27 ronsavage OK.
04:27 hobbs well, you don't need to fork in the github sense
04:27 hobbs but you need to "git clone" rather than download a zip
04:27 ronsavage OK.
04:29 hobbs and maybe take up with jdurand whether his config is friendly to other people. dzil can be easy or a big pain for other people contributing to your code, depending on how it's set up :)
04:31 ronsavage Yeah. I'm making slight progress from a clone, but now hitting yet more uninstalled plugins, this time Pod::Weaver::PluginBundle::DAGOLDEN
04:32 hobbs you should be able to "dzil authordeps --missing | cpanm"
04:32 ronsavage It seems each plugin is aiming for the world record in dependencies :-(
04:32 hobbs (or dzil authordeps --missing | xargs cpan, if you don't use cpanm)
04:33 ronsavage Ah, tried that long ago. It installed a vast number of plugins and their dependencies, but not all of them. 2 failed via that way, but they are the 2 I installed manually. Now others have appeared as dependencies......
04:34 hobbs dependencies are CPAN's way of saying "I love you"
04:35 ronsavage No! They're CPAN's way of saying "I need you"
04:35 hobbs some of us will take what we can get
04:35 hobbs :)
04:36 ronsavage Ah, configure's now running ... er was, it died, for many reasons.
04:37 ronsavage The thing which worries me, is that if I change MarpaX :: Languages :: SVG :: Parser to depend on a module which depends on dzil, I'm inflicting the latter on all users, even if I'm the only user. That's too much overhead. I'll cease and desist. Thanx for the help.
04:38 hobbs well, *users* aren't affected by dzil
04:38 hobbs only developers
04:43 ronsavage Yes, true.
05:49 jdurand joined #marpa
05:49 jdurand ronsavage: Re http://irclog.perlgeek.de/marpa/2015-02-24#i_10166483 - yes hobbs is correct
05:49 jdurand the way to do it is:
05:49 jdurand git clone <repo>
05:49 jdurand dzil authordeps --missing | xargs cpan
05:50 jdurand dzil test (if you want)
05:50 jdurand dzil build (to get tarball that would be uploaded to CPAN)
05:50 * jdurand is using cpan btw, not cpanm
05:51 jdurand Re http://irclog.perlgeek.de/marpa/2015-02-24#i_10166562 - it "died" ?
05:52 jdurand Re http://irclog.perlgeek.de/marpa/2015-02-24#i_10166574 - that's the point. dzil can be painful to get installed (well, on Linux it is not in general - but I did that on Windows also) - but once done, sooo many things are great
05:53 jdurand btw, dzil xtest is something that is usually frightening, and is how your package is ranked as being "well writen" -;
05:53 jdurand Hava nice day
06:05 ronsavage joined #marpa
07:12 jeffreykegler joined #marpa
07:13 jeffreykegler I've written a new analysis of top-down parsing, covering the same ground as http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/11/ll.html
07:13 jeffreykegler This time I've done it as a tweet:
07:14 jeffreykegler 'My parser: look at a token&guess' That works? 'No, so I look ahead&backtrack. But it handles expressions' How? 'I change algorithms'
08:03 basiliscos joined #marpa
09:38 basiliscos joined #marpa
09:57 basiliscos joined #marpa
12:32 lwa joined #marpa
15:48 basiliscos joined #marpa
16:48 basiliscos joined #marpa
19:24 ilbot3 joined #marpa
19:24 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
20:12 basiliscos joined #marpa
22:52 ronsavage joined #marpa
22:59 ronsavage jdurand: Re http://irclog.perlgeek.de/marpa/2015-02-24#i_10166756: http://fpaste.scsys.co.uk/466464
23:16 jdurand joined #marpa
23:17 jdurand ronsavage: Re http://irclog.perlgeek.de/marpa/2015-02-24#i_10172104 - missing packages: Log::Log4perl, XML::LibXML, SUPER
23:18 jdurand Now, I admit I forgot there was this repository of mine, I have abandoned it in favour of marpaXml, that is stalled (I'll come back to it after C bindings generation)

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