Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-01-13

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

All times shown according to UTC.

Time Nick Message
02:13 spacebat joined #marpa
02:14 spacebat hi, I'm a lurker on the list, good to see marpa come to irc
02:15 spacebat I've done little with parsers and parser generators over the years, and while I understand enough to know that marpa is significant I've not found an easy resource to get started
02:16 spacebat is there is a series of blog posts or other resource that would serve as a good tutorial for marpa2 for someone as ignorant of the field as I am
03:43 jeffreykegler joined #marpa
03:47 jeffreykegler spacebat: The annotated list of my blog posts has section for my tutorials: http://jeffreykegler.github.io/Ocean-of-Awar​eness-blog/metapages/annotated.html#TUTORIAL
03:49 jeffreykegler Peter Stuifzand has done a good one: http://marpa-guide.github.io/chapter1.html
03:49 jeffreykegler as has amon: http://longanswers.blogspot.de/2​013/06/transforming-syntax.html
03:50 jeffreykegler ... and the docs start out in semi-tutorial fashion.  Hope this helps.
03:59 spacebat thanks jeffreykegler :)
04:05 * lucs wondered for a minute whether jeffreykegler was psychic, to join the channel with an answer like that, but then he remembered about the channel logs :)
04:31 jeffreykegler left #marpa
04:50 jeffreykegler joined #marpa
04:51 jeffreykegler AWL: I've been thinking about off-side rules.  I looked at https://gist.github.com/latk/8388985
04:52 jeffreykegler * LWA
04:53 jeffreykegler With regard to statements that continue on another line, those can be handled using the Ruby Slippers.
04:53 jeffreykegler I don't have a fully worked out strategy in your case, but take the following as an example
04:55 jeffreykegler You treat all newlines as ending statements, and supply a special end-of-statement token.  That means that in your example the statement that divides over two lines will reject the end-of-statement token.
04:55 jeffreykegler When that happens you know that the following whitespace must be treated specially, and not counted for indent and exdent purposes.
04:57 jeffreykegler A similar issue came up when jdurand was working on his ECMAScript transpiler, and I dealt with it on the Google group: https://groups.google.com/forum/#!s​earchin/marpa-parser/ECMAscript/mar​pa-parser/7yk2JhPvp5Y/K0w67ossNhcJ
04:58 jeffreykegler This was very telegraphic I know, but I hope it conveys the idea.
04:58 jeffreykegler left #marpa
05:45 LWA joined #marpa
09:59 jeffreykegler joined #marpa
14:35 LWA joined #marpa
17:08 jeffreykegler joined #marpa
17:09 jeffreykegler joined #marpa
17:12 rns_ joined #marpa
18:10 LLamalessRider joined #marpa
18:48 ilbot3 joined #marpa
18:48 topic for #marpa is now Current release: https://metacpan.org/pod/Marpa::R2   Source: https://github.com/jeffreykegler/Marpa--R2   public logs at http://irclog.perlgeek.de/marpa/today
18:48 LLamalessRider jeffreykegler: I was wondering if it makes sense to have a rule_action method for the Scanless::G grammars, that can "fetch" the action subroutine I wrote in the DSL.
18:50 LLamalessRider something of such sort would help keep my SLIF grammar and still work with the information in it when traversing the ASF
18:51 jeffreykegler LLamalessRider: good idea.  Can you create a github issue?
18:51 LLamalessRider on it
18:52 jeffreykegler Note that I may not get to it quickly.  I am very much immersed on a libmarpa reworking, one which I hope will be significant.
18:53 LLamalessRider noted. Will consider workarounds until then in that case
18:56 jeffreykegler It's something that can be done at the application level, and that way I can benefit from the implementation and interface ideas.
19:04 jdurand joined #marpa
19:17 LLamalessRider joined #marpa
20:16 jdurand I am thinking there is nothing in the test suite to check thread-safety of Marpa - ok, is Marpa supposed to be thread-safe
20:19 LLamaRider I guess those are two questions - should libmarpa be thread safe, and should Marpa::R2 be thread safe. The topic of threads in Perl 5 is somewhat baffling.
20:23 rns_ joined #marpa
20:23 jdurand Good comment - these are two different beasts
20:27 LLamaRider Actually, this may be a very cool subject to think about - if one is interested in ambiguous parsing (I am!) can the parsing process be split into a separate thread for every branch of the parse forest (ASF)? That would be neat.
20:27 LLamaRider Then I get the same runtime for an unambiguous parse and for any ambiguous parse with N parses where N <= number of cores in my CPU
20:27 LWA joined #marpa
20:28 LLamaRider now *that* would be amazing... Since I intend to routinely parse ~50 million input strings (math formulas)
20:29 LLamaRider sorry to deviate in tangents, I just self-motivated a use case for threading. I guess Jeffrey will have to pinch in on the core subject.
20:41 LWA jeffreykegler: I just went through your ideas on offside-rule parsing with line continuations (http://irclog.perlgeek.de/​marpa/2014-01-13#i_8110729).
20:41 LWA You're right that Ruby Slippers get rid of some complications, but I'm not sure that they fully eliminate the central problem of state in the Lexer. I'll see if I'll write a prototype sometime exploring this, but this isn't a very high priority for me
20:41 LWA (Solving these problems is however a prerequisite for writing a Markdown parser – not exactly a low-hanging fruit)
20:43 jeffreykegler LWA: I need a sign "Fruit may be higher than it appears" :)
20:44 jeffreykegler LWA: Lexer state in itself is not typically regarded as a problem.  State is built into flex.
20:46 jeffreykegler LLamaRider: re threading the multiple ambiguities in an ambiguous parse.  Standard wisdom is that threading does not help with parsing, and Marpa is no exception to this.
20:46 LWA jeffreykegler: Lexer state is a potential problem with Marpa, which can explore ambiguous rules and read alternative tokens at each position. I don't think events can be used to manage the necessary indentation stack without a "rule discarded" event. (Or did I miss it in the docs?)
20:47 jeffreykegler jdurand: Marpa is supposed to be thread-safe, and runs threaded if Perl is threaded.  I believe many of the CPANtesters run threaded Perl's.
20:49 jeffreykegler jdurand: but note this is threaded in the sense the parses from several different grammars can run in parallel.  Everything created from a single Marpa grammar must run in the same thread.
20:49 jdurand jeffreykegler: ok, then I propose to write a template for a multithreaded test - the most vicious being a test that will run in parallel the others tests in the t/ directory -;
20:50 jeffreykegler AFK -- off to lunch
20:50 jeffreykegler left #marpa
20:58 jdurand I profit from jeffrey being absent, ahem, what means "AFK"?
20:58 LLamaRider away from keyboard ^^
20:59 LLamaRider and the ^^ emoticon is roughly covered as 'joyful' by wikipedia. I should probably go easy on emoticons in this channel.
21:00 jdurand mdr (== a joyful lol in french) - thx
21:06 lucs jdurand: Careful, there are public logs (see /topic); tout ce que vous dites pourra être retenu contre vous! ;)
22:14 sivoais joined #marpa
22:42 ronsavage joined #marpa
22:52 ronsavage spacebat: Another resource is http://savage.net.au/Perl-modul​es/html/marpa.papers/index.html
22:53 ronsavage spacebat: Also the items in this doc need to be moved into the FAQ of the Marpa Papers: http://savage.net.au/Perl-modul​es/html/marpa.papers/Marpa.html

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