iostream et STL
Re: iostream et STL
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!
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!
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: iostream et STL
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...).
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...).
-
ExtendeDPremium
Niveau 8: ER (Espèce Rare: nerd)- Messages: 204
- Inscription: 30 Déc 2004, 00:00
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: N/A
Re: iostream et STL
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).
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: iostream et STL
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.
I suppose you also reinstalled Ndless as it is required.
-
ExtendeDPremium
Niveau 8: ER (Espèce Rare: nerd)- Messages: 204
- Inscription: 30 Déc 2004, 00:00
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: N/A
Re: iostream et STL
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?
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?
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: iostream et STL
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,...).
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: iostream et STL
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 )
(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.
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 )
(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...)-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 14621
- Images: 1218
- Inscription: 01 Juin 2007, 00:00
- Localisation: France
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Twitter/X: adriweb
- GitHub: adriweb
Re: iostream et STL
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.
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: iostream et STL
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
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...)-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 14621
- Images: 1218
- Inscription: 01 Juin 2007, 00:00
- Localisation: France
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Twitter/X: adriweb
- GitHub: adriweb
Re: iostream et STL
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.
- Fichiers joints
-
- xcasmenu.zip
- (8.16 Kio) Téléchargé 110 fois
-
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)- Messages: 3518
- Inscription: 13 Déc 2013, 16:35
- Genre:
- Calculatrice(s):→ MyCalcs profile
Retourner vers Native: Ndless, Linux, ...
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 21 invités