Thanks Fabien,
I agree that the 5.3 is just around the corner and I should upgrade my VM to 5.3, but not to a LuaJIT (I’m on a microcontroller).
What should be the effort to port Metalua to 5.3? Is it an easy task that could be overtaken by someone else? Could I help?
Static metaprogramming is a really cool/useful feature, I would be a pity if it will not further maintained.
Dominique T.
From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
On Behalf Of Fabien
Sent: vendredi 11 avril 2014 12:06
To: Lua mailing list
Subject: Re: Static metaprogramming with Lua 5.2.
@Steve it sure would be nice to do some porting. However:
Somewhere on my radar, there's LuaJIT-lang-toolkit [https://github.com/franko/luajit-lang-toolkit]. It converts ASTs into LuaJIT bytecode, but unfortunately defines its own AST format. It would be really nice to convert it to the Metalua format, or at least hack an AST transcoder. I'd even help anyone willing to take the lead on such a project... :-)
On Fri, Apr 11, 2014 at 11:42 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Fri, Apr 11, 2014 at 11:28 AM, Dominique Torette <Dominique.Torette@spacebel.be> wrote:
But from the documentation, it seems that Metalua (only?) support Lua 5.1 (https://github.com/fab13n/metalua/tree/master).
Should I expect problem to run Metalua generated byte code on a Lua 5.2 VM?
You would have a problem - 5.1 bytecode is not compatible with 5.2.
Your best bet is any tool that transforms original source into valid Lua source, and then compile that. Unless some clever person has a 5.2 -> 5.1 bytecode transformer[1]....or you can persuade Fabien that it's important to do the ML port.
[1] would be mostly mechanical - that word 'mostly' is the problem ;)
--
Fabien Fleutot
+---
| 33 chemin de Mange-Pommes
| 31520 Ramonville Saint-Agne -- France
| mobile: +33 6 28 06 09 97
| office: +33 5 61 00 06 49
| home: +33 5 61 75 05 67