[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby for small devices ?

zimba.tm@gmail.com

12/9/2005 5:52:00 PM

Hello ruby fellows,I would like to know if anyone has experience with embedding ruby insmall devices and if such project exists ?In my current work, I'm using Elphel cameras, mobile phones, etc.. But ruby is pretty heavy, plus I don't know if it compiles on ARM orother CPUs.Any hint would be appreciated :)--Cheers, zimbahttp://zim...
8 Answers

Wilson Bilkovich

12/9/2005 6:49:00 PM

0

Check out the "Embedding Ruby" presentation from RubyConf 2005:
http://www.zenspider.com/dl/rubyconf2005/Embedd...

The stuff you're interested in starts around page 18, I'd say.

--Wilson.

On 12/9/05, zimba-tm <zimba.tm@gmail.com> wrote:
> Hello ruby fellows,
>
> I would like to know if anyone has experience with embedding ruby in
> small devices and if such project exists ?
>
> In my current work, I'm using Elphel cameras, mobile phones, etc..
> But ruby is pretty heavy, plus I don't know if it compiles on ARM or
> other CPUs.
>
> Any hint would be appreciated :)
>
> --
> Cheers,
> zimba
>
> http://zim...
>


Kero van Gelder

12/9/2005 9:06:00 PM

0

> Check out the "Embedding Ruby" presentation from RubyConf 2005:
> http://www.zenspider.com/dl/rubyconf2005/Embedd...

Good stuff.

I run Ruby on my iPAQ (I suppose zauri work as well) which has
a StrongArm 200 MHz (arm v4l)
32 MB flash, 32 MB RAM

and as in the above presentation, I chopped the stdlibs in a couple of
packages so I do not carry all the dependencies around. See
http://feeds.handhelds... to get the general idea (polluted with some
apps) and bear in mind that I have 1.8.3 packages cross compiled as well
(but not uploaded). mm, I also see that my descriptions are a bit too much
copy'n'paste.

Bye,
Kero.


zimba.tm@gmail.com

12/10/2005 2:50:00 PM

0

Ok, thanks a lot ppl :-)Wilson, the paper was a very interesting read. It's quite funny to seewhat people do with ruby.Kero, feeds.handhels.org seems down for me. Are you sure it's the right domain ?For more precisions, Elphel cameras[1] run with an Etrax AxisProcessor and an FPGA.I will look into this during the week.Cheers, zimbahttp://zim...[1]: http://wiki.e...

Isaac Gouy

12/10/2005 7:54:00 PM

0

This is about Smalltalk on small devices, not Ruby, but it may be of
interest
http://www.daimi.au.dk/~marius/documents/andersen20...
http://www.smalltalksolutions.com/smalltalksolutions/p...

zimba-tm wrote:
> Hello ruby fellows,
>
> I would like to know if anyone has experience with embedding ruby in
> small devices and if such project exists ?
>
> In my current work, I'm using Elphel cameras, mobile phones, etc..
> But ruby is pretty heavy, plus I don't know if it compiles on ARM or
> other CPUs.
>
> Any hint would be appreciated :)
>
> --
> Cheers,
> zimba
>
> http://zim...

Kero van Gelder

12/12/2005 8:19:00 AM

0

> Kero, feeds.handhels.org seems down for me. Are you sure it's the right domain ?

Sorry, that should be
http://handhelds.org/f...

Dick Davies

12/12/2005 8:25:00 AM

0

I just discovered Scratchbox (http://scra...) and its awesome for
cross-compilation of biggish apps.

[ quick overview:

It's a cross-toolchain for arm and ppc. It's main 'wow' feature
is that it uses qemu-arm to emulate an ARM host.
You run '/scratchbox/login' and have root on an emulated ARM, then
build software.

All the ease of compilation (i.e. you can just run './configure',
it ships with an svn client, etc.)
except an order of magnitude faster (qemu is a bit slow, but i386
is much faster than arm
in the first place, so it's a net win).

For platforms that the emulator isn't good enough for, you can use 'sbrsh'
to login to the PDA, mount the toolchain and source tree from your
scratchbox using NFS and build stuff there.

]

Ruby 1.8.3 built with no trouble
( ext/dl expected a /bin/sh, but a symlink fixed that) and irb, etc runs fine
in the scratchbox. Now i just need to
copy the files onto my slug where it can run natively.

See the quick howto at:
http://scra.../documentation/user/scratchbox-1.0/html/tutorial.html

- that's all i needed, just substituted ruby for glib.
> zimba-tm wrote:
> > Hello ruby fellows,
> >
> > I would like to know if anyone has experience with embedding ruby in
> > small devices and if such project exists ?
> >
> > In my current work, I'm using Elphel cameras, mobile phones, etc..
> > But ruby is pretty heavy, plus I don't know if it compiles on ARM or
> > other CPUs.
> >
> > Any hint would be appreciated :)
> >
> > --
> > Cheers,
> > zimba
> >
> > http://zim...
>
>
>


--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.helloope...


Ilmari Heikkinen

12/12/2005 10:33:00 AM

0

On 12/9/05, Wilson Bilkovich <wilsonb@gmail.com> wrote:> Check out the "Embedding Ruby" presentation from RubyConf 2005:> http://www.zenspider.com/dl/rubyconf2005/EmbeddedR... leaking Mutex problem showcased in the presentation page 27, Ithink the following change fixes it at least for #synchronize : def unlock return unless @locked Thread.critical = true- @locked = false begin t = @waiting.shift+ @locked = t # if there is a waiting thread, keep the mutex locked t.wakeup if t rescue ThreadError retry end Thread.critical = false# if @locked is false, a thread entering #lock sets Thread.critical=true here,# checks for @locked, sees that it's false, and jumps the queue begin t.run if t rescue ThreadError end self end

Ilmari Heikkinen

12/12/2005 10:43:00 AM

0

argh, okay, maybe third time's the charm:while (Thread.critical = true; @locked and @locked != Thread.current)sorry about thatOn 12/12/05, Ilmari Heikkinen <ilmari.heikkinen@gmail.com> wrote:> On 12/12/05, Ilmari Heikkinen <ilmari.heikkinen@gmail.com> wrote:> > The leaking Mutex problem showcased in the presentation page 27, I> > think the following change fixes it at least for #synchronize :>> forgot the #lock-part:>> def lock> - while (Thread.critical = true; @locked)> + while (Thread.critical = true; @locked != Thread.current) # go> ahead if we have the lock> @waiting.push Thread.current> Thread.stop> end> @locked = true> Thread.critical = false> self> end>>> Anything else I missed?>