[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] luaproc 1.0-4
- From: Rena <hyperhacker@...>
- Date: Tue, 6 Oct 2015 12:12:56 -0400
On Oct 6, 2015 2:51 AM, "Sean Conner" <email@example.com> wrote:
> It was thus said that the Great Hisham once stated:
> > Hi! Congratulations on the release!
> > On 4 October 2015 at 18:28, Alexandre Skyrme <firstname.lastname@example.org> wrote:
> > >>
> > >> luaproc is a concurrency library for Lua, it allows multiple independent
> > >> execution flows of Lua code (Lua processes) to be executed in parallel.
> > What versions of Lua are supported? It would be nice to have it in the
> > announcement/README.
> > >> It is available at:
> > >>
> > >> https://github.com/askyrme/luaproc
> > >>
> > >> This is version 1.0-4. It supports Lua processes as arguments to create
> > >> new Lua processes - previously it only supported Lua code strings - and
> > >> fixes a few bugs.
> > >
> > > Sorry, the last paragraph should have read:
> > >
> > > This is version 1.0-4. It supports Lua **functions*** as arguments to
> > > create new Lua processes - previously it only supported Lua code strings -
> > > and fixes a few bugs.
> > What happens when functions have upvalues?
> > And, on a tightly related note, do you have any recommendation for
> > serialization libraries? From this discussion on lua-l  there seem
> > to be a number of options, apparently including ones that serialize
> > upvalues.
> >  http://lua-users.org/lists/lua-l/2015-08/msg00082.html
> Ah yes. I haven't made any progress since posting, due to lack of need.
> But I do have some notes:
> See below. Problems include C functions without a usable name.
> lightuserdata - error
> userdata - insanely ugly. Use callbacks to handle.
> (example: FILE*)
> error, not currently possible.
> Due to Lua semantics (since you can mix an array with non-integer
> indicies), convert to MAP
> It'll take me a few days to get the code up somewhere if anyone is
> interested in what I have so far.
I think you could use a __serialize metamethod here, when you don't have a built-in handler. Then userdata, magic tables and other objects could define handlers as easily as they do other metamethods.