in reply to Re^3: short sorts
in thread short sorts
Arunbear, you seem to be having some fun with this, though you have really made it explode beyond a simple silly subroutine that I plopped into my Nifty module. (My Nifty module is where I put subroutines that I use, but can't categorize anywhere else.) What you have written looks like it would have to be put in a stand alone module. You have added a lot of complexity that I am having a hard time following. It could be that I am having a hard time seeing past my own dispatch table.
I am not entirely sure what you mean when you say that you are making this functional. It could be that I see "subroutine", "sub", and "function" used almost interchangeably that I am not picking up on the subtle differences between them.
As to why the random sort is not acting as expected, I am not sure I can explain the results I was seeing returned. The best I can do is say that it was getting new sort parameters for each iteration of the list while it was being sorted. I also had trouble keeping numerical sorts out of the mix which of course would throw up all kinds of warnings when non-numbers were being sorted.
I hope that you found the idea useful and are using it. Thank you for taking the time to play with this and show me what else can be done. Really silly sorts like sorting from the second character or third to the last character will wait until later. I was thinking about assigning hex and ord numbers to each character and sort them that way, but I think that would be the same as a straight up $a cmp $b.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: short sorts
by Arunbear (Prior) on Apr 07, 2012 at 15:37 UTC | |
by topher (Scribe) on Apr 25, 2012 at 22:50 UTC | |
by Arunbear (Prior) on Apr 26, 2012 at 21:59 UTC | |
by Lady_Aleena (Priest) on Apr 10, 2012 at 02:02 UTC |