<div dir="ltr"><div dir="ltr">Apollo-lander, otherwise known as LuaMR is a language binding library for embedding Lua code in Mercury and visa-versa.  I'm not quite to alpha stage yet, but I've got enough implemented to want to show it off.<div><br></div><div>The source code can be found at: <a href="https://github.com/C4Cypher/Apollo-lander">https://github.com/C4Cypher/Apollo-lander</a><br><div><br></div><div>The main library is in luaMR.m, all calls in which are functionally pure by way of passing a Lua state variable. It is not yet fully implemented.</div><div><br></div><div>The api.m submodule implements the complete Lua C api in Mercury as semipure and impure calls.  This has been almost fully implemented and I've started testing it.  You can do in Mercury just about anything you want that you can in C using this library, provided that you understand how the Lua api and stack operate.  Granted, I only really reccomend those who are experienced with Lua use this library, I intend the luaMR.m library to be the only thing needed for the casual Mercury programmer to embed Lua.</div><div><br></div><div>Later features will involve a framework to write and compile Lua loadable (as in require(module)) modules entirely in Mercury that can be loaded by Lua code without the need for the Melbourne Mercury Compiler, and perhaps possibly an implementation of Lua IN Mercury, but that's only if I feel like it.</div><div><br></div><div>Any input would be very much appreciated, I'm writing this as a way to learn and get used to writing in Lua, C and Mercury.  Furthermore, if there is a feature or aspect of this library that would be helpful to anyone please let me know.</div></div></div></div>