Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-30

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

All times shown according to UTC.

Time Nick Message
00:32 flaviu joined #marpa
00:36 flaviu joined #marpa
00:56 flaviu joined #marpa
01:25 flaviu joined #marpa
01:31 sivoais joined #marpa
01:39 flaviu joined #marpa
01:53 flaviu joined #marpa
01:57 ronsavage joined #marpa
02:27 flaviu joined #marpa
02:30 flaviu 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
03:20 flaviu joined #marpa
03:27 flaviu joined #marpa
05:29 ronsavage Huge progress on GraphViz2::Marpa. I look beyond a lexeme which triggers multiple events, to use the next non-blank char (simple!) to disambiguate the events. Time to celebrate!
07:41 jeffreykegler joined #marpa
07:42 jeffreykegler I've just uploaded the stable, CPAN indexed release Marpa-R2 2.098000
07:42 jeffreykegler Testing appreciated!
07:43 jeffreykegler This is the just previous developer's release, with only version info changed.
08:16 lwa joined #marpa
09:14 rns joined #marpa
09:15 rns jeffreykegler: re http://irclog.perlgeek.de/marpa/2014-10-30#i_9586244 — everything's ok under winxp/5.20.1/vs2010
09:17 rns minor issue under cygwin — after installing swig 3.0.2 I have c:\swigwin-3.0.2\bin in the path and that confuses cygwin's configure:
09:17 rns configure: error: cannot find sources (marpa_ami.h) in /cygdrive/c/swigwin-3.0.2
09:17 rns I worked around this with
09:17 rns MARPA_USE_PERL_AUTOCONF=1 cpan Marpa::R2
09:21 rns This looks like an obscure problem with my setup/cygwin/swig under winxp, so I don't really know if this deserves forcing Config::AutoConf on cygwin by adding cygwin to %perl_autoconf_os
09:24 rns BTW, perhaps MARPA_USE_PERL_AUTOCONF (which saved the day) deserves documenting in INSTALL or README as a workaround for configure errors.
09:25 rns make releng fell back to Config::AutoConf just fine and was successful when I tried to build from a repo.
09:40 rns ronsavage: re  http://irclog.perlgeek.de/marpa/2014-10-30#i_9585998 — congratulations, I'd be interested to look when you'll release the code. BTW, the repo seems to be (not confirmed by (meta)cpan) https://github.com/ronsavage/GraphViz2-Marpa?
10:35 flaviu joined #marpa
16:11 jeffreykegler joined #marpa
16:14 jeffreykegler rns: jdurand is our Config::AutoConf expert (he wrote the first version of Marpa::R2 code for building with it).  Perhaps he'll say what he thinks.
16:15 jeffreykegler In cases like this, where GNU autoconf fails, we have typically switched over to Config::AutoConf.
17:17 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "Bracket matching utlity" (406 lines) at http://scsys.co.uk:8002/436013
17:17 jeffreykegler I've just pasted what I hope you'll find an interesting script.
17:18 jeffreykegler It's a basis on which a lot could be built, but actually is useable just as it is.
17:18 jeffreykegler It checks files for matching brackets: (){}[]
17:19 jeffreykegler The new rejection events are used, along with the Ruby Slippers.
17:31 jeffreykegler I hope readers of this channel will try this out.
17:32 jeffreykegler I think readers will find that it is quite good at pin-pointed issues -- often better than the native interpreters/compilers of languages.
17:38 jeffreykegler * pin-pointed -> pin-pointing
19:31 jdurand joined #marpa
19:33 jdurand Re http://irclog.perlgeek.de/marpa/2014-10-30#i_9588713 - guessing that rns would have like to see an automatic switch to Config::Autoconf if ./configure fails, and *if* Config::Autoconf is a _BUILD_REQUIRES dependency, then we could easily automatically swith to it on platforms where ./configure is the default but fails - opinions?
19:42 flaviu joined #marpa
20:21 ronsavage joined #marpa
20:26 ronsavage rns: Yes, that's the repo. I uploaded an official version to PAUSE before I put the repo in the makefile. As for the code, I went to a book launch yesterday, but now I'll upload a gist with parts of the code.
20:49 ronsavage Marpa::R2 V 2.098. Test statistics:
20:49 ronsavage Fails: 0. Files: 150. Modules: 5. Passes: 5. Tests: 144.
20:49 ronsavage Duration: 19 seconds
20:49 ronsavage As for the gist, I'll make it an article too, but the gist will help me organize my ideas. The article will spell out the detail.
21:22 shadowpaste "ronsavage" at 203.217.73.185 pasted "Marpa: Handling Simultaneous Events for a Given Lexeme" (165 lines) at http://scsys.co.uk:8002/436043
21:26 ronsavage Handling Simultaneous Events for a Given Lexeme: http://scsys.co.uk:8002/436043.
21:28 jdurand joined #marpa
21:30 jdurand Re http://irclog.perlgeek.de/marpa/2014-10-30#i_9590400 - nice paste - but does it prevent you to have more than value() ? Perhaps you build your own value() on-the-fly directly in the lexing phase°
21:49 lwa ronsavage: Interesting approach. Btw, you have a very C-ish coding style. Your "_identify_lexeme" could be written shorter and likely more efficiently as `…; pos($string) = $start + $span; $string =~ /\G\s*(.)/ or return; return ($1 eq '=') ? 'attribute_name' : 'node_name';`
21:53 lwa sorry, the regex should be /\G\s*(\S)/ in order to fail when there's whitespace at the end.
21:58 ronsavage lwa: It's the first draft. I only wrote it yesterday afternoon. I certainly hope it can be simplified.
22:09 ronsavage lwa: Thanx. A couple of tests suggest your code is what I'll adopt. I must confess I've never written code which assigned to pos().
22:16 jeffreykegler joined #marpa
22:17 jeffreykegler jdurand: re http://irclog.perlgeek.de/marpa/2014-10-30#i_9589921 --
22:18 jeffreykegler Builds have to be debugged by "remote control" on machines I don't have access to and few diagnostics.  Automatic "failover" is just way too complex for my taste.
22:18 jeffreykegler Especially these days that Marpa::R2 is progressing toward a freeze.
22:19 jeffreykegler I could see it working, but I'd hate to have to figure out how to fix it if it starts failing.
22:55 ronsavage jeffreykegler: Your gist crashed both copies of Chrome when I tried to drag the mouse across it :-(
22:56 jeffreykegler Maybe they need my bracket matching logic. :-)  (I assume you're talking about my recent paste, not a Github gist.)
22:59 jeffreykegler Actually, Chrome may have crashed due to some other reason, but my bracket matching program contains a lot of -- you guessed it -- unmatched bracket.
22:59 jeffreykegler And there are some fairly complex patterns of them, for use as test cases.
23:01 jeffreykegler My best test was running the script on itself -- it's quite good at spotting the locations with unbalanced brackets, and self-correcting so that other more normal sections do not show up in the problem reports.
23:04 ronsavage judurand. Thanx. Code elsewhere checks both 'if ($self -> recce -> ambiguity_metric > 1)...' and 'if (my $ambiguous_status = $self -> recce -> ambiguous)'.
23:05 ronsavage jeffreykegler: Yes, your paste. Who knows why Chrome crashed?
23:09 ronsavage jeffreykegler: The comment '# continue with a new' presumably should read '# continue with /is/ a new', right?
23:10 jeffreykegler That's a good way of correcting it, yes.
23:11 jeffreykegler I commented the logic far more than I do for most scripts, because I am hoping it will serve others as a template for bunches of super-cool things.
23:11 ronsavage And '# If it the case that we do we not' means '# If it/'s/ the case that we do (delete 'we') not'?
23:13 ronsavage And I take it that the point of putting the suffix on the input string is so Marpa itself is always dealing with just the input string, not 2 strings, so you just fiddle the pos Marpa looks at?
23:15 jeffreykegler That's right.  Marpa insists on a single input string.
23:16 jeffreykegler The suffix contains the potential Ruby Slippers tokens, and it's put at the end so that it does not interfere with line and column counts in the "real" input string.
23:17 jeffreykegler Btw, I've corrected the comments, and the new version is on Github: https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/bracket.pl
23:34 ronsavage OK. I'll look at that. And I changed your intro code to be:
23:34 ronsavage my($suffix) = '(){}[]';
23:34 ronsavage my(@char)  = split(//, $suffix);
23:34 ronsavage my(%tokens);
23:34 ronsavage $tokens{$char[$_]} = [$_, 1] for (0 .. $#char);
23:34 ronsavage Exercise for the reader: Change Jeffrey's gist to ignore escaped brackets!
23:38 ronsavage I'm documenting adding this to Marpa :: Demo :: SampleScripts. Is this text ok:
23:38 ronsavage This program uses the method of adding known tokens (my $suffix = '(){}[]';) to the end of the input
23:38 ronsavage string so Marpa can be told to search just that part of the string when the logic dictates that a
23:38 ronsavage known token (bracket) is to be passed to Marpa to satisfy the grammar. This is usage of Ruby
23:38 ronsavage Slippers. It's put at the end so that it does not interfere with line and column counts in the
23:38 ronsavage original input string.
23:55 jeffreykegler Instead of "known token", I'd say "Ruiby Slippers token".  It's clearer and sounds really cool. :-)
23:56 jeffreykegler Btw, I plan to post about this script first to the Google group, then to my blog.

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