π
<-

iostream et STL

C, C++, ASM...

Re: iostream et STL

Unread postby Adriweb » 30 Mar 2014, 16:47

Nice :D

Image

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: 79.9%
 
Posts: 14839
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: iostream et STL

Unread postby Excale » 30 Mar 2014, 16:54

Il n'a pas l'air d'aimer les puissances par contre.
5^5 fait planter le programme.

Mais sinon, joli travail pour être déjà arrivé jusqu'ici :)


5^5 crashes the program, though :)

Nice work anyway :)
User avatar
ExcaleAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 3.9%
 
Posts: 2955
Images: 3
Joined: 10 Sep 2010, 00:00
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: iostream et STL

Unread postby parisse » 30 Mar 2014, 18:39

Yes, ^ does not work as well as the builtin commandnames from the parser, I believe I have found the reason, I hope I can post a more usable version tomorrow. Once the parser is ok, I hope most things will work (I checked a factorization identificateur x("x"); _factor(pow(x,4)-1,&c),&c); and it worked).
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 93.5%
 
Posts: 3795
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Online

Re: iostream et STL

Unread postby parisse » 31 Mar 2014, 10:22

I have updated
http://www-fourier.ujf-grenoble.fr/~parisse/calc/giac.tgz
It should work better now.
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 93.5%
 
Posts: 3795
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby Excale » 31 Mar 2014, 14:19

Indeed :).

It still fails with complex numbers though:
1^i

Edit: solve(x^2+x-1=0,x) crashes too
expand(x*y) too
(I have to say I don't know exactly what is supposed to fail since some features may not implemented yet)
User avatar
ExcaleAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 3.9%
 
Posts: 2955
Images: 3
Joined: 10 Sep 2010, 00:00
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: iostream et STL

Unread postby parisse » 31 Mar 2014, 15:24

More probably a problem with ^ than with i, if you enter i*i you get -1.
There are certainly many reboots to expect, I haven't tried many functions and I had to make changes in the source related to the ustl (anything using sort may crash). It's really unfortunate that gdb does not work, any idea why it fails? Debugging by adding console output and keypress is really slow.
Short online help is now available with ?cmdname. readline would be nice!
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 93.5%
 
Posts: 3795
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby ExtendeD » 31 Mar 2014, 19:11

Compiling with -Os may indeed lose GDB with the optimizations. I'll have a closer at why the 7Mb allocation fail and try at least to give you a workaround.
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 Vogtinator » 31 Mar 2014, 21:04

Compiling with -Os may indeed lose GDB with the optimizations.

It shouldn't. The only thing that could happen are weird jumps around in the code. But crashes occur to me only if I detach or I attach to a running program. You have to compile first, than launch gdb, connect to nspire_emu, then send the file and start it.

There are certainly many reboots to expect, I haven't tried many functions and I had to make changes in the source related to the ustl (anything using sort may crash).

You could try libstdc++ and use it together with nspireio.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: iostream et STL

Unread postby parisse » 01 Apr 2014, 16:02

Vogtinator wrote:It shouldn't. The only thing that could happen are weird jumps around in the code. But crashes occur to me only if I detach or I attach to a running program. You have to compile first, than launch gdb, connect to nspire_emu, then send the file and start it.

I tried that and it reboots. I got once a debugging session working today but only once.
Anyway, I have modified some calls to sort to be ustl compatible, and giac works now a little better on the TI (archive updated on my site).
User avatar
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Level up: 93.5%
 
Posts: 3795
Joined: 13 Dec 2013, 16:35
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: iostream et STL

Unread postby ExtendeD » 02 Apr 2014, 12:34

I tried to build giac with your .ndless, I got a lot of conflicts between standard libraries and os.h/libndls.h, I didn't have the time to look closer at them. Maybe it's because I have recently switched from Windows to Linux and I'm not use to Ndless on Linux, or we broke something with our recent changes to the SDK.
Is there any particular reason for os.h and other Ndless headers being in .ndless/include?
Could you share your .gdb file to let me check what's wrong without having to rebuild?
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

PreviousNext

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 4 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.
2103 utilisateurs:
>2056 invités
>41 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
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)