Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-06-15

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

All times shown according to UTC.

Time Nick Message
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
01:51 ronsavage jk: A question about https://github.com/jeffreykegler/kollos/blob/master/components/pluif/Lua.pm. Why does sub ast use a sequences of 'if's but no 'elsif's?
01:54 jeffreykegler In this case all the "if's" break out of the loop, either via a "next EVENT" or a "die"
01:55 jeffreykegler I believe the 'elseif's offer no help to the interpreter or, even if a Perl optimizer ever exists, to an optimizer
01:56 jeffreykegler And the if's look cleaner to my eye
01:57 jeffreykegler In particular the sequence if-if-if-if, etc. versus a sequence if-elseif-elseif-else
01:57 jeffreykegler The symmetric structure of the 1st corresponds to the actual structure of the logic ...
01:58 jeffreykegler while the asymmetric structure of  if-elseif-elseif-else makes it looks as if the 1st and last cases were special in some way ...
01:58 jeffreykegler which in this case they are not.
02:03 ronsavage jk. Thanx. Also, could you please run it and post the output. I tried strict.lua as input and the result is:
02:03 ronsavage The Lua source is ambiguous
02:03 ronsavage Marpa::R2 exception at lib/MarpaX/Languages/Lua/Parser.pm line 213.
02:03 ronsavage Perhaps that's expected!?
02:09 jeffreykegler I can't reproduce that error here.
02:10 jeffreykegler In direct answer to your question, no it is not expected.
02:10 jeffreykegler The code does check for ambiguities, so I know where the message is coming from ...
02:10 jeffreykegler but it should not find any and
02:10 jeffreykegler ... in my setup it does not.
02:22 jeffreykegler ronsavage: do you want me to break out a gist with just the files needed, out of the Kollos context?
02:47 jeffreykegler re Kollos for rns and others tracking my work
02:48 jeffreykegler Libmarpa has error codes and mnemonics for all its errors -- something Perl 5, or any large library should have, by the way
02:48 ronsavage jk: No ambiguities, eh? Hmmm. That suggests I've introduced a typo. As for the Kollos context: I'd like to see the expected output for each input file.
02:49 jeffreykegler ronsavage: ok
02:49 jeffreykegler will do once I finish the Kollos update
02:50 ronsavage jk: As for the 'if's. Omitting an else can be the source of a very subtle error, so always like to have a concrete statement that it was intended.
02:50 ronsavage jk: OK. No hurry.
02:50 * jeffreykegler resuming the Kollos update
02:50 ronsavage 'always' => 'I always'
02:51 jeffreykegler Error codes and mnemonics allow you to change error messages without impacting application code ...
02:51 jeffreykegler applications are told they can rely on the error codes and mnemonics, and that they can *not* rely on the messages
02:52 jeffreykegler Anyway, while developing, this is a nuisance, because until you're almost at the end, you can't rely classify all your errors very well ...
02:52 ronsavage Even worse - all files tested report ambiguity :-(.
02:53 jeffreykegler it's a lot of work to create error codes as you do along in development, and mostly wasted work, since you will often have to revisit them ...
02:53 jeffreykegler you really can't do the error codes and mnemonics right until the system is stable.
02:54 jeffreykegler So what I do for development, is I have a special error code, MARPA_ERR_DEVELOPMENT, which is a catch-all for all new errors.
02:55 jeffreykegler And the error-throwing routines have always taken a string, which my docs warn is *not* to be used outside of development, but which is kept around ...
02:56 jeffreykegler for new development like Kollos, or for major mainenance.
02:56 jeffreykegler The string is for use only with MARPA_ERR_DEVELOPMENT, and it says what the error really is ...
02:57 jeffreykegler it's hack-ish, a poor replacement for a real error object, but good enough for development.
02:57 jeffreykegler Once development is done, I can grep for all the MARPA_ERR_DEVELOPMENT errors, and replace this with real error codes, and real error objects.
02:58 jeffreykegler ronsavage: OK, now to the Lua AST's
03:07 ronsavage jk: Problem solved. It's Perl problem. if (my($x) = $recce->fn) returns true when if (my $x =$recce-> fn) returns false. Mega-sigh.
03:08 ronsavage It all stems from my policy of always using my(...) and never my ...!
03:08 jeffreykegler OK.
03:08 jeffreykegler Please let me know of any other questions or issues.
03:08 ronsavage So, if don't spent time generating null output!
03:08 ronsavage Sure.
03:09 ronsavage Ignore 'if' before "don't".
03:10 jeffreykegler Actually, IRC is so full of typos, I just automatically translate all sentences into what I want to hear. :-)
03:11 ronsavage But the embarrassing thing is that they are human-generated typos............
04:35 rns ronsavage: re http://irclog.perlgeek.de/marpa/2015-06-14#i_10749991 -- thanks for taking this, I've got not much cycles available these days and a fresh start looks like a better thing anyway.
06:22 ronsavage joined #marpa
06:22 ronsavage rns: I was stuck for hours waiting for the other programmer on the team to get my code going again. It's a welcome relief from the agony of MarpaX::Grammar::[Parser,GraphViz2], where progress is excruciatingly slow.
06:33 ronsavage But at least there is progress.......
07:02 ernimril joined #marpa
09:58 koo5 joined #marpa
10:23 Cheery http://www.contextfreeart.org/gallery/search.php?t=faves&num=25
10:23 Cheery http://www.contextfreeart.org/mediawiki/index.php/CFDG_Introduction
10:24 Cheery today thought about this, but seems old idea.
14:34 jeffreykegler joined #marpa
15:19 lwa joined #marpa
16:20 koo5 joined #marpa
19:13 ceridwen joined #marpa
19:35 ernimril left #marpa
19:35 ernimril joined #marpa
21:10 Cheery the very first parser+interpreter system I wrote in my parser: https://bpaste.net/show/401c0e7572c5
21:14 koo5 joined #marpa
22:06 Cheery you may be interested how well my parser actually performs
22:06 Cheery I just wrote the grammar language in itself
22:07 Cheery then I parsed it, which generated a parser, which I put to generate another parser from its sources
22:07 Cheery repeat 50 times, it takes 1.5 seconds in python, 3 seconds in pypy
22:53 ronsavage joined #marpa
23:48 jeffreykegler joined #marpa

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