Perl 6 - the future is here, just unevenly distributed

IRC log for #marpa, 2014-12-30

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

All times shown according to UTC.

Time Nick Message
00:02 ronsavage If you wish to embed Lua into GNU Make: https://github.com/motiejus/makelua
00:03 ronsavage A Perl interface to GNU Make: https://github.com/tsurumau/gmk-perl
00:37 jeffreykegler joined #marpa
00:37 jeffreykegler rns: [ and it whom it may concern ]
00:38 jeffreykegler Looking further at this piecewise parsing idea, I see there is enough involved that I probably should code up at least a prototype --
00:38 jeffreykegler and the Kollos-based JSON parser I had planned is probably the best place to do that.
03:27 flaviu joined #marpa
05:33 ronsavage joined #marpa
06:07 rns joined #marpa
06:11 rns re http://irclog.perlgeek.de/marpa/2014-12-30#i_9866527 — sounds good. Dedicated json parser looks like a good use case to start lua/libmarpa interface. And so does piece-wise parsing for using Lua as an extension language for libmarpa.
06:18 rns I was thinking about starting a translation of json.c to Lua; C calls to libmarpa can be translated to Lua calls of C functions using the libmarpa wrapper.
06:19 jeffreykegler I don't have my wrapper ready
06:19 jeffreykegler I'm still working on infra-structure.
06:21 rns Ok.
06:22 rns json.c calls libmarpa functions directly so perhaps not much of wrapper is needed to call them from Lua.
06:23 jeffreykegler You could do your own quick-and-dirty wrapper, if that's what you're saying.
06:23 jeffreykegler Or perhaps not-so-quick-and-dirty
06:24 rns Yes, along the lines of what you're doing with error codes system.
06:24 rns Just enough to call libmarpa functions and use its data structures.
06:24 jeffreykegler Maybe even a fork, and we can move code back and forth.
06:26 rns Yep, a fork and a separate repo seems to be a good idea. I'll look into it and keep you informed.
06:27 jeffreykegler Besides the error codes system, I've been paying careful attention to Lua namespace issues -- the goal is to not use the global namespace at all in Kollos, which is fairly standard (if not universal) Lua practice for modules.
06:27 rns Makes sense.
06:28 jeffreykegler It's tricky in the Kollos case because it's more complicated than most modules -- several submodules, most of which have functions both in Lua and in C.
06:28 jeffreykegler Lots of chicken-and-egg issues in setting the thing up.
06:29 jeffreykegler And finally, I spend time figuring out the Cmake setup -- that's especially an area where a 2nd point of view could be helpful to me.
06:30 jeffreykegler RE how the 2 forks would work -- goals?  do they eventually merge?  etc., etc., perhaps best to leave things vague at this point
06:32 rns Sure.
06:32 rns I thought about porting json.c to lua with minimal interfacing to libmarpa using the code already available in the kollos repo.
06:33 rns And you're doing a similar thing with the error codes system so back-and-forth is in order.
06:34 jeffreykegler If that's an approach you want to explore, that sounds fine to me.
06:34 rns Great! I'll keep you informed.
06:35 jeffreykegler Am I right in guessing that you're planning a lean-and-mean "racing version" of the JSON parser?
06:35 jeffreykegler Because I think about speed, but I always have to err on the side of "full featured" when there is a choice.
06:37 rns I must confess, I didn't thing about speed yet, just about porting json.c to lua with minimal interfacing to libmarpa.
06:37 jeffreykegler OK.  Whatever you do, I am sure it will be very interesting.
06:39 rns Thanks, I'll will give it time on the coming holidays. Sorry, have to go AFK.
06:39 rns Happy coming year!
06:40 rns AFK
06:40 rns left #marpa
06:40 jeffreykegler Happy 2015!
07:19 jluis joined #marpa
07:47 sirdancealot joined #marpa
07:51 jdurand joined #marpa
07:52 jdurand ron: with your text balanced package one can make start and end tokens independant isn't ? I was reading GNU m4 documentation, and it seems a good candidate for such use case, c.f. https://www.gnu.org/software/m4/manual/m4.html#Changequote
07:55 jdurand Also, can we set on-the-fly the escape character?
10:34 lwa joined #marpa
11:28 sirdancealot joined #marpa
11:40 rns joined #marpa
11:42 rns jeffreykegler: I've forked the kollos repo and tried to make all under cygwin, here are the experiences.
11:44 rns For the build to succeed, I needed to do
11:44 rns mkdir build && cd build && cmake .. -G "Unix Makefiles"
11:45 rns and add ${LUA_LIBRARIES} to target_link_libraries(...) in kollos\components\kollos_core\CMakeLists.txt
11:46 rns target_link_libraries(${PROJECT_NAME} ${libmarpa_BINARY_DIR}/libmarpa.a ${LUA_LIBRARIES})
11:46 rns With this, kollos_core and json.exe built just fine.
11:47 rns left #marpa
11:55 jdurand rns: hmmm the .a extension should not appear in CMakeLists.txt - will take a look  to it soon
12:56 flaviu joined #marpa
13:11 flaviu joined #marpa
14:42 jdurand_ joined #marpa
14:44 jdurand_ ron, I looked to the implementation of Text::Balanced::Marpa - ideally this could be used a sub-lexer on a main input - therefore would you mind to an eventual pos parameter prior to start using $recce->read() ? How does your package react in case of exhaustion? Thx.
15:51 aredridel joined #marpa
16:48 jeffreykegler joined #marpa
19:01 koo5 joined #marpa
19:10 sirdancealot joined #marpa
20:41 ronsavage joined #marpa
20:55 ronsavage jdurand: Re http://irclog.perlgeek.de/marpa/2014-12-30#i_9867282. The start and end quote chars are anything you choose, except the backslash character. I did not consider allowing the user to specify a different escape character. Off the top of my head, I'd say it's fairly easy to add such a feature. I'll play with the code today and let you know.
21:00 ronsavage The warning in the FAQ indicates that I have considered the problem of allowing the start and end quotes to be changed during the parse, but it definitely leads to various complications. I would prefer the user switched to another Text :: Balanced :: Marpa object to process the rest of the input. It would be possible to change the code to allow the original object to handle the switch, but it adds complexity to the code (I have already made a
21:02 ronsavage Hmm. My previous msg got truncated: ... (I have already made a brief attempt to implement it) and I've very reluctant to add that sort of complexity. Does answer your questions?
21:03 ronsavage jdurand: Re http://irclog.perlgeek.de/marpa/2014-12-30#i_9868378. I do not understand this" would you mind to an eventual pos parameter prior to start using $recce->read()?"
21:03 ronsavage For "eventual" did you mean "initial"?
21:07 ronsavage Or did you mean: Can I allow the user to set $pos before $recce->read()? I can certainly create a mutator (which defaults to 0) for pos!
21:09 ronsavage I have not yet considered exhaustion. However, I recently added to another module, so I'll look into it here too.
21:22 jeffreykegler joined #marpa
21:24 jeffreykegler rns: re http://irclog.perlgeek.de/marpa/2014-12-30#i_9867895 -- Thanks for doing this.
21:25 jeffreykegler I don't use Windows for development at present, but you and Jean-Damien do, so I try to keep Windows compatibility.
21:25 jeffreykegler Could you submit what the changes you had to make as a PR?
23:35 jdurand joined #marpa
23:35 jdurand ronsavage: Re http://irclog.perlgeek.de/marpa/2014-12-30#i_9870052 - yes -;
23:36 jdurand jeffreykegler, rns: Re http://irclog.perlgeek.de/marpa/2014-12-30#i_9870117 - yes please, then I'll clone (not yet done on my W7 box -;) - thx
23:37 jeffreykegler Btw, I do now have a Windows laptop, but I still don't use it for development, preferring my Linux setup.
23:38 jeffreykegler But if I maintain Windows portability, I may someday be a direct beneficiary. :-)
23:39 jdurand jeffreykegler: No pb - may I say that my dev. environnment is always Linux, but I always check on Windows
23:39 jdurand I am the kind of person that is switching very often between the two OSes
23:40 jdurand late here - AFK
23:59 ronsavage joined #marpa

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