Good point, Werner. Though not needed for this example, that would take care of that option for other uses.
DM 48 .... WHY NOT ?!!!
Re: DM 48 .... WHY NOT ?!!!
Thank you for the discussion. I'm learning a lot. That's one of the annoying things about UserRPL from a programmer's perspective. It attempts to be user friendly and allows you to add an atom to a list. I'd almost rather that be an error because 1 + { 2 } should not be the same as { 1 } + { 2 }. Because of the weirdness around list concatenation, the cons operation becomes:
Every computer science type of operation is not as concise as it could be and there's more weird edge cases to remember. I suppose that's reasonable because the OS was designed for calculators not as a portable Lisp machine.
Code: Select all
<< 1 ->LIST SWAP + >> STO 'CONS'
Re: DM 48 .... WHY NOT ?!!!
One more love letter to RPL then I'll stop spamming this thread. Here's a very simple prefix to postfix converter that takes simple Lisp code and turns it inside out to make RPN. The operators must not be expressions, which is a bogus requirement but I haven't worked out how to do it yet. The LAMBDA function is from my previous post. I build the result only using CONS, which adds an element to the front of the list.
This give the result:
If you evaluate it you will get 5.
I wrote this on an HP50g, but if I had DM48, I would have used it instead and it would most certainly be smaller and less intimidating. I think HP intentionally made the HP50g so it would as big as the yucky TI-83 calculators that everyone was using at the time.
If SM releases the DMCP SDK for the DM32, it would be a great platform to implement an HP48. I would use a long press to distinguish between the soft keys / A-F and the row below. It's not ideal I know, but I'd be happy to use it!
Code: Select all
«
1 →LIST SWAP +
» 'CONS' STO
« → l
»
« » →LST DUP TAIL SWAP HEAD l + SWAP + →PRG
»
» 'LAMBDA' STO
« → pst pre
«
IF pre TYPE 5 == NOT
THEN pst pre CONS
ELSE pst pre HEAD CONS pre TAIL PPArgs
END
»
» 'PrPoIn' STO
« → pst pre
«
IF pre { } SAME
THEN pst
ELSE pst pre TAIL PPArgs pre HEAD PrPoIn
END
»
» 'PPArgs' STO
«
{ } SWAP PrPoIn LAMBDA
» 'PrPo' STO
{ √
{ /
{ -
{ *
5
{ SQ 4 }
}
{ + 2 3 }
}
{ / 9 3 }
}
} PrPo
Code: Select all
« 5 4 SQ * 2 3 + - 9 3 / / √ »
I wrote this on an HP50g, but if I had DM48, I would have used it instead and it would most certainly be smaller and less intimidating. I think HP intentionally made the HP50g so it would as big as the yucky TI-83 calculators that everyone was using at the time.
If SM releases the DMCP SDK for the DM32, it would be a great platform to implement an HP48. I would use a long press to distinguish between the soft keys / A-F and the row below. It's not ideal I know, but I'd be happy to use it!
Re: DM 48 .... WHY NOT ?!!!
I find it prudent to add to this recent discussion in this old thread a topic that has been brought up earlier in the thread: newRPL.
First, it makes the compatibility-breaking but very sane change from the RPL of HP to use the operand + with lists not for concatenation but for addition, swapping it with the function ADD. This makes list concatenation have the very odd name ADD, but, nonetheless an improvement if you ask me. Avoids the confusion discussed above.
https://newrpl.wiki.hpgcc3.org/doku.php ... ter3:lists
Second, there is now a project that runs newRPL on the DM42 hardware! Very early stages, but at least it's a starting point and a proof of concept. And I fully intend to eventually run something like that on a DM32 or three. I do not expect my two 50g's to last until the end of my professional career, however, I do expect my dependence on such a calculator to last... so I am going to make that happen, if no one else does.
viewtopic.php?f=20&t=3363
First, it makes the compatibility-breaking but very sane change from the RPL of HP to use the operand + with lists not for concatenation but for addition, swapping it with the function ADD. This makes list concatenation have the very odd name ADD, but, nonetheless an improvement if you ask me. Avoids the confusion discussed above.
https://newrpl.wiki.hpgcc3.org/doku.php ... ter3:lists
Second, there is now a project that runs newRPL on the DM42 hardware! Very early stages, but at least it's a starting point and a proof of concept. And I fully intend to eventually run something like that on a DM32 or three. I do not expect my two 50g's to last until the end of my professional career, however, I do expect my dependence on such a calculator to last... so I am going to make that happen, if no one else does.
viewtopic.php?f=20&t=3363
Re: DM 48 .... WHY NOT ?!!!
All great news imho. I am looking forward to the day when i can run a 48 on Dm42 hardware.
Waiting for SM to release DM42 hardware with one additional row of keys.
DM42, DB48X, DM32, HP42s, DM41X, HP35s, DM41L
Raising a next generation RPN/RPL user.
DM42, DB48X, DM32, HP42s, DM41X, HP35s, DM41L
Raising a next generation RPN/RPL user.