Why has Python been backed by google and become so rapidly popular and Lua has not?
Do you know why Lua has stayed in background?
closed as primarily opinion-based by MichaelT, GlenH7, gnat, Kilian Foth, World Engineer♦ Oct 29 '13 at 13:16
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
I really love Lua, but it does have some real limitations, and as others have mentioned they derive mostly from Lua's origins as a configuration file language and then later as an embedded scripting language.
Because of the goal to keep Lua small, there exists only a very tiny standard library, that has only bare bones functionality.
This has lead to an unfortunate culture in Lua circles where Lua developers like to re-implement the functionality offered by many other language's standard libraries themselves rather than working collectively on a universally accepted set of core libraries.
Things like multi-threading, regular expressions, platform independent file access methods, and even bit operations (until 5.2) ere all "not included" since they would make Lua much larger and slower. Sure you can get libraries do so these things - but then those have independent maintainers and quality levels.
Don't get me wrong. I love Lua for the same reasons I have just listed.
Simple : Lua have more "niche" objectives than Python.
Python is thought to be useful as a general programming language. So, it's useful in a lot of cases. It covers many well known types of application but doesn't enter directly into competition with other languages that might be targeted at specific constraints, but the simplicity of it's syntax.
Lua is totally targeted to be an embedded scripting language. It's initial purpose, even if it's used in other contexts currently, like build systems; is to be embedded in software and to allow easy implementation of domain-specific script functions and structures. It's so minimalist that it can even be used on really constrained hardware (I used Lua on NintendoDS), it's lightweight, easy to use, FAST, and is such a minimalist language but thought to be extended that a lot of dialect (importing paradigms like object-orientation) are available. It's so portable (ANSI C) that you can use it on any embedded hardware with decent amount of memory for modern embedded software (if I remember well the default lua vm is around 400ko and will almost never grow if you don't loop creating objects...).
So, Lua is initially used in context where you need to embed a scripting language for your application.
Python is used for...almost anything that doesn't require a more niche language (you can make quite performant games using Python, but some kind of performance-heavy games really require to avoid such system).
It's simply that Python is used in more contexts than Lua. As far as I know, other than Android (that provide Java and native language support), Google isn't an embedded software company so they don't really need Lua everywhere, while Python is useful for anything they do (web, build system, communication, web and web).
Python is used in a lot of games for embedded scripting too, but it's heavy and slower than Lua. The syntax of Python makes it more appropriate for big games that rely a lot on scripted information in their game structure (not sure I'm clear there but just think that if you need a "real complete language" for scripting, embedding Python might be a good idea, if the performance is fine for you). Python was not made to be embedded, so that's fine. An equivalent of Python that is targeted at being embedded in C++ is Falcon.
For extreme comparison, some languages that target embedding and try to have more complete syntax than the minimalist Lua, and compete on performance : ChaiScript, AngelScript, Io...
By the way, I've seen new build systems like PreMake or Bam use Lua as the build file language. The idea is that it's lightweight and well known from game developers (build systems in game developpement is a major problem). So maybe that's another domain where Lua might be more appreciated. It's certainly more user-friendly than CMake syntax....
You can do everything with Lua, it's created as a scripting language to extend programs? Yes, but it's far from limited to it, there is a lot of libraries for Lua, and with the right tools(LuaJIT's FFI or tolua) you can even use a C/C++ Library on it. The reason that makes Python more used in my point of view are only age, Python is used as first languages in many colleges and schools, there is more people that know Python than Lua, and is much more easy to found a good library for Python than for Lua, because the language is more mature. Also, i don't know much about Python, but as much as i know, it's easy to hide your code from the end-user, what in Lua, isn't that easy, i'm right?