TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Luvit – Asynchronous I/O for Lua

104 pointsby metacontentabout 12 years ago

9 comments

TheZenPsychoabout 12 years ago
I saw this and for a while I thought "Oh yeah, that's pretty cool, but why isn't the lua community into it?" Then I really looked into luasocket[1], which uses a this api called ltn12, based around dataflow programming concepts. In most respects this is a much much more elegant way of doing network programming than the node.js way. This is the sort of thing you would want to implement on top of node.js to make the callback hell easier to deal with- and compared to luasocket, luvit is a step backward. But this is the standard way of doing networking in lua.<p>[1]: <a href="http://w3.impa.br/~diego/software/luasocket/" rel="nofollow">http://w3.impa.br/~diego/software/luasocket/</a>
评论 #5387310 未加载
matt_mabout 12 years ago
I've been using this lately on a personal project.<p>For those who don't know, this is basically a clone of the Node.js API in the Lua language (using the LuaJIT compiler). This is interesting because:<p>- LuaJIT is often faster than V8 and uses less memory<p>- LuaJIT has a built in C FFI and supports C datatypes for working with low level libraries (or even writing low level code in Lua)<p>- Lua has coroutines<p>I think this is already being used in production at Rackspace, mainly because of the lower memory usage.
评论 #5386577 未加载
评论 #5387827 未加载
评论 #5387322 未加载
halayliabout 12 years ago
For those interested, lthread now supports AIO.<p>It's still in dev branch, but I'll be merging it soon:<p><a href="http://webmon.com/blog/2013/02/19/lthread-now-supports-userland-aio/" rel="nofollow">http://webmon.com/blog/2013/02/19/lthread-now-supports-userl...</a><p><a href="https://github.com/halayli/lthread/blob/dev/src/lthread_io.c" rel="nofollow">https://github.com/halayli/lthread/blob/dev/src/lthread_io.c</a>
评论 #5386497 未加载
评论 #5386400 未加载
tracker1about 12 years ago
Not sure exactly how duped this is for HN... For those that don't know.. Lua is a scripting language, perhaps a bit more structured than it's more popular counterparts (JavaScript and Python), having very good performance characteristics. It's very popular in terms of Game development.<p>Luvit is essentially a lua interpreter with bindings to libuv (the same core IO library used in NodeJS). And could mainly be considered an alternative to NodeJS, which it most closely resembles.<p>Some, who don't like JS syntax may wish to consider Luvit, as it will perform close to, and sometimes better than NodeJS, with some similar gotchas.
评论 #5386547 未加载
limmeauabout 12 years ago
For a while, I thought that luvit is completely undocumented. But then, I found out that one just goes to nodejs.org ...<p>So far, I mostly like it. Recently, I used it to build a PoC for an in-house testing tool for embedded devices and decided to slap a web interface onto it for fun (just like Twisted provokes you to add an NNTP and an SSH interface just for fun).<p>What I'm a bit unhappy with is the decision to be incompatible with the rest of the Lua world. From what I read in the mailing list, it's not just "sorry, that rock uses blocking file IO" but rather "Lua is Lua, and luvit is luvit".
vierabout 12 years ago
The luvit page notably lacks a link to libuv - the I/O engine behind it.<p><a href="https://github.com/joyent/libuv" rel="nofollow">https://github.com/joyent/libuv</a>
jamesbrittabout 12 years ago
Previous discussion:<p><a href="https://news.ycombinator.com/item?id=4767401" rel="nofollow">https://news.ycombinator.com/item?id=4767401</a>
kostjaabout 12 years ago
Tarantool/Box I/O gives you luasocket-style API[1] in cooperative multitasking environment + database backend (if necessary).<p>[1] <a href="http://tarantool.org/dist/master/tarantool_user_guide.html#sp-box-socket" rel="nofollow">http://tarantool.org/dist/master/tarantool_user_guide.html#s...</a>
thomasflabout 12 years ago
+1 for the lovable name.