Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Misc > Re: Ruby or LUA
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 11 Topic 897 of 1011
Post > Topic >>

Re: Ruby or LUA

by "Phlip" <phlipcpp@[EMAIL PROTECTED] > Apr 21, 2007 at 02:38 PM

Nathan Mates wrote:

> DLPnet  wrote:

>>just a quick question, I m currently considering using a scripting
>>language and I m looking at Ruby or LUA. Both of them seem really
>>suitable for *my needs* so I would just like your advice about these 2
>>languages. Not a deep review of each of them but just if anyone has a
>>strong opinion for or against.
>
>   I've not used Ruby, but have done a lot of work with Lua. I feel
> that it's really, really easy to embed Lua into a C/C++ app, and call
> the other language's functions. Lua's memory footprint is also nice
> and small, but that's more of a consideration for console games. Lua
> doesn't have as much of a debugger built-in, but if you're happy with
> printf debugging, it works out quite well.
>
>   Python/Ruby seem to be quite happy running scripts under Windows/
> Mac/Unix/etc, as a standalone app. I've heard that embedding Python is
> more work than Lua, due to more refcount issues, etc.

Embedding Ruby into a C++ app is absurdly easy. It's competitive with Lua,

easier than Python, and much easier than Perl.

However, the definition of a "soft language" is a language that puts the 
needs of the programmer above the needs of the CPU. Ruby will never run 
faster than Lua, because Lua is somewhat more difficult to program. You
get 
many Ruby benefits (dynamic typing, extensible cl*****, metaprogramming,
and 
block closures), but without Ruby's amazingly lean syntax.

Tip: Make certain your 'im****t' or 'require' or 'include' system works.
You 
must write a little more Lua glue code to get that (because Lua can't make

assumptions about your file system). Once you do, you can grow
full-featured 
cl***** in Lua and re-use them. Some games have ****pped with 2/3rds their 
code in Lua and only 1/3rd in C++. That's fine because Lua runs very fast.

-- 
  Phlip
  http://flea.sourceforge.net/PiglegToo_1.html
 




 11 Posts in Topic:
Ruby or LUA
DLPnet <dlpnet-@[EMAIL  2007-04-20 10:01:53 
Re: Ruby or LUA
nathan@[EMAIL PROTECTED]   2007-04-20 16:22:42 
Re: Ruby or LUA
"Phlip" <phl  2007-04-21 14:38:01 
Re: Ruby or LUA
Miss Elaine Eos <Misc@  2007-04-22 07:20:52 
Re: Ruby or LUA
"Phlip" <phl  2007-04-22 12:34:05 
Re: Ruby or LUA
Miss Elaine Eos <Misc@  2007-04-23 06:35:34 
Re: Ruby or LUA
"Phlip" <phl  2007-04-22 12:38:43 
Re: Ruby or LUA
Miss Elaine Eos <Misc@  2007-04-23 06:33:50 
Re: Ruby or LUA
DLPnet <dlpnet-@[EMAIL  2007-04-23 09:53:39 
Re: Ruby or LUA
Kornel Kisielewicz <ad  2007-04-21 16:52:02 
Re: Ruby or LUA
Phlip <phlip2005@[EMAI  2007-04-23 06:55:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:01:19 CDT 2008.