Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-02-23

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

All times shown according to UTC.

Time Nick Message
00:32 ronsavage joined #marpa
00:53 lucs jeffreykegler: Do you mean the logs?
00:57 lucs (Some entries appear to be missing -- I think we lost the log bot a bit from netsplits.)
01:06 jeffreykegler lucs: yes, I noticed.  I take it that stuff is gone forever?
01:08 lucs Well, some of us have some of it in our irc client backlog; not sure how we could reincorporate it into the archive though.
01:09 lucs And strangely enough, ilbot3 appears to be currently present, but the log page doesn't seem to get updated.
01:12 jeffreykegler lucs: my log is getting updated
01:12 jeffreykegler lucs: or, to be exact, messages show up if I refresh.
01:13 jeffreykegler lucs: by the way, just so everyone is clear on how this channel works --
01:14 jeffreykegler lucs: I take it that you're our channel operator and owner?
01:15 lucs Oh, I just happen to use some privileges, to give a hand: you and lwa are the "founders", and you have all the privileges that /chanserv can give.
01:16 lucs Do a  /msg chanserv help  for details.
01:16 jeffreykegler I'm pretty clueless about IRC, so I'm just as happy to have zero privileges.
01:18 lucs Well, you might as well keep the privileges, and read up on it when/if you need  to.
01:18 jeffreykegler lucs: Sounds like a good suggestion.  I take it you have enough privileges to do whatever's needed?
01:19 jeffreykegler lucs: I'm asking now, so when the next crisis comes, I'll be clearer about things.
01:19 lucs I think so. Hang on...
01:22 lucs If I do:  /msg chanserv status #marpa  , I get: "You have access flags +ARfiorstv on #marpa."
01:22 lucs If you do the same, you'll see your privileges, then ask  /msg chanserv help flags  to see what they're about.
01:22 jeffreykegler lucs: :) OK. Looks impressive. :)
01:22 lucs jeffreykegler: You have more :)
01:25 jeffreykegler lucs: also I take it the first place to go if there's an issue we cannot handle is #freenode?
01:26 lucs Well, a lot of regular freenode users are rather knowledgeable (not me in particular), so just asking in the channel can be useful.
01:26 lucs (Note that not too many people hang out here, yet ;-) )
01:27 lucs SO yeah, the #freenode channel is one place, and also freenode.org on the web has a lot of info.
01:28 lucs For the bot (ilbot3) stuff, it's moritz I believe.
01:30 jeffreykegler Which reminds me ...
01:30 lucs Haha! The reason I wasn't seeing the updated logs is because there was a date change right around when I was checking.
01:31 jeffreykegler Are the missing IRC entries lost forever?
01:32 jeffreykegler If so, folks should re-enter any worth having on the record.
01:33 lucs If the bot didn't log them, they are lost, unless someone repastes them or something.
01:34 jeffreykegler So folks, that's the story ... the log has a gap going back a few hours and anything you don't see in it, which is worth recording ...
01:34 jeffreykegler please re-enter it.
01:34 lucs Here are some I see are missing from the log, by jdurand:
01:36 lucs < jdurand> May I share with you something that I found useful: have singletons of grammars, because building a G takes time... c.f. http://cpansearch.perl.org/src/JDDPAUSE/MarpaX-Languages-ECMAScript-AST-0.014/lib/MarpaX/Languages/ECMAScript/AST/Impl/Singleton.pm
01:37 lucs < shadowpaste> "jdurand" at 88.160.190.154 pasted "Marpa-R2-2.081_000: lib/Marpa/R2.xs warning" (6 lines) at http://scsys.co.uk:8002/310858
01:37 lucs < jdurand> Re http://irclog.perlgeek.de/marpa/2014-02-22#i_8325612 : tested ok - since I am using such feature for transpiling, I plan to switch to a default G1 action like [rule,values]
01:38 lucs From my point of view, that's all that was missing.
01:39 jeffreykegler lucs: thanks!
01:39 lucs Sure thing.
09:59 jdurand joined #marpa
10:00 jdurand Jeffrey, about name and symbol array descriptors, are they available when inspecting the grammar. My use case is the following:
10:00 jdurand I generate a transpiling package using G->rule_ids
10:01 jdurand and, at runtime, it is ok if I use [rule] in the action
10:01 jdurand now if I want to use [name] or [symbol] in the actions, I'd need to know them in advance when I generate the transpiling package by inspecting the grammar
10:04 jdurand I.e. may I suggest a G->rule_names() method? This would follow point 3.) at http://scsys.co.uk:8002/310322, i.e. symbol name for a lexeme or a nulled symbol, explicit name of rule's LHS for a G1 thingy
11:46 jdurand_ joined #marpa
11:53 jeffreykegler joined #marpa
11:54 jeffreykegler jdurand: re http://irclog.perlgeek.de/marpa/2014-02-23#i_8330338 -- sounds good. Could you create a Github issue, for tracking progress?
17:38 jdurand joined #marpa
17:41 jdurand Jeffrey, a generic question about BNF: is there algorithms that measure the cardinality iof individual rules ? For instance the ":start" should have 1, others will have between 0 and 1. The cardinality should increase as the rule is "near the :start". The difficulty of course comes for recursivity.
17:42 jdurand My idea would be to use such algorithm to select all the alternatives, ordered by cardinality, in a new ":start" of the C grammar.
17:48 jeffreykegler joined #marpa
17:51 jeffreykegler jdurand: re http://irclog.perlgeek.de/marpa/2014-02-23#i_8331582 -- I didn't follow this.  I think you might be referring to "depth", where depth is the number of nodes between the :start and the current node.
17:52 jeffreykegler In case of recursivity, depth is the minimum of the possible values.
17:52 jdurand let's call it depth, yes
17:53 jdurand Ok - is there a generic algorithm in some paper somewhere!?
17:53 jeffreykegler I've programmed this a few times, you start at the start node (of course)
17:53 * jdurand is listening
17:53 jeffreykegler Probably though I invented my own -- I'm not sure where to find code, but I can describe it
17:54 jeffreykegler Start at :start, numbering it 0
17:54 jeffreykegler Number it's children 1, and push them onto a stack.
17:55 jeffreykegler Then pull items off the stack.  Every one you pull, if it's number is n, you number it's children n+1, and push them on the stack.
17:55 jeffreykegler Track everything pushed on the stack, and refuse to push the same node twice.
17:55 jeffreykegler When the stack is empty you are done, and all nodes are numbered by depth.
17:56 jdurand Ah, very good - seems easy! Will try that. many thanks!!!!
18:12 jeffreykegler jdurand: re the above algorithm -- to guarantee every node has the minimum depth, the structure needs to be a queue, not a stack ...
18:13 jeffreykegler last-in-last-out, instead of last-in-first-out
18:22 jdurand ok, I was writing it
18:23 jdurand and is using rule_ids to get all Ids; followed by symbol_name on the output of rule_expand
18:23 jdurand but ahem, :start is not shown in the output of rule_ids, isn't it
18:24 jeffreykegler :start is a pseudo-symbol and it's rule is a pseudo-rule :-)
18:24 jdurand Ok. So the question is: how to I get :start definition
18:25 jeffreykegler In the SLIF?  Good question.
18:26 jdurand Indeed -;
18:27 jeffreykegler If there's nothing helpful in the Scanless::G pod, I think I'll have to add something.
18:32 jdurand I let you think about it - this is not showstopper for me at all, since I know the grammar top - but for a generic algorithm this would be need, acked
18:32 jdurand "the grammar top rule"
18:33 jeffreykegler jdurand: Could you file another github issue?   Stuff in the IRC backlog tends to get forgotten.
18:34 jeffreykegler I could create an issue myself, but if you do it, you'll automatically be updated.
18:36 jdurand ok
18:49 jdurand Strange. I see you did an update to issue 121 - did not received a mail
18:51 jeffreykegler I know -- I haven't been getting some of the Github notifications either.
18:53 jdurand ok, 121 updated and your comment acked
18:54 * jdurand is happy: 99% needed is now here, cpretty can go on - an in parallel I made very good progress on JavaScript::Transpile
19:01 jeffreykegler I've just commit some new documentation to the repository, about ambiguity in the SLIF: https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/pod/Scanless/DSL.pod#ambiguity
19:01 jeffreykegler * commit -> committed
19:02 jeffreykegler The SLIF has been potentially ambiguous for some time -- meaning that I can create new syntax without worrying about whether it can be dis-ambiguated from the old syntax.
19:02 jeffreykegler This makes it a lot easier to be creative in writing a new language.
19:03 jeffreykegler So far, the one real example is the statement I just created for Jean-Damien.
19:03 jeffreykegler I wanted a way to say that inaccessible symbols are OK by default, which didn't really fit into any current pseudo-rules or syntax, so ...
19:04 jeffreykegler I thought to myself, how about just saying "inaccessible is ok by default"?
19:04 jeffreykegler Ordinarily that would be a problem, because it creates a whole bunch of new keywords, which could be confused with BNF symbols.
19:05 jeffreykegler But if it's the first statement, it cannot be a RHS, which Marpa can figure out.
19:06 jeffreykegler And if you write "xyz ::= a a a a inaccessible is ok by default", you get an error message pinpointing the problem ...
19:06 jdurand Yes, I see - nicely done - and reading the doc I learn about the curly braces
19:07 jeffreykegler which you can fix, among other ways, with a semicolon: "xyz ::= a a a a; inaccessible is ok by default"
19:08 jeffreykegler The big advantage here is that it now becomes a *LOT* harder to paint yourself into a corner when designing a new language.
19:59 LLamaRider joined #marpa
22:08 ronsavage jeffreykegler: But what is the meaning of 'inaccessible is warn by default'?
22:11 jeffreykegler joined #marpa
22:12 jeffreykegler ronsavage: re http://irclog.perlgeek.de/marpa/2014-02-23#i_8332890 -- it says that if you have an inaccessible symbol, warn the user, but proceed with the parse ...
22:13 jeffreykegler an inaccessible symbol (aka unreachable) is one that you cannot get to from the start symbol -- usually as a result of a mistake in writing the grammar ...
22:14 jeffreykegler but not always.  Jean-Damien has been experimenting with subsetting larger grammars by changing the start symbol, and in the process knowingly creates vast numbers of inaccessible symbols.
22:15 jeffreykegler Alternatives to "warn" (which is the default) are "ok" and "fatal".  "ok" means inaccessibles are fine, just proceed and don't bother me with no stinkin' messages.
22:16 jeffreykegler "fatal" is the opposite and well worth considering for most grammars -- typically an inaccessible means a mistake and you may well want to "fail fast" ...
22:16 jeffreykegler because a warning might get lost in a lot of other output.
23:08 jeffreykegler Just sent an email to the list, asking for a renewed RFD on "interface 2", and giving a new proposal for it.
23:09 jeffreykegler In case you're wondering, my criteria for asking the IRC channel versus the list is the breadth of response I am looking for.
23:12 jeffreykegler If I want to hear from people who are less interested in Marpa, and who don't follow this channel, even through the backlogs, I ask the Google group.

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