Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-01-15

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

All times shown according to UTC.

Time Nick Message
00:46 hobbs heh, they didn't edit out my dithering about the license. Oh well.
00:47 jeffreykegler It just emphasizes the "happy ending"
00:47 hobbs :)
00:48 hobbs did I get somewhere close to correct with pausing?
00:49 jeffreykegler It wasn't bad.  I was imagining answering the questions myself as it progressed live ...
00:49 hobbs I over-reached a little bit there, but I think it's in the neighborhood of a valid solution, at least
00:49 jeffreykegler and I wasn't doing much better --- some of the questions I found awkward.
00:50 hobbs yeah, it can be tough
00:50 jeffreykegler I'm going to do notes on it, like I did your last effort, but I think it was OK ...
00:51 jeffreykegler the material is *hard*, even for me, and you had to respond off the top of your head live, ...
00:51 hobbs if there's one thing you have to grudgingly respect in politicians, it's how seamlessly they can make their way from any question to something they know about and want to talk about
00:51 hobbs and make it sound like they're answering the question :)
00:51 ronsavage When Randal talked about using regexps,  you could have said things like (1) They are not recursive but Marpa's rules can be, (2) They can't (?) parse themselves, but Marpa can (and will one day)!
00:51 jeffreykegler I thought your handling of the Perl 6 relationship was very tactful :-)
00:52 jeffreykegler Politicians get as good as they do only after hours and hours of practice.
00:53 hobbs ronsavage: perl 5.12+ regexes have recursion, it's just so ugly that you would never want to use it directly
00:53 jeffreykegler ronsavage: Actually today,  Marpa parses the SLIF
00:54 ronsavage Weeeelllll, politicians can be ruthless (it's their policy) to ignore the real meaning of questions and just 'stay on message', i.e. get the current propaganda across. Since your delivery bore no resemblence to theirs, I'd suggest dropping that topic......
00:54 hobbs which is why Damien created Regexp::Grammars as a sugar layer on top of it
00:54 hobbs s/Damien/Damian/
00:54 hobbs but yeah, sometimes the right thing doesn't pop to the top of your head until far too late
00:55 jeffreykegler Anyway, I've just relistened to the FLOSS thing, and I liked Andrew's performance better on 2nd hearing than I did the first.
00:55 ronsavage Sure, in an interview, it's much much harder to think on the exact reply, than it is for listeners.
00:55 ronsavage 'on' => 'of'
00:56 jeffreykegler A lot of the answers I was nervous about when I heard the live version, I realized on relistening were "best possible", or close to it.
00:56 hobbs yeah, somehow I came out sounding like I know what's what
00:56 hobbs but the usual apologies to anyone I've misrepresented
00:56 ronsavage Yes, Marpa parses its own SLIF, but I meant for Marpa to be parsing regexps one day (soon).
00:57 hobbs especially jdurand
00:57 jeffreykegler Ah, yes, regexes
00:57 jeffreykegler hobbs: next time you can make it up to Jean-Damien ...
00:57 jeffreykegler it is good that Ron got lots of credit for all that he does.
00:57 ronsavage Overall, I think the best point is that it exposes Marpa to yet more people.
00:58 hobbs he wrote the JSON one, and I just followed on from there
00:58 ronsavage The other thing to have mentioned is that on Marpa's home page (mine, not JK's) is that there is a long list of existing modules using Marpa.
00:58 jeffreykegler ronsavage: yes, the old saying is that there is no such thing as bad publicity, although ...
00:59 jeffreykegler I'm not sure that applies to parsing algorithms.
00:59 ronsavage There is an exception to the old saying: Plane crashes naming the airline.
00:59 ronsavage 'crashes' => (of course) 'crase reports'
01:00 ronsavage Aggghhhg. 'crase' => 'crash'. Where the hell is auto-correction when you need it.
01:00 hobbs messing up someone else's perfectly correct input
01:00 jeffreykegler But I am coming from years of experience of being ignored, and anything is better than that.
01:02 ronsavage Actually, I didn't write the JSON one! The first was by Peter Stuifzand, and JK wrote the other 2 in MarpaX :: Demo :: JSONParser.
01:03 hobbs grumble :)
01:03 jeffreykegler hobbs: one thing I really like about your interviewing style is that you don't overreach ...
01:03 ronsavage Ah, yes, the auto-corruption option seem to be turned on by default much too often.
01:03 jeffreykegler you stick to answers that you can deliver.
01:04 jeffreykegler The temptation is to try to be too helpful, get over-ambitious, and risk the crash and burn.
01:04 hobbs yeah, I try never to state anything that I'm not sure of as a fact
01:04 hobbs in general, not only when I'm in front of the camera
01:05 jeffreykegler I think that's why I like it better on the 2nd listen -- I realized that the answers you were giving were good, solid, relatively low-risk ones
01:06 jeffreykegler Which is really the only way to proceed with a topic as difficult as this one.
01:07 hobbs yeah, and I don't mean to moan about it, but you did put me in a position of having to talk about something where there's a lot that I don't know
01:07 hobbs the last thing I want to do is tell lies
01:08 jeffreykegler I was surprised that Randal wanted to talk about the algorithm as much as he did.
01:08 jeffreykegler I didn't expect that.
01:09 hobbs yeah, I was surprised too
01:09 hobbs I think it was personal interest on his part
01:09 jeffreykegler Had I been there, I would have been very hard put to avold turning the thing into a combination math lecture and personal reminiscence, which I don't think would be what the audience wanted.
01:12 jeffreykegler When I first came up with this, I actually expected that I would announce "new general BNF parsing algorithm" and the world would beat a path to my door. :-)
01:13 hobbs I think it tickled Randal's "doing cool things with Perl" bone
01:13 hobbs I won't say that there's nothing innovative being done in Perl today, but not nearly enough of it is interesting to people outside Perl-land
01:14 hobbs but Marpa should be interesting to anyone
01:14 jeffreykegler And Perl is both helped and hurt by the community's non-academic and even anti-academic stance.
01:14 jeffreykegler It helps, because the focus is relentlessly practical, and produces stuff like TAP and CPANtesters.
01:15 jeffreykegler It hurts, because they are indifferent or hostile to anything theoretical from inside the community.
01:16 hobbs I think the antipathy goes both ways. Academia can't take Perl seriously because "take whatever works and throw it together" isn't a respectable enough design principle
01:16 hobbs or something like that
01:17 jeffreykegler I think if people were listing places that a good, new, parsing algorithm might come from, the Perl community would not be high on the list.
01:17 hobbs right
01:17 jeffreykegler That's the attitude of outsiders, but I think it's actually worse *inside* the Perl community.
01:18 jeffreykegler I know Mark Dominus also does the theory thing, but IIRC correctly he's the only other one.
01:19 jeffreykegler I note Randal was very interested in Marpa broadening beyond Perl.
01:19 hobbs a few of the Perlmonks types, I think, but Perlmonks is its own insular community inside the insular community :)
01:20 hobbs MJD is definitely the first person I'd think of though
01:20 jeffreykegler Actually, and frankly, Perlmonks is the worst in that respect -- I've basically been chased off of Perlmonks.
01:20 hobbs I learned more about parsing from his book than from a lot of the more "definitive" sources
01:21 jeffreykegler A few of the senior monks *despise* theory and are quite happy to say so directly and in very frank terms.
01:22 hobbs yeah well, some people are good at being loud and opinionated
01:22 jeffreykegler MJD's book I think is the best intro to parsing for someone from the Perl world -- his summary totally ignores everything but left parsing, but that accurately reflects that state of the practice.
01:22 hobbs it's not quite unique to perl :)
01:23 hobbs yeah, I can cope with theory, but it's all meaningless to me until I connect it with something practical
01:23 hobbs HOP managed that for me with parsing.
01:23 jeffreykegler hobbs: so anyway, I hope you'll be willing to be thrust into being "the voice of Marpa" in the future.
01:24 hobbs I'll keep doing my best
01:24 jeffreykegler I expect Randal was very pleased with the result.
01:25 hobbs I'm happy to promote Marpa and I'm happy to keep practicing my public speaking and such
01:27 hobbs I was happy with it. I can always find fault with my performance but overall I think it went well
01:29 hobbs and Randal steered me away from the topics where I could have gone off on a boring technical tangent
01:30 jeffreykegler Really?  I thought he was qjuite happy to skirt the danger zone on the math/algorithmic stuff.
01:31 jeffreykegler Oh yes!!!!
01:31 jeffreykegler One thing I should mention!!!!
01:32 jeffreykegler hobbs: Have you never seen "Wizard of Oz"?
01:32 hobbs I have
01:32 hobbs I know what the ruby slippers are, I just couldn't recall how they were relevant to parsing :)
01:33 jeffreykegler The idea is that if you want to be in Kansas, and you have the Ruby Slippers, you only have to wish and the Ruby Slippers will make it true.
01:34 hobbs haha, okay
01:34 jeffreykegler If the parser wants an end tag, and you have the Ruby Slippers, the parser only has to wish and its wish comes true.
01:34 hobbs right
01:35 jeffreykegler So that connects with the idea of parsing liberal HTML with a very anti-liberal grammar.
01:35 lucs The Ruby Slippers has got to be the coolest named technical concept ever :)
01:35 jeffreykegler The parser uses a grammar that assumes a perfect world.
01:36 jeffreykegler And the lexer uses the Ruby Slippers to make sure that a perfect world is what the parser sees.
01:36 jeffreykegler I can't tell you guys what a thrill it was when I got the idea, and said to myself, "Can this really work?", and I tried it in my HTML parser ...
01:37 jeffreykegler and it just worked.  I don't think there was a single corner case or gotcha.
01:37 jeffreykegler lucs: Thanks
01:43 hobbs The HTML5 standard really does make explicit what everyonw was doing before. There's a whole bunch of stuff that's defined as being a "parse error", but every error comes with recovery instructions
01:44 hobbs so that you can always parse any putative HTML file to the end, if you don't want to give up
01:45 hobbs and since it's part of the standard, now everyone's handling of "malformed" HTML should theoretically agree
01:45 jeffreykegler So for example if you cut and pasted this IRC conversation
01:45 ronsavage Unlike XML
01:45 jeffreykegler into a browser, it tells you how it should look on the screen when parsed as HTML?  Or ditto if you feed it Perl code by mistake instead of HTML?
01:46 hobbs basically yes
01:47 jeffreykegler Btw, one of the things I worked up was a configurable HTML parser, which allowed you to specify how to handle mistakes, ...
01:47 jeffreykegler that's probably not necessary now that there's a standard.
01:48 jeffreykegler I dropped that effort because with HTML I had just reached the point where eyes were glazing over ...
01:48 jeffreykegler and so I moved on.
01:49 hobbs So for example it says if you've consumed '<a href=' and you encounter a '<', that's a parse error because it's totally illegal to have a '<' outside of a quoted value
01:49 hobbs but the recovery instructions are 'append the character to the current attribute's value, and continue parsing an unquoted attribute value'
01:50 jeffreykegler Which standard is this?
01:50 hobbs so it's illegal but it's also not really illegal, because it's specified exactly what to do with it
01:50 jeffreykegler That is, which HTML rev?
01:50 hobbs 5
01:50 hobbs www.w3.org/TR/html/
01:52 lucs Is HTML5 still DTD/SGML based?
01:53 hobbs lucs: I'm pretty sure it's not, and it's not expressible as a DTD. There's not DTD stuff in the standard like there was for 4
01:54 lucs Aha, okay.
01:54 hobbs but it still uses <!DOCTYPE> for some kind of forwards/backwards compatibility
01:59 jeffreykegler I note in the HTML 5 standard, the behavior on overlap is still not mandated
01:59 jeffreykegler Stuff like "<p>a b c<b></p>d e f</b>"
01:59 jeffreykegler where the <p> and <b> tags overlap
02:00 flaviu joined #marpa
02:00 jeffreykegler Most of my configuration options addressed stuff like how to handle that.
02:01 jeffreykegler And looking at the current HTML 5 standard, all those choices are still live options.
02:03 jeffreykegler AFK
02:09 hobbs someday I need to sit down and try to understand Marpa / Earley more thoroughly
02:11 hobbs the model I have of it is basically, take a top-down left parser, eliminate backtracking and make it non-deterministic by keeping a list of alternative states, plus !!MAGIC!! to use cues to keep the state explosion under control
02:11 hobbs I'm pretty sure that model is the "useful, but completely wrong" kind
02:15 lucs :)
02:25 lucs You know what, I just created a 'marpa' channel on reddit, just to reserve the name.
02:25 lucs If any of you guys want to handle it, I'll transfer it to you.
02:51 ronsavage joined #marpa
03:08 RandalSchwartz joined #marpa
03:08 RandalSchwartz just soundchecking today's episode.
03:09 RandalSchwartz that was geeky and fun today
03:11 lucs RandalSchwartz: You might want to read the log to see what some folks here thought about it (see /topic for link).
03:12 jeffreykegler joined #marpa
03:12 jeffreykegler RandalSchwartz: hi
03:13 jeffreykegler Cool.  I hoped it worked for your audience.
03:13 jeffreykegler I dunno if you backlog, but I was congratulating Andrew on the interview, which I thought he did very well at it.
03:15 jeffreykegler lucs: Thanks!  you can own the reddit channel for now, if that's OK.
03:15 lucs Yeah, no problem.
03:16 jeffreykegler RandalSchwartz: I was also remarking on how much into the algorithm/math you were willing to get -- that of course is my focus, but I've learned to try to back off with audiences.
03:18 RandalSchwartz I got that yes
03:19 RandalSchwartz yeah - I announced at the beginning this might glaze eyes over
03:19 RandalSchwartz we've had probably a half-dozen shows that were this complex
03:19 RandalSchwartz oh - looking at reddit now
03:19 jeffreykegler RandalSchwartz: re funding, etc.  I've been at Marpa full time for 7 years -- no outside job.
03:20 jeffreykegler Just Marpa 60-70 hours a week
03:20 RandalSchwartz oh... not reddit... the log here
03:20 jeffreykegler I made money on Sun stock options, and that's how I've been spending it.
03:21 ronsavage RandalSchwartz: hi
03:21 RandalSchwartz My JSON parser in perl regex is semi-recursive
03:21 RandalSchwartz it's essentially a top-down parser
03:21 RandalSchwartz ... http://www.perlmonks.org/?node_id=995856
03:22 RandalSchwartz uses named sub-parts
03:22 RandalSchwartz and I figured out how to use $^R in Perl to pass down values and pass up results
03:22 RandalSchwartz insane, but then again, so am I. )
03:24 jeffreykegler Right -- Marpa recurses natively, while I don't know the regex implementation, but it probably goes exponential or something.
03:24 RandalSchwartz well - the mad russian probably did the right thing. :)
03:24 jeffreykegler "mad russian"?
03:25 RandalSchwartz ilya
03:25 RandalSchwartz debugger and regex fame
03:25 RandalSchwartz I keep threatening to rewrite undump with Marpa
03:25 jeffreykegler Ah.  I'd expect the "rightest thing" he could do in the regex context is backtrack.
03:25 * lucs still has MJD's barf bags from an old regex presentation at YAPC or Perl conf,: "It's all Ilya's fault!"
03:26 jeffreykegler Actually, I'm trying to find an undump volunteer on this channel.
03:26 jeffreykegler I'm overloaded, so I really can't take it on.
03:26 RandalSchwartz If I still had to produce 1-2 perl columns a month for pay, I'd have done it by now. :)
03:27 RandalSchwartz but thankfully I was paid for 255 Perl articles in the old days.
03:27 jeffreykegler Btw, we've a collection of JSON parsers done in Marpa -- it's a favorite test case.
03:28 jeffreykegler https://metacpan.org/relea​se/MarpaX-Demo-JSONParser
03:29 RandalSchwartz OK - caught up on the IRC backlog.  very cool.
03:30 RandalSchwartz do you have stats on your webpage to see if you have increased traffic?
03:30 RandalSchwartz a lot of our guests report that within a day
03:30 RandalSchwartz we have roughly 50K downloads within the first few days
03:30 jeffreykegler We're all over the place -- a lot of the Marpa sites are now administered by Ron Savage, flaviu is starting one, and other stuff is on Github where I don't get numbers.
03:30 RandalSchwartz the most popular open source podcast in the world.
03:31 jeffreykegler Really, most popular, I didn't know that.
03:31 jeffreykegler But I'm tracking number on my site and they are high.
03:31 RandalSchwartz And I *was* recalling correctly, that you and I met as a result of my legal case, right?
03:31 jeffreykegler No, I just asked to meet you actually, in Palo Alto, based on your Perl fame.
03:31 RandalSchwartz Ahh, so that was prior
03:32 jeffreykegler The court case was kind of a secret then.
03:32 RandalSchwartz the italian place!
03:32 jeffreykegler Right
03:32 RandalSchwartz well, I'm free to rewrite history as it suits me.
03:32 RandalSchwartz as is everyone. :)
03:32 jeffreykegler I'll like your version better -- gets straight into the action -- better plot line
03:33 RandalSchwartz yeah.  I sometimes rewrite my history for better drama. :)
03:33 jeffreykegler And you introduced me to Larry Wall at some point.
03:33 RandalSchwartz some early TPC or something?
03:33 jeffreykegler I think it was after a class -- perhaps one you were teaching?
03:34 RandalSchwartz AHh, yeah
03:34 jeffreykegler He showed up to sign books.
03:34 RandalSchwartz would have been near the old SGI headquarters
03:34 RandalSchwartz now google
03:34 jeffreykegler What year was that?
03:34 RandalSchwartz maybe the beer place there
03:34 RandalSchwartz sometime late 90s
03:34 jeffreykegler Yes, SGI sticks in the mind.  Was the class in-house at SGI?
03:34 RandalSchwartz yes... did dozens of classes there
03:35 RandalSchwartz oddly, when I did my git tech talk, it was within 50 feet of where I taught Perl a decade earlier
03:35 RandalSchwartz so they said "the bathrooms are over..." and I interrupted... "there!"
03:36 jeffreykegler You introduced me to Larry as the author of Marpa -- a very early effort of mine, different from the current one.
03:36 jeffreykegler But also a parser.
03:36 jeffreykegler It vanished into a black hole, and I liked the name, so I was free to re-use it.
03:36 jeffreykegler :-)
03:37 RandalSchwartz that was just Earley?
03:37 RandalSchwartz and pure perl?
03:37 jeffreykegler As a matter of fact, I think you'd prepped Larry somehow, because his first words to me were "You're the author of Marpa".
03:37 RandalSchwartz did you like my overloading of early/Earley multiple times? :)
03:38 RandalSchwartz my brain works that way.
03:38 jeffreykegler Probably a basic Earley implementation, and must have been pure Perl, because there was no XS then.
03:38 jeffreykegler Yes, it was entertaining.
03:38 RandalSchwartz yeah, I recall it being a very basic Earley
03:38 RandalSchwartz because you talked about null rules and left recursion being ugly.
03:38 jeffreykegler Jay Earley now practices psychology in CA
03:39 RandalSchwartz did I at least get most of the terminology correct?
03:39 jeffreykegler Yes, this parsing thing has been a multi-decade obsession.
03:39 RandalSchwartz I was scrambling a bit.
03:39 jeffreykegler I was very impressed with your command of the terminology.
03:39 RandalSchwartz one thing I wanted to talk about was this:
03:40 jeffreykegler And a little surprised that you would get that math-y / geeky
03:40 RandalSchwartz if_statement ::= IF condition THEN statement | IF condition THEN statement ELSE statement
03:40 RandalSchwartz and how earley hold both of those after the first statement
03:40 RandalSchwartz that would have made it more concrete for the audience
03:41 jeffreykegler I'd want a blackboard for something like that.
03:41 RandalSchwartz well... with a bit of handwaving that can be described in words :)
03:41 RandalSchwartz "until you see ELSE, you don't know which form you're in"
03:41 jeffreykegler Randal, at this point in my life, I have looked into a lot of glazed eyes.
03:42 RandalSchwartz heh I understand entirely
03:42 jeffreykegler It's turned into my karma.
03:42 RandalSchwartz actually, not statement, block
03:42 RandalSchwartz if Marpa is given that, does it follow the "closest else" rule?
03:43 RandalSchwartz or does that need to be explicitly coded in?
03:43 jeffreykegler Marpa does whatever you tell it to do in the BNF ...
03:43 RandalSchwartz well - that as written is ambiguous
03:43 jeffreykegler One thing that not understood often is that IF/THEN/ELSE is *not* ambiguous ...
03:43 RandalSchwartz what?
03:43 jeffreykegler except in the sense that LALR is too stupid to parse it.
03:44 RandalSchwartz if a then if b then c else d
03:44 jeffreykegler It's a simple right recursion IIRC
03:44 RandalSchwartz does d belong to a or b
03:44 jeffreykegler and Marpa parses it correctly if you write it as such.
03:44 RandalSchwartz in C, d belongs to b
03:44 RandalSchwartz via the "closest else" rule
03:44 jeffreykegler It's just that LALR is too stupid to deal with the right recursion.
03:44 jeffreykegler That's right recursion.
03:45 RandalSchwartz ahh... ok
03:45 RandalSchwartz and Perl never has that problem because of explicit braces
03:45 jeffreykegler Marpa actually gives you the parse the BNF specifies, which is different from most everything else.
03:45 RandalSchwartz so - my question to hobbs about perl6 grammars and Marpa...
03:45 jeffreykegler So if you specify right recursion, you get it.
03:46 RandalSchwartz can perl6 grammars do what Marpa can't?
03:46 RandalSchwartz or vice versa?
03:46 jeffreykegler Perl 6 grammars are basically a top-down -- just a special notation for recursive descent.
03:47 RandalSchwartz so left recursion would be impossible?
03:47 jeffreykegler And much more limited than Marpa.
03:47 jeffreykegler Without trickery, yes.
03:47 RandalSchwartz p6 grammars have ratcheting... does that help?
03:47 jeffreykegler Also, Larry throws in an operator precedence parser, which you can switch into.
03:48 jeffreykegler It's a symptom, ...
03:48 RandalSchwartz did you see my JSON parser yet?
03:48 RandalSchwartz I think of all people, you'd admire it the most. :)
03:48 jeffreykegler to try and control the backtracking and keep some degree of efficiency.
03:48 RandalSchwartz yeah ratcheting is mostly about efficiency
03:48 jeffreykegler The regex?  I think I glanced at it some time ago.
03:49 RandalSchwartz I was hand-coding a recursive-decent parser, and realized Perl itself could do that. :)
03:49 jeffreykegler To be direct about Perl 6 ...
03:49 RandalSchwartz just had to work out $^R
03:49 jeffreykegler I do not believe Larry's choice of parser has the ability to deliver on the promises/hopes of language oriented programming that were talked about.
03:50 RandalSchwartz OK... I can relate.
03:50 RandalSchwartz I don't know who is going to subclass the Perl6 grammar
03:50 RandalSchwartz and my dismay 15 years ago when larry wasn't renigging on the "/" overload.
03:50 jeffreykegler Perl 6 has made a very commitment to its parsing technology, and I can understand reluctance to abandon it.
03:50 RandalSchwartz which means that you could never separate the parser and tokenizer.
03:51 jeffreykegler Re subgrammars -- I believe that, like top-down combinator parsing ...
03:51 RandalSchwartz the "/" overload was fundamental in my seminal perlmonks post on "only perl can parse Perl"
03:52 RandalSchwartz that's part of why I brought that up a couple of times in different ways with regard to Marp
03:52 jeffreykegler it's not fully functional .. combining grammars works only if you're lucky, or you've made special case arrangements.
03:52 RandalSchwartz "can it parse Perl"
03:52 RandalSchwartz "How does it deal with C typedef?"
03:52 RandalSchwartz hobbs answered those well
03:52 jeffreykegler Yes, Marpa can parse Perl 5.
03:53 RandalSchwartz nice
03:53 jeffreykegler Ah, good, I'm glad you like the answer.
03:53 RandalSchwartz so we can re-write PPI using Marpa
03:53 jeffreykegler Yes.
03:54 RandalSchwartz looking back, it was a pretty interesting interview.  I hope my excitment about what Marpa really means as a breakthrough in parsing came through.
03:54 jeffreykegler I'm glad you see Marpa as a breakthrough.
03:54 RandalSchwartz I'm sorry we didn't emphasize libmarpa
03:54 jeffreykegler I certainly do, but I could be seen as prejudiced.
03:55 jeffreykegler Would Libmarpa have taken the geek-y level to the stratosphere?
03:55 RandalSchwartz I'm now reviewing some of the material you've written that makes a lot of what I was hoping in the show to be actually fairly practical.
03:55 RandalSchwartz I did allude to "isn't most of it written in C?" once or twice.
03:55 jeffreykegler The core algorithm is in C.
03:55 RandalSchwartz and hobbs talked about python and rust bindings.
03:55 jeffreykegler And not Perl-dependent at all
03:55 RandalSchwartz so hopefully, this will invite others.
03:55 jeffreykegler Right.
03:55 RandalSchwartz libmarpa should be the next bison
03:56 jeffreykegler Libmarpa is low-level -- no symbol names, even.
03:56 RandalSchwartz Oh, ok
03:56 jeffreykegler You've got to supply those.
03:56 RandalSchwartz could you build something like bison using libmarpa?
03:56 jeffreykegler Plus folks have gotten used to all my SLIF magic, and that's all at a higher level.
03:56 RandalSchwartz true
03:57 jeffreykegler Like bison, but that isn't Marpa::R2?
03:57 RandalSchwartz well - zero perl
03:57 RandalSchwartz but f'ing faster. :)
03:57 jeffreykegler We're working on doing a Lua wrapper
03:58 jeffreykegler We call that project Kollos, after a Star Trek character.
03:58 jeffreykegler Do you know about Lua?
03:58 jeffreykegler It's very light weight -- the whole language is in fact smaller than Libmarpa.
03:58 RandalSchwartz anyway... in case I haven't said this enough, thanks for letting me put Marpa on the show... and I hope our audience connects you with the resources you need to accomplish what you want and empower the world in unpredictable ways.
03:59 RandalSchwartz yeah - we interviewed the lua guys on floss
03:59 RandalSchwartz "moon" in PT_BR
03:59 jeffreykegler I'll have to go back to that FLOSS re Lua.
03:59 RandalSchwartz 321 shows now.... it's hard to say who we *haven't* covered. :)
04:00 jeffreykegler So Libmarpa+Lua = Kollos, which will sort of be our bison.
04:00 RandalSchwartz awesome
04:00 RandalSchwartz I may have to write apache-log-file to csv using marpa soon :)
04:00 jeffreykegler Some of this depends on my personal future -- I've been fulltime on Marpa, spending money from stock options.
04:00 RandalSchwartz so that might be my first "real" project
04:01 RandalSchwartz how about XSD to parser for XML to ASt
04:01 jeffreykegler Ah, yes, log files
04:01 RandalSchwartz I have a need for htat
04:01 RandalSchwartz could actually pay
04:01 jeffreykegler XSD?
04:02 RandalSchwartz ... http://en.wikipedia.org/wiki/XML_Schema_(W3C)
04:02 RandalSchwartz $vendor provides XSD
04:02 RandalSchwartz and then an XML web endpoint
04:02 RandalSchwartz but I'd rather just have a nice Perl datastructure
04:02 jeffreykegler Hmmm.  Looks interesting.
04:03 RandalSchwartz if I can go from XSD to a parser that can grab XML response into an AST, I'd be very happy
04:03 RandalSchwartz as would my $client
04:03 RandalSchwartz who is paying me for many hours of doing this by hand.
04:03 RandalSchwartz so if you want some consulting cash, I can probably arrange.
04:04 jeffreykegler I'll look at and get back to you.
04:04 RandalSchwartz thanks
04:05 RandalSchwartz the problem is that XML::Simple can parse it, but I spend a lot of time doing the mapping to my ultimate data structure myself
04:05 RandalSchwartz if I had an AST tree, I could write my ->transform methods and call them
04:07 jeffreykegler Note by the way this is true higher level language programming.
04:07 jeffreykegler A language which write a languages.
04:07 jeffreykegler * -> A language which writes a language.
04:08 jeffreykegler That's made possible because Marpa can parse such a wide variety of languages, that you can automatically write a language and reasonably expect to be able to parse it.
04:08 jeffreykegler Which you sure can't do with yacc.
04:09 RandalSchwartz Yeah, the yacc production rules often suck. :)
04:10 RandalSchwartz Oh - but at a higher level, yes
04:10 RandalSchwartz I want to parse XSD to create a parser that will create an AST that will then run on response to my web hit.
04:10 jeffreykegler The central problem is that yacc is restricted to LALR, and a language spec is almost certain *not* to be LALR
04:11 RandalSchwartz this is why I'm excited with Marpa + Perl
04:13 jeffreykegler Back to web hits, yes site traffic is way up at the moment
04:13 RandalSchwartz cool
04:14 RandalSchwartz and you're welcome. :)
04:14 RandalSchwartz odd... I would have expected your article http://jeffreykegler.github.io/Ocean-of​-Awareness-blog/individual/2012/03/the-​syntax-of-english-is-undecidable.html to talk about "time flies like an arrow"
04:14 jeffreykegler Btw, I recently had a 10,000+ hit day -- caused by a reddit & ycombinator discussion of one of my blog posts.
04:15 jeffreykegler "time flies like an arrow" is ambiguous, but didn't create an undecidability.
04:16 RandalSchwartz I guess I don't understand the difference
04:16 jeffreykegler Ambiguous == A is true, but so is B
04:16 jeffreykegler Undecidability == A is true only if A is not true, but A is false only if A is true.
04:16 RandalSchwartz Ahh!
04:16 RandalSchwartz thanks
04:17 RandalSchwartz so even though there are 4 parses of "time flies like an arrow", each of them is internally consistent.
04:17 jeffreykegler So lots of languages are ambiguous in their parsing, but Perl in undecidable
04:17 jeffreykegler A is true, and so are B, C and D.  No big issues there. :-)
04:18 jeffreykegler Or if you remember Casablanca?
04:18 RandalSchwartz the movie?
04:19 jeffreykegler The headwaiter say that Rick's Place is "as honest as the day is long".
04:19 jeffreykegler Which is a useful bit of ambiguity
04:19 RandalSchwartz yeah I never got that.
04:19 RandalSchwartz wait... so PPI is broke, but you say this too? http://jeffreykegler.github.io/Ocean-of-Awar​eness-blog/individual/2011/10/perl-and-parsi​ng-11-are-all-perl-programs-parseable.html
04:20 jeffreykegler Did I say broke?
04:20 RandalSchwartz wait... LISP can't be parsed?
04:20 RandalSchwartz is that because of macros?
04:21 jeffreykegler I think they started saying that after I proved Perl undecidability ...
04:21 jeffreykegler after that everybody wanted to get into the act. :-)
04:21 jeffreykegler LISP is so self-modifiying that I'd be surprised if you can't create an undecidability ...
04:21 RandalSchwartz ahh.  ok.
04:21 jeffreykegler on the other hand, LISP has no real syntax.
04:22 RandalSchwartz damn - this is probably all my fault.
04:22 RandalSchwartz all my arguments with Adam on this
04:22 RandalSchwartz except it was because I understood very clearly what "/" means to the Perl lexer.
04:22 jeffreykegler Yes, and you laid the groundwork -- you two did everything but the math. :-)
04:23 RandalSchwartz as you can see, I was probably the perfect interviewer for a Perl-based parser. :)
04:23 jeffreykegler Indeed!
04:24 jeffreykegler I got into the Perl undecidability question because it's a natural thing to ask, before tackling a problem, "Is it decidable?"
04:24 jeffreykegler At least the question seems natural to me.
04:25 jeffreykegler But apparently nobody had ever asked that question of a language's syntax before.
04:26 jeffreykegler There was just sort of a mental block.
04:26 RandalSchwartz ... Startlingly, Leo's result went 20 years with few implementations. Marpa is its first implementation in a general-purpose utility.
04:26 RandalSchwartz why do you think that was so?
04:26 jeffreykegler No real implementations I believe, until mine.
04:27 jeffreykegler I'm in contact with Joop (whose first name rhymes with "hope", by the way)
04:27 RandalSchwartz yeah, sorry.
04:27 RandalSchwartz I have to make things up sometimes :)
04:27 RandalSchwartz what does he think of your work?
04:28 jeffreykegler No problem, just since you're going to make him famous, it's good to get things straight. :-)
04:28 * RandalSchwartz grins
04:28 RandalSchwartz well - even prior to Adam's work, I had been thinking about the seven characters we had to list in the Camel book that had these overloadings.
04:28 jeffreykegler Joop is not a practical programmer -- he was pure theory -- he's followed Marpa, and has been supportive.
04:29 RandalSchwartz and had asked Larry how that was resolved in a separated parser/lexer
04:29 jeffreykegler He's now a philosopher by the way.
04:29 RandalSchwartz and thats when I learned that the parser and lexer were "friendly"
04:29 jeffreykegler Yes, did you get a chance to read my parsing chronology, by the way.
04:29 RandalSchwartz which was a new thing that I didn't understand and tried to study further
04:30 jeffreykegler I mention it because it answers some of the questions you are asking.
04:30 RandalSchwartz since I had written some lexx/yacc things already.
04:30 RandalSchwartz yeah I saw that timeline about 30 minutes ago
04:30 jeffreykegler http://jeffreykegler.github.io/Ocean-of-Aw​areness-blog/individual/2014/09/chron.html
04:30 jeffreykegler Suprisingly, my most popular post every -- the one that drew that 10,000 plus hits in a day.
04:30 RandalSchwartz sadly - I did not remember who talked about perl parsing being parser/lexer/smoke/mirrors
04:31 RandalSchwartz ahh.. In the words of Chaim Frenkel: "Perl's grammar can not be reduced to BNF. The work of parsing perl is distributed between yacc, the lexer, smoke and mirrors."
04:31 jeffreykegler I also remember the quip but not the source -- is it one of the core group of paid maintainers.
04:32 RandalSchwartz ... http://stackoverflow.com/questions/46​25408/where-can-i-find-a-formal-gramm​ar-for-the-perl-programming-language
04:32 RandalSchwartz and an immediate reference following to my "On Parsing Perl"
04:32 jeffreykegler Anyway, my theory of why no implementations for Leo until mine is in the "Timeline of Parsing" post
04:33 RandalSchwartz I'm wondering how the grammar for perl 6 works, if not by also executing Perl during the lex.
04:34 jeffreykegler The difference is that Perl 6 no longer uses yacc/LALR
04:34 jeffreykegler it uses top-down parsing, which is a lot friendly to lexing as you go.
04:36 jeffreykegler One way I once described the reason for ignoring Leo and the possibilities of Earley parsing ...
04:36 jeffreykegler is that what is a practical parsing is a question that requires knowledge of both theory and practice ...
04:36 RandalSchwartz ahh, so we know we're looking for an operator, so we lex based on that.
04:37 jeffreykegler and once the verdict re Earley's was in, around 1970, the practitioners assumed the theoreticians had settled the matter, and vice versa.
04:37 jeffreykegler It's been a while since I looked at the Perl 5 parsing, but IIRC
04:38 jeffreykegler Perl 5 actually goes into a mini-parse inside the lexer to decide how to lex ...
04:38 jeffreykegler because with yacc, there's no way to get a clue as to where you are.
04:38 RandalSchwartz I believe there were some pass-down variables
04:39 RandalSchwartz parser would set "NEED_OP" or something
04:40 jeffreykegler Maybe.  yacc's idea of location is none too reliable or helpful, but anything's possible.
04:40 RandalSchwartz which would force "/" to be lexxed at an op
04:40 jeffreykegler Anyway, in Perl 6, Larry turned away from yacc the way you'd try to forget a bad dream.
04:41 RandalSchwartz heh
04:41 jeffreykegler By the way, one thing about Larry and yacc ...
04:41 RandalSchwartz anyway... I'm fading... hope this was also useful for you.  and if you can help me with XSD, I have cash.
04:41 RandalSchwartz XSD or WSDL
04:41 jeffreykegler I've read a lot of parsers, and I can't be 100% certain, but I think he advanced the use of yacc futher than anyone else.
04:41 RandalSchwartz some vendors are WSDL
04:42 RandalSchwartz you mean he abused yacc further.
04:42 RandalSchwartz yes
04:42 jeffreykegler I'll get in touch one way or the other
04:42 RandalSchwartz and if I get a spare moment, undump will be mine. :)
04:42 jeffreykegler What I was trying to say is that Larry is important in the history of parsing.
04:43 jeffreykegler Because of the Perl 5 parser
04:43 RandalSchwartz yes of course
04:43 jeffreykegler it's a a klnd of high-water mark
04:43 RandalSchwartz Larry pushed the envelope in a number of ways
04:43 RandalSchwartz he's a brilliant guy
04:43 RandalSchwartz I was just his biggest cheerleader
04:43 jeffreykegler I remember.
04:44 jeffreykegler You "discovered" him in a sense.
04:44 RandalSchwartz no - Perl was already established
04:44 RandalSchwartz I just talked about it a lot :)
04:44 jeffreykegler Who sold ORA on the book?
04:44 RandalSchwartz me
04:44 RandalSchwartz I'm clearly Perl's most prolific author
04:45 jeffreykegler I actually downloaded Perl on its first day of release.
04:45 jeffreykegler So I do remember it before you came along.
04:45 RandalSchwartz many books, many conference talks, 255 magazine article.s
04:45 jeffreykegler But you gave it a big, big boost.
04:46 RandalSchwartz yeah, because it worked for me.
04:46 RandalSchwartz which is why I feel happy about Marpa.  Haven't used it for anything big, but I understand the progress it is over alternatives.
04:46 jeffreykegler Larry is still I believe the best language designer out there.
04:47 RandalSchwartz He understands things that many don't, yes.
04:47 RandalSchwartz having chatted with many other language designers.
04:47 jeffreykegler I wish he'd see the additional power Marpa could bring into language design, but whatever.
04:47 RandalSchwartz will there be a perl6 marpa?
04:48 jeffreykegler Perl 6's internals are even more entangling than Perl 5's.
04:48 jeffreykegler In particular, it seems a module is required to know Unicode *and graphemes*
04:48 RandalSchwartz it would be interesting to rewrite the NQP parser in marpa
04:49 RandalSchwartz because that means everything above that would know marpa
04:49 jeffreykegler We've talked about it, but they've never even done a BNF
04:49 RandalSchwartz ugh
04:49 RandalSchwartz missed opportunity
04:49 jeffreykegler We talked about doing it ourselves, but at a certain level if it is not a priority for them, that is their decision.
04:50 jeffreykegler To be fair, I don't think Larry ever did BNF for Perl 5.
04:50 jeffreykegler So that's just his approach.
04:50 RandalSchwartz sure - was just probably some yacc coding
04:51 jeffreykegler Yes, there's kind of a BNF in the yacc.
04:51 jeffreykegler But notice in the Perl 5 docs,
04:51 RandalSchwartz I kinda hand-waved about BNF in the interview
04:51 jeffreykegler no BNF, where even the smallest RFC almost always has some.
04:51 RandalSchwartz I probably could have explained a bit more of that
04:52 RandalSchwartz although I did talk about that relative to an RFC
04:52 jeffreykegler Another topic where I'd want a whiteboard.
04:52 jeffreykegler I thought you and Andrew handled BNF as well as was possible given the format.
04:52 RandalSchwartz yeah - in audio, I have to learn how to do that without a whiteboard
04:52 RandalSchwartz "mail message = mail header then mail body"
04:53 RandalSchwartz "mail header = things like subject and to"
04:53 jeffreykegler Which is why you don't see a lot of radio shows about quantum mechanics
04:53 jeffreykegler or parsing theory.
04:53 RandalSchwartz I think I did that pretty well
04:53 jeffreykegler I think in that format you can pique interest ...
04:53 jeffreykegler if you do that they'll go to Wikipedia or my posts or whatever ...
04:53 RandalSchwartz yup
04:54 jeffreykegler and if not, it was hopeless anyway.
04:54 RandalSchwartz I think I would have done a bit better with RFC822 in front of me
04:54 RandalSchwartz only so much googling I can do while hosting though :)
04:54 jeffreykegler Maybe someday Marpa the movie
04:55 RandalSchwartz heh
04:55 RandalSchwartz well... again, I'm hoping you get more attention than you can handle.
04:55 RandalSchwartz because what Marpa does deserves that.
04:55 jeffreykegler That little. :-)
04:55 jeffreykegler Thanks a lot.  I very much appreciate your support.  I hope this works out well for you.
04:56 jeffreykegler That the show is popular, etc.
04:56 RandalSchwartz yes... we'll get "incredibly geeky" points.  always happy for that.
04:56 RandalSchwartz but the show is already solid.
04:56 jeffreykegler How is your audience re the extra-geeky stuff?
04:57 RandalSchwartz so I don't really concern myself with "what do I need to do next to make it even more popular"
04:57 jeffreykegler Friendly?  Adverse?
04:57 RandalSchwartz mixed
04:57 jeffreykegler By the way, the show was a learning experience for me.
04:57 RandalSchwartz we have a good variety of end-user-installable vs techno-savvy shows.
04:57 jeffreykegler Seeing how my work is perceived that is
04:58 RandalSchwartz I can imagine.
04:58 jeffreykegler Having lived this stuff for 7 years, it's not geeky to me, but just the run-of-the-mlll stuff.
04:58 RandalSchwartz I can't say this enough times... thank you for finding the derivatives of Earley and integrating them, and then integrating them with Perl.
04:58 jeffreykegler quite welcome.  Just following my obsessions. :-)
04:59 RandalSchwartz which is why this show was personally important to me.
04:59 jeffreykegler I'm glad you saw it that way.  Marpa is like that to me of course, but then it's my baby.
05:00 RandalSchwartz Well, parsing is important... we tried to hit that a couple of times in the show... dunno if it came across well.
05:00 RandalSchwartz important, but also dull. :)
05:01 jeffreykegler Dull? :-)
05:01 jeffreykegler I'm peculiar, in that it fascinates me.  How else could I have done nothing else for 7 years?
05:02 jeffreykegler But parsing opens doors.  Language oriented programming.
05:02 RandalSchwartz I can relate, although I'm more of a guy that likes other people to solve the hard generic problems, and then I apply that to the cash-cow specific problems. :)
05:02 RandalSchwartz like a C compiler
05:02 RandalSchwartz or an OS
05:02 jeffreykegler Actually, did you know that Damian Conway is a Marpa fan?
05:03 RandalSchwartz Awesome, and not unexpected
05:03 jeffreykegler If kind of a quiet one.  He says little about Marpa, but it's always very nice.
05:03 jeffreykegler Anyway, Damian's vision of language oriented programming ...
05:04 jeffreykegler you hook that up to Marpa and nobody will call the result dull.
05:04 RandalSchwartz I think Marpa's biggest possibles is in DSLs.
05:04 RandalSchwartz like puppet, etc.
05:04 RandalSchwartz in fact, you could probably write a puppet-to-perl translator in Marpa pretty easy.
05:05 jeffreykegler DSL's, right.  Creating languages instead of systems of objects and methods.
05:05 RandalSchwartz yeah, rather than writing a YAML in precisely the right format... why not write a DSL?
05:06 jeffreykegler Thinking in terms of small languages and putting them together.
05:06 jeffreykegler The reason before was of course that writing a DSL was a major pain.
05:06 RandalSchwartz Yup.
05:06 jeffreykegler one quite likely just to be a dead end.
05:07 jeffreykegler So whenever you thought of solving a problem with a new language, you would lie down ...
05:07 jeffreykegler and wait until another idea occurred to you.
05:07 RandalSchwartz yeah, if I could write a DSL simply by a BNF and :default => '::array'
05:07 jeffreykegler which you can
05:07 RandalSchwartz I might be easily convinced.
05:07 jeffreykegler Ron Savage has been producing new parsers at the rate of one every two days.
05:08 jeffreykegler Which is why his name popped into Andrew's mind.
05:09 jeffreykegler Anyway, I've tried in my posts to do the "vision thing" like you and Damian do, ...
05:09 jeffreykegler but I just don't have the knack.
05:10 jeffreykegler But I think Marpa + LOP could be really interesting to folks
05:16 RandalSchwartz LOP?
05:17 jeffreykegler Language-oriented programming
05:17 RandalSchwartz Oh
05:17 jeffreykegler It gets talked about as a paradigm -- it's even in the Go4 book.
05:17 RandalSchwartz I don't think people really get the importance of parsers
05:18 RandalSchwartz but everyone ends up writing things like my @list = split /,/, $line;
05:18 RandalSchwartz but what if those items needed "," within an item?
05:18 jeffreykegler It sometimes seems that folks think how a language is numbered is more important than how it is parsed. :-)
05:18 RandalSchwartz and there's where trouble begins.
05:19 jeffreykegler Also, Steven Yegge has talked about the importance of LOP as a paradigm, also Eric Raymond
05:19 RandalSchwartz cool
05:19 jeffreykegler but always there has been the obstacle that there has been no real way to do it.
05:19 RandalSchwartz maybe what you need to do is a series of posts on parsing small languages.
05:20 jeffreykegler I've done it and they've been my worst received.
05:20 RandalSchwartz items ::= item+ seperator = /,/
05:20 RandalSchwartz or whategver it si
05:21 RandalSchwartz and item ::= '"' base_item '"' | base_item
05:21 RandalSchwartz or whatever it would be
05:22 RandalSchwartz yeah CSV would be fun
05:23 RandalSchwartz hey, how would you say XML
05:23 RandalSchwartz with "<foo>" ... "</foo>" ?
05:23 jeffreykegler I've got an HTML parser
05:23 RandalSchwartz or would you not have generic XML?
05:23 jeffreykegler Marpa::R2::HTML
05:23 jeffreykegler it's part of the Marpa::R2 distribution.
05:24 jeffreykegler and I must say one of the Perl community's best kept secrets.
05:25 RandalSchwartz yeah, I referred to that in the show.
05:25 jeffreykegler Generic XML, sure, yes.
05:25 jeffreykegler https://github.com/jdduran​d/MarpaX-Languages-XML-AST
05:26 jeffreykegler Jean-Damien Durand has started an XML parser.
05:26 RandalSchwartz cool
05:26 jeffreykegler I believe it has users at this point.
05:26 RandalSchwartz just wondering how to have correlated <foo> and </foo>
05:27 jeffreykegler I'm not sure how Jean-Damien does it.  My approach ...
05:27 jeffreykegler is to pre-scan the HTML/XML and census the tags ...
05:27 jeffreykegler then generate a parser for those tags.
05:28 RandalSchwartz ahh, ok
05:28 jeffreykegler Again, a true higher level language ...
05:28 RandalSchwartz yes
05:28 jeffreykegler a language that writes a language.
05:29 RandalSchwartz Anyway, the Brilliant Jeffrey Kegler has gotten a nod.  Hope this helps.
05:29 RandalSchwartz and now I must sleep.
05:29 jeffreykegler Good night!
05:29 jeffreykegler AFK
05:30 RandalSchwartz left #marpa
06:10 koo5 joined #marpa
07:59 basiliscos joined #marpa
08:25 basiliscos joined #marpa
11:17 AbigailBuccaneer joined #marpa
12:52 lwa joined #marpa
15:39 koo5 joined #marpa
15:42 jluis joined #marpa
17:05 rns joined #marpa
17:07 jeffreykegler joined #marpa
17:08 jeffreykegler Recording an answer re Web activity on my personally administered sites around the FLOSS broadcast:
17:09 jeffreykegler Jan 13, 43 sessions; Jan 14, 136
17:10 jeffreykegler past 30 day average # of sessions: 21
17:11 jeffreykegler In  terms of users, Jan 13: 37; Jan 14: 124
17:11 jeffreykegler 30 day average # of users: 14
17:11 jeffreykegler Most Marpa sites are *not* included in the counts
17:12 jeffreykegler I get Analytics data only for the Libmarpa reference pages and my copy (*not* the blogs.perl.org copies) of my blogs posts; plus my personal Marpa web site.
17:15 jeffreykegler By comparison, the reaction from my "Timeline of Parsing" web post sent me 8,971 sessions one day; and 6,881 the next.
17:17 jeffreykegler It's important to note that, unlike most sites, for which the raw numbers are the most important thing, for us in Marpa, we're more concerned about folks with serious interest -- those who will go on to create applications or contribute to Marpa itself.
17:17 jeffreykegler So small numbers are fine, if they're the right numbers.
17:18 hobbs jeffreykegler: btw, yes, the recent perl recursive regex lets you write recursive descent that runs entirely inside the regex engine. Just like the rest of the regex engine, it's backtracking.
17:18 jeffreykegler hobbs: thanks!
17:18 hobbs Regexp::Grammars is a system similar to Parse::RecDescent except it uses constant overloading to rewrite your grammar into a monster 5.12+ regex full of recurse rules and (?{...}) code assertions
17:18 jeffreykegler That was my guess
17:19 hobbs and then you can just $input =~ $grammar and it runs
17:19 jeffreykegler Doing stuff the hard way!
17:20 hobbs it's generally faster than P::RD because the regex engine is faster at backtracking and state management than P::RD's Perl code is :)
17:22 jeffreykegler With events, it may now be possible to write a Marpa-powered version of that interface.
17:23 rns jeffreykegler: marpa_g_start_symbol(), when called on a empty grammar (no symbols or rules) returns -1, but marpa_g_error() returns MARPA_NO_ERROR.
17:23 rns Is this intended?
17:23 rns I'd expect MARPA_ERR_NOT_PRECOMPUTED or MARPA_ERR_NO_RULES.
17:24 jeffreykegler It's probably considered a "soft error", like many -1 conditions.
17:25 jeffreykegler If the grammar is generated automatically, it's possible there will be no symbols at a certain point.
17:26 jeffreykegler rns: I tended to "err" in favor of considering things soft errors,
17:27 jeffreykegler 1.) With automatic grammar generation in mind; and
17:27 jeffreykegler 2.) because you can escalate a soft error more easily than you can catch and de-escalate a hard error.
17:28 jeffreykegler rns: Reading my language in the API, I considered it either a soft error, or not an error at all.
17:28 jeffreykegler 0 is a valid symbol number.
17:31 rns Ok. I'm writing a luajit binding for libmarpa and just find it hard to devise an error message for that (perhaps imaginary) case: smth. like "grammar not precomputed or has no rules?"
17:31 rns Or just ignore and let the application do error handling?
17:31 jeffreykegler "Grammar has no start symbol"
17:32 rns Ok, thanks.
17:33 jeffreykegler Re handling -- depends on your app -- no start symbol might be innocuous at that point, but also might be a show-stopper ...
17:33 jeffreykegler certainly you won't be able to go on to precompute without a start symbol.
17:34 jeffreykegler There is a MARPA_ERR_NO_START_SYMBO
17:34 jeffreykegler Oops! -- MARPA_ERR_NO_START_SYMBOL
17:36 jeffreykegler I believe my thinking with marpa_g_start_symbol() was that the most likely case was where you used the -1 to indicate your progress, when your logic for picking the start symbol was complex ...
17:37 jeffreykegler which it can be if you, for example, take the first LHS as the start symbol, but have several types of rules, and other complications.
17:37 rns Ok, thanks for explaining, I'll just return MARPA_ERR_NO_START_SYMBOL
17:37 jeffreykegler So it's a "not yet" indicator, rather than an error.
17:38 jeffreykegler Part of my thinking was probably also that if there was a real problem, marpa_g_precompute() was sure to catch it, with a real error message.
17:39 rns Yes, I see, after all, there is still time before marpa_g_precompute() to set the start symbol, hence the soft error.
17:39 jeffreykegler Exactly.  In general, I think it makes things more flexible if you treat things as warnings or indicators, rather than as errors, where there is a choice.
17:41 rns Ok, got it, thanks.
18:15 jdurand_ joined #marpa
18:16 jdurand_ hobbs: Re http://irclog.perlgeek.de/​marpa/2015-01-15#i_9942548 - no worry, as I said, we'll fight in front of a glass of beer -;
18:17 jdurand_ Right now I am finishing my M4 stuff - it is ready, but I want it to be "well-writen". This will be finally be a Moops thingy, having BOTH gnu and posix, plus a "perl" one for the fun
18:17 jdurand_ Then I'll come back to marpaWrapper and the C bindings
18:17 hobbs nice
18:17 jdurand_ And the XML
18:17 hobbs Moops as in Toby's declarative Moo stuff?
18:17 jdurand_ yes
18:18 hobbs cool. That's "production-ready" enough for you?
18:18 jdurand_ No
18:18 hobbs haha
18:18 jdurand_ but soon
18:18 jdurand_ he he -;
18:18 hobbs fair enough
18:21 jdurand_ When I was listening the FLOSS you said that Marpa can parse anything, including binary sutff - though this is true, AFAIK there is no real implementation of that
18:21 jdurand_ then I was thinking to... he he
18:21 jdurand_ the Java .class files
18:21 jdurand_ they have a very well formalized format
18:22 hobbs yeah, I've never seen it done
18:22 hobbs one project I've had in the back of my mind for a long time is a system that lets you define a file format completely declaratively
18:22 hobbs and it gives you functions for reading and writing that format
18:22 jdurand_ Indeed.
18:23 hobbs so you could have a readable description of, say, the PNG format, pass it to this library, and get a PNG encoder/decoder
18:23 jdurand_ Coming back to .class files, reading http://docs.oracle.com/javase/s​pecs/jvms/se7/html/jvms-4.html it IS clearly BNF
18:23 jdurand_ so anybody wanting to write a .class parser ? IMHO this is an easy exercice
18:25 hobbs I'm interested, but I'm excessively busy right now
18:25 hobbs if it's still waiting to be done in a week or two, I probably will :)
18:26 jdurand_ he he... unless I've done it -; ? Hmmm... let me count the remaining sleeping hours -;
18:27 jdurand_ ok I promiss to come back on this subject in two weeks if nothing is yet done and ask again for any voiunteer
18:28 basiliscos joined #marpa
18:29 * jdurand_ is aking for volunteeers to do a Java's .class file parser!
18:31 jdurand_ Othgerwie, after the M4, my planning is a priori first the C-bindings. As you may know, I have already done a Marpa-powered cdecl - but I want to provide an alternative to SWIG, this is clearly announced lol
18:32 jdurand_ then XML in parallel to MarpaWrapper and/or contribution to Kollos
18:34 * jdurand_ think it is time to drink his glass of porto (Andrew: cheers!) and smoke his cigarette
18:36 hobbs jdurand_: speaking of buying you a beer -- do you do YAPC::EU? I'm going to try to make it for 2015.
18:40 jdurand_ BUlgaria, too far away I am adraid my wide will not like that - but I'll chek with her..; unless you do a short break by the Geneva airport ? I am 2mns away from the arrivals
18:41 jdurand_ "my wife"
18:41 hobbs 2014 was in Sofia, 2015 will be in Granada Spain
18:44 jdurand_ Ah... this makes a big difference - ok will hceck
18:44 jdurand_ "will check" grrrr... switching from qwertz to azerty is always a little bit difficult for a while
19:47 jdurand_ hobbs: he he Granada looks possible - I'll come back on this later either on IRC or as PM
20:37 koo5 joined #marpa
21:05 ronsavage joined #marpa
21:22 ronsavage I was thinking of how to help hobbs with future talks, and realized I, and others, can write short (lightning-style) talks, and I'll collate all sent to me. The first of mine will be on the SVG parser. There are ideas from the docs I can easily turn into a short article.
21:23 ronsavage hobbs: A specific idea is to have Marpa's homepage - mine :-) - open in a browser tab when talking, and you can flip to it for inspiration, without having to know details for any particular module.
21:24 ronsavage And the articles mentioned are ones you can call tutorials, so let people know Marpa is accessible via on-line help, not just code.
21:25 hobbs I did that with a set of notes, so that it would be boiled down a little more
21:25 hobbs and I made a mistake in the boiling :)
21:25 hobbs but yeah, I did try to make clear that there's some good tutorial-type stuff out there
22:13 ronsavage hobbs: Yeah. I'm not aiming to criticize, but rather to list resources and ideas.
22:14 hobbs I get it
22:14 hobbs and I agree :)
22:49 btyler joined #marpa
22:51 sivoais_ joined #marpa
22:53 lucs joined #marpa
23:04 ilbot3 joined #marpa
23:04 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
23:04 lucs_ joined #marpa
23:05 koo5 joined #marpa
23:05 AbigailBuccaneer joined #marpa
23:06 btyler joined #marpa
23:09 jluis joined #marpa
23:12 18VABY4HM joined #marpa
23:13 sivoais joined #marpa
23:13 flaviu joined #marpa
23:13 jeffreykegler joined #marpa
23:13 hobbs joined #marpa
23:14 aredridel joined #marpa
23:23 77CAABZU1 joined #marpa
23:23 1JTAABMSD joined #marpa
23:28 flaviu_ joined #marpa
23:35 7YUAAFL3J joined #marpa
23:35 64MABRKDD joined #marpa
23:46 sivoais joined #marpa
23:48 sivoais_ joined #marpa

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