[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Luv - Thermonuclear battery pack for Lua
- From: Richard Hundt <richardhundt@...>
- Date: Tue, 9 Oct 2012 19:12:52 +0200
On Oct 9, 2012, at 5:16 PM, Javier Guerra Giraldez wrote:
> On Mon, Oct 8, 2012 at 2:39 PM, Richard Hundt <richardhundt@gmail.com> wrote:
>> Luv is an attempt to do libuv bindings to Lua in a style more suited to a language with coroutines than edge-triggered event-loop style programming with callbacks.
>
> seems very nice. _much_ more suited to my style than luvit.
>
> after a quick look at the docs and code:
>
> - file:seek() seems to be missing?
Seek is missing at the moment, however both file:write() and file:read() take an optional offset as last parameter (I forgot to document that for write, so thanks for that). Having seek would be nice though. I'll add that to my TODO.
>
> - since you also handle real threads, i guess any normal blocking
> library can be used from a thread; but some guidelines to make 'fiber
> friendly' extensions would allow other people to write bindings to
> non-blocking libraries.
Yep, that was the plan. I've split most of the functions into two namespaces, with luvL_ prefixes for those callable from other C code (for suspending and resuming states, and so on), so the idea was to put a kind of luvlib out which makes this easy. For now, though, anything defined in luv.h is public API. It's just hopelessly undocumented.
I'll get there once a couple more creases are ironed out, such as error handling and return codes being more consistent.
Thanks for all your feedback so far.
Cheers,
Richard