Domain: lua-users.org
Stories and comments across the archive that link to lua-users.org.
Comments · 14
-
Re:Lua?
What about Python makes it unsuitable as an extension language?
He said that it was less suitable than Lua, not that it was unsuitable. His reasoning was that Lua is purpose-built to be embedded whereas Python isn't. Since both languages seem to be proven real-world choices, I suspect the technical tradeoffs are less unilateral than the grandparent post implies, but it's easy to Google up a comparative list (like this one) and make your own decision. (Though I suspect this tendency to compare and analyze to be a bit deceptive... if you know one language well already, go with it and get something done already.)
-
Congratulations on YOUR grade F
It's kicking the ass of plain Lua, which was about 100x slower than Python
Really? Show us where!
beating plain Lua just means that you don't get an F in first-semester computer science.
Must be a real interesting school you attended. LuaJIT has been completely rewritten for 2.0 and the first beta was released on 31st Oct... here's a clue...
-
Lua
Lua:
Official website: http://www.lua.org/
Direct link to manual: http://www.lua.org/manual/5.1/
Lua community: http://lua-users.org/wiki/ -
Re:Compiled Python 3000?This is the thing that makes me laugh my ass off : people saying Python is not slow if you use Python libraries implemented in C.
How on earth did your broken reading comprehension lead you to that conclusion?
What I said (for people capable of reading English) is that it's best to let Python itself do as much as it can, rather than needlessly re-implement parts of the language in native Python. Don't write loops if map() or list comprehensions can replace them. Don't write "c = a; a = b; b = c" to swap two variables when "a, b = b, a" does the same thing but faster and with less memory.
The C equivalent would be saying to use libc instead of hand-rolled knockoffs because the standard version will almost certainly be more efficient and better tested.
Finally, it's "Lua", not "LUA", and even their Wiki doesn't claim as much superiority over Python as you do.
-
Re:Is it only for extending things?
-
Re:data description language; Lua vs Guile
Unless you've got more up-to-date information than I have, Lua in fact does not support Unicode. It is true that you can kind of, sort of, manipulate Unicode strings in Lua, but to call this ability support is unwarranted. Here is the discussion of the topic from the Lua Users' Wiki. It says that the length functions do not return the number of characters in a string, only the number of bytes. It says that Lua's built-in pattern matching does not work on Unicode. It says that there is no notation that allows you to specify a Unicode character without hand-encoding it in UTF-8 and specifying each byte - you can't write something like "\u0561" in a Lua program to get the character U+0561 Armenian letter ayb. It says that Lua does not perform Unicode normalization for you, so unless you can guarantee that your strings are appropriately normlized, Lua will not determine string equality correctly and you will not be able to use Unicode strings as table keys.
I submit therefore that Lua does not support Unicode in the sense that languages like Tcl and Python do. It is much easier to work with Unicode in those languages than in Lua.
-
Re:Pascal
I'm not sure why they say the syntax is Pascal-like. It isn't in the slightest. Look on http://www.lua-users.org/ at the Wiki, which has plenty of code examples.
-
Re:Nothing beats LuaSeconded. Lua is the nicest scripting language I've worked with. It embeds beautifully in both Java and
.Net.http://lua-users.org/ is your friend.
-
Re:Python vs Lua
There are plenty of serious discussions about Python vs. Lua for game development. These two languages are easily the most popular choices (besides home-brew languages, which is pretty much an inferior choice to using something already developed like Lua or Python).
The really short version of the debate I've heard is:
1. Lua is easier to setup and integrate intially.
2. Python is a much more full fledged language, and generally better the larger the project is.
Also, in reply to your particular comments, modern Python is very good with memory management (it has added mark-and-sweep in addition to reference counting), and Python is fairly reasonable for "directly storing data". More specific to Civ4, however: Turn based games are not going to be as concerned about speed (where Lua often does win). (For instance, World of Warcraft uses Lua for the interface, and it really does need to be as fast as possible.)
Further Reading (says it better than I can).
http://lua-users.org/wiki/LuaVersusPython
http://games.slashdot.org/article.pl?sid=05/09/15/ 2154222&tid=206&tid=156
http://mozart.chat.net/~jeske/Projects/ScriptPerf/
http://www.gdconf.com/archives/2004/ (search for 'Lua')
http://www.pygame.org/ -
Re:Python is nice but consider LUA for game script
People complaining about Lua memory management performance and multi-tasking scalability are behind the times.
The 5.1 development version of Lua, due for final release late 2005, includes an incremental garbage collector and has been enhanced by Mike Pall with optional patches that allow for the efficient multitasking of large numbers of scripts (http://lua-users.org/wiki/ResumableVmPatch and http://luajit.luaforge.net/coco.html). Note that those patches fit a niche similar to stackless Python. Running scripts in different threads was already supported in prior Lua versions with only a small amount of C-side infrastructure.
In addition, Mike has recently released a JIT (http://luajit.luaforge.net/) extension for even better performance.
-
Ooops..Linky
-
What's it built on?
The "jab" at Pygame got me interested. Trying to determine what libraries this is built on, but not seeing it immediately. It looks like a great set of features for now, congrats. How does this compare to LuaSdl?
As the Pygame author, it's fun to see what other projects are doing in similar fields. Now I need to determine what benchmark was used to determine the 2x. :-) I admit Pygame's been dragging over the summer, but trying to gear up for a new release before the end of the year. -
Re:SDL-perl
Try the Lua bindings. Lua is a much better language than PERL anyway.
-
Re:http://twiki.org/
- Every wiki or related documentation site I have every found has been a mess of disorganization.
This wiki on the lua programming language seems to be fairly well organized.