Author Topic: TI & Lua  (Read 10480 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
TI & Lua
« on: June 10, 2012, 07:04:47 am »
TI updated their scripting page a bit a couple of days ago:
http://education.ti.com/educationportal/sites/US/nonProductSingle/nspire-scripting.html

Some interesting statements:
Quote
For programmers and the programming community
The wider programming community gains a potential programming and gaming platform that can well suit their needs. We look forward to seeing programmers band together through existing online communities to share their work and learn from one another.

At least they recognize that there is/was a need. And because several members of the community have close contact with TI, stuff will only get better :)
Also, they clearly don't mind games ..

Quote
Getting started with Lua scripting for TI-Nspire technology
Try a series of tutorials that will take you from getting started to creating TI-Nspire documents with the Script Editor. Learn more

These tutorials use OcLua (made by ExtendeD)  ;D

Both things show that they slowly start appreciating the community again. This is because it benefits them too. (So if they would open up to native programming, it would benefit them a great deal). If TI continues with this trend I think we will see some great stuff happening :)


Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI & Lua
« Reply #1 on: June 10, 2012, 07:13:25 am »
This page should change again sometime soon ;-)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI & Lua
« Reply #2 on: June 10, 2012, 08:14:14 am »
Quote
If TI continues with this trend I think we will see some great stuff happening :)
Unlikely. Nobody should set any hopes on TI behaving as they did with the older series, and as they should have done for the Nspire series.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI & Lua
« Reply #3 on: June 10, 2012, 10:44:59 am »
Quote
If TI continues with this trend I think we will see some great stuff happening :)
Unlikely. Nobody should set any hopes on TI behaving as they did with the older series, and as they should have done for the Nspire series.
Well, beginning with Lua first, not talking about native for now.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: TI & Lua
« Reply #4 on: June 10, 2012, 10:49:17 am »
can't you somehow force TI to make it possible to read and write to files with lua? that would make the possiblities a lot bigger, since then extern levels etc could be added without having to update the game in total (just an example)

or with the physics engine it would be possible to make one general program that reads from files that contain a specific setup and runs them..

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI & Lua
« Reply #5 on: June 10, 2012, 10:52:25 am »
I and Adrien have talked to TI regarding the matter, showing where it could be useful. TI might improve external reading/writing in the future.
(also, you can already read external files)

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: TI & Lua
« Reply #6 on: June 10, 2012, 10:54:33 am »
read external files??? how? i didn't know that ö

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: TI & Lua
« Reply #7 on: June 10, 2012, 11:11:21 am »
you can load stuff inside MyLib with some math.eval() calls I think, or directly var.recall
Here's what Levak does, in a version of Make3D :

Code: [Select]
_, err = pcall(function() loadstring(var.recall("make3d_lib\\s__importer__"))() end)
if not err then
--- some more init code --
end
« Last Edit: June 10, 2012, 11:11:47 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI & Lua
« Reply #8 on: June 10, 2012, 11:26:56 am »
Yup, you can get data from Library documents using [lua]math.eval[/lua] or [lua]var.recall[/lua] :)
The only annoying thing is that you will need to know the name of the external library.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: TI & Lua
« Reply #9 on: June 10, 2012, 11:42:06 am »
By "reading from external files", I think that what he, and most of us, have in mind is not that kind of platform-specific, two-way-incompatible, watered-down file access ;)

"Reading from external files" means being able to rely on standard Lua functions from the "io" family, in order to read and write arbitrary data from the filesystem. Access to the filesystem is a basic capability provided by dozens of thousands sane programming environments; sadly, five years after its introduction on the market, the Nspire still is not one of them (when it's restricted to what TI feels like providing to users, that is).
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: TI & Lua
« Reply #10 on: June 10, 2012, 11:43:44 am »
I know it is restricted. And that is why we asked TI to improve it :)
They understood that the functionality could have good use. However I do not know if/when/how it will be done.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: TI & Lua
« Reply #11 on: June 10, 2012, 11:47:35 am »
thanks lionel for explaining them xp

and thanks jim & adriweb &whoever else for asking, i hope they include it in the next versions..

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: TI & Lua
« Reply #12 on: June 13, 2012, 07:59:33 am »
I know it is restricted. And that is why we asked TI to improve it :)
They understood that the functionality could have good use. However I do not know if/when/how it will be done.
I hope they stop restricting and make the systems more open, maybe even support ASM/C. If they do that, I am really going to send them a "thanks" mail xD
I'm not a nerd but I pretend:

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: TI & Lua
« Reply #13 on: June 16, 2012, 05:34:02 pm »
It took TI 4 years to give into supporting assembly since the time a hack was discovered. 2014.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI & Lua
« Reply #14 on: June 16, 2012, 07:27:27 pm »
I made a news about this. Still not as great as stopping blocking Ndless, but still good nonetheless. Hopefully they spend less energy into blocking Ndless and more into fixing bugs before release and improving Lua speed and commands. Still hoping, for example, that Lua eventually adds direct input controls, so movement can occur every frame rather than every 6 frame or so and allow multiple keypresses. More speed would be nice too for 3D stuff and tilemapping.