Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-10-12

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

All times shown according to UTC.

Time Nick Message
01:21 ronsavage joined #marpa
01:34 jeffreykegler rns: http://irclog.perlgeek.de/marpa/2014-10-11#i_9490788 -- I sometimes wake up at night and will check email or the IRC.  Anything that requires a lot of effort, I leave for some other time. :-)
02:18 flaviu joined #marpa
02:47 ronsavage I.e. Don't parse today what you can parse tomorrow!
03:17 CQ_ joined #marpa
05:23 rns joined #marpa
05:25 jeffreykegler joined #marpa
05:26 rns jeffreykegler: re http://irclog.perlgeek.de/marpa/2014-10-11#i_9493150 — fixed in this commit — http://goo.gl/vs54uz — with your patch, Marpa::R2 synopsis BNF with actions in Lua now parses ok. Thanks!
05:27 jeffreykegler Parser-driven development !
05:29 rns Yep, at its best. :)
05:29 jeffreykegler Best so far, anyway. :-)
05:41 rns Well, as good as it gets, at least. :) re http://irclog.perlgeek.de/marpa/2014-10-11#i_9492649 — hopefully fixed in this commit http://goo.gl/T4lnnK — 'use 5.010;' is in all files, dependant tests are skipped if lua or Inline::Lua are missing. Was/is there anything else?
05:42 jeffreykegler Versions for Marpa::R2, Inline and Inline::Lua
05:43 rns Ok, working on it.
05:43 jeffreykegler I switch around with perlbrew a lot, and each perl has its own PERLLIB, which needs to be separately updated ...
05:44 jeffreykegler so a fast fail if I don't have the right version can save me a lot of grief.
05:46 jeffreykegler Do you really work with just 5.10?  I had a bug that went away when I moved to 5.18, but that might have been because that changed my whole library environment
05:56 rns Nope, 5.14.2 on cygwin. I 'use 5.010;' as the minimum.
05:56 rns the minimum requirement that is.
05:57 jeffreykegler I don't understand.
05:57 jeffreykegler Does Lua::AST work with 5.10?
05:59 jeffreykegler That is, if you need 5.14.2, isn't that the minimum?
05:59 rns I didn't test it with 5.10. Should I require 5.14.2 then?
06:00 jeffreykegler Unless you know it works with 5.10, you need to require something higher.
06:00 jeffreykegler Something that you know that it works with.
06:00 jeffreykegler That's what "minimum" has to mean in this context.
06:01 jeffreykegler That's why I never upgrade my Perl, and usually run with 5.10 -- otherwise I don't know whether or not I need to require a higher version for Marpa::R2
06:03 rns Ok, cygwin has 5.10.1 so I'll do the same thing.
06:04 jeffreykegler In practice, if you develop with a set of versions, you need to require them, unless of course you have the kind of pre-release test environment that we don't have.
06:05 jeffreykegler Whether to require 5.14 or not is up to you.  Particular as this is only a trial application ...
06:05 jeffreykegler There's no need to worry much about having a high degree of portability.
06:06 rns Well, I'm going to release to cpan eventually, so it'll raise up anyway.
06:07 jeffreykegler But whatever you decide on, that requirement needs to be made explicit in the code, and ditto for all the packages you load.
06:08 rns I think Marpa::R2 starts with 5.010 and so should Lua::Ast.
06:08 rns Ok, now I'm installing modules for 5.10.1 and will update the code.
06:09 rns BTW, if I run 5.10.1, should I 'use v5.10.1;' or will 'use 5.10;' suffice?
06:09 jeffreykegler By the way, Marpa::R2 runs with 5.10.0, and there is a *big* difference.
06:09 jeffreykegler So "use 5.10.1" is not the same as "use 5.10"
06:10 jeffreykegler 5.10.0 is too hard to find to use for development, so what I recommend ...
06:10 rns Got that. If Is use 5.10.1 will it be a problem for your setup?
06:11 jeffreykegler 5.10.1 will not be a problem for me, or for any but a few unfortunates out there.
06:11 jeffreykegler But they do exist and some are important Marpa::R2 users.  I can't ignore them, but you can and probably should, frankly.
06:12 jeffreykegler "they" == "5.10.0 users"
06:13 jeffreykegler When I say that 5.10.0 is hard to find, it's not one of the pre-existing variants on perlbrew -- you'd probably have to find it somewhere and compile it yourself, which is not worth the trouble.
06:15 rns I see. I'll try to set up 5.10.1 and all modules for it and if smth. fails I'll fall back to 5.14.2 and will require it and module versions I'm using currenty. Should be enough for the moment.
06:16 jeffreykegler Like I say, either way I'll cope, as long as you explicitly require all the versions you need in the code.
06:17 rns Ok, I'll do it. Not everything installs ok on cygwin, esp. on older perls. :( I now understand better what Jean-Damien had to say about cygwin. :)
06:29 rns No, 5.10.1 installed but modules, e.g. Config::Autoconf, failed. So, with these commits — http://goo.gl/8zJDOf, http://goo.gl/KVPrqD — I'll 'use v5.14.2' and require current versions of modules I use. Glad we sorted it out.
06:29 rns cpantesters should help to know where the module really works.
06:30 jeffreykegler Sounds good
06:30 rns Perhaps you can write a couple of Lua BNF scripts for me to test?
06:30 rns To test parser, that is. :)
06:30 jeffreykegler Actually your translation of the synopsis look good for a start.
06:31 jeffreykegler I want to get comments about the proposed syntax, before we do a whole lot.
06:32 jeffreykegler That's why I call it parser-driven develoment -- first the parser, then the spec.
06:33 jeffreykegler I'll think about doing others.
06:33 rns Makes sense, so I'll focus on formatter so we (and possibly others :) ) to finally see what the parser produces. :)
06:34 jeffreykegler Time for me to sign off.
06:34 jeffreykegler AFK
06:34 rns Good luck. And thanks a lot!
06:38 rns left #marpa
06:40 rns joined #marpa
06:40 rns left #marpa
06:41 rns joined #marpa
06:44 qwebirc53891 joined #marpa
06:45 qwebirc53891 left #marpa
06:59 ronsavage joined #marpa
07:55 lwa joined #marpa
12:23 jdurand joined #marpa
12:23 jdurand Jeffrey, when Marpa::R2 says "Counted nullables confuse Marpa" - it is confusing the perl part or also libmarpa ?
14:27 jeffreykegler joined #marpa
14:28 jeffreykegler jdurand: At both levels.  At the Libmarpa level it's a fatal error: MARPA_ERR_COUNTED_NULLABLE
14:30 jeffreykegler jdurand: We may make surprisingly fast progress on the LUIF and will need the Libmarpa wrapper at some point.
14:31 jeffreykegler If you're still wrapped up in other stuff, rns and/or I could do it --
14:31 jeffreykegler your pointer to the SWIG was excellent, so it creating the wrapper should (I hope) be fast.
14:49 jdurand joined #marpa
14:49 jdurand Re http://irclog.perlgeek.de/marpa/2014-10-12#i_9494937 - ok, will work on that tonight - ok if I take the C version bundle within CPAN instead of the libmarpa github repo itself ?
14:58 flaviu joined #marpa
15:17 jeffreykegler jdurand: the C version bundle in the latest Marpa::R2 dev should be good.  Thanks!
17:12 jdurand FYI I found this page very interesting: http://lua-users.org/wiki/BindingCodeToLua
17:16 jdurand jeffreykegler: I assume the proof of concept should be against lua 5.1
17:26 jeffreykegler joined #marpa
17:26 jeffreykegler jdurand: Yes, we are strictly Lua 5.1
20:20 shadowpaste "jdurand" at 88.160.190.154 pasted "Marpa lua binding proof of concept" (16 lines) at http://scsys.co.uk:8002/429386
20:23 jdurand Let me add that marpa_version is as vicious as its prototype is simple: marpa_version(int *array), where there is NO formal definition of the size of the array in marpa.h
20:23 jdurand In this very special case, it is impossible for a binding generator to know if the argument is input, or output, or both. You could say "both" and voila, this is the end of the story.
20:25 jdurand This is not so simple; and it appears that marpa_version() was not the easiest case, although I do not claim to have done things clean
20:26 jdurand Anyway, in general one has ot take care of unbounded arrays with SWIG, that's all. once you know that, you can bind your API to a /lot/ of languages.
20:27 jdurand Structures/unions/etc... will always be mapped OK by SWIG - one just have to care about the unbounded things and pointers, to tell it what to do in such case, and if this is input, output or input/output (this has a consequence from stack point of view)
20:27 jdurand If you want I'll do the THIF example in LUA to have something very concrete
20:28 shadowpaste "jdurand" at 88.160.190.154 pasted "The Marpa/LUA bindings definitions: marpa.i" (10 lines) at http://scsys.co.uk:8002/429387
20:29 shadowpaste "jdurand" at 88.160.190.154 pasted "How to generate Marpa/LUA bindings: the shared library" (14 lines) at http://scsys.co.uk:8002/429388
20:36 idiosyncrat joined #marpa
20:36 idiosyncrat jdurand: Great! is it in a repository somewhere?
20:39 jdurand will do it now... few seconds
20:41 idiosyncrat I probably should write a "safe" version of marpa_version() -- then we stop supporting the "unsafe" one.
20:43 jdurand https://gist.github.com/jddurand/09954a5984596ceaf113
20:45 jdurand A "safe" version would be better, indeed. But that's not a drama neither -;
21:05 shadowpaste "jdurand" at 88.160.190.154 pasted "One of best side-effects of SWIG: prototype checking" (15 lines) at http://scsys.co.uk:8002/429393
21:31 idiosyncrat joined #marpa
21:34 idiosyncrat rns, jdurand: I'm now reading up on MetaLua (which rns pointed out to me).  That, using the Libmarpa wrapper, might be the "right" way to implement the LUIF.
21:35 idiosyncrat I think it's smart enough to spot the "::=" operator and hand control over to a macro, which could then switch to Libmarpa parsing.
21:35 idiosyncrat I'm not sure this is really a better way -- any thoughts?
21:40 jdurand jeffreykegler: if metalua is really 100% compatible with lua, this is its claim, then this sound a good way
21:42 idiosyncrat jdurand: rns pointed me to MetaLua, I'm curious what he thinks.  You follow my idea?  A MetaLua macro could use your wrapper to parse the BNF statements in the LUIF ...
21:42 idiosyncrat The rest of the LUIF is pure Lua anyway.
21:43 jdurand I understand very well. This is a nice idea.
21:43 idiosyncrat jdurand: I take it the Libmarpa wrapper is ready for that kind of use?
21:44 jdurand Just making it in standalone repository. I claim it is very stable and proposes all what I think (thought) is needed. I invite you to look to the header at https://github.com/jddurand/MarpaX-Languages-XML-AST-XS/blob/master/include/marpaWrapper.h.
21:45 sivoais joined #marpa
21:46 jdurand I.e. let me make it a repository of its own and we are done
21:46 idiosyncrat Cool!  Next is some sort of test.
21:47 idiosyncrat When the globe spins a bit more, I expect we'll hear from rns.
21:51 jdurand Oups wrong link, sorry, should have read https://github.com/jddurand/marpaXml/blob/master/include/internal/marpaWrapper.h. Ok. Back to it, there is only *one* add-on to the libmarpa: I wrote my agnostic version of $slr->parse(), c.f. https://github.com/jddurand/marpaXml/blob/master/src/internal/marpaWrapper.c#L1650. It has a builtin stack manipulation, etc. And is 100% callback-driven.
21:52 jdurand Anyway, we'll see very quickly if something is missing in it, and adding something there will be nothing else but straightforward. It has been extensively valgrinded, I am very confident.
21:53 idiosyncrat It's part of the marpaXml repository?
21:53 jdurand Currently, yes.
21:53 jdurand I'll make it independant. Its dependencies are only: marpa and a very generic log mechanism, that depend on nothing.
21:54 idiosyncrat So to build it, you'd have to build MarpaXml?
21:54 idiosyncrat Sorry, the last crossed your answer
21:56 jdurand No pb - no it will be standalone - this is an easy task to do
21:56 jdurand I'll tell you when that's ready. Have to sleep now -; see you soon.
21:57 idiosyncrat jdurand: Thanks!
23:33 ilbot3 joined #marpa
23:33 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:46 ilbot3 joined #marpa
23:46 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

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