Artifacts Associated With Ticket 747083ffffffffffffffffffffffffffffffffff
Ticket change [ad3ef2c2d6] (rid 101439) by nobody on 2003-06-01 17:17:57:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
improve lsearch by adding a -command tclcmd option to search list items using the same function as lsort e.g. set L [lsort -command CompareVector $L] set X [lsearch -sorted -command CompareVector $L] also some grouping would be great: think you have a list with every 4 items belong to a group and you wanna sort it by the third item: e.g. set L { a0 a1 a2 a3 b0 b1 b2 b3 c0 c1 c2 c3 .. } to sort using lsort you have to make a list of lists by set L2 {} foreach {a b c d} { lappend L2 [list $a $b $c $d] } set L2 [lsort -index 2 $L2] set L [concat $L2] a faster approach with the nonexisting -group option set L [lsort -group 4 -index 2 $L] searching such lists is required than as well so lsearch -group 4 -index 2 $L c2 will return 2 the group number (my favourite, or 10 as the real index, or 8 as the first member of the group) such grouped lists are very general in my opinion, because regexp,array get,split are functions that may return such lists finally a quick "lreverse list" command would be a nice idea. - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: ""
- title initialized to:
lsearch -command tclcmd -group grpsize, lsort -group grpsiz
- type initialized to: "Support"
Ticket change [d930296c7a] (rid 107565) by dkf on 2003-06-02 17:56:20:
- assignee changed to: "dkf"
- subsystem changed to: ""
Ticket change [33a587776f] (rid 106630) by mic42 on 2003-08-15 13:41:09:
- icomment:
Logged In: YES user_id=302287 The TIP #127 implementation could help with a part of this internally. Implementing -group could basically consists of a preprocessing step to create sublists for internal use, that get flattend out after searching or sorting is done. Could give quite complex interactions with the -index option if used on nested lists. Implementing -command is trivial, just copy the code from lsort. It would have fit in quite well for TIP #127, but i didn't see it requested here and no comment was added to the TIP (or mailed to me).
- login: "mic42"
- mimetype: "text/plain"
- username: "mic42"
- icomment:
Ticket change [282fa886e1] (rid 88651) by kieranelby on 2008-08-29 23:36:24:
- icomment:
Logged In: YES user_id=99072 Originator: NO I've often thought the ability to directly sort a name-value style of list would be rather useful, and fancied some exercise in Tcl internals, so I've created patch 2082681 which adds a "-group" option to lsort: https://sourceforge.net/tracker/?func=detail&aid=2082681&group_id=10894&atid=310894 When using -group in conjunction with the multiple index form of -index, it seemed to make most sense to have -group consume the first index given to -index, and use that as the offset within each group. e.g. % lsort -group 3 -index {0 1} \ {{Bob Smith} 25 Audi {Jane Doe} 40 Ford} {{Jane Doe} 40 Ford {Bob Smith} 25 Audi} (since Smith is index 1 of element 0 of the first group of 3, and it sorts after Doe in the corresponding position in the 2nd group of 3). I might get round to a patch for lsearch and a TIP at some point ... - login: "kieranelby"
- mimetype: "text/plain"
- username: "kieranelby"
- icomment:
Ticket change [b75aeed601] (rid 125573) by dkf on 2008-09-29 15:51:20:
- closedate changed to: "2008-09-29T08:51:20"
- closer changed to: "dkf"
- resolution changed to: "Out of Date"
- status changed to: "Closed"
Ticket change [587a927a32] (rid 117811) by dkf on 2008-11-02 18:33:33:
- icomment:
data_type - 210894
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "None"
- username: "dkf"
- icomment:
Ticket change [05a3a42630] (rid 89099) by dkf on 2009-01-30 20:49:11:
- foundin changed to: "Spam"
- icomment:
allow_comments - 1
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: ""
- username: "dkf"
Ticket change [90fdf00e05] (rid 120554) by dkf on 2009-07-29 19:53:42:
- icomment:
IP - Comment Removed: 130.88.1.31
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment: