Author Topic: [Lua] Saisie RPN  (Read 3672 times)

0 Members and 1 Guest are viewing this topic.

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
[Lua] Saisie RPN
« on: July 19, 2013, 08:48:58 am »
Hi everyone!

With this Lua program, you'll be able to enter your calculations in the mode RPN (Reverse Polish notation). It enables you to enter them faster, have details of calculation each time and avoid operating errors priority. Menu and help menu are up to now in french, but I'll do a translation.

Here's a screenshot:
Any suggestion, remark or bug report it welcome!

Future features adding:
  • Complex number support.
  • Constants support.
  • Scienfic numbers support like 3,4E-5.
  • More functions.
  • Permutate last 2 entries when pressing key tab.
  • Being able to scroll in order to see all the entries.
  • Use of variables.
Last version (2)
« Last Edit: March 23, 2014, 02:08:09 pm by mdr1 »



Offline AlexisVieira

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 100
  • Rating: +1/-1
    • View Profile
Re: [Lua] Saisie RPN
« Reply #1 on: July 19, 2013, 11:45:24 am »
seems interesting. good job
I'm Portuguese, sorry bad English

Offline xlibman

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55807
  • Rating: +3148/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • CodeWalrus
Re: Re: [Lua] Saisie RPN
« Reply #2 on: July 19, 2013, 12:28:03 pm »
Good job so far. I know that some HP calc users missed RPN when it vanished from calcs with the HP 39gII, so if they got an Nspire they would like this. :)
In case you are wondering where I went, I am still active in the TI community, but I left Omni back in 2015 for various  reasons. I might come back one day, depending of certain circumstances, but my new online home (despite me being Omnimaga founder in 2001) is now CodeWalrus ( https://codewalr.us ). Sorry for the inconveniences.

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Saisie RPN
« Reply #3 on: July 19, 2013, 04:37:29 pm »
Quote from: DJ Omnimaga
Good job so far. I know that some HP calc users missed RPN when it vanished from calcs with the HP 39gII, so if they got an Nspire they would like this. :)

Thanks. I've been dreaming having RPN for a long time, and I had the idea to add it to the Nspire thanks to Lua. You can notice that this program does better than current HP Prime's RPN mode.


Update:
(19/07/13) 1.1.1->1.1.2 : Correction de bugs, ajout des fonctions trigonométriques inverses et hyperboliques, support de la touche (-), redimensionnement corrigé, ajout des numéros des entrées, ajout de la puissance "^", ajout de "10^".

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Saisie RPN
« Reply #4 on: July 19, 2013, 09:14:51 pm »
Well... an update again. XD This one adds the exact calculation, but the results are sometimes strange. Of course, you can disable it with the menu.


Help: how to enter these calculations? There:
  • ln(423) => 423 [ctrl] [e^x]
  • root(456,3) => 456 [enter] 3 [ctrl] [^]
  • (478-32.4²)/3 => 478 [enter] 32.4 [x²] [-] 3 [/]

Download version 1.2.1
vvvvvvvvvvvvvvvvvvvv

Offline xlibman

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55807
  • Rating: +3148/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • CodeWalrus
Re: [Lua] Saisie RPN
« Reply #5 on: July 26, 2013, 02:24:51 am »
Good to hear :D
In case you are wondering where I went, I am still active in the TI community, but I left Omni back in 2015 for various  reasons. I might come back one day, depending of certain circumstances, but my new online home (despite me being Omnimaga founder in 2001) is now CodeWalrus ( https://codewalr.us ). Sorry for the inconveniences.

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline AnToX98

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +10/-0
    • View Profile
Re: [Lua] Saisie RPN
« Reply #6 on: November 10, 2013, 11:19:51 am »
That is an awesome work :D
You should just work a little bit to make a better GUI, then evrything is perfect :)



My Lua projects :

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Saisie RPN
« Reply #7 on: November 10, 2013, 11:25:21 am »
Thanks. I'm coding the whole code again with a different structure to be able to recycle the D2Editor instances (which cannot be deleted) and some other stuffs. I didn't find any solution to know the size of formula in pixels though. For the GUI, what do you think I could especially improve?

Offline AnToX98

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +10/-0
    • View Profile
Re: [Lua] Saisie RPN
« Reply #8 on: November 10, 2013, 11:32:18 am »
Little things as :
- Drawing a line between each calculations
- Sidebar to go up and down and up easily ?

Conversely, I don't know if it is possible to do that with the 2D editor...



My Lua projects :

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Saisie RPN
« Reply #9 on: November 10, 2013, 11:44:38 am »
I can easily add a line separating calculations if you think it may improve the graphic aspect. A sidebar would be very difficult, but if I finally add the features I want, I could try to add a navigation in the historic.



Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Saisie RPN
« Reply #10 on: March 23, 2014, 02:05:16 pm »
New version! The code has been entirely remade. Many features have been added.

Ajouts (in french, sorry):
  • La suggestion de Ron.
  • Les nombres à écriture scientifique.
  • Les nombres complexes.
  • Les variables.
  • Les unités, le symbole "_", les constantes complexes et entières etc.
  • Des symboles usuels tels que pi, e ainsi que plus de fonctions (toutes celles trigonométriques par exemple, ainsi que l'opérateur factorielle).
  • Échange les deux dernières entrées avec tab.
  • La touche DEL ne supprime plus tout une entrée mais défait un nœud. Par exemple, si vous avez (3+4)/(5-b) et que vous voulez calculer (3+4)*(5-b), il suffit de presser DEL pour défaire un nœud ce qui a pour effet de faire remonter deux entrées dans l'historique : 3+4 et 5-b. Ensuite, une simple pression sur "*". Pour supprimer une entrée en entier, appuyer sur ctrl+del.
  • Amélioration de l'interface graphique.
  • Corrections d'erreurs et de bugs (si l'on peut se permettre de parler ainsi puisque tout a été entièrement reprogrammé depuis le début).
  • Amélioration de l'affichage.
  • D'autres choses que j'ai oublié de citer.
EDIT: fixed a bug.
« Last Edit: March 24, 2014, 10:44:40 am by mdr1 »



Offline AnToX98

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +10/-0
    • View Profile
Re: [Lua] Saisie RPN
« Reply #11 on: March 23, 2014, 03:42:09 pm »
Super je teste tout de suite ! :)



My Lua projects :