HP Forums
Base48: an application inspired by the 48GX Base functions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Base48: an application inspired by the 48GX Base functions (/thread-11241.html)



Base48: an application inspired by the 48GX Base functions - Didier Lachieze - 08-18-2018 06:51 AM

Here is a small app implementing base functions in a RPL mode inspired by the 48GX.

You'll find an environment with a stack, softkeys and similar function set.

Some differences driven by quest for simplicity:
  • only integer numbers are supported, not real numbers
  • no need to type the # prefix or the base suffix, these are added automatically depending on the base chosen (hex, dec, oct or bin)
  • only number/letters authorized in the current base can be entered
  • in hex mode no need to press alpha for A..F , just press the corresponding keys
  • only the 4 operators (+,-,x,/) and the app logic, bit and byte functions are supported
  • the Prime RPN swap key ( [,] ) is supported, no other stack function is implemented
  • Next and Prev menu keys are mapped to the right and left arrows
  • exit is done by ON or Esc
  • in Home you can access the app stack values via the App variable "stack"

V1.1 - what's new:
  • Undo of the last operation
  • Import from Home Ans, CAS Ans or RPN stack
  • Export to Home Ans
  • Export to RPN stack via a user defined key (program provided in the included documentation)
  • Support of Shift key for different functions, including :
  • Shift Clear to clear the stack
  • Shift Info to provide some info about the App
  • Shift Num setup to give access to the App settings
  • Internal menu handling has been rewritten to make it more generic with the softkey actions coded in the menu description

V1.0: This is the first version. Comments and bug reports are welcome.


RE: Base48: an application inspired by the 48GX Base functions - Stevetuc - 08-20-2018 12:21 PM

(08-18-2018 06:51 AM)Didier Lachieze Wrote:  Here is a small app implementing base functions in a RPL mode inspired by the 48GX.

You'll find an environment with a stack, softkeys and similar function set.

Some differences driven by quest for simplicity:
  1. only integer numbers are supported, not real numbers
  2. no need to type the # prefix or the base suffix, these are added automatically depending on the base chosen (hex, dec, oct or bin)
  3. only number/letters authorized in the current base can be entered
  4. in hex mode no need to press alpha for A..F , just press the corresponding keys
  5. only the 4 operators (+,-,x,/) and the app logic, bit and byte functions are supported
  6. the Prime RPN swap key ( [,] ) is supported, no other stack function is implemented
  7. Next and Prev menu keys are mapped to the right and left arrows
  8. exit is done by ON or Esc
  9. in Home you can access the app stack values via the App variable "stack"


This is the first version. Comments and bug reports are welcome.

Very nice app!

Suggestions regarding possible future additions:

lt would be handy if the logic operators could have an undo, do user could try these out yet retain the input data.

Reading input from rpn stack and also writing back to the stack

Programatically, answer(n) gives the values on the rpn stack for use in the app and if stack list is exported as a space delimited string via a user key say, pressing enter will add the elements as individual stack levels.


RE: Base48: an application inspired by the 48GX Base functions - Tyann - 08-20-2018 03:55 PM

Bonjour Didier Lachieze

Je viens d'essayer vôtre application, c'est vraiment de l'excellent travail.
Bravo et merci pour cette application.



Hello Didier Lachieze

I just tried the application, it's really great work.
Congratulations and thank you for this application.


RE: Base48: an application inspired by the 48GX Base functions - JDW - 08-20-2018 09:24 PM

(08-18-2018 06:51 AM)Didier Lachieze Wrote:  Here is a small app implementing base functions in a RPL mode inspired by the 48GX.

Oh my, Didier! May you live to be a thousand years old, sir!

This app is simply outstanding! No Prime should be without your miraculous handiwork!


RE: Base48: an application inspired by the 48GX Base functions - JDW - 08-21-2018 12:21 AM

(08-18-2018 06:51 AM)Didier Lachieze Wrote:  ...bug reports are welcome.

Didier, once again, I cannot praise your glorious app enough. It is excellent. But since you asked for bug reports, I must mention one small thing. Open any of the HP apps and then press Blue-Shift and On. The result is the calculator turns off, and when you turn on the Prime again you are back in the app where you left off. Now open your Base48 app and press Blue-Shift and On. The Prime does not power off. It takes you Home instead because, apparently, Blue-Shift is ignored. But when you press Blue-Shift within your app, the 9 & 8 & 7 flicker briefly, which indicates the Blue-Shift key is reserved for something else in your app?

Is this a feature or a bug?

Many thanks.


RE: Base48: an application inspired by the 48GX Base functions - Didier Lachieze - 08-21-2018 07:21 AM

(08-20-2018 12:21 PM)Stevetuc Wrote:  Suggestions regarding possible future additions:

lt would be handy if the logic operators could have an undo, do user could try these out yet retain the input data.

Reading input from rpn stack and also writing back to the stack

Programatically, answer(n) gives the values on the rpn stack for use in the app and if stack list is exported as a space delimited string via a user key say, pressing enter will add the elements as individual stack levels.

Thanks, I'll look to implement these suggestions in the next version.

(08-21-2018 12:21 AM)JDW Wrote:  Didier, once again, I cannot praise your glorious app enough. It is excellent. But since you asked for bug reports, I must mention one small thing. Open any of the HP apps and then press Blue-Shift and On. The result is the calculator turns off, and when you turn on the Prime again you are back in the app where you left off. Now open your Base48 app and press Blue-Shift and On. The Prime does not power off. It takes you Home instead because, apparently, Blue-Shift is ignored.
[...]
Is this a feature or a bug?

Thanks, I would say this is a limitation of the app. To manage the stack I have to intercept the keystrokes. Currently I have not implemented any action associated to the Blue-Shift key, but even if I do I don't know a way to programmatically turn off the Prime. So it's not possible to replicate how Blue-Shift On is managed by the standard apps.


RE: Base48: an application inspired by the 48GX Base functions - Didier Lachieze - 09-10-2018 06:37 PM

I've updated the first post with V1.1 implementing most of the requests. See the included documentation for details.


RE: Base48: an application inspired by the 48GX Base functions - JDW - 09-11-2018 12:19 AM

This app is nothing short of glorious!


RE: Base48: an application inspired by the 48GX Base functions - ggauny@live.fr - 09-11-2018 09:31 AM

Bjr Didier,

Vraiment impressionnant !

Merci.


RE: Base48: an application inspired by the 48GX Base functions - JDW - 09-11-2018 11:58 AM

With regard to the "Exit Settings" on page 9 of your Base48.pdf documentation, it should be noted that retrieving Ans from Base48 in Home works only if you exit via the Esc key. But if you exit Base48 by pressing On, if you then press blue-Shift & +(Ans), you will retrieve the last answer you had in Home. It is only when you press Esc to exit Base48 that subsequently pressing blue-Shift & + will put Stack Level 1 of Base48 onto your Home stack level 1.

I now have a question. Can apps trigger help files when the user presses the Help key? If so, I was thinking that perhaps some basic info from the Base48.pdf could be added in text form such that it would be displayed when the user pressed the Help key. Not critically important, perhaps. Just a thought.


RE: Base48: an application inspired by the 48GX Base functions - Didier Lachieze - 09-11-2018 06:51 PM

(09-11-2018 11:58 AM)JDW Wrote:  With regard to the "Exit Settings" on page 9 of your Base48.pdf documentation, it should be noted that retrieving Ans from Base48 in Home works only if you exit via the Esc key. But if you exit Base48 by pressing On, if you then press blue-Shift & +(Ans), you will retrieve the last answer you had in Home.

You're right, pressing On is like Ctrl C: the current running program or app is interrupted, so the app is not gracefully exiting and the code setting Ans is not called. I should be able to fix this in the next version.

(09-11-2018 11:58 AM)JDW Wrote:  I now have a question. Can apps trigger help files when the user presses the Help key? If so, I was thinking that perhaps some basic info from the Base48.pdf could be added in text form such that it would be displayed when the user pressed the Help key. Not critically important, perhaps. Just a thought.

Good idea, I'll see what I can do.


RE: Base48: an application inspired by the 48GX Base functions - Leviset - 09-14-2018 01:47 PM

There’s a post on Eddie’s blog from Joe Horn showing
how to use the HP prime ‘convert’ command coupled with reverse to do base conversions.
‘convert’ MUST be in lower case.
http://edspi31415.blogspot.com/2017/02/hp-prime-base-conversions-joe-horn.html?m=1


RE: Base48: an application inspired by the 48GX Base functions - JDW - 09-15-2018 12:09 AM

(09-14-2018 01:47 PM)Leviset Wrote:  There’s a post on Eddie’s blog from Joe Horn showing
how to use the HP prime ‘convert’ command coupled with reverse to do base conversions.
‘convert’ MUST be in lower case.
http://edspi31415.blogspot.com/2017/02/hp-prime-base-conversions-joe-horn.html?m=1

While I certainly appreciate information, that doesn’t come close to touching the power, speed and convenience if Didier’s wonderful app. Eddie should do a follow-up article on the Base48 app.


RE: Base48: an application inspired by the 48GX Base functions - dkostan - 06-21-2023 07:25 PM

Great app! I really don't like the way the Prime handles the base functions, powerful perhaps, but clunky at best IMO. This app helps a lot. kudos.

In the spirit of the 48/49/50 implementation, while in the app, it would be nice to remap the primes SIN through LOG buttons row (skipping x^y since its 'F') as menu buttons versus needing to interact with the touchscreen for the HEX, DEC, OCT, etc. functions. Another bad usability design choice (IMO) for the Prime was not including a row of buttons specifically for soft menu selection. Interacting with the touchscreen for those types of actions is also clunky. Yeah I know it probably would have added ~$2 to the cost of the unit but would have been better and provide a better experience.