[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lift 0.1 looking for early adopters
- From: Thiago Bastos <tbastos@...>
- Date: Tue, 16 Feb 2016 21:35:16 +0000
I love that you're reconciling your projects with the vanilla Lua ecosystem. To be honest I had looked into Luvit roughly a year ago and was simultaneously impressed and put off by the fact that it was a separate ecosystem and didn't "improve" upon Node.js. I always thought a Lua rendition of Node.js exploiting coroutines and other Lua features could make Node.js look feeble by comparison. I'm happy that you're addressing both issues :-)
I think I see the reasons why you couldn't use luarocks and had to create lit. In my idealistic opinion, however, I think both ecosystems (Luvit and LuaRocks) would be better off by joining forces in the future. It would be awesome if Lua had only one package manager, and you could install Luvit/weblit from it.
If you feel the same, I would love to hear what you think would be necessary for a merger. A new package manager?
Personally I'd be in favor of a new decentralized package manager based on just Lua and libuv. If possible with legacy support for LuaRocks packages. Could it be LuaRocks 3.0? Lit 2.0?
I just wanted to chime in here as the creator of Luvit.
First I think Lift is a great project. I'm glad my luv bindings are helping others.
Secondly, the comparison is accurate for luvit proper, but there is much more to the luvit ecosystem than just the luvit metapackage.
The luvit package aims to be a complete node.js port in lua. This is why it's callbback based and has very similar APIs.
That said, I'm not a fan of callbacks in lua. I think it's a shame to have native coroutines in a language and not use them.
For the last year or so, I've been writing apps and libraries using luv, but with coroutines for servers and clients. The lit package manager itself it implemented at a luvi app (not luvit) and doesn't use luvit's standard library. It has it's own coro-* libraries that are much easier to use. I've also written an HTTP web framework on top of these coro-* conventions at https://github.com/creationix/weblit
I'm sorry that I haven't documented this new development as well as I should for newcomers to find it.
If you want to do task automation, Lift looks great. If you want to write TCP servers, use the coro-* libraries published to lit. https://luvit.io/lit.html#coro
Also I've recently been working on an effort to make luvit's ecosystem more widely available to non-luvit developers. Most all the popular libraries are now in a format that can be used by lua directly without luvit's custom require loader. I've even written a custom lua loader that implements a lit compatible path resolution algorithm, but uses lua's native require (and so mixes freely with luarocks packages).
If anyone is interested, I can write up a blog post on using these libraries from vanilla lua.