Python to RPN converter
|
02-16-2018, 05:27 AM
(This post was last modified: 11-02-2018 04:23 AM by tcab.)
Post: #1
|
|||
|
|||
Python to RPN converter
I am pleased to announce the Python to HP42S RPN converter website is online.
http://www.pyrpn.atug.com/ You write code in a high level structured language (which happens to be Python 3 syntax), hit a button and RPN is generated. You then paste the RPN into Free42 or transfer it to your DM42 (by creating a raw) - and it runs.
The converter supports core Python syntax (which is very powerful), but does not implement the 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 - which of course you can do. Specifically, it has the following capabilities:
Included in the examples are some graphic primitive routines originally written for the Raspberry Pi in C rewritten into Python and converted to RPN. This now gives the 42S a small graphics library to generate lines, circles, rectangles, filled shapes etc. More information in this related thread. This would be of particular interest to owners of the DM42 calculator which has the larger screen, crying out to be taken advantage of. and targeting the larger screen size of the DM42 - this image: The purpose of the Python to RPN converter is not to usurp the beauty and role of handcrafted RPN, it is to provide an alternative way of programming the HP42S for those who prefer to to use if statements and for loops etc. rather than GTO's and ISG. The purpose is also to provide powerful new features to make programming the 42S easier: lists, dictionaries, matrix access syntax, native complex number syntax, alpha messages easily built with multiple parameters in one line, simpler menu support using aview() etc. My hope is that the Python to RPN converter will contribute to keeping this wonderfully designed calculator alive, just as Free42 and the DM42 have done. I look forward to what people build, using the increased ease of use and power of a structured programming language and hope to see some great new programs developed for the 42S - and for Free42 and DM42 in particular - where it is particularly easy to transfer generated RPN to those devices (in the case of Free42 on a mac or pc, its as simple as copy paste - there is a tutorial in the user guide). I hope people like it. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)