HP Forums
Looking for userRPL examples - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Looking for userRPL examples (/thread-1148.html)



Looking for userRPL examples - Claudio L. - 04-22-2014 04:22 PM

Hello,
As newRPL slowly progresses, we are in need of small code examples to use in the docs.
Examples need to be short and straight to the point.
But the idea is that the examples should do something cool or fun at the same time, so the docs are not so hard to swallow.
Does anybody know of a collection of userRPL "gems" anywhere?
Or if each of you share their own favorite code snippets here, we can create a small collection of them.
Here's an example that shows how to do linear interpolation, using only stack commands:
given x0 y0 x1 y1 x, returns y corresponding to the point in the same straight line as (x0,y0) and (x1,y1), that has coordinate x.
Code:

<< 3. PICK - 5. ROLL 4. ROLL - / 3. ROLL 3. PICK - * + >>

I know, it isn't that great but shows the use of PICK and ROLL commands, while doing something meaningful. Then we can rewrite the same example but using local variables to show a different way to do it. This is the kind of examples we are looking for.

Thanks


RE: Looking for userRPL examples - Thomas Klemm - 04-22-2014 05:08 PM

(04-22-2014 04:22 PM)Claudio L. Wrote:  Does anybody know of a collection of userRPL "gems" anywhere?
One-Minute Marvels


RE: Looking for userRPL examples - rprosperi - 04-22-2014 07:54 PM

(04-22-2014 05:08 PM)Thomas Klemm Wrote:  One-Minute Marvels

Darn, you beat me to it Thomas. This awesome work from Richard and Wlodek is the universal answer to almost any "I need RPL examples to do..." well almost any reason you need RPL examples, this collection likely has some answers.

To all RPL users: If you aren't familiar with this collection, definitely get it!

I would like to find an analogous collection for the WP-34S, emphasizing 34S-unique (or at least 34S-superior) capabilities. Anyone seen such a thing?


RE: Looking for userRPL examples - Marcus von Cube - 04-22-2014 10:36 PM

(04-22-2014 07:54 PM)rprosperi Wrote:  I would like to find an analogous collection for the WP-34S, emphasizing 34S-unique (or at least 34S-superior) capabilities. Anyone seen such a thing?
Time to start a new thread? Smile


RE: Looking for userRPL examples - Claudio L. - 04-23-2014 01:23 PM

(04-22-2014 05:08 PM)Thomas Klemm Wrote:  
(04-22-2014 04:22 PM)Claudio L. Wrote:  Does anybody know of a collection of userRPL "gems" anywhere?
One-Minute Marvels

Thanks! That's a great start.


RE: Looking for userRPL examples - Tim Wessman - 04-24-2014 05:12 PM

For a longer collection of basic up to more complicated stuff, http://www.hpcalc.org/details.php?id=1771 is where I'd go to. I always thought that was the best learn to program userRPL book there was (although the fact that it was what I learned on probably biased me some).