HP Forums
Haskell & RPL - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Haskell & RPL (/thread-3733.html)



Haskell & RPL - Tugdual - 04-27-2015 10:32 PM

I just decided to learn the basics of Haskell and this is quite fascinating (I encourage anybody to discover it).
Now the more I read about Haskell the more I feel like RPL has some familiarities though it doesn't belong to the family of functional programming languages. I find Haskell interesting for some math applications, and the syntax is quite light so I was wondering if there had ever been some thoughts about having Haskell on a calculator?


RE: Haskell & RPL - Thomas Klemm - 04-27-2015 11:11 PM

You might like Joy which I consider a mix of Haskell and Forth.
The nutstudio (HP-41 calculator emulator and tools) could be of interest as well.

Cheers
Thomas


RE: Haskell & RPL - Gilles - 04-28-2015 07:31 AM

(04-27-2015 10:32 PM)Tugdual Wrote:  I just decided to learn the basics of Haskell and this is quite fascinating (I encourage anybody to discover it).
Now the more I read about Haskell the more I feel like RPL has some familiarities though it doesn't belong to the family of functional programming languages. I find Haskell interesting for some math applications, and the syntax is quite light so I was wondering if there had ever been some thoughts about having Haskell on a calculator?

Haskell is very interesting....

Not totally haskell but I use a lot the "Gofer Library" on my HP50G :
http://www.musikwissenschaft.uni-mainz.de/~ag/hp49/hp49.php

Read me

An excellent and must-have library !
I think that if you like Haskell, you will like this library.


RE: Haskell & RPL - Paul Dale - 04-28-2015 07:36 AM

I did consider the possibility of using something like Haskell and an arbitrary precision numeric library in a calculator to guarantee results to a specific number of significant digits. The lazy evaluation is a bonus here, the unlimited memory requirements a set back. Still, it would be an interesting project.


- Pauli


RE: Haskell & RPL - BruceH - 05-06-2015 03:31 PM

(04-28-2015 07:36 AM)Paul Dale Wrote:  I did consider the possibility of using something like Haskell and an arbitrary precision numeric library in a calculator to guarantee results to a specific number of significant digits. The lazy evaluation is a bonus here, the unlimited memory requirements a set back. Still, it would be an interesting project.
- Pauli

One nice feature of Haskell is that it generates C code. So if one were, hypothetically speaking, intending to produce an entirely new firmware for a calculator like the 50G, then writing a new RPL in Haskell rather than directly in C would result in much more rapid development times, with rather fewer bugs and more easily automated testing.

So don't port Haskell to the calc, but use it to develop a new calc. As I suggested in another thread previously, FreeRTOS provides a nice OS base and any new RPL implementation can run as an app on top of it.