Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2017-07-15

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

All times shown according to UTC.

Time Nick Message
00:52 ronsavage joined #marpa
01:49 ilbot3 joined #marpa
01:49 Topic for #marpa is now Start here: http://savage.net.au/Marpa.html - Code paste/run: https://f.perlbot.pl/#marpa - Jeffrey's Marpa site: http://jeffreykegler.github.io/Marpa-web-site/ - IRC log: http://irclog.perlgeek.de/marpa/today - Youtube channel: https://www.youtube.com/channel/UCYKVfGBtfTqbs1JdYq-dc5g
01:49 idiosyncrat cheako: re https://jeffreykegler.github.io/Marpa-web-site/ -- the two should have 100% the same effect.
01:51 idiosyncrat Re learning BNF -- it's usually been taught along with parsing theory.
01:52 idiosyncrat How to use it for the practical purpose of writing parsers, as opposed to being a theoretical way of describing lanuages, has not been covered in a lot of places ...
01:52 idiosyncrat because before Marpa it really wasn't possible.
01:53 idiosyncrat Yacc used a BNF-like syntax, but could only implement a small subset of it.
01:53 idiosyncrat PEG parsers use a BNF-like syntax, but the parser they implement is not the one that the BNF describes, except in limited cases.
01:54 ronsavage There was no such thing as parsing theory (at my uni!) when I was at uni, but I had the marvellous opportunity of using Burroughs Extended Algol in the early 1970s, and their manuals explained everything about their versions of languages (not just Algol) in BNF. And as for the Graphviz BNF I linked to, it was the classic trial-and-error approach for me.
01:57 idiosyncrat In the early 1970's it was hoped and expected that general BNF parsers like Marpa would appear any day, and when that didn't happen, BNF stopped being taught as much.  As ronsavage points out, it did survive as a way of describing langauges, so for decades the main use for knowing BNF was to read the appendixes of language specifications.
01:59 idiosyncrat When I was taught language specifications, I was not taught regular expressions -- they didn't become hot until UNIX and the ed editor.  Instead I was taught BNF and something called Markov string rewriting.
02:00 idiosyncrat With UNIX, there were lots of things you could do with regular expressions, far more than with BNF.
02:01 idiosyncrat But one of my nasty surprises which I announced Marpa was that hardly anybody had been taught BNF in the last 20 years. :-(
02:01 idiosyncrat Fortunately, it's not that hard to learn.
03:18 cheako joined #marpa
03:31 cheako joined #marpa
04:04 kaare_ joined #marpa
04:11 perlbot cheako pasted a new file at https://perlbot.pl/p/bxaddm - Getting better, what matched space?
04:14 cheako idiosyncrat: Thanks for the history, I'm too young to have been taught BNF though I've seen it all the time in RFCs.
05:01 ceridwen joined #marpa
05:01 ceridwen joined #marpa
07:32 ronsavage joined #marpa
08:25 ronsavage cheako: Re https://irclog.perlgeek.de/marpa/2017-07-15#i_14874747. Are you referring to 'true;\s'? That \s is the way Marpa always represents literal spaces in the input stream.
11:12 ernimril joined #marpa
14:40 kaare_ joined #marpa
14:46 kaare_ joined #marpa
15:04 kaare_ joined #marpa
16:22 cheako joined #marpa
16:26 sirdancealot joined #marpa
16:27 cheako ronsavage: The input is from line 47(and specifically contains a leading space), I'm just confused as to why it wont match from line 22(the DSL rule meant to match such occurrences).
16:46 kaare_ joined #marpa
17:59 perlbot c_heako pasted a new file at https://perlbot.pl/p/xlla95 - I switched over to using bless.
18:33 cheako https://gist.github.com/jeffreykegler/4747725#file-ast-pl-L34    What is "action => ::dwim"?
19:52 idiosyncrat cheako: I don't think I the :dwim pseudo-action in Marpa::R2.
19:54 idiosyncrat It probably tried to "do what you mean" based on the length of the RHS -- :first for length 1, :array for length > 1
19:55 idiosyncrat sub My_Actions::dwim {
19:55 idiosyncrat shift;
19:55 idiosyncrat return $_[0] if scalar @_ == 1;
19:55 idiosyncrat return [@_];
19:55 idiosyncrat }
19:56 idiosyncrat That's my version of an explicitly implemented DWIM action from the R2 test suite (naif.t).
19:56 idiosyncrat That's probably what I had in mind.
20:44 idiosyncrat left #marpa

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