[Back to the Floodgap main page] Return to Floodgap Retrotech

Plua Revisited


Plua was (in version 2.0, its final release) an implementation of Lua 5.0.3 for the classic Palm OS (3.5 and up, including PalmOS 5 Garnet) written by Marcio Migueletto de Andrade. Besides implementing a small onboard IDE and the language itself, it could generate executable PRCs that would run using a standalone runtime, or be "cross-compiled" using a modified version of luac called plua2c. It has disappeared from most of its former locations, including Marcio's old site and the Yahoo! Groups site that used to host it.

Screenshot of actual Plua application. Plua was freeware, but was never open source. However, by historical happenstance as the maintainer of the plua2c port to Mac OS X, I retained the source code to that specific component and recently made 64-bit fixes to it to allow development on my Raptor Talos II workstation.

I can't provide the source code due to my gentleman's agreement with Marcio, which I still honour until permitted otherwise. Similarly, Marcio's license prevents modification or patching of the runtime or the built-in IDE, and I have been unable to contact him through any of our previous methods. So, as a means to foster renewed interest in what I think was one of the best scripting environments for the Palm family, I've decided to start hosting Plua myself along with issuing 64-bit compatible plua2c binaries for my local systems in the spirit of the Mac OS X port. Now that Garnet has virtually no commercial relevance, I'm hopeful that we may be able to revamp Plua into an open-source version (with his permission, or as a clean reimplementation) so that Palm retrocomputing enthusiasts can continue to develop and work with it.

About Plua 2.0

Plua offers a nearly full range of GUI controls, graphics (including turtle graphics and a sprite engine), sound, networking, resource and file operations as shown in the screenshot at right of a 100% Plua Gopher client running in Palm OS Emulator 3.5. Notice the use of native controls, including pull-down menus. The runtime can also be expanded with your own C-based libraries to add additional custom functions. Programs can be developed right on the Palm device itself.

A detailed language reference is included with the Plua distribution, or you can read the Plua documentation here.

You should also read the FAQ, which includes important information on Plua's license.

Download Plua 2.0 for PalmOS

Download Plua (258K). This includes local copies of the documentation as well as online help, the IDE and the runtime. The PRCs can be installed with Palm Desktop or pilot-xfer. You will also need to install MathLib (50K).

Here is an example of what Plua source code looks like. This example draws an animated fishtank using bitmap resources.

You can download that script (with resources) and other example scripts (547K) to play with. These demonstrate Plua's graphics, UI, sound and networking capabilities. For some of the examples you will need PilRC to compile the resources; here is source code for 64-bit fixed PilRC (263K) suitable for most modern platforms.

Download plua2c

plua2c is the "cross-compiler" for Plua. It allows you to write Lua code on your desktop machine and build the executable PRC on the same system; you can then hotsync the binary over to a test device or run it in emulation. The target device needs Plua2RT and MathLib installed.

Generated applications may be distributed under any license you want, along with the unmodified runtime and any of your own libraries you may have created. Read the license.

These binaries (except for the original Mac OS X Jaguar port) are for modern 64-bit systems. The choice of platforms purely represents what I use or have access to, and I may add others in the future. Again, per my arrangement with Marcio, currently I may only distribute binaries, not the source code. I do not have the original plua2c binaries as I never used them personally.

Here are the usage instructions, which are the same for all the ports. These zip archives contain bare binaries.

Plua 1.x

Plua 1.1 and Plua 1.0 were the previous implementations of Lua for Palm OS, based on 4.0. I do not have the source code for 1.x or its pluac, and it has several bugs which were on purpose never fixed. It can be found on the Wayback Machine for Plua 1.1 or Plua 1.0. They are primarily of most use where you are developing for a device that is limited to Palm OS 3.1.

Comments

E-mail me (especially if you're Marcio).


Cameron Kaiser