I've worked with an interpreted, dynamic language embedded in a large
enterprise application running on Palm OS devices and other small
computers. It's a real challenge.

Palm devices have never attempted to be general purpose computers, so
there are a couple of real limitations. Existing Palm devices are
slow. The stack is small. And the heap is very small. If you're using
OS 3.5 or later, not doing network stuff, etc., you have a maximum of
256 KB available in the dynamic heap. Older versions of the OS have
significantly lower limits. (There are alternative types of memory
which have their own issues. But this is a Ruby mailing list, not a
Palm OS mailing list...)

I'm sure it'd be possible to port Ruby. And who knows--maybe it'd
actually be useful with some future, more powerful generation of Palm
OS devices. But it would be a big job. I don't know much about Ruby's
internals, but I assume that it takes the existence of a virtual
memory for granted. You'll need to think hard about memory usage,
questioning each malloc. You'll have to worry about memory
fragmentation. You'll have to fight with a weird toolchain. And you'll
probably need to find alternatives to recursion you find in Ruby's
parser and interpreter. And you could spend the rest of your life
trying to make it fast enough.

So, it'd be hard. But it might also be fun.

You might want to check out Pippy, a port of Python for Palm.
(http://www.endeavors.com/pippy/) Their efforts would probably be
instructive.

bill

> -----Original Message-----
> From: Hal E. Fulton [mailto:hal9000 / hypermetrics.com]
> Sent: 20 April, 2002 11:13 am
> To: ruby-talk ML
> Subject: Q: Possible Palm OS port?
>
>
> Hello all,
>
> Question for you. (More a matter of curiosity than
> a practical matter...)
>
> Several people have expressed interest in a port
> of Ruby to the Palm OS...
>
> Are there any thoughts on what it would take to
> make this work?
>
> Disclaimer: I'm not qualified for the task. Not by
> myself, anyway.
>
> Here are some preliminary thoughts of mine:
>
> 1. Size is a concern. The typical Palm is about
> 8 megs, I think. I suppose some functionality
> would have to be removed. Some can be removed
> easily such as Tk stuff, right?
>
> 2. File access and IO would be radically different,
> I think... does the Palm even have the concept of
> a "file"?
>
> 3. Isn't there a gcc version which cross-compiles
> for the Palm? I know there's PocketC, but that's
> not a true C compiler AFAIK.
>
> 4. I suppose there should be an add-on library to
> interface to the rest of the Palm... a way to read
> from the Memo app, a native GUI, and so on...
>
> Anyone have ideas on this?
>
> How many person-hours are we talking here, and
> what are the major design decisions?
>
> Hal Fulton
>
>
>
>