Post Reply 
HP Prime: python programming language support?
09-06-2018, 07:22 PM
Post: #1
HP Prime: python programming language support?
I understand that a Python language front end was implemented in the HP Prime CAS environment about one year ago, but I wonder how does it compare against the 2018 new and recently released Casio fx-CG50 v3.20 and NumWorks v1.7.0 implementations?

I'm not recalling any recent HP announcement on this subject, but I might be wrong.

Python is getting more popular every day, being used almost everywhere for everything, it is like a fashion, I would say.
The last thing I wanted was having to learn yet another programming language, but I had to play with it after all these years of using Assembly, PL/M, C, COBOL, C#, and JAVA, to mention but a few, in order to support some of the software products we distribute.

And apparently Python is taught in schools as well.
Surely it must have something unique that the other programming languages are missing.
I was told that it is "easy to learn and deploy". Generally speaking, "easy" means many times that the thing is "limited" in what it can do. Again, I might be wrong.

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
09-06-2018, 08:53 PM
Post: #2
RE: HP Prime: python programming language support?
(09-06-2018 07:22 PM)jebem Wrote:  Surely [Python] must have something unique that the other programming languages are missing.
I was told that it is "easy to learn and deploy". Generally speaking, "easy" means many times that the thing is "limited" in what it can do. Again, I might be wrong.

Python has many excellent qualities, but key among them, and IMHO the key to its wide appeal and adoption, is that Python was designed specifically for code readability, and in this regard it has succeeded. Even if you don't know Python at all, most programmers (even casual) can look at the code and grasp what it is doing (so, not C-like in this regard).

I think the key overall weakness (which is actually a plus feature for some folks) is that it is an interpreted language, so subject to the limitations that brings. I've seen a few compilers are starting to come out for specialized use, but I don't think any general purpose compilers exist from reputable vendors (though, if I'm wrong, please add information).

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
09-07-2018, 05:46 AM (This post was last modified: 09-07-2018 05:48 AM by parisse.)
Post: #3
RE: HP Prime: python programming language support?
(09-06-2018 07:22 PM)jebem Wrote:  I understand that a Python language front end was implemented in the HP Prime CAS environment about one year ago, but I wonder how does it compare against the 2018 new and recently released Casio fx-CG50 v3.20 and NumWorks v1.7.0 implementations?
Many simple Python scripts will run on the HP (I mean OOP or some advanced features like yield are not supported). Some scripts will require a few adjustements. And the HP UI does not support Python compatibility right now.
One big difference with the Casio and Numworks MicroPython implementations is that the CAS programming language is fully integrated in the HP calc. You can call any CAS and HP PPL commands from your Python syntax CAS scripts. Casio has only urandom and math modules, Numworks urandom/math/cmath and a few pixelized graphic commands. On the HP you have something equivalent to numpy/scipy+CAS.
Actually, this is not the full picture on the Casio CG50/CG20/Graph 90+e, because I have ported Xcas on it
https://www-fourier.ujf-grenoble.fr/~par...sioen.html
(https://www-fourier.ujf-grenoble.fr/~par...casio.html if you read French)
If you are running KhiCAS, you will also have a much more complete programming environment on the Casio + some features that are currently not available on the HP like Logo turtle or programming editor with syntax coloration and parenthese matching. On the other hand, the Xcas port on the Casio is incomplete because there is not enough room in flash to make a full port.
Find all posts by this user
Quote this message in a reply
09-07-2018, 11:38 AM
Post: #4
RE: HP Prime: python programming language support?
(09-07-2018 05:46 AM)parisse Wrote:  Many simple Python scripts will run on the HP (I mean OOP or some advanced features like yield are not supported). Some scripts will require a few adjustements. And the HP UI does not support Python compatibility right now.

Python on the HP Prime CAS? Really? Good news!
Any examples of the (limited) HP Prime Python scripts?
What are the limitations or the mentioned adjustments?

This could yet another classroom competitive edge on the HP Prime.
I hope that Tim & Cyrille could persuade The Big Boss
to fund for a more complete edition with HP UI support
as well as a good, prepared documentation with examples.

More for the classroom - and for the NEW fans.
More educational institutes and more individuals will adapt to the HP Prime.
VPN
Find all posts by this user
Quote this message in a reply
09-08-2018, 09:16 AM
Post: #5
RE: HP Prime: python programming language support?
(09-07-2018 11:38 AM)CyberAngel Wrote:  
(09-07-2018 05:46 AM)parisse Wrote:  Many simple Python scripts will run on the HP (I mean OOP or some advanced features like yield are not supported). Some scripts will require a few adjustements. And the HP UI does not support Python compatibility right now.

Python on the HP Prime CAS? Really? Good news!
Any examples of the (limited) HP Prime Python scripts?
What are the limitations or the mentioned adjustments?

This could yet another classroom competitive edge on the HP Prime.
I hope that Tim & Cyrille could persuade The Big Boss
to fund for a more complete edition with HP UI support
as well as a good, prepared documentation with examples.

More for the classroom - and for the NEW fans.
More educational institutes and more individuals will adapt to the HP Prime.
VPN

Don't get too excited! See http://www.hpmuseum.org/forum/thread-948...l#pid83159.

Some python-like constructs are allowed in CAS but python programs will (generally) not run as-is.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
09-08-2018, 10:54 AM
Post: #6
RE: HP Prime: python programming language support?
Don't be too pessimistic :-)
For math school use, I hope that most scripts will run, a few will require minor changes.
Find all posts by this user
Quote this message in a reply
01-22-2019, 03:36 PM
Post: #7
RE: HP Prime: python programming language support?
Where would I find basic instruction in how to write some microPython code on the HP Prime.

I got the fx-CG50 recently, and so far, it seems that it's micropython doesn't even support arrays, which to me is a grave shortcoming.

So I'm searching the web for an introductory tutorial or the equivalent. Oh for the days that a reference manual for a calculators programming language could be stuffed into a coat pocket.

John
Fortran in college (1969)
BASIC since TRS-80 Model 1 Level 1 16K in 1977
Find all posts by this user
Quote this message in a reply
01-22-2019, 03:55 PM
Post: #8
RE: HP Prime: python programming language support?
(09-06-2018 08:53 PM)rprosperi Wrote:  Python has many excellent qualities, but key among them, and IMHO the key to its wide appeal and adoption, is that Python was designed specifically for code readability, and in this regard it has succeeded. Even if you don't know Python at all, most programmers (even casual) can look at the code and grasp what it is doing (so, not C-like in this regard).

I think the key overall weakness (which is actually a plus feature for some folks) is that it is an interpreted language, so subject to the limitations that brings. I've seen a few compilers are starting to come out for specialized use, but I don't think any general purpose compilers exist from reputable vendors (though, if I'm wrong, please add information).

Bob, thanks for this information. I've been aware of Python for a few years but never really investigated it. I'm all for making code easier to understand. There are so many programming languages these days, I yearn for the days when it was FORTRAN or assembly.

Regarding compiled versus interpreted, I think that many would be surprised to know that the original BASIC at Dartmouth College in 1964 was compiled and ran on a GE minicomputer. BASIC implementations became interpreted when people like Bill Gates had to stuff BASIC on microcomputers.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)