I learn a new language at least once a year. It’s just something that I have tried to do since I started taking my profession seriously(1988-ish). Recently I started to get the itch to learn a new language and it did not take long to select one.
I had been working with ZMQ (ZeroMQ) for a while and luckily for me they have example code in a number of client languages. Since ZMQ is implemented in C, they have plenty of C examples but curiously enough all of those examples have Lua versions too. The remainder of the examples vary from language to language.
I do not select languages because of the geek factor or the cool factor but for it’s ability to shorten the development cycle, the tools it provides, community support, the development pool, community activity and viability in business. And using this criterial I had initially dismissed Lua.
For example, there have not been any releases or patches in over 5 years even though Lua is the scripting language used in WOW(world of warcraft). According to github Lua is not in the top 86% of the languages stored there. The community seems to be very protective and a little snarky. And the origin of the language is based on some misguided protectionism on the part of the Brazilian government. And finally, performance.
So in the last 24 hours or so a couple of things have changed. First of all the Tiobe Community Index released some new numbers that suggest that Lua is making moves. Although the sudden moves make me suspicious. Secondly, Snarky people never really bother me. Next, WOW has a different sensibility when it comes to application correctness than banking applications.
Of course, nothing is going to change the origins of the language and I’m not sure how crazy I am about the fact that it was developed blindly but who cares. The language and it’s tools compile and install more simply and easily than erlang. And to respond to a tweet about concurrency primitives:
for n=1,NBR_WORKERS do
local seed = os.time() + math.random()
workers[n] = zmq.threads.runstring(nil, worker_task, self, seed)
I cannot say much about the benchmarks except that they would suggest that the language, in this testcase, is exceptional. And so even if the language does not support IPC for itself this mechanism might be even better for all the reasons one might use an MQ.
So for the time being I think that Lua is still on the short list and as soon as I break free I’m going to take a much closer look.