Feature Requests item #1519081, was opened at 2006-07-08 04:11 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478073&aid=1519081...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: zexy Group: Next Release (example) Status: Open Priority: 5 Submitted By: ClaudiusMaximus (claudiusmaximus) Assigned to: Nobody/Anonymous (nobody) Summary: zexy msgfile sort
Initial Comment: PART 1: SIMPLE SORT
I would find it useful if [msgfile] had a 'sort' method. This could be [sort( to sort in normal order or [sort reverse( to sort in reverse order.
Case-sensitive or no, either would be useful, though not a high priority for me personally to be able to choose which.
However a stable sorting algorithm is a high priority for me, meaning that repeated calls of [sort( with no intervening operations leave the order of the lines the same.
Here is an example of a sorted list of messages in (some) normal order:
---cut-here--- #ffeeff 1 2 10 AMBULANCE FIRE-ENGINE Fire-Engine FOG a a blah ablah 1 ablah 2 foo zimmer ---cut-here---
PART 2: ADVANCED SORT
An advanced sorting method could be the following:
[pdsort mycallbackreceiver myleftreceiver myrightreceiver(
Which would allow arbitrary Pd patch implementation of comparison operations. On receiving this message, [msgfile] would, for each comparison operation, act as follows:
Given we need to compare $1 < $2, execute the message:
[ ; myrightreceiver $2; myleftreceiver $1; mycallbackreceiver XXX (
where XXX is a receive-symbol for the Pd patch comparison implementation to reply to.
For single floats, the Pd patch comparison implementation could be:
[r my-cb-r] [r my-l-r] [r my-r-r] | | | | [ < ] | | [pack s f ] | [ ; $1 $2 (
PART 3: CONCLUSION
Simple sort with some stable algorithm that sorts numbers numerically and symbols alphabetically with 'anythings' handled in the obvious way would be more than enough for me.
The advanced sort would allow more flexibility, but would be horrible to implement, at a guess...
Thank you for your attention :)
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478073&aid=1519081...