Re: HP 39gII and parallel list processing Message #10 Posted by Gilles Carpentier on 24 July 2012, 6:43 p.m., in response to message #5 by Tim Wessman
Just my 2 euros :
I prefer to not respond to your RPL point of view. It is not my opinion but we all know that this is a endless debate.
Quote:
Open questions to everyone: Were we able to eventually support RPN on something like this device, how would you like it done? What would be "absolutely critical"? What would be nice but not critical?
In my opinion, just a RPN vision for such a calc is not enough. It seems you want to forget the RPL but there are some concepts of RPL you could not forget.
I'm new to the 39gII and i must say I don't really understand how this calc deals with algebraic objects. Just un example with the ITERATE command :
ITERATE (X²+5,X,2,3) (what it does is not really important).
In my point of view, it would be more logic to do :
ITERATE ('X²+5','X',2,3)
But in an algebraic language, the system knows that the first and second parameters must be algebraic (and not to be evaluated immediatly, that's the important point!) . In a RPN language,the system can't. So you have no choice. in RPN all objects on the stack must have a unambigous type. For example :
'X²+5' 'X' 2 3 ITERATE
(as you see, i think such powerfull RPN calculator must also understand algebraic syntax - I think it's not a problem)
But it's a RPN calc, so we must be able to write the function in RPN (and more than a function, a program !)
BEGIN ² 5 + END 'X' 2 3 ITERATE // In this case, 'X' unuse, but can be use in a more complex program IF 10 > THEN X ² ELSE X SQRT END
(or why not << ² 5 + >> 'X' 2 3 ITERATE ;D
The system must knows exactly what type of objects are on the stack (Real,integer,list,matrrix, algebraic,program to evaluate etc.)
For example a new MAP function (which apply a function or a program to all the items of a matrix or a list) could be something like :
L1 'f(x)=x²+3' MAP // Define a local agebraic function
(or L1 '->x x²+3' MAP )
or
L1 BEGIN ² 3 + END MAP
( or L1 << ² 3 + >> MAP )
Of course you need some stack manipulation command
For this kind of calc,the stack must be of course 'infinite'
... SWAP or X<->Y, ROT or other name ? it's not a problem!
Could be interesting to have mnemotechnic commands in remplacement of the FORTH legacy X<->Y (SWAP) X->X (DUP) Z->X etc...I dont knowbut I must say the FORTH legacy is fine for me.
I think that most of the algebraic 39gII could work in RPN.
But it seems more logical to have
LOCAL 'a' 'b' 'c'
or
{'a' 'b' 'c'} LOCAL (I prefer this, and just 'a' LOCAL if only one variable)
EXPORT SQUARE // quote or not quote ? EXPORT SQUARE or 'SQUARE' EXPORT Imo depends if the language allows self creation of program.
As a RPL user I prefer a lot 'SQUARE' EXPORT
<< X->X * >> //or DUP,or ENTER
'CUBE' EXPORT
<< X->X SQUARE *>>
RETURN just leave the 'word'. What is on the stack,it is to the programmer to work well ! So on the contrary with the 39gII,a word (function) can return more than only one item (and not only a list of items which is in general a too heavy process ( note that there is a beautiful way to do with the 50G { 1 2 3 } { 'One' 'Two' 'Three'} STO
etc etc...
Edited: 24 July 2012, 7:46 p.m.
|