Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-08-20

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

All times shown according to UTC.

Time Nick Message
01:04 idiosyncrat_ joined #marpa
02:16 idiosyncrat_ joined #marpa
02:16 idiosyncrat_ left #marpa
02:16 idiosyncrat_ joined #marpa
02:16 idiosyncrat_ https://gist.github.com/jeffreykegler/5431739
02:17 idiosyncrat_ I've built on your bugfix and have a new version of that gist.  A bunch of changes.
02:17 idiosyncrat_ It used unnamed events.  I now strongly discourage use of unnamed events.
02:18 idiosyncrat_ I changed the gist to use named events.
02:18 idiosyncrat_ The handling of the EOL in a line which declares heredocs has been changed as well.
02:19 idiosyncrat_ I not longer use an event for that -- I use the resume() method's ability to set an end point instead ...
02:20 idiosyncrat_ I keep resume()'ing until the heredoc declaring line is consumed and then I resume() from after the end of the heredoc's declared in that line.
02:21 idiosyncrat_ Only one event now, no more special tricks with different kinds of whitespace in the grammar -- I think much simpler & clearer
02:22 idiosyncrat_ And I updated the comments, and did some work to improve them, so those who want to know more should be able to figure out what is going on from the gist itself.
02:50 idiosyncrat_ joined #marpa
02:51 idiosyncrat_ mauke: my previous comments are of course a followup to our discussion of yesterday
03:08 mauke_ joined #marpa
03:08 ronsavage jk: Beautiful. I've added that and the one using 'package Tautology::Mod::Actions' to MarpaX::Demo::SampleScripts/examples. I've released a new version of that module, with those 2 and a config parsing demo. jk: DIid you write the Tautology one, whereby in a action sub another parse is performed, using the outer parse's grammar. I try to add attributions to all scripts.
03:14 CQ_ joined #marpa
03:17 idiosyncrat_ joined #marpa
03:29 idiosyncrat_ Thank you, though I am much more aware of less than beautiful process of arriving at its present state. :-)
03:30 idiosyncrat_ I don't think Tautology is mine.  Do you have a URL for it?
04:09 ronsavage jk:I do now: https://gist.github.com/ronsavage/7e15a45ae608fa1ac21c
04:10 ronsavage I search all gists, but there was no other reference to it.
04:13 idiosyncrat_ joined #marpa
04:14 idiosyncrat_ Nope.  O'
04:14 idiosyncrat_ I'm pretty sure Tautology is not mine.
04:17 ronsavage jk: OK.
04:23 idiosyncrat_ ronsavage: Oh, and of course as per the comment at the beginning ...
04:24 idiosyncrat_ For the heredoc example credit is shared with Peter Stuifzand and mauke
04:28 ronsavage OK
04:31 idiosyncrat_ Good night!
05:17 purag joined #marpa
05:51 CQ http://testers.perl6.org/dist/M/Marpa/%3Cunknown%3E.html ...Marpa on perl6 looks pretty red : )
06:00 rns CQ: must be this one -- https://github.com/drforr/perl6-Marpa. drforr is on this channel at times. Well, patches welcome, I think. :))
06:03 rns There is an unanswered question on quora about Marpa vs. Perl6 -- http://www.quora.com/What-are-the-differences-between-Marpa-and-the-Perl-6-grammars
06:04 rns and another mentioning marpa in one answer -- http://www.quora.com/What-are-the-parsing-techniques-used-by-modern-compilers
06:38 CQ rns maybe I'll have a peek, but work starts again next week...
09:26 koo7 joined #marpa
15:08 koo7 joined #marpa
16:52 djns joined #marpa
17:12 idiosyncrat_ joined #marpa
17:13 idiosyncrat_ re http://irclog.perlgeek.de/marpa/2015-08-20#i_11085758 -- the 2 quora.com questions
17:13 idiosyncrat_ Quora apparently requires you to register to *read* its content, unlike stackoverflow which only requires registration for participants.
17:14 idiosyncrat_ Talk of Perl 6 grammars kind of died down, but is coming back.  I have qualms about writing up a comparison.
17:15 idiosyncrat_ Perl 6 has been the target of a lot of harsh criticism, and I am reluctant to seem to participate.
17:17 idiosyncrat_ I do however, think that, speaking specifically of Perl 6 grammars and the hopes that they would empower grammar-driven programming ...
17:17 idiosyncrat_ that Perl 6 grammars are way too underpowered to deliver on that vision.
17:18 idiosyncrat_ That of course is criticism, but it's aimed only at Perl 6's grammars, and only at some of the great hopes for them early in the project.
17:19 Aria I agree.
17:19 idiosyncrat_ For the rest, Marpa is heavily influenced by Perl 6, even if that influence is not obvious on the surface.
17:20 idiosyncrat_ Whenever I encounter an interface issue, if Larry has done anything remotely similar, I study that first.
17:42 CQ I wouldn't compare the two (although I googled just that today...). I think that one comment I read: "people use regexp and simple grammars until they learn why they need more" (something like that) is a good suggestion: present marpa for what it is, and when people need it, make sure they can find it and have an easy entry
17:43 CQ quora seems to let you read if coming from external links...
17:47 koo7 joined #marpa
17:49 idiosyncrat_ CQ: that was my thought when I first announced Marpa -- no comparisons were necessary, folks would enounter frustrations and migrate when they discovered that by using Marpa they could avoid those frustrations.
17:50 idiosyncrat_ But it was wrong.
17:51 idiosyncrat_ LALR's momentum was slowed by its problems, but it took decades -- and LALR is *still* being taught as *the* solution to parsing in some places.
17:52 idiosyncrat_ Literally decades -- from the invention of LALR, to the GCC rewrite back into recursive descent is 40 years.
17:53 djns I read about this, that many people still read advice from the 1960s when computers were a million times slower, that some algorithm is too slow, when things are much different today, computers are faster
17:53 lwa joined #marpa
17:54 idiosyncrat_ PEG's another case -- folks use it and promote and ignore the issue of how tricky it is to use.
17:55 djns This has happened on Unix as well, long ago, someone published a book called Unix Haters Handbook, where it was suggested X11 was "slow". Any GUI in the 1980s was "slow" on the hardware at the time. Today X is considered lightweight compared to Windows. But people who dont know better just read this 30 year old stuff and hang on to these old stereotypes
17:56 idiosyncrat_ I think one consideration is that, when an algorithm becomes the "state of the art", confessing you could not get it working ...
17:56 idiosyncrat_ can be read as confessing to incompentence.
17:57 idiosyncrat_ s/incompentence/incompetence/ -- incompetent at typing :-)
17:58 idiosyncrat_ So while LALR was abandoned due to the difficulties in using it, including many abandoned projects, you never *did* read of these on blogs, etc.
18:00 idiosyncrat_ Folks suffered in silence, in part I think because they wanted to avoid the implication that the failure was their failure -- after all, these algorithms *were* the industry standard solution.
18:00 djns right
18:03 CQ idiosyncrat_: try use cases maybe? show specific situations with marpa examples where other parsers fail? The problem is that parsers are so complex and people don't use them often... so they use something that works and then don't write another one
18:03 CQ fail / are much less efficient / more complex / ...
18:03 idiosyncrat_ One would be the SLIF
18:03 idiosyncrat_ Try to copy the SLIF using PEG.
18:04 idiosyncrat_ In particular, precedenced statements require 2nd-order language programming -- first you auto-generate the BNF, then you parse from the BNF.
18:07 idiosyncrat_ I've actually tried specifically showing things you'd want to do that Marpa can and others parsers cannot, and these blogs posts are my most misread.
18:08 idiosyncrat_ I've written a *lot* of blog posts that seemed to miss the target, particularly at the time, but my "Language Design" posts almost invariably are misread.
18:09 idiosyncrat_ http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html#DESIGN
18:11 idiosyncrat_ Like the one I wrote about the power of Marpa to solve the issue of significant whitespace (a la Python) vs. not (as in most languages)
18:11 idiosyncrat_ I wrote a post to show that Marpa allows you to have it both ways: http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2014/02/semantic_ws.html
18:11 idiosyncrat_ This was read as begin all about my point of view on whitespace -- which it is not.
18:12 idiosyncrat_ But on one level it is about whitespace handling and that's the level at which most people read it.
18:13 idiosyncrat_ So in the cases where I've tried to show specific examples of Marpa's extra capabilities ...
18:13 CQ idiosyncrat_: I think that they are written at a level where people (already) know what they are talking about, and not people looking for the right parser...
18:13 idiosyncrat_ The examples are read as being about the specifics and not about the new capabilities.
18:14 CQ is it possible to make simpler examples? show some simple html parsers, json parser, etc. maybe and state why marpa makes it easier?
18:14 CQ idiosyncrat_: I think that's because the people reading them are looking at the concrete stuff and don't get the abstract advantages because they are at a lower level of understanding
18:14 idiosyncrat_ If you think you can explain things better -- and in some respects it would be hard for you to do *worse* than I have --
18:14 idiosyncrat_ try blogging a series on Marpa.
18:15 idiosyncrat_ I have a problem that I *do* think theoretically, and in abstractions, more than most programmers.
18:15 idiosyncrat_ If you think about it, the author of Marpa would probably have to be someone like that.
18:15 CQ idiosyncrat_: sure, and that makes you able to write a good parser :)
18:16 idiosyncrat_ But it means I have a very hard time of figuring out what I need to say to explain what I've done.
18:17 CQ I work in consulting, and understanding the problem is the easy part, explaining it in a few pages is the hard part, getting people to change is the harder part :)
18:17 idiosyncrat_ A consideration that's also important is that the parsing theory field has been full of disappointing and just plain bogus claims.
18:18 idiosyncrat_ That is, if you've ignored all the claims about "great new parsers" over the past few decades, you've saved yourself a lot of time.
18:18 CQ idiosyncrat_: ok, fine, but for how many people using parsers are the claims relevant, and how many Just Want To Parse Something (tm) ?
18:18 idiosyncrat_ CQ: Like I say, if you think you know how to get this across, have at it.
18:20 idiosyncrat_ Randal Schwartz is very important in Perl history, not because of any code he contributed, but because he was able to get people to want to use Perl.
18:20 CQ are there a few simple parsing tasks that can easily serve as examples? like scraping a webpage (ok, enough cpan HTML modules for that...), parsing non-trivial logfiles, ini-files, or things like that?
18:20 idiosyncrat_ And in a way that Larry does not.
18:20 CQ agree
18:21 idiosyncrat_ All these things have been tried, if not necessarily tried in the right way.
18:21 idiosyncrat_ One of the keys to doing this is coming up with the right example ... even if one already used.
18:22 idiosyncrat_ Ron Savage's page has a lot of tutorials: http://savage.net.au/Marpa.html#Tutorials
18:23 idiosyncrat_ Including many by other people.
18:23 CQ maybe that's a thought... there are language comparison coding sites with tasks that get implemented actoss X languages... maybe do something similar for parsing?
18:24 CQ I tried to learn from that last year, and many things I had to spend quite some time on, even having written a lex/yacc/bison parser a few years back
18:24 idiosyncrat_ Pehaps, but it's a lot of work.
18:24 idiosyncrat_ A lot of languages are designed around the parsing technique these days, rather than vice versa.
18:25 idiosyncrat_ And Marpa is most interesting (at least to me) for the things it can do that other parsers simply cannot.
18:26 CQ http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ ...something like this, but I remember a different website with code snippets
18:26 idiosyncrat_ CQ: you might try to think auto-biographically ...
18:26 idiosyncrat_ that is, you're here, something made you think nice things about Marpa ...
18:27 idiosyncrat_ for which I am grateful :-) ...
18:27 idiosyncrat_ what? and why?
18:27 CQ easy: all the other perl parsing modules made me cringe for one reason or another
18:27 CQ ;)
18:27 idiosyncrat_ So that's your blog post
18:28 idiosyncrat_ A tour of Perl parse modules and descriptions of your reactions.
18:30 djns <rule1> ::="(" <str1> ")"
18:30 djns "(" <str1> ")" ::= "<" "String 1" ">"
18:30 djns Does this match a string "<String 1>"?
18:31 CQ https://swtch.com/~rsc/regexp/regexp1.html ... maybe some timing comparisons?
18:32 idiosyncrat_ djns: my guess is yes :-)
18:33 CQ http://rosettacode.org/wiki/Rosetta_Code ... that's the site
18:34 djns there is not documentation on what multiple symbols on the left hand side means, on the internet
18:34 djns not much
18:34 CQ idiosyncrat_: I need to go, will read the log later.
18:34 idiosyncrat_ CQ: look at my annotated blog post list -- lots of this stuff is covered -- http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html
18:35 CQ but: something like a FAQ with questions like what djns asked, commented and explained why the answer is what it is
18:36 idiosyncrat_ Actually djns is asking about *context-sensitive* parsing which Marpa does *not* do.
18:36 CQ idiosyncrat_: thanks, I'll have a look at that page tomorrow...
18:37 CQ afk...
18:38 idiosyncrat_ AFK
18:39 djns ok. And yes, I did see some examples of lhs symbols in context sensitive parser documentation
20:32 purmou joined #marpa
22:34 aredridel joined #marpa
22:45 aredridel joined #marpa
22:50 ronsavage joined #marpa
22:56 ronsavage CQ: Re http://irclog.perlgeek.de/marpa/2015-08-20#i_11089337. We have an FAQ: http://savage.net.au/Perl-modules/html/marpa.papers/
23:10 idiosyncrat_ joined #marpa
23:11 idiosyncrat_ ronsavage: djns is asked about context-sensitive grammars, a special interest of his.  The topic does not IMHO belong in the FAQ
23:11 idiosyncrat_ s/asked about/asking about/
23:24 ronsavage OK. I took his question to be more general. And those types are grammars are not mentioned in the FAQ.
23:28 idiosyncrat_ Perhaps there are other questions that I forgot about, ...
23:28 idiosyncrat_ but the periodic quizes on my knowledge of context-sensitive parsing stick in my mind. :-)
23:43 ronsavage Also, we discussed this back here: http://irclog.perlgeek.de/marpa/2015-07-30
23:54 dvxd how hard do you think it would be to use libmarpa; implement an EBNF parser using it, then emit that EBNF parser as a C routine, string in, parse tree out?

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