Plua in 2020 - Palm OS Lua revisited
In the past few years, thanks to some cool little microcontrollers you might have come across the programming/scripting language called Lua.
Way back in the early 2000s (the earliest date I can find is 2003) there was a port of this called Plua for Palm OS handhelds. I fondly remember using it on my Sony Clie SJ22 with Palm OS 4.1 - I seem to have lost most of the code that I wrote at the time, but that's not really the point of this post. What I wanted to do was recover what I could of the language, find the newset version of it and maybe see if any new lua code which people have been writing is applicable to this admittedly quite old implementation in 2020.
So firstly I tried to track down all the versions I could find. The wayback machine helped a load here:
Plua website with dead links for version 2.0
I have also been able to track down Plua version 1.0, and I somehow found a zip archive of version 2.0. I am going to host these here unless someone tells me not to - emails to Marcio have not been responded to so I assume they are now abandonware. That said, if I'm wrong please let me know and I'll remove them.
What I don't have are the desktop compliers or examples for Plua 2.0 - however I felt it would be a good exercise to convert the Plua 1.1 examples to 2.0 and get a good grasp on how things translate.
The main differences are quite obvious - in 1.1, Palm OS specific functions are prefixed with a lowercase 'p' and that's about it: ptitle(), pfont(), pfield() etc. In Plua 2.0 things are a lot more structured: gui.title(), screen.font(), gui.field() and Marcio also added support for things like VFS through the file operations functions.
The examples are named: chat.lua, cube.lua, dialog.lua, plot.lua and tree.lua.
Below is a link to my updated versions of these for Lua 2.0; and yes - the chat app can successfully communicate to the old code running in 1.1 on another Palm.
I hope this was of interest to someone :)