Post Reply 
Little explorations with HP calculators (no Prime)
03-31-2017, 05:27 PM (This post was last modified: 03-31-2017 05:43 PM by pier4r.)
Post: #90
RE: Little explorations with the HP calculators
(03-31-2017 03:12 PM)DavidM Wrote:  -

Super thanks! You cannot believe how helpful you were. my goodness two weeks.

First and foremost I steal your timeit program, I did not think about it. Pretty neat.

Second the result that you report shows a bug in my program. Every correspondent place in the lower list should have a 1 where the main list has 22 (because it is the maximum). It is like i messed up with POS and TAIL. I can debug it like "unit testing" though thanks to the DIR structure and not a big nested program.

I did not see that in my tests, so great.

Third: 2 weeks, too long.

Fourth, for the optimizations. Yes I used SEQ syntax as seen in a couple of examples over the internet, I may do a program to replace that just with a FOR, at the end I need a list though. Or maybe as you suggested: stack duplicates, number, \->LIST.

About the algebraics. Sometimes I use algebraics to improve the readability of the code ( like 'matrix(row,column)' or expressions that are ugly - for me - in RPL, I prefer 'n^2' rather than n 2 ^ ). Otherwise I always end up on it and say "what the heck do I want to do here?" even if I add comments.

In general I tend to avoid direct stack operations unless they are very small, otherwise I need to put long comments in the code to remember myself how the operations will work (see the comments near the STREAM command in the code that you copied).

So I suppose there is room for improvements but not if I want to stick with certain principles for code readability and maintainability. For example the message #8 in this post makes heavy use of the stack and to me it is unreadable until I debug it and I add comments.

Sure I know I lose quite a lot of speed. I would say that even when I fix the bug that your report showed me, I cannot wait 2 weeks for a result of just one tournament format, when I have to test 4 of them. (this would mean 2 months of activity for the 50g, I would need a very stable source of power to not lose the computation)

So, many thanks for your input once again, surely the program was neat to learn about the directory structure and some other stuff. Now I fix some passages and then I archive it.

Or maybe I can give it a try and ask here how people would do some parts, if I split my code in very small generic parts.

Ok I killed the execution on the 50g. It had done 74 iterations completely, in 42h and 42m. So an average of 34 minutes per iteration on my side.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Little explorations with the HP calculators - pier4r - 03-31-2017 05:27 PM



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