RiscLua 6.0
David Gee (1833) 268 posts |
I had the idea of using the SWI facility in RiscLua to get round this problem, but ran into a problem. If include the line riscos = require "riscos" whether or not preceded by
Any suggestions? (I tried the “original” lua6 as well as my “modified” version, but it made no difference: ARM v3 version, VRPC, RO 4.39). |
GavinWraith (26) 1563 posts |
I have tracked this error message to luaL_checkversion_ in lauxlib.c. The first number is evidently nonsense, and I suspect points to some corrupted data. I am not quite sure what you are doing. Were you going to write a Lua program which used riscos.sys on OS_ReadLine? Seems a reasonable thing to try. |
David Gee (1833) 268 posts |
Yes, I do. |
GavinWraith (26) 1563 posts |
Does it work with Then try a program Does this output 1234?
|
David Gee (1833) 268 posts |
The final example does indeed output 1234. Hope this helps. Incidentally, the same happens if I use RPCEmu/RO 5.22, with (of course) the same version of Risc Lua (i.e. ARM v3). |
GavinWraith (26) 1563 posts |
Thanks. It looks as if So, my apologies if you brave guinea pigs are being led a dance. It is all something of an experiment, and your feedback is really needed. It may well turn out that the more practical way to go for RiscLua will be to revert to the Norcroft C compiler and AIF rather than GCC and ELF. Too early to yet to come to conclusions. |
GavinWraith (26) 1563 posts |
David, download again. I think I know what was wrong. The v3 directory contained the ARMv3 versions of lua6 and luac6 but I had omitted the ARMv3 versions of the libraries in !rlua6.solib. That has been set right in the zip file I have just put on my website. You were getting that error because the dlopen function spotted that you were trying to link an ARMv3 core with ARMv7 modules. Anyway, try again and let me know if you have better luck. |
David Gee (1833) 268 posts |
I’ll try the ARM v3 version as soon as I can. However, I’ve just checked out the “ARM v7” version on my Pi 1 (ARM v6 processor) and it doesn’t have any problems. Moreover on that setup with RO 5.21 I can make the change to StrongEd’s TaskWindow modefile as suggested without any problems. |
David Gee (1833) 268 posts |
I’ve tried out the ARM v3 version and it’s now fine. |
GavinWraith (26) 1563 posts |
Phew! Thanks for that news. When bugs are encountered I suffer existential angst. I can no longer have faith in the good ordering of the universe until the cause is brought to light. |
GavinWraith (26) 1563 posts |
I have put up a short new tutorial at http://www.wra1th.plus.com/lua/wimp.html on first steps in wimp programming using RiscLua’s wimp libraries. It has two small examples. The first puts an icon on the iconbar and gives it a menu. The second, with an extra eight lines, makes the iconbar icon draggable and reports where it gets dragged to. You may find the notion of drag object an interesting abstraction. I would quite like to see the sources for the Toolbox – I presume they are in C – to see if there is any correspondence between the implementations of draggable objects. |
Fred Graute (114) 645 posts |
That looks interesting, thanks. Minor typo in the URL, it starts with ‘https’ instead of ‘http’. |
GavinWraith (26) 1563 posts |
That is weird. It shows ‘http’ in the editing window. Is this a feature of Textile? No ‘https’ came from me. Yes, I think this is a server bug. |
GavinWraith (26) 1563 posts |
I discovered a small bug in the drag library; now cured in RiscLua 6.02 . It only showed up after quite a few dragging actions, confusing the window manager’s message book-keeping. The drag library now only contains the one function: object. The drag.init entry is no more. There is another example, !draggit in the Examples directory. If you drag a (source) directory onto its iconbar icon, and then drag the icon that pops up as a result to another (target) directory window, the resulting actions depend on the code in a text file called draggit in the source directory. Its an example to show that sometimes configuration data has to be in the form of a function rather than strings or numbers. |