Why Lua ?
#1
Hello

Why create plugin with Lua ? Python is not good ?

Thanks.
Reply
Thanks given by:
#2
I never worked with Python. I've heard some good things about it, but I've heard even more good things about Lua.

Are there any problems you have with Lua? It's quite fast, and we don't even have LuaJit yet.
Reply
Thanks given by: Creaprog , sphinxc0re
#3
Ok, Lua is the matter of taste. Thanks.
Reply
Thanks given by:
#4
Python is problematic because it has a *lot* of libraries, and those are mostly incompatible with MCServer's architecture. Take networking, for example - Python provides networking support, http support, ssl support... BUT the support it provides is blocking, i. e. the Python code calling into these libraries waits for the operation to finish. And this would kill MCS, the server needs the plugin callbacks to be rather fast and use callback-based, rather than blocking mechanisms.
So we'd have to strip all libraries from the Python. And then the language is pretty much useless and all people writing plugins would whine about library X not being available and library Y being cut off.

So that's why Lua is better for this task.
Reply
Thanks given by: Creaprog , Seadragon91
#5
Lua is good for video game no ?
World Of Warcraft use Lua.
Reply
Thanks given by:
#6
Yes, Lua is usually chosen as a game scripting language. Python is more likely to be chosen for text-processing tasks.
Reply
Thanks given by:
#7
But how about Javascript? If you need a non-blocking language, you can use javascript. Maybe you know NodeJS, a non-blocking server. More people know javascript then lua and i think, javascript is easier then lua (or englisch :/)
Reply
Thanks given by:
#8
Javascript was never designed for this task. Why not learn Lua? (Disclaimer: I haven't learnt Lua yet)
Lua is the " de-facto standard language" for this task.
Reply
Thanks given by: Bogus
#9
Also the reference Lua interpreter is designed for embedding. It has a nice C API for interfacing with. Javascript interpreters are huge and whilst they are designed for embedding they are difficult to work with as they are designed to be used by large projects with lots of contributors. V8 has a larger code-base than MCServer. Python is designed with the assumption that it is the primary language on the project and C code is extensions and it has terrible multi-threading support. Lua was designed for exactly the scenario we are using it for so why use something that wasn't.
Reply
Thanks given by: Defkil




Users browsing this thread: 3 Guest(s)