4 ms·
I wonder why the author decided integrating with python was a better idea than, say, lua. Seems to me that lua is winning that fight, but that's just my curren
by cobrausn 14y ago
I wonder why the author decided integrating with python was a better idea than, say, lua. Seems to me that lua is winning that fight, but that's just my current impression - I don't really have any solid numbers to back that up.
- TazeTSchnitzel 14y agoLua also makes it very, very easy to integrate it with a C program.
- mercurial 14y agoWhich fight? As an embedded language, Lua is more popular, yes. Outside of this, probably not.
- meaty 14y agoWell in this case, it's more integrating Python with C i.e. writing a C callable and calling it from Python. I'm not really a Lua fan personally (the confusing indice and ordinal notation scares me), but I can see why it makes sense for integration purposes. Clean, simple, to the point.
- timknauf 14y agoHaving just completed a large project with Lua, I have to say that the indice/ordinal notation thing is something that we quickly got used to. In fact, some nice succinct idioms work because elements run from 1 to arraySize (inclusive).
- davidw 14y agoSeems like something where you want to illustrate the concepts of integrating with a scripting language: * Calling out from your C program to the scripting language. * Setting variables in the scripting language from C. * Creating functions that can be called from the scripting language. * Making those available by creating a loadable shared lib that the scripting language can utilize. Stuff like that is not that different across different languages and if you've figured one out, others won't be that hard. My take: Tcl's C API is pretty cool. I wrote about it some here: http://www.amazon.com/dp/032133633X/?tag=dedasys-20 http://www.amazon.com/dp/032133633X/?tag=dedasys-20
- sherjilozair 14y agoPython usage is much more.
- law 14y agoHow mature is string manipulation in Lua? Personally, I use python for anything involving string manipulation, and then use C or C++ (depending on context) to do significant data processing on the (now hashed) data.
- timknauf 14y agoLua's core string manipulation has been kept (as I understand it) deliberately limited in order to keep the implementation simple. What is present - e.g., simplified pattern-matching - is cleverly designed and often useful but, by design, there's nothing to compare to Python's rich built-in set of libraries.