RiscLua: An alternative programming language for RISC OS systems

Gavin Wraith has been in touch with a little information about RiscLua, a version of the Lua programming language adapted for RISC OS computer systems, and further developed over the last ten years. It seems that RiscLua was updated to version 5.40 in November 2011, a piece of news that was overlooked on this site.

Gavin explains further:

The intention behind RiscLua has been to provide a programming language combining the facilities of BASIC with the more modern and expressive features of Lua. Just as BASIC can be used for creating wimp programs, using the keywords DIM, SYS and the operators !, ?, $, so can RiscLua using the values dim, sys, !, ?, $ in the riscos library. What is new in version 5.40 is that memory allocated with dim can now be made garbage-collectible.

RiscLua uses 32-bit integers (because the ARM chips chiefly used by RISC OS do not support floating point operations) and has bitwise operators &, |, ^^, ~, <<, >> analogous to AND, OR, EOR, NOT, <<, >> in BASIC. It incorporates R. Ierusalimschy‘s very powerful lpeg (Lua Parser-Expression Grammar) library for matching patterns and capturing data from text.

Lua was originally designed as a data-entry language for non-programmers. and has always been kept small and simple. I would like to see RiscLua as offering an upgrade path from BASIC. There is certain amount of tutorial material accessible from the RiscLua website. I realize that much of it is inadequate for the absolute beginner, so I would be grateful to receive criticism and suggestions from anybody who is tempted to try their hand with RiscLua.


Related posts