Hacker News new | ask | show | jobs
by TheZenPsycho 4839 days 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.

[1]: http://w3.impa.br/~diego/software/luasocket/

1 comments

Any good open-source (or closed) examples of web apps built on this?

The idea sounds neat, but I'm wary of concepts that aren't seeing real-world use. Node.js has momentum, Luvit has a little bit of momentum, this? In the web development community, I've never heard of the approach, which suggests using it might be more DIY than I'd like. Also the copyright date is 2004-2007. Abandoned?

Forgive me for being a bit ignorant about this, since I'm quite a bit outside the lua community myself. (and didn't quite expect to get voted to the top here) I've done some googling around, and It's hard to say if luasocket is abandoned as such- but there are several forks of it. Regardless, it's the standard library that pretty much anyone and everyone uses for networking. There are a number of forks on github of luasocket- maintained presumably to add features needed for specific projects.

There is the Kepler project http://www.keplerproject.org/ , which appears to be much like the commonJS project for javascript- with luasocket at its core. Kepler project lists http://slimfastclinic.com/ and http://www.bestjuicer.biz/ as websites that were built with lua. (though they may be out of date since the slimfastclinic.com says it's wordpress)

It might also be worth pointing out, just as a side note, that mod_lua for apache has existed for a while https://httpd.apache.org/docs/trunk/mod/mod_lua.html

hm the other one is wordpress too. this one most definitely is a lua program though http://sputnik.freewisdom.org/en/Lua