Post Reply 
Tripartite Palindromic Partition of Integer (HP 50g) Challenge
03-13-2023, 11:00 PM (This post was last modified: 03-13-2023 11:03 PM by 2old2randr.)
Post: #73
RE: Tripartite Palindromic Partition of Integer (HP 50g) Challenge
Thanks, Gerald.

I only got interested in the problem after reading the initial discussion on this thread. Being new to RPL and the 50g, I thought it would be an interesting exercise to translate a non-trivial and (relatively) clear set of algorithms to RPL as a way to improve my familiarity with writing programs for the 50g.

I think the initial implementation took a couple of hours a day over the course of a week. Most of the time was spent in importing the code (typed in a text editor on my Mac) to the calculator. Because there is no help from the editor with respect to the syntax, in some cases, it took me a while to find the cause of a syntax error and fix it. Initially, I had to resort to deleting blocks (in the calculator editor) to check where the error was contained. Only later did I find a quicker way to locate the position of the syntax error. All my testing was done on the calculator itself. I tried to find numbers that exercised different cases in the algorithms but couldn't in some cases - as you've pointed out on several occasions.

Most of the errors (apart from a few e.g., SML5) were due to the programs being syntactically valid but containing typos of various kinds. This is down to my not having an editing environment on the Mac that can help. For example, one of the errors was due to an AND being misplaced - instead of 'a 1 < b 0 == AND THEN', I had typed 'a 1 < b 0 AND == THEN'. This does not leave extraneous values on the stack but the wrong branch is taken in some cases ...

Anyhow, I was determined to see this through once I started on it. This is why I added SML2-SML6 once the main algorithms seemed ok.

Thank you for setting up the challenge. I quite enjoyed it and I think I'm now quite used to the computer -> 50g environment I am using. I found I am making fewer syntax errors now as compared to when I started and the bugs now are mostly genuine errors in logic rather than typos as they used to be earlier.

Sudhir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Tripartite Palindromic Partition of Integer (HP 50g) Challenge - 2old2randr - 03-13-2023 11:00 PM



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