Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2016-05-12

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

All times shown according to UTC.

Time Nick Message
00:43 lucs FWIW, I prefer '-' over '!', as it's visually more obvious.
00:43 lucs (it stands out more)
00:47 idiosyncrat_ lucs: Thanks for that observation, because to my eye the '!' is far more obvious -- it's good to know that's not universal
00:53 lucs My eyesight isn't very good, eh, the horizontal '-' seems to contrast more with (especially capital) letters.
01:00 lucs My eyeglasses were replaced recently, but I still have trouble distinguishing commas and periods in code, so I value contrast greatly :-)
02:05 ronsavage I think using 'A ::= B! C! D E! F!' to omit D simply requires too much annotation. Surely the simplest case, inclusion, should not require annotation. Exceptions should, though.
02:05 ronsavage It's like you've inventing an anti-Hamming code!
02:09 idiosyncrat_ A special attraction of the bang notation to me was that
02:10 idiosyncrat_ A ::= B C D action => ::first
02:10 idiosyncrat_ becomes
02:10 idiosyncrat_ A ::= B! C D
02:11 idiosyncrat_ I'm often tempted to ask Larry about these things, but he's busy pushing his own parser, which leaves me to do my own language design.
02:12 idiosyncrat_ I don't think the Perl community benefits very well from this trade-off, but that's the way it is. :-)
02:56 ronsavage joined #marpa
04:25 ronsavage It sounds to me like discussing ideas with Larry would be valuable, but not discussing implementation details.....
04:28 idiosyncrat_ Ditto, and I do ask, and even get an answer from time to time, but these days he's busy, so all I can do is study his work on his own stuff.
04:28 idiosyncrat_ Anyway ... Good night!
04:50 aredridel joined #marpa
05:34 ronsavage joined #marpa
06:56 aredridel joined #marpa
09:36 rns joined #marpa
09:38 rns idiosyncrat, ronsavage, lucs: re syntax for invisibility -- one observation I had is that proper Huffman coding is difficult when the cases are:
09:39 rns (1) http://irclog.perlgeek.de/marpa/2016-05-11#i_12462474 -- 99.9% of symbols need to be visible
09:40 rns (2) http://irclog.perlgeek.de/marpa/2016-05-12#i_12467299 -- A ::= B C D action => ::first becomes A ::= B! C D
09:41 rns (3) more symbols need to be visible than invisible to semantics in my grammars
09:45 rns A suggestion: how about A ::= B (C D)+ E to mean grouping and A ::= B (C D) E to mean invisible C and D?
09:47 rns In other words, ()*, ()+, ()? mean grouping and () means hiding -- after all IIRC, all the search for the new hiding syntax is because () with quantifiers are needed for grouping.
09:49 rns Too context dependent and error-prone as it is, but looks suspiciously close to what we have in natural languages to me.
09:53 rns Whcih may or may not be a good thing. :)
11:44 rns left #marpa
12:05 pczarn joined #marpa
13:09 kaare_ joined #marpa
13:13 VsyachePuz joined #marpa
15:09 idiosyncrat_ joined #marpa
15:09 idiosyncrat_ rns: re http://irclog.perlgeek.de/marpa/2016-05-12#i_12468258
15:10 idiosyncrat_ Two problems with this -- first, you may want to both group and hide, so if A ::= b ( C ) hides <C>, how do you hide A :: b ( C )*
15:12 idiosyncrat_ Second, a problem with my using () for hiding is that it strongly suggests grouping, and if, in fact, it *does* mean grouping in some contexts the situation becomes very confusion.
15:12 idiosyncrat_ I think I'll will drop the idea of using "!" -- its attractions seem to be special to me :-)
15:13 idiosyncrat_ And I do want () to mean grouping -- I'm pretty much settled on that.
15:14 idiosyncrat_ So that takes us back to the earlier proposal, where minus signs mean hiding.  To both hide and group, you can say
15:14 idiosyncrat_ A ::= B (- C D -) E
15:14 idiosyncrat_ or
15:14 idiosyncrat_ A ::= B C- D- E
15:15 idiosyncrat_ where in both cases <C> and <D> are hidden from the semantics.
16:23 pczarn At 8000 lines, my parser generator has everything it needs to run, but several important parts are missing
17:28 rns joined #marpa
17:33 rns idiosyncrat: re http://irclog.perlgeek.de/marpa/2016-05-12#i_12469791 -- strictly for argument sake: A ::= b ( ( C )* ) would be used to hide ( C )*.
17:38 rns or, with hiding minus,
17:38 rns A ::= b ( ( C )* )-
17:38 rns or A ::= b (- C -)*
17:39 rns or A ::= b ( C )*-
17:39 rns or even (for single-symbol groups) A ::= b C*-
19:18 idiosyncrat_ joined #marpa
19:18 idiosyncrat_ For hiding <C>
19:19 idiosyncrat_ A ::= b ( ( C )* )    -- seems very non-orthogonal.
19:19 idiosyncrat_ A ::= b (- C -)*   -- seem OK
19:20 idiosyncrat_ A ::= b ( C )*-   -- allowing the minus to be last may be confused with a range in a quantifier (something I plan to introduce in Marpa::R3)
19:21 idiosyncrat_ A ::= b C*-                  -- same problem here, but
19:21 idiosyncrat_ A ::= b C-*        should work find.
19:21 idiosyncrat_ s/find/fine/
19:30 idiosyncrat_ Another matter to think about with grouping -- with
19:31 idiosyncrat_ A ::= B C+ D
19:31 idiosyncrat_ or
19:31 idiosyncrat_ A ::= B ( C )+ D
19:32 idiosyncrat_ the values of the <C>'s have to go into an array -- otherwise you have to parse the parse to figure out where the <C>'s begin and end -- not too hard in that example, but consider
19:32 idiosyncrat_ A :: B C1+ C2+ D
19:33 idiosyncrat_ So for orthogonality, that means that
19:33 idiosyncrat_ A ::= B C D
19:33 idiosyncrat_ oops -- I mean
19:33 idiosyncrat_ A ::= B (C) D
19:34 idiosyncrat_ should produce
19:34 idiosyncrat_ [ v(B), [ v(C) ], v(D) ]
19:34 idiosyncrat_ where v(X) is the value of the symbol <X>
22:35 ronsavage joined #marpa
22:39 ronsavage Has anybody suggested (...)[*?+] for grouping /and/ (...)! for hiding. In other words, add ! to the set of counters [*?+] to mean 0 are visible?
22:47 idiosyncrat_ joined #marpa
22:48 idiosyncrat_ ronsavage: re http://irclog.perlgeek.de/marpa/2016-05-12#i_12471995 -- yes, you just suggested it.  :-)
22:49 idiosyncrat_ Using bang ("!") to mean hide is an interesting idea.
22:49 idiosyncrat_ I thought of it to mean "visible" after its use to emphasize sentences in European languages ...
22:50 idiosyncrat_ but the meaning not "invisible" is equally natural -- it would come from its use in programming languages for various kinds of negation.

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