Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-03-20

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

All times shown according to UTC.

Time Nick Message
00:32 idiosyncrat joined #marpa
01:55 idiosyncrat Still working on "eager" lexemes
01:56 idiosyncrat I succumbed to the "one bit more" syndrome -- in doing tests, I realized that eagerness often is especially handy in discarded tokens, and I had only implemented it for regular, non-discarded tokens.
01:57 idiosyncrat I figured that would be an easy addition, since the implementation of the semantics eagerness was done, and would be shared, and all I had to do was add another adverb to the discard rule.
01:58 idiosyncrat Which was true, but adding a new adverb to the discard rule took me the past 2 days. :-)
01:59 idiosyncrat Anyway, that's now done, and eagerness works and is tested in the test suite for discarded and non-discarded tokens.
01:59 idiosyncrat Before releasing, I plan to add one more test.
02:00 idiosyncrat These often reveal corner cases I've missed, but we can hope "eager" lexemes will appear in a release in the next few days.
02:21 idiosyncrat OK.  Added the new tests and they work.  So the next step is documentation.
02:22 idiosyncrat As I've mentioned, documentation sometimes reveals corner cases I have not thought out, or new testing which would be prudent, so it's as subject to surprises as implementation.
02:37 idiosyncrat My new test may be interesting -- it is Lua "long bracketed" quotes -- these are of the form
02:38 idiosyncrat [=[ stuff ]=]
02:38 idiosyncrat where the number of equal signs may vary from zero on up, but the number of equal signs on the left and on the right must be the same so that
02:39 idiosyncrat [[X]] and [==[X]==]
02:39 idiosyncrat but not
02:39 idiosyncrat [=[X]] or [===[X]==]
02:40 idiosyncrat These are *very* handy -- they allow for the safe quoting of any string, after checking it for the maximum number of consective equal signs.
02:40 idiosyncrat The strings to be quoted may themselves contain long-bracketed quotes.
02:41 idiosyncrat These are impossible to describe using pure regular expressions.
02:42 idiosyncrat Marpa's lexer is fully context-free, but without eagerness you still have the problem of telling it that the stuff in the middle may not contain a closing long bracket.
02:46 idiosyncrat With eagerness, the solution is quite natural and elegant:
02:46 idiosyncrat :lexeme ~ piece eager => 1
02:46 idiosyncrat piece ~ '[' balanced_eq ']'
02:46 idiosyncrat balanced_eq ~ '=' balanced_eq '='
02:46 idiosyncrat balanced_eq ~ '[' anything ']'
02:46 idiosyncrat <anything> ~ <anychar>+
02:46 idiosyncrat <anychar> ~ [\d\D]
02:49 ilbot3 joined #marpa
02:49 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:50 idiosyncrat Our logbot just went on break for 4 minutes, but fortunately not before getting my sample grammar, so I don't have to retype it for the log.  :-)
03:46 idiosyncrat https://github.com/jeffreykegler/Marpa--R3/blob/master/cpan/pod/Scanless/DSL.pod#eager
03:46 idiosyncrat The documentation phase went smoothly.
03:46 idiosyncrat The above link is to the new description of the "eager" adverb.
03:48 idiosyncrat The latest Github commit https://github.com/jeffreykegler/Marpa--R3/commit/19fab2dfdc06d52a99fc4ada0d8bf2364b47dda7
03:48 idiosyncrat has the tested, documented implementation.
03:49 idiosyncrat Next step is to create a CPAN developer's release.
03:49 idiosyncrat As I've tried to convince you, this is a very useful feature, and I hope those brave souls who use alpha releases will want to play with it.
05:04 ronsavage joined #marpa
05:06 ronsavage JK: My first reading of the 'eager' docs is that they are very clear, clearer than I expected.
05:11 idiosyncrat Certainly clearer than you'd expect from my initial description on this channel, which was a bit of a mess. :-)
05:11 idiosyncrat ronsavage: Good, glad to hear it.
05:12 idiosyncrat Good night!
07:24 ronsavage joined #marpa
12:50 sirdancealot joined #marpa
16:24 idiosyncrat joined #marpa
16:25 idiosyncrat Marpa-R3-4.001_042 was just uploaded to CPAN.
16:26 idiosyncrat This release has a new feature: "eager" lexemes, as discussed over the last ~48 hours.
16:28 idiosyncrat Eager lexemes are documented here: https://github.com/jeffreykegler/Marpa--R3/blob/master/cpan/pod/Scanless/DSL.pod#eager
17:34 sirdancealot joined #marpa
21:06 idiosyncrat CPANtesters looks good for Marpa-R3-4.001_042
21:55 ronsavage joined #marpa

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