[erlang-questions] Luerl - Lua in Erlang
Mon Feb 20 03:38:16 CET 2012
----- Original Message -----
> On 19 February 2012 00:32, Robert Virding
> <> wrote:
> > Report bugs and missing features.
> Sure will! Matthew has already mentioned the most important one -
> calling Erlang modules/functions. My laundry list for the standard
> libraries would definitely be io + file, followed closely by
> coroutines, modules and packages. It looks a lot like the stdlib
> implementations just need to take their proper inputs (and the
> stack/state), call the relevant Erlang stdlib implementation and
> return this in the correct format along with St.
Some of this is more difficult. The current interpreter is not really suitable to do coroutines on. The others should be doable, some are just work like implementing there own (non) regular expression patterns. What is also needed is a good interface between erlang and Lua.
> Is this the right general pattern? Allowing (obviously) for the
> implementation to try and remain faithful to the documented semantics
> of Lua's standard library - because if so, it looks like assisting
> with implementing additional standard library functions should be
> relatively easy.
At the moment I am still working with the internal data structures and many of the libraries need this information. Fro examples I have tables as orddicts; while this is not a bad choice if it were to change them many internal functions would have to change. I am now looking at alternatives for storing the tables; I am testing orddicts, arrays, the process dictionary and ETS. Arrays and the process dictionaries seem the best so far.
I have given some more comments in http://news.ycombinator.com/item?id=3610332 .
Suggestions are welcome.
More information about the erlang-questions