Post Reply 
Programming puzzles: processing lists!
02-14-2019, 09:13 PM
Post: #276
RE: Programming puzzles: processing lists!
(02-14-2019 06:21 PM)pier4r Wrote:  For those that like stackrobatics surely it would be pleasant.

This made me LOL (seriously). Is there truly anyone who enjoys manipulating large groups of items on the stack? I think the only enjoyment I ever get from it is when I actually finalize some RPL-stack-modifying implementation that succeeds in doing what I actually meant for it do in the first place. There's a feeling like you're blindfolded and you just (successfully) taught someone how to juggle spinning chainsaws. At some point you ask "why do I put myself through this?", but inevitably there are those moments when you realize that something magic just happened in your calculator that you taught it to do. I suppose that's what keeps me dabbling with it. For what it's worth, I see the same issues with RPN vs. RPL code in this regard. It's just that RPL allows you to have much more on the stack, so the complexity can be greater.

(02-14-2019 06:21 PM)pier4r Wrote:  I say built in as the multistopwatch uses a type of data structure I never saw before that I think it is not user RPL accessible.

That data object has a formal type: Library Data, which is a generic RPL object type defined by the O/S. It's essentially an encapsulation of binary data formatted in whatever way the programmer wanted (there is no defined structure within a Library Data object). In that particular case, I did provide a way to export the data into... you guessed it... a list that can be interrogated, analyzed, and manipulated in whatever way you wish. (Technically, it's a multi-layered list, and some of the elements of sublists are actually arrays Smile).

(02-14-2019 06:21 PM)pier4r Wrote:  For me it was a semi shock as I asked such question in 2013 or the like and the consensus was "between lists and arrays there is not much difference in speed". Having the lists plenty of functions more (thanks to DavidM too), the lists were the way to go until yesterday.

Yes, there are some things which type 3 arrays may make easier/faster. But the more customization you need, the less likely the case that arrays will be significantly better than lists.

(02-14-2019 06:21 PM)pier4r Wrote:  But when A takes ~ 100 time less the speed of B, according to certain programming styles at least, then A becomes attractive to explore.

Absolutely. And I would suggest that RPL is rich enough that there are many different paths to this kind of discovery. Despite many years of tinkering with these systems, I keep seeing people come up with new and interesting ways of solving problems that never cease to amaze.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Programming puzzles: processing lists! - DavidM - 02-14-2019 09:13 PM

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