Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-07-20

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

All times shown according to UTC.

Time Nick Message
00:24 RichardMichaels hi
01:48 ilbot3 joined #marpa
01:48 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
02:20 jeffreykegler joined #marpa
03:29 ronsavage RM: Hi (again). Are you testing your connexion?
03:41 idiosyncrat joined #marpa
03:42 jeffreykegler ronsavage: I think of RM's message as kind of a daily sign-on
03:43 jeffreykegler They do the same thing on #perl6 -- every day there's a message around midnight GMT, except it's a "good night" instead of a "hi"
03:54 ronsavage jk: Ahh. Ok. Hmmm - Does each person on #perl6 send a sign-on msg? Presumably no, but rather it's configured in their individual irc clients.
04:07 idiosyncrat ronsavage: for example, http://irclog.perlgeek.de/p​erl6/2015-07-19#i_10920944
04:07 idiosyncrat On perl6 one person, masak, does it.  It's sort of a custom.
06:04 ronsavage joined #marpa
08:56 CQ joined #marpa
11:12 pczarn joined #marpa
13:25 lwa joined #marpa
14:13 koo7 joined #marpa
14:30 RichardMichaels joined #marpa
14:40 KotH_ joined #marpa
14:42 hobbs joined #marpa
14:42 hobbs joined #marpa
14:42 ceridwen joined #marpa
14:42 ceridwen joined #marpa
14:58 RichardMichaels hi
15:31 pczarn Eliminating nullable symbols is really convenient
15:52 RichardMichaels It certainly sounds like it
16:15 pczarn what kinds of grammars and parses may produce Earley sets with many distinct items and origin values?
16:16 pczarn oh, items are always unique but origins aren't
16:20 Aria Yup.
16:21 pczarn I'm still interested in origin numbers
16:25 Aria What about them?
16:28 pczarn a raw report from a small sample parsed with C::Ast shows there are at most 6 different origins of items in a set
17:01 jeffreykegler joined #marpa
17:01 jeffreykegler pczarn: Interesting
17:02 jeffreykegler and it is nice to see Jean-Damien work in use
17:24 koo7 joined #marpa
17:29 pczarn jeffreykegler: could a dotted rule be represented as a small index into an array?
17:30 jeffreykegler Sure
17:30 jeffreykegler Kollos is going to binarize all rules, so that means 2 bits for the index ...
17:31 jeffreykegler the only possible positions are at the beginning, between symbols in a 2 symbol rule, and at the end.
17:32 jeffreykegler But hacking the parse engine will have to wait until after we port over the Marpa::R2 test suite,
17:32 jeffreykegler a project for which I hoping to have considerable help.
17:34 pczarn what's the benefit of binarizing all rules? I imagine many rules would be added during a rewrite
17:35 pczarn I meant something else
17:36 jeffreykegler Effectively they get binarized all over the place already, in links during parsing, and in the bocage for evaluation.
17:36 jeffreykegler And a binarized rule fits in a very small fixed length structure.
17:37 jeffreykegler Currently Libmarpa allows rules of basically arbitrary length, and that means a lot of logic to handle the very long rules that nobody every really uses.
17:40 pczarn I'm currently storing rules in an array of structs: [(Sum -> Sum [+-] Product), (Sum -> Product), (Product -> Factor, ....)]
17:40 jeffreykegler What language?
17:41 pczarn Rust, but the above is pseudocode
17:41 jeffreykegler Are variable length arrays built-in in Rust?
17:42 pczarn like in C++ except for variable length arrays owned on the stack
17:42 jeffreykegler Libmarpa is in C, so you've got to hand-code them (or use a library)
17:43 pczarn you have to store a rule pointer besides that 2 bit index
17:43 pczarn unless it's an aligned pointer
17:43 jeffreykegler Libmarpa aims to be heavily optimized and variable-length arrays cost considerably more than a small fixed length one.
17:44 pczarn in an Earley item/dotted rule
17:44 jeffreykegler The list of rules is known before the parse, so an index into an array of them can be used ...
17:44 jeffreykegler although in Libmarpa it may be a pointer, yes.
17:45 jeffreykegler I say "may be" because I don't remember.
17:46 pczarn so it may be an index into a flat array [Sum [+-] Product END Product END Factor END ...], Sum -> [0, 4], Product -> [6]
17:47 jeffreykegler Yes, and therefore could be packed with some other flags into a 64-bit word.
17:47 jeffreykegler I say 64-bit, because it seems to make sense to optimize for 64 bits at this point in history.
17:48 jeffreykegler All my equipment is 32-bit, but I suspect computers with 32-bit chips aren't going to be shipped for much longer.
17:50 pczarn and I'm now convinced an Earley item would ideally have 64 bits
17:56 jeffreykegler As I pointed out to Aria the other day, how to best pack Earley items is not the real question in practice ...
17:56 jeffreykegler the real question is how to pack Earley items *plus links*, with the links being the trickiest and most space-consuming part.
18:00 Aria Yeah, not sure on 32-bit. I think they'll last for a long time in the embedded space. But definitely things that favor 64-bits are to be expected at this point
18:03 pczarn what are links? how do they work?
18:07 pczarn if Earley sets are stored in a single dynamic array, origin indices must be replaced with links, I guess
18:08 Aria links let you construct enough backreference to construct a tree efficiently.
18:09 pczarn at what stage? is that only used for evaluation?
18:10 Aria You create them as you parse, or that's one obvious place to.
18:13 pczarn thanks, I'll find out more at some point
18:40 mvuets joined #marpa
20:09 pczarn Just a progress reminder: Loup's tutorial recently went from 66% to 75% complete. He wrote a few paragraphs on code generation which could be very useful to me
20:27 Aria Oo.
20:29 mvuets hello! i commited into giving a talk at a local PM meetup upcoming Monday
20:29 mvuets haven't ever used Marpa before and could not get around to start looking into it yet
20:32 mvuets who wants to stake on it? (-:
20:33 mvuets my talk is about toki pona (a constructed minimalist language). someone made a formal grammar of the language and i thought i could try adapt it for Marpa
20:33 mvuets to make a simple sentence validator
20:33 Aria Oh neat!
20:34 Aria <3 Toki pona.
20:34 * Aria knows the creator a bit.
20:34 mvuets oh! this tiny tiny world is tiny
20:34 Aria Isn't it?
20:35 * mvuets is tempted to say something sophisticated in toki pona, but cannot
20:35 mvuets and the next part of my great plan is to use a resulting AST to train a Markov chain model and make some rubbish generator
20:36 mvuets so. any help, suggestions, blame, and praise are very welcome
22:13 ernimril joined #marpa
22:36 ronsavage joined #marpa
23:59 jeffreykegler joined #marpa

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