Sweet! Thanks Mark...Cool to see someone has done research with sorting
algorithms in lingo.

Something I tried once that wasn't too bad was using an intermediary
property list that was sorted by property. By walking down a list of
proplists (aka records), I would copy the info to be sorted from one
list into the property of the sorted 'lookup' list and put the id of the
'record' into the value of the lookup's property. True, I had to walk
through the whole list 2 times max (1-walk through and build sorted
lookup, 2-walk through lookup and build the final sorted), but the speed
was crazy fast...A list of thousands of records could be sorted almost
instantaneously. Primarily it was used for a proprietary database, but
now with Valentina supporting most sql and being faster than light
itself, its not of much use anymore...Which is probably a good thing: I
didn't want to have to port SQL to lingo anyway :0)

I'll have to dig up the code somewhere, it's a little bulky but it works
well. Unfortunately, it would only help with 'natural' sorting if some
sort of processing was done as the sorting properties were added to the
lookup...Which may incur a performance penalty if analyzing strings on a
character level. But it may work nonetheless for smaller lists (under
1000).

~Mathew


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark A. Boyd
> Sent: Tuesday, August 26, 2003 1:35 PM
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> BaFileList() and .sort
> 
> 
> At 08:41 2003-08-26, Mathew Ray wrote:
> 
> >Which brings up another question: Anybody have good efficient lingo
> >utilities for doing different types of sorting? Uhoh, I feel the a
> >flashback coming on...DFS, BFS, red-black BSTs, bubblesorts, 
> mergesorts,
> >oh my! Maybe I should pull out my old notes. They are in a 
> box somewhere
> 
> The only one that pops into my mind is David Mennenoh's found here:
> http://www.crackconspiracy.com/%7Edavem/dave/davedir2.htm
> 
> I really haven't read through that page, but on another page, 
> davedir.htm, 
> he says "You'll find code for the infamous Bubble Sort, 
> Insertion Sort, 
> Shell Sort, and Quick Sort along with a couple more little 
> things if you 
> download the Director cast."
> 
> 
> 
> --
> Mark A. Boyd
> Keep-On-Learnin' :)



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to