News for hackers. Stuff that matters.
Re:Raphters, a web framework for C by compay on Monday April 04, 2011 @02:24PM (#2407811)
It would be neat to see how you could possibly hook Lua into this to give you some of the flexibility of a dynamic language with the speed and small footprint of a (mostly) C app. I've been thinking of working on something like that for a while but unfortunately my C skills need a lot more work before I'd be comfortable tackling it.
Re:Raphters, a web framework for C by DTrejo on Monday April 04, 2011 @04:40PM (#2408417)
Came across this the other day:

Embed the Power of Lua into NginX https://github.com/chaoslawful/lua-nginx-module

Re:Raphters, a web framework for C by 1337p337 on Monday April 04, 2011 @04:54PM (#2408481)
There's also AbsoLUAtion for Lighttpd. Lua's a very nice, convenient language for embedding dynamic/user-configurable bits in otherwise static applications. PowerDNS and nmap use it, too. It seems to have displaced Tcl as the de facto language for embedding.
Re:Raphters, a web framework for C by ay on Tuesday April 05, 2011 @05:25AM (#2410270)
Luajit2 approaches C on speed [1] - and with the newly released FFI library the C is not really needed that much - so, pretty much all the work has been already done. Just use the results of it :)

[1] http://news.ycombinator.com/item?id=641313

Re:Raphters, a web framework for C by compay on Tuesday April 05, 2011 @08:03AM (#2410566)
LuaJIT is awesome but it doesn't run on as many architectures as the original Lua VM. The nice thing about a framework in C is that you can install it anywhere it compiles, and if you stick to ANSI C like Lua does then it compiles pretty much anywhere, like Lua itself.
Re:Raphters, a web framework for C by ay on Tuesday April 05, 2011 @05:05PM (#2412724)
Agree, just x86 and x86_64 - though realistically, is there a lot of usage of other platforms for high-performance servers ?

And if the server is not high-performing, mongrel2 + $something can be a very good choice. (And has a more liberal license).

But of course, the tastes differ - so the more, the merrier. as soon as the folks do not get pwned.

Re:Raphters, a web framework for C by compay on Tuesday April 05, 2011 @08:12PM (#2413356)
I'm thinking of small devices like wireless routers, phones and maybe even wristwatches. I like the idea of having a full stack framework for web apps, served locally on a tiny device. You could reuse a lot of code that way and at least for phones, potentially avoid some of the cost of having a native app with totally different code from your web app.

But yeah, LuaJIT recently added support PPC and soon will add ARM, so point well taken - to do what I'm thinking of, it may not really be necessary to have anything in C.

Re:Raphters, a web framework for C by lhorie on Monday April 04, 2011 @03:47PM (#2408198)
Have you looked at Tir?

http://tir.mongrel2.org/home

Re:Raphters, a web framework for C by compay on Monday April 04, 2011 @03:52PM (#2408218)
Yeah, I wrote the test framework that Zed uses for Mongrel2 and Tir's unit tests, and also wrote the WSAPI handler for Mongrel2 (a separate project from Tir).

What I'd really like to see is not so much a web framework in Lua (there are a few, I'm working on another one, and it's really not hard to make one either), but rather one that's mostly C but lets you use Lua, say, for templates or controller functions. That could be pretty interesting for very small devices, or for squeezing lots of performance out of a larger one, all while stilling letting you program the bulk of your code in a higher level language.