Omnimaga

Omnimaga => News => Topic started by: critor on March 24, 2012, 06:37:31 am

Title: Lua print restored in OS 3.1
Post by: critor on March 24, 2012, 06:37:31 am
Cross-posting from TI-Planet.

When Nspire OS 3.1.0.392 was released in september, we discovered that the  standard Lua print() function had been removed (http://tiplanet.org/forum/viewtopic.php?f=43&t=8164).

This function made it possible to output data to the RS232 port of the Nspire, thereby enabling control of external peripherals (http://tiplanet.org/forum/viewtopic.php?t=7883), sound output (http://www.tiplanet.org/forum/viewtopic.php?t=7907), or whatever you see fit. It was already used in the wild when TI removed it...

(http://i43.servimg.com/u/f43/13/23/13/53/luaser10.jpg)

(http://i43.servimg.com/u/f43/13/23/13/53/nspire10.png)


This mis-feature of TI-Nspire OS 3.1.0.392 can now be fixed, thanks to fixprint (http://tiplanet.org/forum/archives_voir.php?id=4227). Fixprint hot-patches the OS in RAM to restore the funtionnality which was removed by TI, and can be launched automatically on boot by Ndless 3.1 :)


This program is yet another compelling showcase of the endless possibilities offered by native code - including hotfixes to TI's OS (fixprint can be considered as such).
Sadly, TI is dead set on shutting the door to native code on the Nspire platform...



Download from the TI-Planet news:
http://tiplanet.org/forum/viewtopic.php?t=8931
Title: Re: Lua print restored in OS 3.1
Post by: Stefan Bauwens on March 24, 2012, 06:50:38 am
Awesome! :D
Well done to the maker of that utitlity.
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 24, 2012, 06:52:33 am
It's a team of makers, actually :)
Title: Re: Lua print restored in OS 3.1
Post by: Chockosta on March 24, 2012, 07:12:11 am
Nice work !
The RS232 port is quite fun to play with :)
Title: Re: Lua print restored in OS 3.1
Post by: Jim Bauwens on March 24, 2012, 09:26:24 am
Very nice ;D
Title: Re: Lua print restored in OS 3.1
Post by: Nick on March 24, 2012, 09:35:47 am
do you just have to put fixprint.tns on your calc and nothing else? since i was that runprint.tns too, and i'm confused :)
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 24, 2012, 10:15:51 am
Oh yeah, I should have put a note about runprint :)
fixprint is the Ndless program, and runprint is the Lua testcase.

fixprint ought to be launched interactively, the first time, to check whether you have the appropriate version of Ndless 3.1 beta (SVN r568 and later). If you don't, the calculator will reboot, and you'll have to upgrade your Ndless version. In my testing with SVN r568, I hadn't noticed a problem.
Title: Re: Lua print restored in OS 3.1
Post by: renatose on March 24, 2012, 11:32:40 am
this is realy nice! In a month or so I'll start playing with it, I've got everything to start playing :D a nspire, an arduino, an rs232 usb adapter, wires, an LCD screen and imagination! this is gonna be great!

Good job, thanks to the team of makers! :D
Title: Re: Lua print restored in OS 3.1
Post by: Juju on March 24, 2012, 01:14:55 pm
Yay cool serial stuff is back :D
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 24, 2012, 01:25:24 pm
Was eliminating this functionality another effort on ti's part to indicate clearly that they don't want our business?  Or just another one of their stupid mistakes. 
Title: Re: Lua print restored in OS 3.1
Post by: Nick on March 24, 2012, 01:33:29 pm
Was eliminating this functionality another effort on ti's part to indicate clearly that they don't want our business?  Or just another one of their stupid mistakes. 

i guess the first. They really don't want to make us do things with it that don't fit with the needs for school and other "serious" stuff.
So everything that might be used to make it function more than it should gets removed
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 24, 2012, 02:07:40 pm
And the problem is, serial communication definitely has valid uses for classrooms, so by crippling their Lua (intentionally or not) and by fighting native code, they're doubly hurting themselves...
See, for instance, two projects aimed at drawing curves for math functions:
* the ToyoBot, made by critor's students and himself: a TI-Robot controlled by a TI-Z80, http://tiplanet.org/forum/archives_voir.php?id=1859 ;
* TDF89, using a different drawing hardware controlled by a TI-68k: http://tiplanet.org/forum/viewtopic.php?p=102589#p102589 , http://www.dailymotion.com/swf/video/xgj6rx
Such projects are always great learning experiences for pupils...

Besides expanding functionality, patching the OS in RAM allows third parties to prevent TI's bugs from striking (I think that the boot2 reflashing code contained in OS 3.0.1.1753, which bricked thousands of calculators beyond repair with standard hardware and software last year, could be prevented from striking), or fix them (e.g. fixprint), without TI having to deploy new OS versions !
The possibilities are endless :)
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 24, 2012, 04:58:42 pm
This is cool. A few weeks ago I remember people telling me they wished more sound games existed in Lua for OS 3.1, but I had to tell them that sound was no longer possible via Lua.

@Lionel, could they be preventing actual stuff such as TI-Robot from being done in order to prevent people from making money with such device? Not that this would affect them at all if people made money by creating a third-party add-in for the TI-Nspire, but we never know what TI thinks, sometimes. >.>
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 24, 2012, 06:30:18 pm
And the problem is, serial communication definitely has valid uses for classrooms, so by crippling their Lua (intentionally or not) and by fighting native code, they're doubly hurting themselves...

Why do I keep thinking that the only effective way to deal with TI is to hurt them financially such as a boycott on buying new nspires (used is ok because ti doesn't get that money) and pressure on teachers to put the toys away and go back to teaching/learning math again? 
Title: Re: Lua print restored in OS 3.1
Post by: apcalc on March 24, 2012, 10:30:23 pm
Great News! ;)
Title: Re: Lua print restored in OS 3.1
Post by: Scipi on March 24, 2012, 10:43:39 pm
And the problem is, serial communication definitely has valid uses for classrooms, so by crippling their Lua (intentionally or not) and by fighting native code, they're doubly hurting themselves...

Why do I keep thinking that the only effective way to deal with TI is to hurt them financially such as a boycott on buying new nspires (used is ok because ti doesn't get that money) and pressure on teachers to put the toys away and go back to teaching/learning math again? 

I would rather think that enticing Casio to produce superior products and not doing anything to make them want to lock down their calcs would be a more viable option. Just let TI hurt themselves, really. But that will only happen if there is reason to switch to Casio. Right now the development community is still focused on TI because there are more programs for it, thus more users, thus more programs are developed by said users. It's a cycle that feeds into itself. If, however, Casio developers started cropping up more and released high quality software (which they already do), that coupled with, perhaps, a more powerful calc from Casio could start siphoning off TI's userbase and start its own cycle of growth.

Besides, who says we need to fight TI. We can't really beat them anyways, we're only a minor portion of their profit margins, sadly enough. The best we can do is help Casio grow to surpass TI and not make them dislike us in doing so.
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 25, 2012, 01:03:48 am
Quote
Besides, who says we need to fight TI. We can't really beat them anyways, we're only a minor portion of their profit margins, sadly enough. The best we can do is help Casio grow to surpass TI and not make them dislike us in doing so.

Dealing effectively with TI  doesn't mean fighting them but you make some good points and I think your analysis of the situation is right on.  It just seems clear to me that because TI doesn't really care about us, give them their wish and stop supporting them with good reviews and by buying their "new" calc's.  Also, it seems that the only people that TI gives a rats ass about is their beloved high school math teachers and since students spend far more time with those teachers than TI possibly can, start pressuring your teacher to teach math not calculator operation, that is, tell your teachers that you want to learn the math and suggest that if it is going to be a calculator class you want to learn how to use the Prizm.  Of course it may not be necessary if the new os due out soon cannot be hacked in which case the migration to Casio will speed up.  We shall see but sooner or later it will happen.  Just my thinking.
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 25, 2012, 02:21:01 am
A good argument to convince teachers would be to tell them that the TI-Nspire is a major PITA to use, because of the complex interface, mouse and confusing menus compared to standard models like the Prizm or the 84+. Another argument would be that the calc is way too expensive compared to other models (although that doesn't work if they lend calcs). Even if you disagree with my first point, you can still tell them the calc is overly complex compared to others.

I do not think people should boycott TI by stopping TI calc programming or something, especially that it still has the largest userbase for your games, but encouraging people to get a Prizm is a good move.
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 25, 2012, 11:42:21 am
A good argument to convince teachers would be to tell them that the TI-Nspire is a major PITA to use, because of the complex interface, mouse and confusing menus compared to standard models like the Prizm or the 84+. Another argument would be that the calc is way too expensive compared to other models (although that doesn't work if they lend calcs). Even if you disagree with my first point, you can still tell them the calc is overly complex compared to others.

I do not think people should boycott TI by stopping TI calc programming or something, especially that it still has the largest userbase for your games, but encouraging people to get a Prizm is a good move.

You are absolutely right that nspire is a pita.  That is the biggest mistake TI made with that design.  They went away from the thing that sold all those 83/84/89 calculators.

  In dealing with the teachers, some don't want to use nspires any way but feel forced into it and those are the ones to go after and support.  They are math oriented and understand the students that want to learn math and not how to use nspires.   I really believe students can make a difference and get some teachers to start using the prism and that in my opinion is good because when TI comes out with a hack proof os (which may be the one due out soon), the nspires will be to limited.     
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 25, 2012, 12:09:16 pm
On the other hand, the Nspire interface feels a bit more familiar with Windows. If they allowed a mouse to be used with the calc it would actually be very awesome. :D However as it is now, the touchpad is barely responsive and was poorly implemented. I mean Doors CS on the 83+ uses a similar system with selecting stuff with the mouse cursor, but at least the mouse is responsive. Granted, both things got keypad shortcuts, but still...

Also I hate how high they charge for their calcs outside United States and France. Here a TI-Nspire CX, not even the CAS, costs $194.99! I saw the PRIZM and the 83+ for $99.99 a few times and normally the PRIZM is $149.99, the same price as their monochrome 84+.
Title: Re: Lua print restored in OS 3.1
Post by: cyanophycean314 on March 25, 2012, 09:11:02 pm
Very good job!  :)
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 25, 2012, 10:37:19 pm
Also I hate how high they charge for their calcs outside United States and France. Here a TI-Nspire CX, not even the CAS, costs $194.99! I saw the PRIZM and the 83+ for $99.99 a few times and normally the PRIZM is $149.99, the same price as their monochrome 84+.

They sure are greedy bastards!  If I were you I'd skip the nspire.  That's way to much money and with the Prizm at the same price as the b&w TI-84, it's a no brainer.  And if you get the nspire and use the 84 plug in keyboard that's the most expensive 84 that I've ever heard of. 
BTW, Kerm at Cemetech is doing some really awesome stuff.
Title: Re: Lua print restored in OS 3.1
Post by: Jim Bauwens on March 26, 2012, 09:35:53 am
The price is mostly defined by the store that sells it. I've seen prices of a CX quite low, and basically the same as a 84 in that store.
Also, in term of hardware and mathematical features the CX blows the Prizm away.

Also, I personally found quite some of your remarks rude and would have down rated them if I could.
Something that many seen to forget is that the TI-Nspire series are incredible calculators. TI really has done a great job, and they are extremely good for education.
Maybe they don't support the community (which they actually do, every year a bit more and more), but they make excellent calculators which help many students of year again and again.

The only, and also ONLY downside I see is that they keep locking the calculators down. They have given reasons why, and I can understand them. I still think that it's not the correct thing to do (I'm sure Ndless can co-exist with TI), but I also understand there concerns.
I really like my CX, and I never though it was something horrible.
Title: Re: Lua print restored in OS 3.1
Post by: Chockosta on March 26, 2012, 12:01:46 pm
I agree with you jimbauwens, even if I would add some downsides to the TI-Nspire CX :
- Some bugs are quite annoying (like when the mouse appears, a weird square is displayed for a few seconds)
- The file explorer is really slow to load
- The text editor is way too slow too
- There is no official on-calc lua script editor

But the Nspire is still better than the prizm, IMHO
Title: Re: Lua print restored in OS 3.1
Post by: Adriweb on March 26, 2012, 01:03:16 pm
- Some bugs are quite annoying (like when the mouse appears, a weird square is displayed for a few seconds)
That might be fixed in 3.2. I don't remember.
CAS bugs are fixed in 3.2 for the majority :)

- The file explorer is really slow to load
Yep, when you have a lot of files, it's quite slow to load. I think they should change it to load whenever you open a directory, and not "prefetch"/"precache" all the hierarchy...
HideManager (by Levak) solves that, though.

- The text editor is way too slow too
That's true for long texts indeed. It's completely linked to their crappy internal XML structure (http://hackspire.unsads.com/wiki/index.php/Notes#Raw_exemple)... Maybe one day they will make it better...

- There is no official on-calc lua script editor
Well, nope, but it's not really easy to program 'big' things with Lua on-calc anyway (since it's more complex than Basic). LuaCS 2 provides, though, a really awesome editor with Syntax-Coloring, templates, etc.

But the Nspire is still better than the prizm, IMHO
Same for me ;)
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 26, 2012, 01:10:18 pm
Quote
and they (the Nspires) are extremely good for education.
And they could be even better if they were open development platforms, like the TI-Z80 and the TI-68k series :)
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 26, 2012, 01:35:37 pm
Quote
and they (the Nspires) are extremely good for education.
And they could be even better if they were open development platforms, like the TI-Z80 and the TI-68k series :)
Agreed.  :)
Title: Re: Lua print restored in OS 3.1
Post by: lkj on March 26, 2012, 03:54:46 pm
Quote from: Chockosta on Today at 18:01:46
- There is no official on-calc lua script editor
Well, nope, but it's not really easy to program 'big' things with Lua on-calc anyway (since it's more complex than Basic). LuaCS 2 provides, though, a really awesome editor with Syntax-Coloring, templates, etc.
Where can I find that program?

The price is mostly defined by the store that sells it. I've seen prices of a CX quite low, and basically the same as a 84 in that store.
Also, in term of hardware and mathematical features the CX blows the Prizm away.

Also, I personally found quite some of your remarks rude and would have down rated them if I could.
Something that many seen to forget is that the TI-Nspire series are incredible calculators. TI really has done a great job, and they are extremely good for education.
Maybe they don't support the community (which they actually do, every year a bit more and more), but they make excellent calculators which help many students of year again and again.

The only, and also ONLY downside I see is that they keep locking the calculators down. They have given reasons why, and I can understand them. I still think that it's not the correct thing to do (I'm sure Ndless can co-exist with TI), but I also understand there concerns.
I really like my CX, and I never though it was something horrible.
I agree with you that TI has made a great calc with the CX and that some people seem to not see the good things about it. But that they support the community every year a bit more is only half-correct since the z80 and 68k were open for programming in asm and everything, and their strategy to lock their calcs down was new with the nspires.
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 26, 2012, 05:44:04 pm
In any case they need to fix the poorly responsive touchpad, though. Often I move my finger on the touchpad during about 5 seconds before the cursor finally appears, and also when pressing directional keys on the touchpad, if you continue touching the touchpad, you'll continue going in the same direction once you press directional controls again, no matter in which direction you want to go and where your finger is located.

Granted, we can still use keyboard controls, but that still makes things annoying to use sometimes.
Title: Re: Lua print restored in OS 3.1
Post by: Dingus on March 27, 2012, 01:07:45 pm

Also, I personally found quite some of your remarks rude and would have down rated them if I could.


Jim, I would like to respectfully make a couple of points.
First, I don't know you and  I've never said any thing negative to you or about you so to make a personal attack on me like that is strange unless you have a personal or business reason for supporting TI that way.   
Second, my experience with TI has been very unsatisfactory so I view them much differently than you apparently do.
Third, I call it the way I see it and you need to understand that attacking the messenger because you don't like the message doesn't change reality one bit.
So have a good day and Btw, do you work for TI?
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 27, 2012, 01:27:50 pm
I think I can answer for him:

Quote
Btw, do you work for TI?
Yes and no, in that he isn't on their payroll, but it's no secret that he is under NDA for Nspire OS 3.2, works on EEPro (though he's got lots of homework at the moment) and sends some Lua-based content to TI.
Title: Re: Lua print restored in OS 3.1
Post by: Adriweb on March 27, 2012, 01:46:07 pm
I think I can answer for him:

Quote
Btw, do you work for TI?
Yes and no, in that he isn't on their payroll, but it's no secret that he is under NDA for Nspire OS 3.2, works on EEPro (though he's got lots of homework at the moment) and sends some Lua-based content to TI.

Excatly :)

For stuff I've done, though, I got to the T3 conference etc., for example...

However, EEPro is a TI-Planet project, nothing to do with TI.
But they're probably interested in seeing what we can do since it's a huge project :)

Plus, I'm going to work for them under contract soon :)
Title: Re: Lua print restored in OS 3.1
Post by: Jim Bauwens on March 27, 2012, 01:55:30 pm
Indeed, I work quite close with TI.

Also, downrating is not a personal attack. I said it to show how I thought about your post(s).
In my opinion you made TI much worse then what they are.
I agree that blocking ndless is wrong, but they are not greedy bastards.
They have spend quite some money the past year to be more involved with the community (mainly through TI-Planet).
I got my CX CAS from them, together with expensive teacher software. You might thinks thats the reason I'm so pro TI, but thats not true. I've seen how they really are.
Title: Re: Lua print restored in OS 3.1
Post by: Lionel Debroux on March 27, 2012, 02:45:12 pm
I also got a CX CAS + Teacher software from TI (without having signed an NDA, it was for TILP development; in the past, Romain LiƩvin also got hardware from TI), but I tend to have a different opinion of how they really are.

But it's just that, my opinion, and neither "side" is going to convince the other one anyway, so I'm not sure we should keep discussing about TI's motivations/actions, and what we think about them :)
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 27, 2012, 03:24:49 pm
Indeed, I work quite close with TI.

Also, downrating is not a personal attack. I said it to show how I thought about your post(s).
In my opinion you made TI much worse then what they are.
I agree that blocking ndless is wrong, but they are not greedy bastards.
They have spend quite some money the past year to be more involved with the community (mainly through TI-Planet).
I got my CX CAS from them, together with expensive teacher software. You might thinks thats the reason I'm so pro TI, but thats not true. I've seen how they really are.
Well in my view they're still kinda greedy in a way, because there's no other excuse to charge $194.99 for a calculator, when you can buy a dual core computer for that price on Boxing Day/Black Friday at Best Buy.

Heck in Canada you can get a Nintendo 3DS for cheaper than that. Granted, that's not a calculator, but when I bought my CX at Staples last Summer, most clerks and cashiers told me they found TI calcs to be way too expensive for their budget and that they prefer sticking to their old 86 or 89 found at a pawn shop.

The CX could really be cheaper IMHO, possibly close to what the PRIZM costs, although a bit higher.
Title: Re: Lua print restored in OS 3.1
Post by: Jim Bauwens on March 27, 2012, 03:31:57 pm
Of course 195$ is too much, but I don't think it's the normal price.
There is a big chance the store decided the price. (But idk)
Title: Re: Lua print restored in OS 3.1
Post by: DJ Omnimaga on March 27, 2012, 03:43:00 pm
In USA the same store charges like $159-165. What I don't get is why TI charges so much outside United States when Nintendo/Sony charges the exact same price for their console/handhelds in both Canada and USA? ($169 and $249 for the 3DS and PSVita, respectively)

Btw the lowest I've ever seen for a regular 84+ here is $119.99, during a sale. The regular (and lowest) price is $149.99. Wal-Mart sells them for $169.99 and TI website has deleted their canadian store completely. (used to be $149.99 for Canadians)

Also I checked TI website a while ago and found the US prices to be rather high too. Considering the PRIZM price of $129.99 and $99.99 during school sales, you would expect the TI-Nspire CX to range between $139.99 and $149.99 and $119-129 during school start sales).


Also, I personally found quite some of your remarks rude and would have down rated them if I could.


Jim, I would like to respectfully make a couple of points.
First, I don't know you and  I've never said any thing negative to you or about you so to make a personal attack on me like that is strange unless you have a personal or business reason for supporting TI that way.  
Second, my experience with TI has been very unsatisfactory so I view them much differently than you apparently do.
Third, I call it the way I see it and you need to understand that attacking the messenger because you don't like the message doesn't change reality one bit.
So have a good day and Btw, do you work for TI?
I think he was rude to you because your messages themselves were rude (especially the ones in another topic). Also it'S generally a bad practice to accuse someone of making personal attacks towards you in response to a reprimand about being rude, becuse it sounds like you are trying to act like you are perfect and never do anything wrong or trying to shift blames on others. Also knowing you as member, you are not a troll, but actual trolls often use the blame shifting tactic on others who defends themselves or someone else, and I don't think you want other forum members to see you as a troll.

Anyway let's not take fanboy attitudes here. I don't see you as a Casio fanboy and I don't see Jim/Adriweb as a TI fanboy, but both gotta be careful to not sound like so and not act like one company is perfect and isn't doing anything wrong or the complete opposite.
Title: Re: Lua print restored in OS 3.1
Post by: Yeong on April 01, 2012, 12:38:57 pm
I actually saw CX in $109.99 when the school started O.o
And I bought my CX with $135.99 in Wal-Mart. So the high prices are probably due to store manager's choice.
Title: Re: Lua print restored in OS 3.1
Post by: renatose on June 22, 2012, 06:25:40 pm
fixprint doesn't give me any output doing nothing and runprint opens a document with a Lua script which doesn't print anything to the screen neither to the RS232 port...
Title: Re: Lua print restored in OS 3.1
Post by: ExtendeD on June 22, 2012, 06:27:20 pm
Maybe there's a problem with your RS232 adapter. If you can see something in nspire_emu's console, you can be sure its an hardware issue.
Title: Re: Lua print restored in OS 3.1
Post by: renatose on June 22, 2012, 06:34:23 pm
Maybe there's a problem with your RS232 adapter. If you can see something in nspire_emu's console, you can be sure its an hardware issue.
isn't it supposed to show some text on the screen?
Code: [Select]
print("hello world")
print(1, 2, 3)
print(FOOBAR)
Title: Re: Lua print restored in OS 3.1
Post by: ExtendeD on June 22, 2012, 06:37:53 pm
No, only on the RS232 output, which is emulated by nspire_emu by printing on the DOS console.
Title: Re: Lua print restored in OS 3.1
Post by: Levak on June 22, 2012, 08:32:08 pm
Maybe there's a problem with your RS232 adapter. If you can see something in nspire_emu's console, you can be sure its an hardware issue.
isn't it supposed to show some text on the screen?
Code: [Select]
print("hello world")
print(1, 2, 3)
print(FOOBAR)
No. Use
on.paint(gc) gc:drawString("Hello World", 0, 0, "top") end
instead.

print() is only outputing text through serial port and as said ExtendeD, you can see its content in the nspire_emu console.
Title: Re: Lua print restored in OS 3.1
Post by: renatose on June 24, 2012, 06:22:27 am
My problem was only with the wiring...