HP42S commands with symbols renaming advice
|
02-13-2018, 02:28 AM
(This post was last modified: 02-13-2018 02:41 AM by tcab.)
Post: #1
|
|||
|
|||
HP42S commands with symbols renaming advice
I have built a Python to RPN converter, a web based tool which lets you program the HP42S/Free42/DM42 using the Python language. You type in Python and the converter outputs a complete RPN program that you can paste into Free42.
HP42S commands which include symbols like ?!,.<>+-×÷≤≠↑Σ→ etc. are not valid Python syntax, so alternative names have been invented. Something like FS? is exposed as e.g. isFS(). The table below lists all renamed commands. Code:
I am looking for community input on the replacement function names that I have chosen. I have tried to keep the core HP42S name in uppercase, and describe the symbol where possible. I'm toying with the idea of making each function start with an uppercase letter - or does what I have chosen look ok? |
|||
02-13-2018, 03:45 AM
Post: #2
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
They look good to me. The one that stands out is 'CommonExp'. An alternative would be 'TENto' which would be consistent with 'Eto'.
Try CC41! |
|||
02-13-2018, 06:13 AM
Post: #3
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
(02-13-2018 02:28 AM)tcab Wrote: I have built a Python to RPN converter, a web based tool which lets you program the HP42S/Free42/DM42 using the Python language. You type in Python and the converter outputs a complete RPN program that you can paste into Free42. Good idea, would you give us the link to the repo? |
|||
02-13-2018, 07:27 AM
Post: #4
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
Thanks Craig, that's a good suggestion - I'll think about that. Oh and I forgot one:
Code:
|
|||
02-13-2018, 09:07 AM
Post: #5
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
Wow that looks awesome !
Quick question: I have thought of implementing in RPN an algebraic equation editor/parser for the 42S, to give it this missing feature from the 32SII. I wanted to use a matrix to store a tree-like structure to store the compiled equation tokens. I have given up, no time. But I wonder if Python could help ! Do you support something like equation parsing that would be translated into RPN ? Thanks and cheers, Vincent |
|||
02-13-2018, 11:21 AM
Post: #6
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
(02-13-2018 09:07 AM)Vincent Weber Wrote: But I wonder if Python could help ! Do you support something like equation parsing that would be translated into RPN ? Hey Vincent. Equation parsing sounds pretty ambitious - certainly a higher level language like Python will multiply your chances significantly. My Python to RPN converter doesn't have any specific parsing or token related functionality like e.g. the tokenize module. It is simply core Python syntax (which is very powerful), but no built in Python libraries that you would get in desktop Python. You have to rely on the ability to call HP42S commands from Python to do your work. Specifically, it has the following capabilities:
You write in Python, hit a button and RPN is generated. Paste the RPN into Free42 or transfer it to your DM42 - and it runs. I've sent you a PM with the beta site url. If anybody else is interested, feel free to PM me. cheers, Andy |
|||
02-13-2018, 11:32 AM
Post: #7
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
Wonderful, Andy, thank you!
Another way to love DM42/Free42/HP42s! Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
02-13-2018, 12:04 PM
Post: #8
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
(02-13-2018 11:32 AM)salvomic Wrote: Wonderful, Andy, thank you! Thanks Salvo. I agree - in fact I'm specifically targeting the HP42S/Free42/DM42 because it is the HP design that I love the most. I am so happy that Free42 will always be there and that the DM42 was recently created. Python does open up possibilities for the DM42 e.g. I ported some graphic primitive routines originally written for the Raspberry Pi in C into Python: Code:
which I then converted to HP42S RPN using my converter. This then allowed me to create images like this: and targeting the larger screen size of the DM42 - this image: Creating these drawing primitives directly in RPN would have been a big project for someone, I think. It only took me a few hours using Python, and I could draw upon existing algorithms I found on the internet. |
|||
02-13-2018, 12:20 PM
Post: #9
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
@tcab, Kudos for your work, this is impressive and opens a lot of applications for the DM42 !
|
|||
02-13-2018, 01:29 PM
Post: #10
|
|||
|
|||
RE: HP42S commands with symbols renaming advice
(02-13-2018 12:04 PM)tcab Wrote: in fact I'm specifically targeting the HP42S/Free42/DM42 because it is the HP design that I love the most. I am so happy that Free42 will always be there and that the DM42 was recently created. Well, right! Please, if you think is ok, could you post something about this subject in the SwissMicros forum also? I think there many people could appreciate your work... Salvo ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)