[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Lightweight Ruby?

Chanon Sajjamanochai

8/15/2006 2:16:00 PM

Hi all,

I was the one who started the "Using Ruby in a commercial application?"
thread.
Thanks for all the replies!

After some more consideration on using Ruby embedded in C++ for games, it
started to become clear that the main reason that I wouldn't want to use it
yet is because of portability and lightweightness.

Lua which is more widely used in games is a lot more lightweight and
portable.

The main reason this is important to me is that porting games to different
platforms might be a problem if the scripting language used isn't portable
to other platforms.

But I really like the Ruby language/syntax .. I just wish there was a more
lightweight version of it that is more portable. Heavy features such as
threads wouldn't be required so that it could be more lightweight.

Anyways, I searched the archives and found a few people saying they were
working on something like this. Also there is something called "minruby"
which doesn't have any documentation.

Anyone know of any information about a lightweight Ruby project or is
working on one?

Thank you!,
Chanon


14 Answers

greg.kujawa

8/15/2006 2:42:00 PM

0

What do you mean by lightweight? Ruby certainly seems to be portable,
in that it can be implemented on Mac OS X, Windows, Linux, BSD, BeOS,
OS/2, Solaris, AIX, etc. Are you looking to implement Ruby on an
embedded device like a PDA, Smartphone, game console, etc.?

Chanon Sajjamanochai wrote:
> Hi all,
>
> I was the one who started the "Using Ruby in a commercial application?"
> thread.
> Thanks for all the replies!
>
> After some more consideration on using Ruby embedded in C++ for games, it
> started to become clear that the main reason that I wouldn't want to use it
> yet is because of portability and lightweightness.
>
> Lua which is more widely used in games is a lot more lightweight and
> portable.
>
> The main reason this is important to me is that porting games to different
> platforms might be a problem if the scripting language used isn't portable
> to other platforms.
>
> But I really like the Ruby language/syntax .. I just wish there was a more
> lightweight version of it that is more portable. Heavy features such as
> threads wouldn't be required so that it could be more lightweight.
>
> Anyways, I searched the archives and found a few people saying they were
> working on something like this. Also there is something called "minruby"
> which doesn't have any documentation.
>
> Anyone know of any information about a lightweight Ruby project or is
> working on one?
>
> Thank you!,
> Chanon

Chanon Sajjamanochai

8/15/2006 2:57:00 PM

0

Yes, Nintendo DS and other game consoles could be future targets.

The thing is, to invest in a technology (including training employees to
learn it, developing libraries and tools for it) I'd like to be assured that
it will be a future proof decision.

Thank you!

----- Original Message -----
From: "gregarican" <greg.kujawa@gmail.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Tuesday, August 15, 2006 9:45 PM
Subject: Re: Lightweight Ruby?


> What do you mean by lightweight? Ruby certainly seems to be portable,
> in that it can be implemented on Mac OS X, Windows, Linux, BSD, BeOS,
> OS/2, Solaris, AIX, etc. Are you looking to implement Ruby on an
> embedded device like a PDA, Smartphone, game console, etc.?
>
> Chanon Sajjamanochai wrote:
>> Hi all,
>>
>> I was the one who started the "Using Ruby in a commercial application?"
>> thread.
>> Thanks for all the replies!
>>
>> After some more consideration on using Ruby embedded in C++ for games, it
>> started to become clear that the main reason that I wouldn't want to use
>> it
>> yet is because of portability and lightweightness.
>>
>> Lua which is more widely used in games is a lot more lightweight and
>> portable.
>>
>> The main reason this is important to me is that porting games to
>> different
>> platforms might be a problem if the scripting language used isn't
>> portable
>> to other platforms.
>>
>> But I really like the Ruby language/syntax .. I just wish there was a
>> more
>> lightweight version of it that is more portable. Heavy features such as
>> threads wouldn't be required so that it could be more lightweight.
>>
>> Anyways, I searched the archives and found a few people saying they were
>> working on something like this. Also there is something called "minruby"
>> which doesn't have any documentation.
>>
>> Anyone know of any information about a lightweight Ruby project or is
>> working on one?
>>
>> Thank you!,
>> Chanon
>
>
>


Ilan Berci

8/15/2006 3:00:00 PM

0

Cganon,

I don't believe it's a matter of being light, it's simply a matter of
security. Embedded scripting engines within games must heavily limit a
language's capabilities to avoid malicious intent. Lua for example, used
within WoW, is very primitive by design.

There are examples of this in the Java community as well. RoboCode,
written within IBM and now open source uses Java's security manager to
restrict callers from creating threads or getting access to system
resources.

I believe that it would be incredibly complex to implenent safe guards
in an open class system but hopefully I am terribly misguided. :)

ilan

Chanon Sajjamanochai wrote:
> Hi all,
>

>
> But I really like the Ruby language/syntax .. I just wish there was a
> more
> lightweight version of it that is more portable. Heavy features such as
> threads wouldn't be required so that it could be more lightweight.
>



--
Posted via http://www.ruby-....

greg.kujawa

8/15/2006 3:53:00 PM

0

Hmm. I would think your options might be more restricted to proprietary
software tools provided by the gaming console manufacturers. Otherwise
your work would be more of a modded deal that wouldn't be as easy to
distribute commercially (if that's your ultimate goal).

I am not an authority on console game programming by any stretch, but I
am not sure if Ruby would be a viable option in this area. Ruby doesn't
have many up-to-date implementations for PDA's and Smartphone, let
alone a game console. Maybe there's projects out there I am not aware
of perhaps...

Chanon Sajjamanochai wrote:
> Yes, Nintendo DS and other game consoles could be future targets.
>
> The thing is, to invest in a technology (including training employees to
> learn it, developing libraries and tools for it) I'd like to be assured that
> it will be a future proof decision.
>
> Thank you!
>
> ----- Original Message -----
> From: "gregarican" <greg.kujawa@gmail.com>
> Newsgroups: comp.lang.ruby
> To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
> Sent: Tuesday, August 15, 2006 9:45 PM
> Subject: Re: Lightweight Ruby?
>
>
> > What do you mean by lightweight? Ruby certainly seems to be portable,
> > in that it can be implemented on Mac OS X, Windows, Linux, BSD, BeOS,
> > OS/2, Solaris, AIX, etc. Are you looking to implement Ruby on an
> > embedded device like a PDA, Smartphone, game console, etc.?
> >
> > Chanon Sajjamanochai wrote:
> >> Hi all,
> >>
> >> I was the one who started the "Using Ruby in a commercial application?"
> >> thread.
> >> Thanks for all the replies!
> >>
> >> After some more consideration on using Ruby embedded in C++ for games, it
> >> started to become clear that the main reason that I wouldn't want to use
> >> it
> >> yet is because of portability and lightweightness.
> >>
> >> Lua which is more widely used in games is a lot more lightweight and
> >> portable.
> >>
> >> The main reason this is important to me is that porting games to
> >> different
> >> platforms might be a problem if the scripting language used isn't
> >> portable
> >> to other platforms.
> >>
> >> But I really like the Ruby language/syntax .. I just wish there was a
> >> more
> >> lightweight version of it that is more portable. Heavy features such as
> >> threads wouldn't be required so that it could be more lightweight.
> >>
> >> Anyways, I searched the archives and found a few people saying they were
> >> working on something like this. Also there is something called "minruby"
> >> which doesn't have any documentation.
> >>
> >> Anyone know of any information about a lightweight Ruby project or is
> >> working on one?
> >>
> >> Thank you!,
> >> Chanon
> >
> >
> >

Kero van Gelder

8/16/2006 10:19:00 PM

0

> I don't believe it's a matter of being light, it's simply a matter of
> security. Embedded scripting engines within games must heavily limit a
> language's capabilities to avoid malicious intent. Lua for example, used
> within WoW, is very primitive by design.
>
> There are examples of this in the Java community as well. RoboCode,
> written within IBM and now open source uses Java's security manager to
> restrict callers from creating threads or getting access to system
> resources.
>
> I believe that it would be incredibly complex to implenent safe guards
> in an open class system but hopefully I am terribly misguided. :)

Why's sandbox (see another current thread) might help here.

Of course, I'll be packaging Ruby 1.8.5 for iPAQ/linux as soon as it is
released. Lightweight in my sense is smaller packages. I'll be using ruby,
readline, irb and openssl only. I packaged network stuff separately in the
past, but a PDA without network seems a bit useless. Oh, this will be
unpacked onto jffs2, which is a compressed FS, so the actual flash-usage
isn't much higher.

~/iPAQ/Ruby/ruby-1.8.5/ipkg$ wc *ipk
34 202 8344 erb1.8_1.8.5-preview3-1_arm.ipk
7 30 634 erb_1.8.5-preview3-1_arm.ipk
118 619 30304 irb1.8_1.8.5-preview3-1_arm.ipk
8 29 636 irb_1.8.5-preview3-1_arm.ipk
43 308 16210 ruby1.8-curses_1.8.5-preview3-1_arm.ipk
1387 8625 494482 ruby1.8-dev_1.8.5-preview3-1_arm.ipk
446 2429 115234 ruby1.8-doc_1.8.5-preview3-1_arm.ipk
231 1476 87676 ruby1.8-openssl_1.8.5-preview3-1_arm.ipk
22 150 7496 ruby1.8-readline_1.8.5-preview3-1_arm.ipk
305 1489 66108 ruby1.8-rexml_1.8.5-preview3-1_arm.ipk
109 594 25956 ruby1.8-rss_1.8.5-preview3-1_arm.ipk
14 79 2534 ruby1.8-runit_1.8.5-preview3-1_arm.ipk
192 1106 51064 ruby1.8-soap_1.8.5-preview3-1_arm.ipk
94 555 25262 ruby1.8-test_1.8.5-preview3-1_arm.ipk
139 762 33818 ruby1.8-webrick_1.8.5-preview3-1_arm.ipk
80 461 23358 ruby1.8-wsdl_1.8.5-preview3-1_arm.ipk
96 548 22922 ruby1.8-xmlrpc_1.8.5-preview3-1_arm.ipk
57 329 14210 ruby1.8-xsd_1.8.5-preview3-1_arm.ipk
75 353 15630 ruby1.8-yaml_1.8.5-preview3-1_arm.ipk
3048 18428 987842 ruby1.8_1.8.5-preview3-1_arm.ipk
7 32 648 ruby_1.8.5-preview3-1_arm.ipk
6512 38604 2030368 total

Brian McCallister

8/16/2006 10:49:00 PM

0

Lua embeds much easier than Ruby, IMHO. This is especially if you use
multiple threads (which most games do, I believe).

Best tool for the job isn't always your favorite tool :-)

-Brian

ps: ruby threads are lightweight, they are not system/posix threads

On Aug 15, 2006, at 7:16 AM, Chanon Sajjamanochai wrote:

> Hi all,
>
> I was the one who started the "Using Ruby in a commercial
> application?" thread.
> Thanks for all the replies!
>
> After some more consideration on using Ruby embedded in C++ for
> games, it started to become clear that the main reason that I
> wouldn't want to use it yet is because of portability and
> lightweightness.
>
> Lua which is more widely used in games is a lot more lightweight
> and portable.
>
> The main reason this is important to me is that porting games to
> different platforms might be a problem if the scripting language
> used isn't portable to other platforms.
>
> But I really like the Ruby language/syntax .. I just wish there was
> a more lightweight version of it that is more portable. Heavy
> features such as threads wouldn't be required so that it could be
> more lightweight.
>
> Anyways, I searched the archives and found a few people saying they
> were working on something like this. Also there is something called
> "minruby" which doesn't have any documentation.
>
> Anyone know of any information about a lightweight Ruby project or
> is working on one?
>
> Thank you!,
> Chanon
>
>


Bira

8/17/2006 11:44:00 AM

0

On 8/16/06, Brian McCallister <brianm@apache.org> wrote:
> Lua embeds much easier than Ruby, IMHO. This is especially if you use
> multiple threads (which most games do, I believe).
>
> Best tool for the job isn't always your favorite tool :-)
>
> -Brian

Lua is also a nifty language :). Lua and Ruby seem to have the same
goals of being simple and fun to program in. Lua isn't
object-oriented, but you can implement OOP in it and do a whole lot of
other nifty tricks using its peculiar data types.


--
Bira
http://compexplicita.bl...
http://sinfoniaferida.bl...

greg.kujawa

8/17/2006 11:56:00 AM

0

I briefly looked at Lua but didn't get a chance to fully research its
capabilities. Are there a decent amount of libraries available for this
language? For example, could I implement XMLRPC, SOAP, etc. with it or
use standard GUI toolkits such as Qt, GTK, Fox, Wx, etc.?

Bira wrote:
> On 8/16/06, Brian McCallister <brianm@apache.org> wrote:
> > Lua embeds much easier than Ruby, IMHO. This is especially if you use
> > multiple threads (which most games do, I believe).
> >
> > Best tool for the job isn't always your favorite tool :-)
> >
> > -Brian
>
> Lua is also a nifty language :). Lua and Ruby seem to have the same
> goals of being simple and fun to program in. Lua isn't
> object-oriented, but you can implement OOP in it and do a whole lot of
> other nifty tricks using its peculiar data types.
>
>
> --
> Bira
> http://compexplicita.bl...
> http://sinfoniaferida.bl...

James Gray

8/17/2006 12:50:00 PM

0

On Aug 17, 2006, at 7:00 AM, gregarican wrote:

> I briefly looked at Lua but didn't get a chance to fully research its
> capabilities. Are there a decent amount of libraries available for
> this
> language? For example, could I implement XMLRPC, SOAP, etc. with it or
> use standard GUI toolkits such as Qt, GTK, Fox, Wx, etc.?

I sure hope so. The language doesn't even implement bitwise
operators, so your going to need a library for pretty much
everything. ;)

James Edward Gray II

Austin Ziegler

8/17/2006 1:02:00 PM

0

On 8/16/06, Kero <kero@chello.single-dot.nl> wrote:
> Of course, I'll be packaging Ruby 1.8.5 for iPAQ/linux as soon as it is
> released. Lightweight in my sense is smaller packages. I'll be using ruby,
> readline, irb and openssl only. I packaged network stuff separately in the
> past, but a PDA without network seems a bit useless. Oh, this will be
> unpacked onto jffs2, which is a compressed FS, so the actual flash-usage
> isn't much higher.

I would include zlib if you haven't already; otherwise, you won't be
able to use RubyGems.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca