Re: stable sorting

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Kat, you wrote:

[...]

> Hey Rob (again), maybe we could add keywords to the list that the archive
> search program uses? Versatile libs like strtok and win32lib and the internet
> programs like irc/http/ftp/tcp4u programs could use added keywords that
> don't currently appear in the archive webpage descriptions.

Or maybe you add some more keywords to the description?
Even if I had read the description of 'strtok' on the archieves
webpage ...
------------==-------------------------------==-----------------------
A large set of routines for treating strings of text as streams of
"tokens". Check the on-line documentation. Dec 27: version 2.1, more
commands and options, faster parsing
------------==-------------------------------==-----------------------
... I believe that I wouldn't have got the idea, that this has something
to do with sorting.

[...]

>> The functions are very useful and flexible! I downloaded 'strtok-v2-1.zip'
>> and am very curious to have a closer look at the source code, if I've
>> some more time. Hopefully I'll understand, how it works.
>
> Don't get too comfy with the source, v2.2 changes some things.

OK.

> More
> options and such. I am trying so hard to not break backwards compatability,
> but make the functions more fault tolerant and possibly faster.
>
>>> Strtok v2.2 is due out someday in March 2003.
>>
>> Well.. how about making sorttok() and sortntok() (or two additional
>> functions) even more generic? At the moment, one "record" must be a
>> string:
>>
>> sorted = sorttok({"Fred,Astaire,45,Alberta,Canada",
>>                   "Lucy,Ball,56,Barre,North Dakota",
>>                   "Red,Skelton,34,London,England",
>>                   "Pierre,du Pont,12,Paris,France"},
>>                   3, ',')
>>
>> I don't always have comma (or semicolon or whatever) delimeted fields.
>
> You know you can use any unique delimiter you want, right? As long as the
> char is not a member of the top sequences (this works only on two-deep
> sequences), you can use none, or anything.

Yes, I know.

>> So wouldn't it be more generic, if one field is an atom or a sequence?
>> E.g.:
>>
>> sorted = sorttok({{"Fred","Astaire",45,"Alberta","Canada"},
>>                   {"Lucy","Ball",56,"Barre","North Dakota"},
>>                   {"Red","Skelton",34,"London","England"},
>>                   {"Pierre","du Pont",12,"Paris","France"}},
>>                   3, ',')
>
> I considered this early on, but i myself didn't need that option at the time,
> and there wasn't a request for it when i issued a RFC for the next strtok lib
> version.

It was just an idea, because I personally like generic routines. I don't
have much experience with sorting though.

> Looks reasonable to do, since, if the program assumes the
> programmer knows what they are doing, such a list would be of nested
> sequences, and not atoms. I'll take a peek at it tonite. Maybe. I still am
> doing battle with the flu.

I hope you get better soon.

> I was going to make such things part of 2.2, but i could do a 2.15 release.

I'm not in a hurry ...

> By the way, strtok should be fine with the new Eu versions, since there are
> no includes in the strtok lib.
>
> Kat

Best regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |  while not asleep do
 \ /  against HTML in       |     sheep += 1
  X   e-mail and news,      |  end while
 / \  and unneeded MIME     |

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu