[m-users.] Apollo, binding Mercury to Lua

Charlie McGee c4cypher at gmail.com
Fri Sep 14 08:58:36 AEST 2018

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.

The source code can be found at: https://github.com/C4Cypher/Apollo-lander

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.

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.

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.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20180913/db340bd0/attachment.html>

More information about the users mailing list