lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Dec 30, 2005 at 00:13 -0600, Dolan, Ryanne Thomas (UMR-Student) wrote:
> 
> By the way, I've heard Lua has already been ported to Palm OS, unless
> you mean Lua5.1.

I'm aware of exactly two projects to run Lua on PalmOS.


One is PLua (http://meusite.uai.com.br/~mmand/plua/plua.htm), which is a
Lua 4 port.  I cannot determine which license this software is under.
There is none I could recognize as such, only the few words in the HTML
documentation:

   THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY, SO USE IT AT YOUR
   OWN RISK. Plua can not be reverse engineered or modified in any way.
   To include Plua in any software collection, online or not, first
   contact the author for permission. No one is allowed to sell or
   charge for redistributing Plua.

The PLua software is distributed in binary form only: it comes with a
PRC for PalmOS and a "pluac" compiler for Windows and "for Linux" (ia32
exclusively and I'm not sure which libc).

Although it doesn't cost money it's not OpenSource and in its current
form is not usable without a PC and Linux on it.  "Including" it in
other software needs the author's agreement.


And there is Lua for PalmOS.  http://luaforge.net/projects/luapalmos/
looks rather empty, the last change (alpha2) was about 17 months ago.
http://sourceforge.net/projects/luapalmos does not look better (last
activity in mid 2003).

Although this project is MIT licensed, it has a big disadvantage for
contributors: they are expected to have access to the MetroWerks
CodeWarrior IDE.  Which is USD 400.  Even the edu version (which one has
to qualify for in the first place) is USD 150.  And MetroWerks decided
to drop MacOS support three years ago.  Which means that you need a
valid MS Windows license.  And an ia32 PC to run all this stuff on.  I
do agree that professional PalmOS developers might have no problems with
all this and already own a copy of the IDE.  But for private users or
"just for the fun of it" this is too hard a constraint.

In addition the *.mcp project file is one huge binary chunk.  So
interested developers could not even get the faintest idea of the
project's structure or compile options used.  Which means that not only
could I not tell if contributed changes, fixes or extensions work -- I
could not even tell if the code compiles at all.

I'm not too familiar with PalmOS development, it's just one of the
little things I come back to when I'm a little bored. :)  But I guess
that the decision to base a project on CodeWarrior keeps volunteers
away.  Should the project move to prc-tools, it needs a cleanup first
(filenames currently are case insensitive and even not consistent with
the original Lua code base; the non English comments are a minor problem
I guess).


Of course I'm not saying that I'm the best developer in the world and
only I can do good software.  It's just that I decided (or was driven
to) to not contribute to the above projects.  At this point I thought if
I could do the port on my own.  Even if I don't succeed the time spent
would have been fun and I might have learned a little more ("experience
is what you get when you don't get what you actually wanted"). :>  Even
the current research is a benefit to me already.

Currently it's just that I collect ideas and do some mind experiments.
It looks like the pieces may form a working Lua port when put together.
But as I said I did not do any coding yet which might open new cans of
worms (there's a C compiler but no complete ANSI C library available,
the SysLib interface is somewhat different and thus loadlib() modules
may look different than elsewhere, the (code) resources are limited to
some 32-64K, the data chunks are limited to 64K, file I/O needs to be
emulated(?), native integers have 16 bits only, optional ARMlets for
speedup have a certain prototype due to thunking which would mean bigger
changes in the code layout, keeping state between switching applications
may be a problem, running the VM and the UI in parallel has to be
implemented which started this thread, etc etc).  So expect quite a few
months to pass before anything usable may show up.

But I'm afraid all this Palm specific stuff is getting off topic for the
Lua list.  I'm not going to discuss it here in any further detail.  It's
just that I wanted to tell what made me start "yet another" PalmOS port
project.


BTW do I not expect serious problems when upgrading the Lua code base to
a newer version.  Once the ANSI library and PalmOS interfacing stuff is
done it should just be a matter of dropping in the new Lua release.  I'm
trying to patch as little as necessary in Lua so the PalmOS port does
have glue logic but no (big) diffs against the original code base.


virtually yours
Gerhard Sittig
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.