Author Topic: Can you code in Lua?  (Read 26741 times)

0 Members and 1 Guest are viewing this topic.

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: Can you code in Lua?
« Reply #15 on: April 14, 2011, 06:25:50 pm »
I don't know Lua, but maybe I'll check it out eventually.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Can you code in Lua?
« Reply #16 on: April 14, 2011, 06:33:04 pm »
I know what Lua is, but not the language itself. Definitely gonna learn it, if only to test on nspire_emu :D

I learnt Lua a few months ago, but haven't coded a lot of programs, it was more just learning.

Lucky for you, eh? ;D

I know Lua extremely well :)  It's actually a very powerful language for an interpreter, and I like it much more than python, because of stright out OOP, it has a much simpler table system -- it can be a pain for some applications, but for others it saves some programming time, and helps you think of the object easier :)

I don't wanna discuss this, but Python's OOP is better than Lua's.

First of all, Lua is not an OOP language, so you can't really do that comparison there. Otherwise you'd be saying something like "Axe's sprite commands are better than BASIC's." Yeah, because BASIC doesn't have sprite commands ;)

Nobody has thought about the fact that the entire TI OS could be coded in Lua ?
Look:
 - TI was really fast to implement this Lua interpreter (since 05/2010)
 - Same Way of programming, Lua's objects and "toto.a, toto.b, toto.c etc .." variables, math.eval("DelVar "..varname) and expr("DelVar "&varname)
 - Same way of TNS structure, in the XML files, we've got "<gg:VAR></gg:VAR>" token for the widget variables, in the Lua's interpreted method we've got the "gc:" object

Thus, only one question : Can Lua be compiled ? or just directly interpreded by the ARM core ?


Wow, that's an interesting thought. If TI already has a Lua compiler, they could just release that and we wouldn't need to worry about this hacking just to get some ASM working on an Nspire.




Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Can you code in Lua?
« Reply #17 on: April 14, 2011, 07:05:30 pm »
I think ASM needs to be brought to the Nspire either way, because if nothing else TI will undoubtedly have screwed up their Lua interpreter and someone in the community will need to fix it. Plus, just try writing nDoom in an interpreted language :P
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Can you code in Lua?
« Reply #18 on: April 14, 2011, 07:06:40 pm »
Oh, true x.x

But if Lua can be compiled as Levak suggested, it might not be too bad.




Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Can you code in Lua?
« Reply #19 on: April 14, 2011, 07:36:57 pm »
It's bytecode compiling, like java, and .pyc python files, so it's not really like asm.

Offline Sebasu

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +0/-0
    • View Profile
Re: Can you code in Lua?
« Reply #20 on: April 15, 2011, 12:21:13 am »
i asked some months ago to the technical support of TI about the posibility of an SDK for the Nspire, they answer me that the SDK was possible in models like ti-89 titanium because this calculators was using flashROM, but the nspire don´t use this, the lua posibility to programing will be usefull, but ASM programing couldn't be posible

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Can you code in Lua?
« Reply #21 on: April 15, 2011, 12:26:00 am »
Um, the Nspire uses Flash ROM too. Also, ASM is already possible on the regular Nspire, so it should be possible on the CX as well.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Can you code in Lua?
« Reply #22 on: April 15, 2011, 07:15:14 am »
i asked some months ago to the technical support of TI about the posibility of an SDK for the Nspire, they answer me that the SDK was possible in models like ti-89 titanium because this calculators was using flashROM, but the nspire don´t use this, the lua posibility to programing will be usefull, but ASM programing couldn't be posible

Um, the Nspire uses Flash ROM too. Also, ASM is already possible on the regular Nspire, so it should be possible on the CX as well.

I'm pretty sure they lied, the NSpire uses Flash ROM.

In the meanwhile, no SDK available here.

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: Can you code in Lua?
« Reply #23 on: April 16, 2011, 12:47:22 am »
They told to some other people they did not have any plan to open the Nspire to 3rd party development. However you must not believe everything they say via TI-CARES, because sometimes the person who answers will guess the answer. X.x

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Can you code in Lua?
« Reply #24 on: April 16, 2011, 08:22:42 am »
i asked some months ago to the technical support of TI about the posibility of an SDK for the Nspire, they answer me that the SDK was possible in models like ti-89 titanium because this calculators was using flashROM, but the nspire don´t use this, the lua posibility to programing will be usefull, but ASM programing couldn't be posible
Wtf... TI lies so much. The Nspire clearly has Flash ROM! And Flash ROM has nothing to do with programmability anyway...

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Can you code in Lua?
« Reply #25 on: April 16, 2011, 08:35:06 am »
Sorry too busy atm in life to learn a new language.
« Last Edit: April 16, 2011, 08:35:18 am by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Can you code in Lua?
« Reply #26 on: April 16, 2011, 02:20:11 pm »
i asked some months ago to the technical support of TI about the posibility of an SDK for the Nspire, they answer me that the SDK was possible in models like ti-89 titanium because this calculators was using flashROM, but the nspire don´t use this, the lua posibility to programing will be usefull, but ASM programing couldn't be posible
Wtf... TI lies so much. The Nspire clearly has Flash ROM!
NAND Flash isn't generally called "ROM", because it can't be mapped into memory where you can execute code from it directly. It's more like a hard disk, in that you have to read the contents into RAM. (Not that that in any way prevents an SDK from being possible, of course)
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Can you code in Lua?
« Reply #27 on: April 17, 2011, 05:34:15 am »
Is anyone planning on making a NSpire Lua IDE soon? I'd like to help if anyone is interested in starting such project.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Can you code in Lua?
« Reply #28 on: April 17, 2011, 07:28:42 am »
What would such an IDE do? There are already plenty of IDE compatible with Lua, that can integrate the TI-Nspire conversion tools.
Ndless.me with the finest TI-Nspire programs

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Can you code in Lua?
« Reply #29 on: April 17, 2011, 07:35:02 am »
What would such an IDE do? There are already plenty of IDE compatible with Lua, that can integrate the TI-Nspire conversion tools.

Yeah I meant a text editor with syntax highlighting with .tns>Lua althogether. But you're probably right, it's not that important.