Lua logo Lua (version 3.2) was first ported to RISC OS by Reuben Thomas, who has since, alas, left the RISC OS scene. Soon afterwards Lua version 4.0 came out, at which point I started experimenting with the Lua sources to see if I could add to them facilities for calling RISC OS SWIs. In that way RiscLua started life. Its initial development was rather haphazard.

I was faced with two problems. First, the standard Lua sources use 64-bit floating point numbers ( doubles ) by default. Unfortunately the ARM chips mostly used by RISC OS did not then have on-chip floating point operations. The Lua sources have since been improved to make it easier to use alternative number types. My earliest efforts used the default doubles; later I used 32-bit integers as the default for RiscLua, reckoning that the sacrifice of not having floating point numbers was worth the efficiency gained on ARM chips. Later versions of RiscLua gave back the use of floating point numbers; first of all, version 3.10 used the MAPM bignumber package. This was abandoned as clumsy in version 3.20.

In version 4.00 the doubles library was introduced, which implements 64-bit floating point numbers, not in the Lua virtual machine (which keeps to 32-bit integers) but as objects in the heap. Second, RISC OS SWIs use registers as pointers to arrays of data, whereas Lua, for reasons of portability and security, avoids such things. However, its notion of userdata provided enough to implement what was required. It was not until version 3.00 of RiscLua, with the introduction of the block and swi libraries, that the RISC OS calling interface was properly rationalized. In version 3.30 bitwise operations on integers were implemented more efficiently using extra opcodes for the Lua virtual machine.

Version 5.00 reverts to an earlier, simpler approach. It replaces the block and swi libraries by the single library riscos and also moves into it the directory iterator and filetype functions formerly in os so as not to pollute the standard Lua libraries with extraneous RISC OS stuff. The syntax is now much closer to that of Basic. Adopting Basic's confusion of addresses and pointers with integers is somewhat against the spirit of Lua, though the consequent insecurity will not affect pure Lua programs, only those whose use of SWIs requires the presence of buffers for passing data between program and operating system.

Version 5.30 is based on Lua 5.2(beta). It could run programs written for RiscLua 5.00; compiled programs will need to be recompiled. Version 5.40 is based on Lua 5.2. It is backwards compatible with 5.30 but makes dim ed blocks garbage-collectible. After a statement   x = riscos.dim(n) , a userdatum riscos.block[x] is created. Applying # to it yields the number of bytes in the block - useful for checking overflow. Setting it to nil renders the block garbage-collectible. Version 5.41 is based on Lua 5.2.1 and is backwards compatible with 5.40. Version 5.50 replaces the doubles library by the arbitrary-precision bc library. Version 5.60 is based on the final version of Lua 5.2.2 and version 0.12 of the Lpeg library. Version 5.70 adds the alternative syntax x op = y for x = x op y for the operations .. + - * / ^ % & | ^^ << >> . Version 5.71 uses LUA_INIT to add error throwback with a function riscos.throw if the DDEUtils module is available. Format strings can be used as if they were functions.

Version 6.00 was made possible by the release of GCC 4.7.2 which affords floating point in hardware (for ARMv7) and dynamically loadable libraries. Thus RiscLua can now revert to much greater conformance with the standard Lua distribution. Numbers need no longer be restricted to 32-bit integers. The riscos , lpeg and bc libraries are now loadable dynamically and are not built in. The only difference for users is that old programs must be modified by the insertion of appropriate require statements. Further Lua libraries were added for wimp programming.

Version 7, based on Lua 5.4.0(work 2), reverted to static linking; with the riscos and lpeg libraries built in. For some reason the change to GCC 4.7.4 seemed to have broken the dynamic linking of C libraries. An important syntactic change was that global variables must be declared by prefixing them in their first use with the word global. . Otherwise their use raises errors.Compiled statically with GCC 4.7.4. 32-bit numbers. Now uses a prelude defining a global variable obey$dir, the behaviour of format strings as functions, and the need to declare global variables.

Version 8, based on Lua 5.4.0(alpha). The default uses VFP floats, but if a version appropriate for the Iyonix is required, drop the diff-directory IYO.!rlua8 onto the default. The prelude is no longer run by default. Uncomment the appropriate section of !rlua8.!Boot to change this. The global variable declaration featured in RiscLua 7 has been dropped. The Examples and Utilities directories must be in the same directory as !rlua8. They may be extended later.

Version 801 is a catch up version, based on Lua 5.4.0(rc1). It uses 64-bit integers and 64-bit VFP floats. Version 802 is for older maxchines. Version 84 is a catch up to Lua 5.4.2. Version 86 restores dynamic linking and is based on Lua 5.4.3.

Change version-labelling to reflect Lua version. Version 544VFP-C is functionally the same as version 86, but with the help documentation revised. Version 545VFP has some internal improvements over the previous version.

545VFP April 2023
Based on Lua 5.4.5 rc1. Internal improvements and bug-fixing.
544VFP-C Jan 2022
Based on Lua 5.4.4. VFP. 64-bit arithmetic, no string/number coercions, dynamic linking.
86 Sept 2021
Based on Lua 5.4.3. VFP. 64-bit arithmetic, no string/number coercions, dynamic linking.
84 Dec 2020
Based on Lua 5.4.2. VFP. 64-bit arithmetic, no string/number coercions.
83 May 2020
Based on Lua 5.4.0. VFP. 64-bit arithmetic, no string/number coercions.
802 May 2020
Soft float version with no VFP, statically linked with UnixLib, for older machines.
801 April 2020
Based on Lua 5.4.0 (rc1). VFP, 64-bit arithmetic, no string/number coercions.
8.0 June 2019
Based on Lua 5.4.0 (alpha)
7.10 July 2018
Based on Lua 5.4.0 (work2)
6.00 October 2015
Compiled with GCC 4.7.2. Dynamic linking. Numbers can now be floats.
5.71 May 2015
Error throwback. (getmetatable "").__call = string.format
5.70 August 2013
Update operators added.
5.60 March 2013
The Lpeg library is updated to version 0.12 and the final version of Lua 5.2.2 is used.
5.50 November 2012
The doubles library is replaced by the arbitrary precision bc library, which uses no floating point instructions.
5.41 May 2012
Catch up version based on Lua 5.2.1
5.40 November 2011
Catch up version based on Lua 5.2. Blocks are now garbage-collectible. The riscos library has a table, block , of userdata indexed by addresses of allocated blocks.
5.30 July 2011
Catch up version based on Lua 5.2(beta). Backwards compatible with RiscLua 5.25, except that the escape sequence \* in strings has become \z.
5.25 November 2010
Catch-up version based on Lua 5.2(alpha). Backwards compatible with RiscLua 5.20 except for treatment of lexical environments and modules.
5.20 February 2010
Catch-up version based on Lua 5.2w2. Backwards compatible with RiscLua 5.00. Implements the features new to Lua 5.2 such as lexical environments.
5.00 December 2008
Revert to earlier simplicities - out with blocks - syntax for arrays, indirection and software interrupts now practically identical to Basic. Language now leaner but less safe.
4.14 June 2008
Can now subtract blocks to get offset. Added draw and weave libraries.
4.13 April 2008
Update Lpeg library to version 8.
4.12 March 2008
Update to Lua 5.1.3. Incorporate Lpeg library, version 7.
4.01 July 2007
Update to Lua 5.1.2.
4.00 December 2006
Update to Lua 5.1.1. Add doubles library.
3.41 April 2006
Update to Lua 5.1.
3.30 January 2006
Update to Lua 5.1(beta). Implement bitwise operations in the virtual machine.
3.20 October 2005
Update to Lua 5.1(alpha+). Use separate bit library for bitwise operations.
3.10 May 2005
Use mapm library for arbitrary size numbers.
3.00 August 2004
Major rewrite using block and swi libraries replacing riscos library. Improved error handling. Revert to implementing RiscLua as an application.
2.32 May 2003
Implement RiscLua as a relocatable module.
2.30 May 2003
Update to Lua 5.02.
2.20 December 2002
Update to Lua 5.0(beta).
2.10 November 2002
First 32-bit version.
2.00 October 2002
Update to Lua 5.0(alpha).
1.50 June 2002
Update to Lua 4.0.