HHC 2014, HP Handheld Conference, Sept. 20-21, 2014, Reno, NV: Joe Horn presents "Programming the Same Task on an HP-41, HP-71B, HP 50g, and HP Prime".
Very nice seeing how the program changes depending on the platform. For the HP Prime, there is no need to "swap" for the Prime, and storing T into B is unnecessary. LOCAL T:=MAX(A,B); A:=MIN(A,B); return({%CHANGE(A,T), %CHANGE(T,A)}); Also, if you run the program from the Program Browser, it will provide you a nice input form where you only need to enter the values 4, and 5 as the input (i.e. no need to type PCH(4,5).
≈ 9:00 Semicolon needed at end of command? They seem to agree that it isn't needed for the last command in the program, also citing Pascal for that. I believe Pascal inherited that part of its syntax from ALGOL, which didn't require semicolon after the final command in a block. A practice that is frowned upon, because when you edit the program, if you add more statements after that line within that block, you're in trouble if you then forget to add that missing semicolon!
@Ralph Reilly A very welcome innovation, that latter, which we didn't have the benefit of, 50+ years ago. It probably would have overtaxed the CPUs of that era. Fred
And they have powerful RPL with hierarchical catalogs of variables, and u can program it on C/C++ ! And HP 50g is still faster than "modern" HP Prime, because u can't program Prime with C/C++ !
Yes, and it really is sweet. LastArg reproduces the arguments consumed by the previous command, so matches up very well with high=max(a,b), low=min(a,b). The same technique was then used for the two %Ch calls. It could be written many other ways, e.g: Max LastArg Min Dup2 Max UnRot Min Dup2 < «Swap» IfT If Dup2 < Then Swap End 2 →List Sort RevList List→ The Swap way is more similar to the HP-41 and HP-71B examples, while the Max/Min ways are more like the Prime example. Just for fun, let me try a different approach without %Ch: « / Dup Inv 2 →List «1 - 100 *» Map Sort List→ Swap » I think the one in this presentation was easily the most neat of these.
It would have been ideal to have RPL available for command line programming , and some kind of C derivative for the IDE. The 50g still has the most elegant programming interface.
+Falcrist Its not true (at least for everything before Prime), kids could play with logarithmic ruler, but it does not make it a toy. Same for serious things as HP 50g, i can,t see ways kids could play with it. People stil use things HP-15C and small analogue DM-15C. You cant solve demand for spontaneous pocket calculations with smartphones because they are not autonomous enough and its not comfortable type numbers on glass screen.
Ex Set Pocket calculators and graphing calculators are for classrooms and collectors. If you're doing math-heavy work like engineering or scientific work, you're using python, mathcad, or specialized software to get the job done. If it's anything else, you're most likely using spreadsheet and database programs. For basic computations, there are a metric fuckton of programs, including emulators of almost every calculator that has ever been made. If you're doing real work, there are five options: 1) You're in an office, in which case you're using a desktop, workstation, or server to do computations. 2) You're on the go, in which case you use a phone, tablet, or laptop... not an extra calculator. 3) You're a surveyor working for a company that somehow can't afford to upgrade from 1970s technology. 4) You live in a 3rd world country, and don't have access to computers. 5) You're a hipster dumbass who finds excuses to bust out a calculator when you should be using a real tool. The fact that you think it's not possible to use a phone for literally everything a calculator can do indicates that you fall into the dumbass category. The fact that you differentiate between the Prime and the 50g confirms that you're a dumbass. I'm thoroughly enjoying the irony of a person who thinks the HP Prime is a toy, but can't handle the fact that the entire pocket calculator genre is obsoleted to the point of being toys and museum pieces. I bet you're already trying to think of ways to convince me that you're an engineer. Go ahead. This should be fucking rich.
Prime is worse, 'cause it could give both worlds, but they dropped RPL at all and closed low level programming from developers. I like Prime exterior, but it is gloomy jail internally.
Very nice seeing how the program changes depending on the platform. For the HP Prime, there is no need to "swap" for the Prime, and storing T into B is unnecessary.
LOCAL T:=MAX(A,B);
A:=MIN(A,B);
return({%CHANGE(A,T), %CHANGE(T,A)});
Also, if you run the program from the Program Browser, it will provide you a nice input form where you only need to enter the values 4, and 5 as the input (i.e. no need to type PCH(4,5).
HP 71B is the one and only. The most amazing computer ever made
This is a really helpful comparison. I like the elegance of the RPL stack in theory, but the PPL is more human-readable for me in practice.
≈ 9:00
Semicolon needed at end of command? They seem to agree that it isn't needed for the last command in the program, also citing Pascal for that.
I believe Pascal inherited that part of its syntax from ALGOL, which didn't require semicolon after the final command in a block. A practice that is frowned upon, because when you edit the program, if you add more statements after that line within that block, you're in trouble if you then forget to add that missing semicolon!
@Ralph Reilly A very welcome innovation, that latter, which we didn't have the benefit of, 50+ years ago.
It probably would have overtaxed the CPUs of that era.
Fred
I just watched this...
HP 50g. Intuitive. They use stack commands.
And they have powerful RPL with hierarchical catalogs of variables, and u can program it on C/C++ ! And HP 50g is still faster than "modern" HP Prime, because u can't program Prime with C/C++ !
@@IExSet who is programming the 50g in C/C++ ? Not me !! 🤔😉
Does the 50g program actually do the same thing as the others?
Yes, and it really is sweet. LastArg reproduces the arguments consumed by the previous command, so matches up very well with high=max(a,b), low=min(a,b). The same technique was then used for the two %Ch calls. It could be written many other ways, e.g:
Max LastArg Min
Dup2 Max UnRot Min
Dup2 < «Swap» IfT
If Dup2 < Then Swap End
2 →List Sort RevList List→
The Swap way is more similar to the HP-41 and HP-71B examples, while the Max/Min ways are more like the Prime example.
Just for fun, let me try a different approach without %Ch:
«
/
Dup Inv
2 →List
«1 - 100 *» Map
Sort
List→
Swap
»
I think the one in this presentation was easily the most neat of these.
Just because the Prime needs longer code it doesn't mean it's worse. Sure, you lose efficiency but you gain ease of use and readability.
It would have been ideal to have RPL available for command line programming , and some kind of C derivative for the IDE. The 50g still has the most elegant programming interface.
Prime is toy for schoolboys(girls)
Ex Set All pocket calculators and graphing calculators are toys for schoolboys(girls).
+Falcrist Its not true (at least for everything before Prime), kids could play with logarithmic ruler, but it does not make it a toy. Same for serious things as HP 50g, i can,t see ways kids could play with it. People stil use things HP-15C and small analogue DM-15C. You cant solve demand for spontaneous pocket calculations with smartphones because they are not autonomous enough and its not comfortable type numbers on glass screen.
Ex Set Pocket calculators and graphing calculators are for classrooms and collectors.
If you're doing math-heavy work like engineering or scientific work, you're using python, mathcad, or specialized software to get the job done. If it's anything else, you're most likely using spreadsheet and database programs. For basic computations, there are a metric fuckton of programs, including emulators of almost every calculator that has ever been made.
If you're doing real work, there are five options:
1) You're in an office, in which case you're using a desktop, workstation, or server to do computations.
2) You're on the go, in which case you use a phone, tablet, or laptop... not an extra calculator.
3) You're a surveyor working for a company that somehow can't afford to upgrade from 1970s technology.
4) You live in a 3rd world country, and don't have access to computers.
5) You're a hipster dumbass who finds excuses to bust out a calculator when you should be using a real tool.
The fact that you think it's not possible to use a phone for literally everything a calculator can do indicates that you fall into the dumbass category. The fact that you differentiate between the Prime and the 50g confirms that you're a dumbass.
I'm thoroughly enjoying the irony of a person who thinks the HP Prime is a toy, but can't handle the fact that the entire pocket calculator genre is obsoleted to the point of being toys and museum pieces. I bet you're already trying to think of ways to convince me that you're an engineer.
Go ahead. This should be fucking rich.
PACIFIC COAST HIGHWAY
Prime is worse, 'cause it could give both worlds, but they dropped RPL at all and closed low level programming from developers. I like Prime exterior, but it is gloomy jail internally.
He sounds like George Carlin
Non è utile