Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-20

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

All times shown according to UTC.

Time Nick Message
02:35 ronsavage joined #marpa
02:52 ronsavage jeffreykegler: Is 'start' syntactic sugar for ':start'?
03:02 jeffreykegler <start> is allowed as a symbol.  I'm not sure if that is the question you were asking, was it?
03:04 jeffreykegler The symbol <start> can be used for anything, so it isn't the start symbol of the grammar unless something else makes that so.
03:16 ronsavage I had the impression the word start was treated specially - as a synonym for :start - while studying the output of MarpaX::Grammar::Parser when run on metag.bnf.
03:18 jeffreykegler Is that output somewhere that I can look at?
03:36 ronsavage The code doesn't run at the moment. Let me play with it.
03:37 jeffreykegler OK.
04:22 jeffreykegler joined #marpa
04:23 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "Test of Ruby Slippers with SLIF" (110 lines) at http://scsys.co.uk:8002/433276
04:24 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "Output of Ruby Slippers test" (14 lines) at http://scsys.co.uk:8002/433277
04:25 jeffreykegler I mentioned my hope that the new features I'd added to Marpa::R2 allow you to use the Ruby Slippers in the SLIF.
04:25 jeffreykegler But I hadn't tested it, so I did and ...........................................
04:26 jeffreykegler it worked right off the bat!
04:26 jeffreykegler The above two pastes are an example script and its output.
04:45 jdurand joined #marpa
04:45 jdurand Re http://irclog.perlgeek.de/​marpa/2014-10-20#i_9534695 - then it could replace the automatic semicolon insertion mechanism I wrote with your help for ECMAScript isnt'it?
05:59 ronsavage joined #marpa
07:02 rns joined #marpa
07:03 rns re http://irclog.perlgeek.de/​marpa/2014-10-20#i_9534733 — lua has optional semicolons too. :)
07:06 rns Overall, great news, congratularions and thanks are in order!
08:50 jeffreykegler joined #marpa
08:53 jeffreykegler jdurand: re http://irclog.perlgeek.de/​marpa/2014-10-20#i_9534733 -- yes, it's for exactly that kind of thing.  Although at this point I don't recall the specifics, so whether it goes far enough I don't guarantee, but I hope so.
08:56 jeffreykegler Also, the efficiency tradeoff will be worth watching.  The new events shouldn't be very expensive, but they do involve a transfer of control from XS to Perl, and then (presumably) back.  If the logic being replaced also involves a round trip from XS to Perl and back, these new mechanisms should be a a win.
09:02 asb joined #marpa
09:02 asb Hi! The example in the Marpa::R2 documentation cannot handle expressions like 1 + 1 + 1 - how do I get these to work?
09:04 jeffreykegler Which doc?
09:07 asb https://metacpan.org/pod/Marpa::R2
09:12 jeffreykegler Hmmm.  Interesting.  It's 2AM here (California), so I won't be able to look at this for a few hours.
09:12 jeffreykegler Perhaps someone else can take a shot in the meantime.
09:13 asb uh, 2 AM...  I can post it to google groups, too
09:14 jeffreykegler Sure.  Although there's a lot of overlap between the people on this channel and those who respond on G+
09:16 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "1 + 1 + 1 issue" (8 lines) at http://scsys.co.uk:8002/433321
09:16 jeffreykegler Is what I just pasted something like what you're seeing?
09:17 asb yes, that's the message
09:18 jeffreykegler It doesn't look right to me, but I'll have to look again when I'm awake. :-)
09:19 asb yure :) I created a thread in the marpa parser group
09:20 jeffreykegler On the G+ message, you might want to add some of these details -- exactly which example, and a link to my input showing something like the error message you get.
09:21 jeffreykegler Typical in this cases is that you would be asked to create a minimal example of your own, showing the problem, though it does seem pretty clear at this point.
09:21 jeffreykegler Sorry to have to go.  I will look back at this later.
09:22 jeffreykegler Hopefully somebody will solve it for me while I'm asleep. :-)
09:22 jeffreykegler AFK
09:28 jeffreykegler joined #marpa
09:31 jeffreykegler I'm back.  I had a guess as to what the issue is, but I couldn't imagine I'd make a mistake that stupid.  (The synopsis is a basic textbook example, which I wrote up from memory, but screwed up.)
09:31 jeffreykegler I'm working on the fix.  Give me a few minutes.
09:36 shadowpaste "jeffreykegler" at 162.232.214.245 pasted "Fix to 1 + 1 + 1 problem" (77 lines) at http://scsys.co.uk:8002/433323
09:36 jeffreykegler asb: I think that should fix the issue.  Thanks for catching this!!
09:37 asb ah, added left recursion
09:37 jeffreykegler The script I pasted will fail, but the error will be that the answer is now 3, which is what you want, instead of the originally expected 49.
09:38 asb thank you!
09:39 jeffreykegler You are extremely welcome!  Your straightforward approach exposed a very embarrassing mistake, which I am grateful to you for the chance to eliminate.
09:40 asb yw
10:22 asb left #marpa
13:43 asb joined #marpa
16:56 jeffreykegler joined #marpa
17:21 asb joined #marpa
17:24 asb Hi! Is there a way to inspect why a parse is exhausted? I don't finf the error in my grammar.
17:25 jeffreykegler Not really.  Exhausted means you've reached a point where there is no way to continue, so the concept of a specific "reason" for it is hard to define.
17:25 jeffreykegler Parse exhaustion can be viewed as an absence of reasons to continue.
17:26 jeffreykegler To find the state of the grammar, however, you can use progress reports.
17:26 jeffreykegler I think the tutorial example is one of tracing down a case of unexpected exhaustion.
17:27 jeffreykegler https://metacpan.org/pod/Marpa::R2::Progress
17:27 jeffreykegler That may be what you're looking for.
17:37 asb I just had a look at Marpa::R2::Scanless::R and there is an error in the synopsis. The variable §EVAL_ERROR is not defined. Where should it come from? should it be $@?
17:40 jeffreykegler All code in the synopses is tested.  This won't detect misdesigns, like the one you discovered a few hours ago, but it will spot any outright failure to run.
17:41 jeffreykegler Code in the synopses is extracted from a larger context, so not all variables are necessarily defined in the extract.
17:42 asb hm, ok. I just wondered because I searched the POD for it and there is no other occurrence
17:43 jeffreykegler In this case, EVAL_ERROR is exported by "use English qw( -no_match_vars );", which is one of the header lines not included in the extract.
17:44 jeffreykegler English is a commonly used module which allows all those strangely named perl variables to be accessible via English names.
17:44 jeffreykegler Such coding standards suggest, or even insist on, its use.
17:45 asb I just looked it up. I never used the module so I wasn't aware of it
17:45 asb sorry.
17:46 jeffreykegler When I encounter stuff like that, like somebody using ABCD_WXYZ in a module, with no explanation, I will Google "Perl ABCD_WXYZ", which often explains it.
17:48 jeffreykegler * "Such coding standards" -> "Some coding standards"
19:00 jdurand_ joined #marpa
19:00 jdurand_ Jeffrey - I have a tiny path for win32/do_config_h.pl but it is at three locations in libmarpa's git - which one is the master ?
19:01 jdurand_ Locations: ./dist/win32/do_config_h.pl ./work/stage/win32/do_config_h.pl ./work/win32/do_config_h.pl
19:01 jdurand_ "tiny patch" sorry
19:41 flaviu joined #marpa
20:11 jeffreykegler joined #marpa
20:12 jeffreykegler jdurand: ./dist/win32/do_config_h.pl
21:02 flaviu joined #marpa

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