02-15-2015, 07:51 AM
Hello
Why create plugin with Lua ? Python is not good ?
Thanks.
Why create plugin with Lua ? Python is not good ?
Thanks.
Why Lua ?
|
02-15-2015, 07:51 AM
Hello
Why create plugin with Lua ? Python is not good ? Thanks.
02-15-2015, 07:54 AM
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. Thanks given by: Creaprog , sphinxc0re
02-15-2015, 07:57 AM
Ok, Lua is the matter of taste. Thanks.
02-15-2015, 07:59 AM
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. Thanks given by: Creaprog , Seadragon91
02-15-2015, 08:02 AM
Lua is good for video game no ?
World Of Warcraft use Lua.
02-15-2015, 08:03 AM
Yes, Lua is usually chosen as a game scripting language. Python is more likely to be chosen for text-processing tasks.
02-15-2015, 10:28 AM
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 :/)
02-15-2015, 05:34 PM
(This post was last modified: 02-15-2015, 05:35 PM by LogicParrot.)
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. Thanks given by: Bogus
02-16-2015, 03:51 AM
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.
Thanks given by: Defkil
|
« Next Oldest | Next Newest »
|