Author Topic: new in 3.6  (Read 8053 times)

0 Members and 1 Guest are viewing this topic.

Offline The_King

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 247
  • Rating: +6/-2
  • Ⓣⓗⓔ Ⓖⓐⓜⓔ ⓍⒹ
    • View Profile
new in 3.6
« on: November 20, 2013, 08:34:22 pm »
i just started this to know about new features of lua in os 3.6

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: new in 3.6
« Reply #1 on: November 21, 2013, 01:42:19 am »
We don't know for sure, otherwise we'd already have posted weeks ago ;)
Lua is no substitute for native code anyway.
« Last Edit: November 21, 2013, 02:11:44 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

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: new in 3.6
« Reply #2 on: November 21, 2013, 01:46:19 am »
Yeah I am curious about what OS 3.6 really adds in terms of Lua. Of course, I am pretty sure that speed won't be improved, though. >.<

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: new in 3.6
« Reply #3 on: November 21, 2013, 02:07:02 am »
Well, in fact, you can see already a few changes if you create a script with the new platform.apilevel (2.3) and dump _G (Lua's environment variable where "everything is").

For example, resources handlers etc.
These changes will be reflected by new features within the SDK (script editor in the computer software), though, so we'll have to wait for its release to actually see what's new...

Changes will be put on http://wiki.inspired-lua.org/Changes_in_OS_3.6 , by the way.

Of course, I am pretty sure that speed won't be improved, though. >.<
Images, in fact, are supposed to have been greatly improved (completely new system). I don't know about the rest. What's slow in Nspire-Lua is some graphing parts, not much else in fact.
« Last Edit: June 25, 2014, 05:24:41 pm by Adriweb »
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: new in 3.6
« Reply #4 on: November 21, 2013, 02:19:16 am »
Really? That's good then, but will it still be possible to set the program version to OS 3.1 or something?

Also, I wonder if image size will be greatly reduced?



Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: new in 3.6
« Reply #5 on: November 21, 2013, 02:36:22 am »
Really? That's good then, but will it still be possible to set the program version to OS 3.1 or something?
Yep, that's still going to be possible. (and in fact, cross-version handling is now a fully-exposed feature within the SDK)

Also, I wonder if image size will be greatly reduced?
I haven't tried yet, but that's highly possible though, with the new thing :) (Could it be worse anyway ? :P)

We'll see :P
« Last Edit: November 21, 2013, 02:42:29 am by adriweb »
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: new in 3.6
« Reply #6 on: November 21, 2013, 03:03:39 am »
It can't be worse than HP Prime image data for sure... (one pixel is made of four hex characters and programs use UTF-16. Add to that the fact that the string of hexadecimal characters is broken into 64-bit chunks separated by commas, and this pretty much gives you an idea of how massive just a 16x16 sprite can be)

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: new in 3.6
« Reply #7 on: November 21, 2013, 03:57:13 am »
That gives a nice convenience tradeoff, though. The only reasonable change I can think of for that without making some kind of converter would be to switch to UTF-8 or plain ASCII.

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: new in 3.6
« Reply #8 on: November 21, 2013, 04:05:45 am »
I think the UTF-16 was so that we can use as many special chars as possible in our HP PPL programs, ranging from Chinese chars to even shapes and small images (smileys, spades, etc), so many that you could basically design a game off those chars and people would think you used sprites. However, literally every bit of code grows to ridiculous file sizes as a result (such as my 4 KB Tunnel game)

I wonder how are TI-Nspire Lua images compressed?
« Last Edit: November 21, 2013, 04:06:07 am by DJ Omnimaga »

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: new in 3.6
« Reply #9 on: November 21, 2013, 04:26:17 am »
UTF-8 has the full range of characters that UTF-16 provides. Special characters are larger, but normal Latin characters are only 1 byte each. UTF-16 is almost always 2 bytes per character, with only the most obscure character sets taking more. UTF-32 is ALWAYS 4 bytes.

All 3 have the same base character range, 4 bytes worth of individual characters. However, the worst case sizes are:

UTF-8: 4 or 6, depending on the standard used. (6 if using the pre-2003 standard, but 4 reduces the theoretical size)
UTF-16: 4 bytes, but the implementation makes this 4 have more chars available
UTF-32: 4 bytes (exact)

The best case, on the other hand, is much more telling:

UTF-8: 1 byte
UTF-16: 2 bytes
UTF-32: 4 bytes

Keep in mind, the unicode character set is far from full. The set is laid out sparsely, with several large gaps. The slight lackings in UTF-8 fall in these areas, giving it full access to all characters.

UTF-8 is used when dealing with memory constraints, and also when using common sense. It's also the newest standard. The primary disadvantages lie in problems with measuring length.
UTF-16 is the "old" way, having been around the longest of any Unicode standard, in many forms.
UTF-32 is nice for slow 32 bit systems, since it is straightforward to interpret. However, usually memory constraints outweigh this.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: new in 3.6
« Reply #10 on: November 21, 2013, 06:27:33 am »
I wonder how are TI-Nspire Lua images compressed?
As of right now (before 3.6, then) : it's not much compressed, in fact : http://wiki.inspired-lua.org/TI.Image
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

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: new in 3.6
« Reply #11 on: November 21, 2013, 06:29:17 am »
That's still better than the HP Prime format DJ was talking about, though. Pixels as raw bitmaps aren't that bad, especially in a sprite-based engine.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: new in 3.6
« Reply #12 on: November 21, 2013, 06:41:19 am »
The actual issue comes from the fact that the really long strings are directly put in the lua source file, and the editor becomes slow if there are several....
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation