[q2x] OT: Lua questions

Nick Trout nick at rockstarvancouver.com
Wed Jan 21 21:16:33 EST 2004




> > I suppose that's highly subjective, but personally I'd think about
> > writing the whole thing in Python.
> 
> Well, shit, you're fired from the Lua Wiki then =P

:)

Look back through the Lua-l archives. I've always stated that Lua is
niche language and excellent for embedding. Python is a PITA to embed.
Python projects are scalable, Lua is awkward to develop on a grand
scale, it's just not mature enough yet. Python has lots of nice language
features Lua doesn't have, but Lua is nice and small and much faster.
Lua is the right tool for game embedding. Python is the right tool for
rapid tool development.
 
> > require. Lua is great for embedding and extending but you could
> > write you whole system in Python and avoid the glue/architecture
> > problem.
> 
> True.  Or use Ruby (if it wasn't so slow).  I worry about performance
> though, especially if I have, say, > 1000 simultaneous connected users
> (not a problem right now, but I want to be scalable).

Sorry, I don't know about Ruby. I've never felt the need for a pure OO
language. Python is a kind of hybrid, like C++. Why I like Python is its
just practical and it works! The libraries are great, docs are great,
the community is great and it's easy to learn.

As far as performance, if you're running it on Ghz machine you should be
able to run that many users. Read about Zope and the performance it
gets. It's entirely written in Python and large corporate website are
written in it; this is content on demand, not static pages.

> My biggest thing is that I just don't know Python, but I kinda
> half-ass know Lua.  Although I've now had several people say I should
> invert the relationship and just write it all in a scripting language.

I think Lua is good for customisation and doing the prompt stuff as you
suggest but then you get into all these architectural issues. I wouldn't
use Python in a game (I had this out at GDC with the Python round
table!) because its not re-entrant, its too big and its too slow. But,
as a standalone tool is above and beyond Lua, and Perl.

> When Python/Whatever have a complete integrated development
> environment, I'll maybe bite =)
> 
> Actually, I'm curious why there is no Python Studio commercially...

There are several solutions, OTTOMH:

 * Activestate (here in Vancouver) provide:
http://www.activestate.com/Products/Visual_Python/

 * There is WingIDE: http://wingide.com/

I don't use any of these, I use, for GUI work (although it contains a
full IDE and target debugger!) Boa:
http://boa-constructor.sourceforge.net/

Or, the PythonWin IDE which comes with win32com. Or the excellent SciTE
editor at http://www.scintilla.org/

BTW for a Python installation definitely use the ActiveState version:
http://www.activestate.com/Products/ActivePython/

It has CHM help and all of the win32 stuff included, along with XML libs
etc.

If you need any help with Python do the Python tutorial as it's
excellent (and I sort of based the Lua one on it) and of course you can
ask questions here.

Nick








More information about the q2x mailing list