Re:"When I design software, I really try hard to make it sim...
by william42 on Sunday September 25, 2011 @04:54PM
(#3036720)
Does Lua not have the startup time issues of Python/Ruby? If it does, then to counteract the lack of threads you'd probably use a coroutine-based system like gevent and Python's greenlets.
[ Parent
| on HN ]
Re:"When I design software, I really try hard to make it sim...
by MattJ100 on Sunday September 25, 2011 @04:58PM
(#3036732)
matthew@rusticanum:~$ time python2.6 -c 'print("hello world")'
hello world
real 0m0.027s
user 0m0.024s
sys 0m0.004s
matthew@rusticanum:~$ time lua -e 'print("hello world")'
hello world
real 0m0.005s
user 0m0.000s
sys 0m0.000s
Nevertheless, what you describe is practically how Tir works: http://tir.mongrel2.org/
Re:"When I design software, I really try hard to make it sim...
by chubot on Sunday September 25, 2011 @07:33PM
(#3037060)
That's a good comparison to make, but once you have a Python program or Ruby program importing 20 packages, each with several modules, then it gets really slow. Like 100-500ms, which is more work than the "real" work of a handling many HTTP requests. Bad packages can do arbitrary computation at import time.
To be fair, I haven't run any Lua programs with 20 packages... AFAIK Lua didn't have a module system until Lua 5, and it's not as capable as Python or Ruby's.
Re:"When I design software, I really try hard to make it sim...
by silentbicycle on Monday September 26, 2011 @12:32AM
(#3037661)
No, it doesn't. It also has vastly more efficient coroutines.