Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-05-01

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

All times shown according to UTC.

Time Nick Message
04:40 jeffreykegler joined #marpa
04:41 jeffreykegler jdurand: re the semantics callback interface, and adding it into Libmarpa my thinking is ...
04:42 jeffreykegler1 joined #marpa
04:42 jeffreykegler1 that it'd be a simple, standard layer on top of the present event-driven semantics.
04:43 jeffreykegler1 This new layer would become the one in the main documentation, and the present event-driven interface ...
04:43 jeffreykegler1 would be moved into an "Advanced interfaces" section at the end.
04:43 jeffreykegler1 One more step toward making a programmer's first encounter with Libmarpa a less daunting than it is now.
14:56 jeffreykegler joined #marpa
14:58 jeffreykegler From the blogosphere, a short but very favorable review of Marpa: http://semantic-programming.blogspot.com/2014/05/marpa.html
17:15 LLamaRider joined #marpa
17:22 LLamaRider joined #marpa
18:50 jdurand joined #marpa
18:51 jdurand Re http://irclog.perlgeek.de/marpa/2014-05-01#i_8662441 - good, popularity increases, slowly but surely
19:17 jdurand Jeffrey, when I read: marpa_g_symbol_new (Marpa_Grammar g) returns the ID of a new symbol; On failure, −2...
19:18 jdurand Does this mean that any value other than -2 is a success ? I am pretty sure that any value < 0 is a failure isn't it
19:19 jeffreykegler It means status in case of anything but a valid symbol ID or -2 is not defined.
19:19 jeffreykegler Which the prudent application will treat as a very serious failure.
19:20 jeffreykegler In other words, return values of, for example, -1 or -3, are not supposed to happen.
19:22 jdurand But are they acceptable ieven if not supposed to happen? An application will do: if (returnvalue != -2) reading the doc. Is this correct, then?
19:23 jeffreykegler Yes, that would be correct.
19:24 jdurand Ok, very good -; thanks!
19:26 jeffreykegler If I were programming in this situation, I would write it "if (returnvalue >= 0)", but that's a matter of style, and of "defensive programming".
19:31 jdurand Because you know the internals i.e. that a Marpa_Symbol_ID must be >= 0 - the doc does not state that AFAIK
19:48 jeffreykegler The Libmarpa doc should state that -- I'll look at it.
19:50 jdurand Was it a choice to have no marpa_g_symbol_unref(), marpa_g_rule_undef() and so on ?
19:50 jdurand Hmmm... "_unref", or "_destroy", you see what I mean
19:53 jeffreykegler There's a discussion about this in the Libmarpa doc: http://jeffreykegler.github.io/Marpa-web-site/libmarpa_api/latest/Architecture.html#Architecture
19:54 jeffreykegler Basically, Libmarpa has "time objects" and "numbered objects".
19:54 jeffreykegler "Time objects" have independent lifetimes, and therefore reference counts.
19:55 jeffreykegler Whereas, "Numbered objects do not have lifetimes of their own. Every numbered object belongs to a time object, and is destroyed with it. Rules and symbols are numbered objects."
19:56 jdurand Ok, thanks!
20:15 jdurand The return value of marpa_g_start_symbol_set(g, sym_id) is it always != than sym_id ?
20:16 jdurand Heu... I meat always == to sym_id in case of success ?
20:17 jeffreykegler So the doc says :-)
20:28 jeffreykegler I fix the Libmarpa doc to document the valid range of symbol ID's -- the non-negative integers.
20:28 jeffreykegler I noticed a similar problem for rule ID's and fixed that as well.
20:28 jeffreykegler Thanks!
20:34 jdurand Thanks to you, I have implemented an associated logic in my grammar abstraction wrapper
20:34 jdurand In the doc for: "marpa_g_symbol_is_nulled_event_set " there is a typo, "derviations"
20:37 jeffreykegler Fixed that typo in commit 0cb3bed092a7931c787907f1216baf377fb3efb8
20:37 jeffreykegler AFK for a few minutes
21:02 jeffreykegler Off to lunch\
22:35 jdurand joined #marpa
22:37 jdurand Jeffrey, in http://jeffreykegler.github.io/Marpa-web-site/libmarpa_api/latest/Event-codes.html#Event-codes, section MARPA_EVENT_SYMBOL_COMPLETED, the doc mentions marpa_r_completed_symbol_event_set  but there is no such symbol
22:37 jdurand "no such method" sorry

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