Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: aeTIos on March 29, 2014, 05:06:47 am
-
So this might sound silly, because the nspire has native Lua support. Still, it's programming flow isn't optimal for programming games, mainly due to the lack of key repeat. So I'm asking if someone could port LuaZM to the nspire? (I think LuaZM is written in c, so that should be fairly easy)
TIA and kudos to anyone who pulls this off!
You will also get cherries.
-
You will also get cherries.
Can i have some without coding :P
Anyway that would be a good idea
now only if my nspire's touchpad hadnt gone haywire...
-
Something that would be cool is a way to integrate new libraries in the already existing Lua engine. Maybe with Ndless?
-
I'd also be OK with that. Thing is, I hate event based programming. It makes things complicated for me.
Inb4 adriweb walks in and starts praising event based programming :p
-
dammit now I have to reply.
You know, event-based programming, in Nspire-Lua, is great.
It is good for designing of software's and applications. It has four main advantages and/or uses: flexibility, suitability for graphical interfaces, ease of development, and simplicity of programming. Event driven programming is one among the few largely flexible programming language types. It allows the programmer to visually design the form to their needs and program the objects on the form with a huge range of events that can do different things when run.
I believe it's a very nice choice from TI to have put their API that way, because, for example, haveing a big while loop for the keypresses wouldn't be very good for big scripts, especially since we only have one big script file.
(because source has to be linked : http://www.ask.com/question/what-is-event-driven-programming-good-for )
anyway, for those wanting to port LuaZM, go ahead, it can only be fun
-
I don't see how a big bunch of keypress checks hurts a program? Most of the time you shouldn't have your keychecks in a while loop unless you consider the big loop to be it.
-
Since we already do have a functioning Lua supported by TI, I'm not sure this will happen. I'd also guess that files for one version of Lua wouldn't work with the other, and that could get a little confusing. Just observations.
-
So, go for the ndless lua extensions. The thing that's on top of my list is key repeat. I'd murder for that, really. (well, not really, but you get the point)
-
I don't see how a big bunch of keypress checks hurts a program? Most of the time you shouldn't have your keychecks in a while loop unless you consider the big loop to be it.
It kind of makes everything global, though.
-
Personally this wouldn't be that useful except for people who wants to code in Lua but wants the speed of C or close, since TI's Lua, in some cases, can still be pretty slow. However, it would make it easier to play PRIZM Lua programs since all you would have to do is load the LuaZM file on the calc. It would probably require some modifying, though, since the PRIZM resolution width is larger than the Nspire CX.
Also the Nspire version of Lua has the disadvantage of only allowing 1 keypress at a time.
-
Perhaps it would be possible to add in luaJIT to make blazing fast lua. http://luajit.org/index.html (http://luajit.org/index.html)