Author Topic: LuaZM-like interpreter for nspire?  (Read 6338 times)

0 Members and 1 Guest are viewing this topic.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
LuaZM-like interpreter for nspire?
« 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.
I'm not a nerd but I pretend:

Offline The_King

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 247
  • Rating: +6/-2
  • Ⓣⓗⓔ Ⓖⓐⓜⓔ ⓍⒹ
    • View Profile
Re: LuaZM-like interpreter for nspire?
« Reply #1 on: March 29, 2014, 09:39:20 pm »

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...

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: LuaZM-like interpreter for nspire?
« Reply #2 on: March 30, 2014, 12:06:35 am »
Something that would be cool is a way to integrate new libraries in the already existing Lua engine. Maybe with Ndless?

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: LuaZM-like interpreter for nspire?
« Reply #3 on: March 31, 2014, 04:08:53 pm »
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
I'm not a nerd but I pretend:

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: LuaZM-like interpreter for nspire?
« Reply #4 on: March 31, 2014, 04:24:57 pm »
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

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: LuaZM-like interpreter for nspire?
« Reply #5 on: March 31, 2014, 04:40:28 pm »
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.
« Last Edit: March 31, 2014, 04:42:21 pm by aeTIos »
I'm not a nerd but I pretend:

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: LuaZM-like interpreter for nspire?
« Reply #6 on: March 31, 2014, 04:55:55 pm »
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.
« Last Edit: March 31, 2014, 05:07:03 pm by Art_of_camelot »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: LuaZM-like interpreter for nspire?
« Reply #7 on: March 31, 2014, 05:03:52 pm »
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'm not a nerd but I pretend:

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: LuaZM-like interpreter for nspire?
« Reply #8 on: March 31, 2014, 05:40:58 pm »
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.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: LuaZM-like interpreter for nspire?
« Reply #9 on: April 03, 2014, 02:54:59 pm »
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.
« Last Edit: April 03, 2014, 02:58:26 pm by DJ Omnimaga »

Offline Aspiring

  • LV3 Member (Next: 100)
  • ***
  • Posts: 81
  • Rating: +5/-0
  • The only source of knowledge is experience-Einsten
    • View Profile
Re: LuaZM-like interpreter for nspire?
« Reply #10 on: April 03, 2014, 04:52:35 pm »
Perhaps it would be possible to add in luaJIT to make blazing fast lua. http://luajit.org/index.html