Lua for RISC OS
Lua evolved from a data-entry language devised for PETROBRAS, the Brazilian
oil company in the early 1990s. Its keynote has been simplicity.
The current version is Lua 5.1. The term refers to a C library and to a
programming language which the library implements. Both aspects have been designed
for portability, extendibility and embeddability
Here are some useful links about Lua:
Usually boasts of portability mean portability to various styles of Unix,
Windows and perhaps MacOS. For Lua it means a lot more. In particular
it is portable to RISC OS.
There are two separate packages you can download from this
site.
RiscLua is a modification of standard Lua, with enhancements to make it
possible to write wimp programs with it. It comes as an application !lua. The directory !lua.bin contains two binaries: lua a RiscLua interpreter, and luac a
compiler to bytecode for RiscLua.
Sources are in a form ready for compilation with the Norcroft C compiler.
What can these mean?
NB
!Luna is now incorporated into RiscLua. Luna scripts for StrongED
should be converted as follows
#! luna
to
#! lua
If the variable text is used in the script
it now needs to be defined. You can do this by inserting the line
io.input(arg[1]);text = io.read "*all";io.input()
before its first use.
Back to RISC OS stuff