π
<-

iostream et STL

C, C++, ASM...

Re: iostream et STL

Unread postby parisse » 02 Apr 2014, 15:10

I have updated giac.tgz on my website (the site does not work reliably at this time... but the gdb file is 28M large). If you don't have the same version of the SDK probably the best is to recompile libtommath, my modified version of nspire-io and ustl, all available from my site
http://www-fourier.ujf-grenoble.fr/~parisse/calc
I have made some progress, now you can factor integers up to 128 bits, for example ifactor(2^128+1), and factor(x^4+1,sqrt(2)) works (lost a lot of time before I could detect that the standard rand() function returned always 0...). I still do not understand why running partfrac(1/(x^4-1)) leaves the application (without rebooting), so any help to get gdb working with giac would be greatly appreciated!
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby ExtendeD » 02 Apr 2014, 21:09

Could you please try this update of Ndless? http://bytecode.fr/miscfiles/ti/nspire/ ... 2fa.tar.gz
GDB requires a fixed base address, so Ndless preallocates a block for the program on GDB connection. The block was initially 5k, I have resized it to 8MB (giac is the biggest Ndless program ever run...).
User avatar
ExtendeDPremium
Niveau 8: ER (Espèce Rare: nerd)
Niveau 8: ER (Espèce Rare: nerd)
Level up: 64.1%
 
Posts: 204
Joined: 30 Dec 2004, 00:00
Gender: Male
Calculator(s):
MyCalcs profile
Class: N/A

Re: iostream et STL

Unread postby parisse » 03 Apr 2014, 08:11

It did not work. Perhaps I did something wrong, I removed the ndless files in the ndless directory and replaced them with the new ones in calcbin from your archive. Then I sent giac.tns and opened arm-none-eabi-gdb, file giac.tns.gdb then remote localhost:3333, but setting a breakpoint failed (Cannot access memory at address 0x35b140).
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby ExtendeD » 03 Apr 2014, 08:38

I didn't go further that setting successfully a breakpoint on main, maybe there are other issues. Which breakpoint are you trying to set? Are you setting it before or after running giac?
I suppose you also reinstalled Ndless as it is required.
User avatar
ExtendeDPremium
Niveau 8: ER (Espèce Rare: nerd)
Niveau 8: ER (Espèce Rare: nerd)
Level up: 64.1%
 
Posts: 204
Joined: 30 Dec 2004, 00:00
Gender: Male
Calculator(s):
MyCalcs profile
Class: N/A

Re: iostream et STL

Unread postby parisse » 03 Apr 2014, 11:54

I tried b giac.cc:11 (I had problems with -Os with b main the time it worked, n did not work properly, always returned to the breakpoint instead of going to the next instruction).
I ran ndless ressources and confirmed uninstall, then deleted the 2 files from ndless, and sent the 3 files from calc_bin from your archive. Perhaps I missed something?
By the way, is there any reason why file transfert is much slower with 3.6 than with 3.1?
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby parisse » 03 Apr 2014, 13:42

The partfrac problem is fixed. There are probably still many port bugs left, but not too obvious ones. It's now clear that the giac engine works (or will work if there is a bug) on the TI, it's time to begin thinking of a user interface (a text history first, then save/restore session, then some 2-d plots,...).
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby Adriweb » 03 Apr 2014, 13:54

For the user interface, making a Lua binding is probably the best way to go, since it is completely integrated into the OS (as Nspire-Lua is official).
The Ndless SDK has examples on how to make Lua libraries :)
(then, in the lua script, only a "require xxxx" has to be done)

An example of an interface that could be hooked to giac (fully done in Lua, here, for Xavier Andréani's "SuperSpire" program, an exact calculation engine :) )
Image
(as you can see, it mimics the OS GUI, here)

Although, that would be only for calculations. For plots.... maybe go with a trick by Excale that consists of "adding" another app to the Nspire, which would be an Ndless program, in fact, integrated into a document. But there might be better ways

Anyway, that's if you want to go with something not standalone (or, in addition to).
For something standalone with graphics, there is nSDL, if you're interested in that.

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 80%
 
Posts: 14842
Images: 1133
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: iostream et STL

Unread postby parisse » 03 Apr 2014, 18:22

I think it would be best if someone else would like to do the interface (I would of course help with using giac). I can certainly do something with basic functionnalities, but it will not be as good as if it is done by someone really interested, one of the reason being that I'm not comfortable with the nspire (less than with the voyage 200...), and of course I'm already very busy working on the giac kernel and all it's ports (Xcas, geogebra CAS, HP Prime). giac has the potential to improve the CAS of the nspire (the simplest example being factoring larger integers, but there are many other more advanced math examples), it just lacks a good GUI. A good GUI could also be better than the current TI CAS GUI, for example modifiable entries, embedded 2-d plots if a command as a graphical output, so that it's easy to have several plots of function, statistics, geometric objects ..., all in a same embedded plot, embedded programs, all in a simple CAS session.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby Adriweb » 03 Apr 2014, 18:28

Actually, if you're satisfied with this Lua look&feel (it can be changed in any manner we want, anyway), making it work with giac would be a matter of minutes, since it would require only a few line changes from SuperSpire's code. (the best advantage being the MathPrint display, being automatically done by the OS)
But then again, that's pretty much only for calculations, probably not plots (nothing is impossible, though...).

But if it's completely in C(++), then I can't really help you ^^
I'm sure there are several people that will, though :)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 80%
 
Posts: 14842
Images: 1133
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: iostream et STL

Unread postby parisse » 03 Apr 2014, 18:52

A calculation GUI for giac would already be great! And if the GUI gives easy access to the online help (like in Xcas, Index, where you have a short description of the command, and you can select an example to be copied in the commandline where you can modify it, or navigate to a related command) and menus (a suitable menu could be a submenu of Xcas menu, see attached file for the French version) it would be awesome. Embedded 2-d plots and/or programs is harder, probably a couple months of work.
You do not have the required permissions to view the files attached to this post.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 94.1%
 
Posts: 3807
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

PreviousNext

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1360 utilisateurs:
>1340 invités
>13 membres
>7 robots
Record simultané (sur 6 mois):
29271 utilisateurs (le 11/07/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)