Re:The future of Raphters, a web framework for C.
by vmind on Tuesday April 12, 2011 @09:04AM
(#2436967)
Have you considered LuaJIT instead of v8? Given you are using v8 as a target VM for compiling another language to javascript, and lua is quite similar, although if other javascript libraries are used that could be a major factor. (This is assuming you are writing Chrysalis/Stencil)
[ Parent
| on HN ]
Re:The future of Raphters, a web framework for C.
by swah on Tuesday April 12, 2011 @09:21AM
(#2437039)
Bump! Lua is small and sweet. Zed Shaw picked it for his framework, not that unlike Raphters in some ways: http://tir.mongrel2.org/home
Re:The future of Raphters, a web framework for C.
by throwa_way on Tuesday April 12, 2011 @10:29AM
(#2437324)
Specifically, the luajit implementation is known for being ridiculously fast.
Re:The future of Raphters, a web framework for C.
by silentbicycle on Tuesday April 12, 2011 @11:22AM
(#2437561)
Normal Lua's performance is also quite decent (especially compared to its peers: Python, Ruby, and Perl), and has a very clear path for moving hotspots out to C. LuaJIT's performance is just a bonus. :)
Re:The future of Raphters, a web framework for C.
by DanWaterworth on Tuesday April 12, 2011 @09:11AM
(#2436998)
That's a good idea. (I am writing Chrysalis/Stencil). The current design is that there is a code-generator that outputs javascript which can be run on either side. But outputting Lua instead for the server-side would seem possible.
Re:The future of Raphters, a web framework for C.
by silentbicycle on Tuesday April 12, 2011 @10:26AM
(#2437315)
Also, compiling to Lua is not a bad option. Its syntax (http://www.lua.org/manual/5.1/manual.html#8) is quite straightforward, and it's designed to compile rapidly (due to using table as a JSON-like serialization format).
While writing out a (kinda silly) benchmark a while ago, it struck me that, while Python's compiler is rather slow, Lua's has very little impact on the overall runtime. Between that and the lack of weird corner cases in the grammar, I'm reasonably comfortable doing string-eval metaprogramming in Lua, something I would never do in Python.
Benchmark (http://news.ycombinator.com/item?id=1800396) and commentary (http://news.ycombinator.com/item?id=1804166).