Omnimaga

Calculator Community => TI Calculators => Topic started by: sillibird on June 11, 2014, 07:04:44 pm

Title: Where to start with programming.
Post by: sillibird on June 11, 2014, 07:04:44 pm
I am interested in programming for the Nspire (ndless.) I know you must either use C or C++, luckily, I know neither. Which one is better/easier to start with and is there any good books/references to learn that language for Nspire?

...Or should I go with lua? I don't know how you run lua files on the Nspire... But I know a hair of Lua...
Title: Re: Where to start with programming.
Post by: LDStudios on June 11, 2014, 07:23:40 pm
Personally I would recommend lua for a beginner programmer, as it is probably easier to learn. In addition, you can program lua directly on your calculator, which will allow you to practice and learn from school and at home. (See JSE http://www.omnimaga.org/ti-nspire-projects/jens%27-script-editor-an-on-calc-lua-editor/?topicseen (http://www.omnimaga.org/ti-nspire-projects/jens%27-script-editor-an-on-calc-lua-editor/?topicseen))

Running lua files on the nspire is incredible simple. Just load the .tns document to your calculator open it, and voila! To access the script editor on the student software, click insert>script editor>insert script.

Here are a couple of great places to go if you want to start learning lua:
- http://www.compasstech.com.au/TNS_Authoring/Scripting/index.html (http://www.compasstech.com.au/TNS_Authoring/Scripting/index.html)
- http://inspired-lua.org (http://inspired-lua.org)
If you have any questions, ask me or some of the more experienced lua programmers in the community.

If you would rather start with C (Ndless), I don't have a lot of advice or experience, but you can start with this introductory tutorial:
- http://ndlessly.wordpress.com/native-development-intro/ (http://ndlessly.wordpress.com/native-development-intro/)

Good luck, and I hope to see some great projects from you!
Title: Re: Where to start with programming.
Post by: sillibird on June 11, 2014, 07:29:16 pm
Thanks, I'll try lua.
Title: Re: Where to start with programming.
Post by: sillibird on June 11, 2014, 07:52:12 pm
One last thing- whats with the weirdness of Jens Script Editor? When typing some letters appear spaced out /too close
Title: Re: Where to start with programming.
Post by: DJ Omnimaga on June 11, 2014, 09:53:41 pm
Lua will also ensure that your programs still run on as many OSes as possible, should Ndless, required to run  C/ASM stuff, never come out for OS 3.9 and higher. I heard that Lua is easier to code than C when it comes to calc stuff, but it's slower (although it got much faster in OS 3.2 and higher)

Welcome to the forums by the way! :)
Title: Re: Where to start with programming.
Post by: The_King on June 11, 2014, 09:58:22 pm
One last thing- whats with the weirdness of Jens Script Editor? When typing some letters appear spaced out /too close

well the program is actually writen in lua and the jens, who made it wasnt too experienced himself when he made it. But he is working on a new release, so hopefully he might fix it in the version.

Btw WELCOME TO OMNIMAGA
Title: Re: Where to start with programming.
Post by: sillibird on June 11, 2014, 10:18:20 pm
Thanks :)

Just to note: I'm new to the NSpire which is easy to tell. I got it yesterday :p. Anyways, I recently came from a Ti-84 which was really good up until it broke. I loved the native programming on that... I knew it inside and out... The only downside was that if you screwed up you where screwed.


So... Since I've seen languages ported to the NSpire... My question is... Could/ can someone port the Ti-Basic of the 84 to the NSPire? I honestly find the native nspire programming too difficult :p
Title: Re: Where to start with programming.
Post by: DJ Omnimaga on June 11, 2014, 11:29:17 pm
Are you sure the 84+ is really broken, though? Normally ASM programs cannot break the calc unless you leave the screen in test mode or if you mess with the Flash then delete the certificate or something.
Title: Re: Where to start with programming.
Post by: sillibird on June 11, 2014, 11:37:29 pm
The calculator died of old use. It doesn't turn on anymore even with new batteries.
Title: Re: Where to start with programming.
Post by: Hayleia on June 12, 2014, 01:58:04 am
Lua will also ensure that your programs still run on as many OSes as possible, should Ndless, required to run  C/ASM stuff, never come out for OS 3.9 and higher.
Not even so true. Since their Lua is always changed from a version to another (made faster on certain points and slower on others), you can not even be sure that your Lua program will run the same on newer OSes. Of course, you can at least be sure they will run.

I recently came from a Ti-84
...
Could/ can someone port the Ti-Basic of the 84 to the NSPire?
I guess people know what I am going to write... :P
The TI-84 doesn't exist. There is always something after the "84", either a "Plus" or a "Pocket", sometimes both, sometimes followed with "SE" or ".fr" and now even "CSE".
It used not to matter since they were all compatible (if we forget about boot code 1.03) but now the CSE broke that rule so you have to give the full name each time. Or at least give the name of a compatible calc so we know if it is monochrome or not (like you can say "84+SE" instead of "84+PocketSE" if you think that the latter is too long to write, no one cares, not even me :P ).

And this will be the same for Nspire. Do you imagine yourself asking for help and saying "I have a TI" ? How can people help ? :P
Then you could say "a TI Nspire", but if your question is about derivation, ok but CAS or not ?
Same, if you ask for gpSP, you have to tell us if it is a CX or not.
So of course, maybe you don't know at first that you have to give the hardware revision for some questions, but at least always give the full name ;)
Title: Re: Where to start with programming.
Post by: Streetwalrus on June 12, 2014, 06:38:26 am
Lol Hayleia. XD

One last thing- whats with the weirdness of Jens Script Editor? When typing some letters appear spaced out /too close
That's called a fixed width font. You know it's awesome. :P
Title: Re: Where to start with programming.
Post by: aeTIos on June 12, 2014, 06:39:59 am
Lol Hayleia. XD

One last thing- whats with the weirdness of Jens Script Editor? When typing some letters appear spaced out /too close
That's called a fixed width font. You know it's awesome. :P
You mean "you'll learn to appreciate it really fast because it makes your tables so much more readable"
Title: Re: Where to start with programming.
Post by: Streetwalrus on June 12, 2014, 06:41:21 am
Honestly, if I could I'd use fixed width fonts everywhere. Let's force DejaVu sans mono in Firefox.
Title: Re: Where to start with programming.
Post by: Eiyeron on June 12, 2014, 06:42:12 am
Or indenting uniform.  Fixed width is best for coding.
Title: Re: Where to start with programming.
Post by: aeTIos on June 12, 2014, 06:42:27 am
That sounds good. Let's not derail this thread though (I don't even know what the OP reads ._. )
Title: Re: Where to start with programming.
Post by: sillibird on June 12, 2014, 07:50:16 am
Ti-84 Plus, :)
Title: Re: Where to start with programming.
Post by: aeTIos on June 14, 2014, 02:16:31 am
I would recommend starting with Lua programming if you want to program the Nspire.
Title: Re: Where to start with programming.
Post by: Streetwalrus on June 14, 2014, 12:07:05 pm
/me mumbles something about event based programming sucks
Title: Re: Where to start with programming.
Post by: Sorunome on June 14, 2014, 12:08:54 pm
/me mumbles something about event based programming sucks
I have to dis-agree, JS is one of my fav languages and it is event-driven :P
Title: Re: Where to start with programming.
Post by: sillibird on June 14, 2014, 05:41:46 pm
So... anyways... Is it possible to port the 84Plus BASIC to the Nspire?
Title: Re: Where to start with programming.
Post by: willrandship on June 14, 2014, 05:42:39 pm
Yes, but no one really wants to do so. Lua is better.
Title: Re: Where to start with programming.
Post by: aeTIos on June 14, 2014, 05:43:43 pm
Lua is basically TI-Basic on steroids. Including no key repeat. >.<