Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2015-08-10

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

All times shown according to UTC.

Time Nick Message
02:18 idiosyncrat_ joined #marpa
06:14 ronsavage joined #marpa
07:56 CQ joined #marpa
16:17 idiosyncrat_ joined #marpa
16:19 idiosyncrat_ I have revised my public CV: http://jeffreykegler.github.io/Curriculum-vitae/
16:25 koo7 joined #marpa
17:59 idiosyncrat_ joined #marpa
18:09 lwa joined #marpa
19:29 dvxd joined #marpa
19:30 dvxd is libmarpa suitable to use inside arbitrary language, or is it just usable with Perl?
19:32 ceridwen Libmarpa is a C library and can be used from other languages with appropriate FFIs, but the API is very low-level and not very friendly.
19:39 dvxd nod. I was thinking of importing it into newlisp. newlisp FFI is very friendly, so mapping numbers to symbols and strings should be fairly easy.
19:39 dvxd each number represents what, a byte/octet?
19:40 dvxd I was looking at PEG, then remembered: didn't someone figure out how to take Earley and speed it up? and found Marpa.  Again.
19:41 ceridwen I'm going to defer to the developer of libmarpa on that one, I haven't done enough with it to be confident in my answer.
19:43 dvxd looks like integers represent rules, and arbitrary objects. so the question is how to specifically spell out a grammar.  Or does it accept EBNF, but the output is a series of integers.
19:43 dvxd is marpa author in this channel?
19:43 ceridwen Yes, sometimes.
19:43 ceridwen He may not be around right now though.
19:49 idiosyncrat_ dxvd: hi -- I'm about to run but let me quickly answer.  If I miss something, I'll backlog and catch it later.
19:50 idiosyncrat_ Libmarpa is written to be upper-level language indifferent.  It is not tied to Perl
19:50 dvxd thanks.
19:51 idiosyncrat_ It *is* very low-level.  As you noticed, no symbol names, just numbers.  There's a Libmarpa API doc which spells this out, but feel free to ask here.
19:51 dvxd I looked briefly at marpa a year ago and moved on when I thought it was tied to perl.  Glad I've come back to it.
19:51 dvxd I'll finish reading the document; guess I should read the blog entries too.
19:51 idiosyncrat_ In order to avoid issues of string representation (UTF8?  Latin-8?  ASCII-7?) Libmarpa uses *no* strings.
19:51 dvxd the library sounds ideal for a newlisp ffi wrapper.
19:51 dvxd I use newlisp because it is like perl... but more readable.  has a lot of the same ethic.
19:52 idiosyncrat_ Error codes, symbols, rules, even token values, are all integers.
19:52 idiosyncrat_ (With token values, the idea is that you use the integers as indices to an array with the real values, if needed.)
19:53 dvxd ok... what do I pass to libmarpa?  a straight EBNF grammar?  or must the grammar be some sequence of integers?
19:54 idiosyncrat_ So the Marpa algorithm is all there, and language-indifferent, but at a low enough level that it's people do miss some of the value added.
19:54 dvxd the "everything is an integer" model; is that for input as well as output of libamarpa?
19:54 idiosyncrat_ *Everything*
19:54 dvxd heh.
19:54 idiosyncrat_ No strings, no floats.  Everything.
19:55 dvxd that can all be handled in newlisp easily enough. but how to specify a sequence of bytes?
19:55 idiosyncrat_ So you've got to write an upper layer which turns an EBNF/BNF grammar into rule/symbols in the form of integers.
19:55 dvxd the Go wrapper looked like it was using strings.
19:55 dvxd ah, ok.
19:56 dvxd and there is a way to tell marpa "this is a literal integer" and "this is a symbol integer".
19:56 idiosyncrat_ I did not write the Go wrapper, so would not know.  My experience is that an the upper layer *has* to have strings.  Without symbol names, you can't get far.
19:57 dvxd yeah. mapping integers to symbols is super easy.
19:57 idiosyncrat_ Libmarpa does not necessarily see string inputs -- it sees token, which have a symbol and a value.  Both are represented as integers
19:57 dvxd I'll look more into the Go implementation, it looks clear.  The Rust language has been clobbering my brain lately.
19:58 idiosyncrat_ ceridwen: Thanks -- you basically were right on the mark.
19:58 idiosyncrat_ Right now rns & I are working on a Lua port, and that contains my version of higher layer stuff, but it is a work in progress.
19:58 dvxd idiosyncrat: you are the author of marpa?
19:59 idiosyncrat_ Sorry, yes, I am Jeffrey Kegler.
19:59 dvxd Pleased to meet you.  Thanks for making your work available.
20:00 idiosyncrat_ Marpa::R2 obviously contains all the upper level logic, but unfortunately it is code which "evolved" and supports a lot of obsolete interfaces for compatibility reasons.
20:00 dvxd I've heard lots of nice things about Lua.  If I wasn't focused on newLisp, I'd be into it.  I was impressed when OpenBSD borrowed the Lua version of regular expressions for their http daemon.
20:00 idiosyncrat_ dxvd: Working on Marpa has been my pleasure, if so far not a remunerative one.
20:01 dvxd I also recently read about the Knot DNS server, and the http daemon written in Ragel because of their speed.  Think in a shootout, Marpa could bee them?
20:01 dvxd beat?
20:02 idiosyncrat_ Lua for what it does is unrivaled.  Our reason for picking Lua is that it is so small it is reasonable to wrap it inside other languages, like Perl or Go or newlisp
20:02 idiosyncrat_ Dunno about Kont DNS server / Ragel
20:02 dvxd it is small. newLisp has grown a bit; I think about twice the size of Lua now.
20:03 idiosyncrat_ If we are talking in the context of net overhead, the parsing / byte crunching overhead may not be measureable either way.
20:03 dvxd ok. then it gets down to EBNF, and marpa is way more flexible than ragel.
20:04 idiosyncrat_ Anyway, thanks for your interest, if you think you might go with Libmarpa, your next stop might be the Libmarpa API doc.
20:05 idiosyncrat_ https://jeffreykegler.github.io/Marpa-web-site/libmarpa.html
20:05 idiosyncrat_ Nice to meet you, dvxd.  Thanks for your interest and sorry to have to go AFK now.
20:05 idiosyncrat_ bye
20:06 dvxd amazing. I'm used to people on IRC being idle for days and weeks at a time.
20:19 dvxd heh. PEG is like Jimmy Hoffa's body... good reading.
21:49 djns joined #marpa
23:56 idiosyncrat_ joined #marpa
23:57 idiosyncrat_ dvxd: I was going to recommend my PEG article, so you've anticipated me. :-)

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