Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: XVicarious on April 14, 2011, 09:36:49 pm
-
Lua2TI
http://www.omnimaga.org/index.php?action=downloads;sa=view;down=651
Lua2TI is a program to convert your Lua source files into TNS documents for use on the Nspire (v3.0).
You need to have .Net Framework 4.0 to use this program!
Directions:
1. Open program and browse for your *.lua source code.
2. Press "Convert to TNS!"
3. The output *.tns file should be called Document.tns, now load up the tns onto your calculator or Nspire Student Software and enjoy!
Please do not redistribute this, the only two places (for now) I want this is here at Omnimaga or on my website at http://www.kilmarentertainment.webege.com
For sources: http://www.kilmarentertainment.webege.com/apps/downloads/Lua2TI.tar.gz
-
Yes finally a Windows one!
Does this work with special chars?
-
Nice. I think I'll move this auto-post in the Lua section. Also I'm happy this one has a GUI. I kinda prefer that to having to go through command prompt. XD
This is definitively a must upload on Ticalc.org and TI-BANK too.
-
by special you mean: " < > '? Or others? If others specify and ill updated it,
-
Don't forget &
-
okay... Updating now...
-
Lua2TI
http://www.omnimaga.org/index.php?action=downloads;sa=view;down=651
Lua2TI is a program to convert your Lua source files into TNS documents for use on the Nspire (v3.0).
Directions:
1. Open program and browse for your *.lua source code.
2. Press "Convert to TNS!"
3. The output *.tns file should be called Document.tns, now load up the tns onto your calculator or Nspire Student Software and enjoy!
Please do not redistribute this, the only two places (for now) I want this is here at Omnimaga or on my website at http://www.kilmarentertainment.webege.com
Updated with "&" as first character to replace due to special formatting for the XML
-
Wow....This fast?! O.O
-
Lua2TI Linux
http://www.omnimaga.org/index.php?action=downloads;sa=view;down=652
Convert your Lua sources to TNS files on Linux!
Requires the Mono Framework (v3.5)
1. Open file in Lua2TI
2. Press "Convert to TNS!"
3. Use the file (should be in the directory that the program is in!)
-
On *nix, you may want to delegate the processing to the bash or Python script, and make only the GUI front-end (for selecting input and output file names) in Mono :)
Likewise on Windows if someone made a PowerShell script.
That's how TILP, GFM and KTIGCC ought to work, in fact.
-
Can anyone share the algorithm for this? I'd like it :D
-
They have a python version of it. That one if you look at the code shows pretty much everything about it
-
The shell script version shows it as well:
* add an XML header and an XML footer to the Lua code;
* ZIP the result;
* put the ZIP at the end of an empty TNS document (which is made of 368 bytes worth of data compressed with an unknown format)
-
@Debroux: I just compiled my C# source for Linux, it was much easier than reinventing the wheel :P
-
Link to sources added in first post, that is for both Windows and Linux... And Mac too I suppose. Remember, you will need "7za" for the compression!
For Windows: http://downloads.sourceforge.net/sevenzip/7za920.zip
For Linux: http://sourceforge.net/projects/p7zip/files/p7zip/9.20.1/p7zip_9.20.1_x86_linux_bin.tar.bz2/download
For Mac: http://mac.softpedia.com/get/Compression-Tools/p7zip.shtml
-
Sorry if this is the wrong place but...
where can you get all of the libraries for Lua development?
-
I don't know really... They are built into the parser, its an interpreted language much like BASIC, the funtions that we know work are located here : https://docs.google.com/document/d/1qsExH5xZKx73mShdI8B8eA1ZCcmmZZnJ9TzrLwvKKFM/edit?hl=fr&authkey=CIGfyZQN#
-
Cool! Hopefully if someone wants to add more features later he can continue it. :D
-
:D Right now I'm working on making a TNS (that was created with Lua2TI or the likes) to a Lua source file.
-
:D Right now I'm working on making a TNS (that was created with Lua2TI or the likes) to a Lua source file.
Sounds good! This might really come in handy, as I can't seem to be able to extract the code from the Periodic Table (although others, like 15 Puzzle, will work). :(
-
I believe Goplat said something about the compression being different than normal about it being a few bytes off.
-
As posted elsewhere, TI's file for periodic table is entirely compressed with the unspecified 0D compression method, instead of the standard 08 DEFLATE method.
However, files created by the various Lua to TNS incarnations have a part compressed with the 0D compression method, which we're putting at the beginning of the file, and a part (made of three sub-parts) compressed with the standard 08 method. Any well-behaved program or library with ZIP opening capability can perform the TNS to Lua conversion :)
-
Lua2TI has been uploaded to TI-Bank. I'm working on getting a Mac version up
-
Go ahead, but FYI, AdRiWeB has already made a native Mac executable, which has the significant advantage (from a user's POV) of not requiring the dependency on the non-native Mono stuff ;)
-
I actually think that my new linux executable might not need mono, it has it everything it needs packaged up
-
Sounds nice Jkag. By the way if http://ourl.ca/10458.new#new ever got finished, do you think in the future conversion between OS 1.x/2.0 Ndless Lua files and 3.0 Lua TNS files would be possible? It would be nice to run Lua games on older OSes, but of course Lua for Ndless would have to be finished by someone else, first.
-
It may be very possible, I'd have to see format difference, all that the Lua to TNS converters to is make the source into XML, so if that is about what has to be done, it would be very possible. I'd really have to see the format though
-
I used the windows version of this to convert this code to .tns and I am getting an error when opening it on my Nspire
Code:c = “”
function on.charIn(ch)
c = ch
platform.window:invalidate()
end
function on.paint(gc)
gc:setFont(“sansserif”, “r”, 10)
gc:drawString(c, 0, 0, “top”)
end
Error:unexpected symbol near 'char(239)'
Is it just bad code or what
-
I really don't know lol. I don't know Lua very well, but did you check the syntax (I think there is a syntax checker built into Lua) before you converted it?
And TNS -> Lua is amost done. Some reason I'm having trouble with changing the "&" (etc) back to their normal counterparts.
-
I'm having some trouble with this for Windows... everytime i load the document.tns onto the calc, it just gives me a message about the file format not being supported.
Any thoughts?
-
That's natural, if you have OS 3.0.2: it doesn't support files generated by third parties.
Either open the file with OS 3.0.1 and save it, or use TI Nspire Computer Software and the converter program leaked involuntarily by a third party, then officially released by TI.
-
But I have 3.0.1
-
Wait, do you need to have 7-zip installed for it to work?
-
Maybe one of the third-party converters does, I don't remember.