Omnimaga

Omnimaga => News => Topic started by: DJ Omnimaga on August 21, 2012, 02:02:36 pm

Title: Lua on the PRIZM soon?
Post by: DJ Omnimaga on August 21, 2012, 02:02:36 pm
After arriving on the ClassPad years ago, then as LuaFX on the Casio AFX and years later the FX-9860G calculator models, it seems that Lua is finally making its ways to the FX-cg10 and cg20 models as well: A few days ago, KermMartian has started working on LuaZM, his own implementation of Lua for the PRIZM! Hopefully this should attract new PRIZM programmers, noticing the high success that TI's version of Lua saw on the TI-Nspire in the past year that spawned dozens of releases.

The Casio Prizm is a powerful calculator, great for both math (http://www.cemetech.net/programs/index.php?mode=file&id=727) and playing games (http://prizm.cemetech.net/index.php?title=Prizm_User_Portal). It is particularly great for programming, and for months thoroughly bested the TI-Nspire calculator (http://www.cemetech.net/news.php?id=443) in offering ASM, BASIC, and C programming. In an attempt to reduce criticism of their apparently anti-student stance, Texas Instruments improved the TI-Nspire to run Lua (http://www.lua.org/) programs. Lua is a "fast, lightweight, embeddable scripting language," an interpreted procedural language. The language has allowed budding Nspire programmers to quickly write games and programs without needing to use a computer.

I am happy to announce that I am now bringing Lua to the Casio Prizm graphing calculator, in the form of a full-featured Lua interpreter. After days of porting, rewriting parts of libc (including the longjmp/setjmp system), and learning some SH4 assembly, I am proud to present the first screenshot of the interpreter successfully running on a Prizm. Special kudos to Juju for the PrizmIO (http://www.cemetech.net/forum/viewtopic.php?t=8020) library, a port of an Nspire I/O library for C programmers. As you can see from the screenshots, this is just the raw interpreter; although it understands Lua syntax and can parse/lex the language, load libraries, and recognize incorrect code, it is almost entirely lacking in functioning libraries. From here, I will be porting over each of the standard libraries, starting with numbers, strings, and I/O. Please feel free to share thoughts and suggestions here or in the original Cemetech thread (http://www.cemetech.net/forum/viewtopic.php?t=8093). Bonus features: Planned transparent support for Nspire and Lua FX programs.

(http://www.cemetech.net/img/projects/luazm/firstsuccess.jpg)

Nonetheless, this looks promising and this will give much more options to PRIZM programmers, some of which may find C and ASM too hard, but BASIC too slow or limited. Maybe this will also make it easier for TI-Nspire programmers to port their programs to the other platform or vice-versa too.

As said in the quote above, feel free to discuss the project here (http://ourl.ca/16824) or in the main Cemetech thread (http://www.cemetech.net/forum/viewtopic.php?t=8093).
Title: Re: Lua on the PRIZM soon?
Post by: Stefan Bauwens on August 22, 2012, 04:25:30 am
Hmm, interesting. I wonder how much slower, if it is, it will be than on the Nspire. ;)
Title: Re: Lua on the PRIZM soon?
Post by: apcalc on August 22, 2012, 07:30:45 pm
Good news! :)