lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Jan 25, 2020, 11:50 AM Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
On Sat, 25 Jan 2020 at 07:08, Sean Conner <sean@conman.org> wrote:
>
> > The C library for Cqueues contains a proper event driven library written
> > ground up by William Ahern for use in Lua. It works with poll, epoll,
> > kqueues and whatever-the-heck Solaris uses. It *doesn't* support IOCP for
> > Windows. If we can add IOCP support then we have a superb socket library
> > for all platforms. I found a library stuffed inside another project that
> > claimed to be an epoll wrapper for IOCP. I can dig the info up if you like.
>

>   I want to keep the event driver module from the network module.  Granted,
> event drivers are mostly used for network applications, but there are times
> when you need them sans networking, such as dealing with character devices
> like serial ports or terminal IO.
>
>   A module like Cqueues is more of a framework than a library.  If there was
> a separate event module, then frameworks like Cqueues, lua-ev or turbo could
> gain access to the best underlying event structure for a given operating
> system. 

Hi, libuv is a hugely popular library in this area due to its use in
Node JS. 

This entire discussion reminds me of https://xkcd.com/927/ ("Standards").

That said I do enjoy the multiplatform libuv library, since it covers a large spectrum of what I'd consider "batteries" in the context of this discussion. A static build of Luvit+SQLite3 is my "tool of choice" - single static binary "distribution" that I can use both on my desktop and ARM machines like Raspberry Pi and Android.

The main downside for me is that it forces the "callback hell" programming model. Fortunately the "coro-fs" (and other) libraries by creationix make use of Lua coroutines for a more pleasant experience.