Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-22

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

All times shown according to UTC.

Time Nick Message
01:07 jeffreykegler joined #marpa
02:09 ronsavage joined #marpa
02:58 ronsavage See who links to your site: http://siteexplorer.info/domain/savage.net.au
07:49 ronsavage joined #marpa
11:01 asb joined #marpa
11:02 asb Hi! Did somebody already use Marpa::R2 in a moose-based class? I'm looking for how to provide object data to actions
11:25 asb Or, to put it simpler: is there a way to pass data to an action?
15:06 jeffreykegler joined #marpa
15:51 jeffreykegler asb: I have not used Moose.  I think at least one person *has* used Moose with Marpa, but I forget who.
15:52 jeffreykegler You might try re-asking on the G+ group, which has a greater variety of readers.
15:54 jeffreykegler Also, you might trying searching the G+ archive for mentions of Moose.  I may mis-remember but I think successful Marpa-Moose efforts have been reported there.
17:08 lwa joined #marpa
17:22 asb_ joined #marpa
20:19 flaviu joined #marpa
21:05 ronsavage asb: Re Marpa+Moose. Impossible. Marpa calls the object's new(), which is incompatible with Moose. See MarpaX::Languages::SVG::Parser for use of an action's module without new().
21:06 ronsavage The interaction between Marpa andMarpaX::Languages::SVG::Parser::Actions happens in MarpaX::Languages::SVG::Parser::SAXHandler actually, not in MarpaX::Languages::SVG::Parser, but that should not matter.
21:07 ronsavage The actions file has no Moo/Moose etc, so the Moose-style init never takes place, and Marpa searches for and fails to find new(), so there is no object-level init as you expect with a class/object based on new().
21:09 ronsavage BTW: You're vastly better off using Moo rather than Moose. I do understand there may be non-code-based reasons for using Moose, but I've wiped out all trace of Moose in my code.
21:10 ronsavage It was not used on all 95-or-so modules of course, but where it was used it's gone, with no loss of power /from my point of view/. Others may disagree :-)
21:11 ronsavage I should say 95-or-so distro, some having many separate modules.
21:11 ronsavage Damn. disto => distro/s/.
21:14 ronsavage I should add: In the actions module, I used 'our' variables, so I could, if desired, init them from the module which 'use's the actions module. I do do that.
21:15 ronsavage See the SAXHandler line 290, and later (in the calling sequence) line 192, where a function in the actions module is called to re-init local variables within the action stuff.
21:15 ronsavage The reason it's 're'-init is because then any number of parses can take place. The line 290 sets the logger from the caller, and that is never reset.
21:31 jdurand_ joined #marpa
21:40 jdurand_ ronsage: Re http://irclog.perlgeek.de/​marpa/2014-10-22#i_9550855 - more precisely I'd rephrase it to "Marpa searches for new() in the object's namespace". I found this issue was raised on G+ end of last year in fact, c.f. https://groups.google.com/d/msg/mar​pa-parser/xx_85_d6g1I/v26SwWiZ6fcJ
21:49 jdurand_ asb: Ron save is right, so, and I guess that the backward-but-painful workaround is to have: use SUPER; sub new { super(); }   .... unless you already overrided this method of course. Totally untested -;
21:50 jdurand_ I meant "Ron savage" - deep apologizes, Ron!
22:09 jdurand joined #marpa
22:13 jdurand Well..; back on super, you better of asking for an eventual fix -; just calling super() might not do it, question of blessing - oh well, there is unbless in Data::Structure::Util -; AFK
23:12 flaviu joined #marpa

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