Loading ...
Sorry, an error occurred while loading the content.

Re: [peditors] pedit and sorting

Expand Messages
  • Paul Nevai
    # My wishes have already been expressed by other peditors in this thread. I # only add that it would be useful for the sorting algorithm to be stable. Gimme
    Message 1 of 19 , Mar 2, 2001
    • 0 Attachment
      # My wishes have already been expressed by other peditors in this thread. I
      # only add that it would be useful for the sorting algorithm to be stable.

      Gimme any program or algorithm and I will break it...
    • omar-@home.com
      ... Most important for me: sort within a selection Regards. michael walsh
      Message 2 of 19 , Mar 2, 2001
      • 0 Attachment
        >I figured out how to sort lines in

        Most important for me: sort within a selection

        Regards.

        michael walsh
      • Paolo Amoroso
        On Fri, 2 Mar 2001 12:00:16 -0500 (EST), Paul Nevai wrote: [Paolo Amoroso:] ... Maybe I was not clear enough. I referred to a
        Message 3 of 19 , Mar 2, 2001
        • 0 Attachment
          On Fri, 2 Mar 2001 12:00:16 -0500 (EST), Paul Nevai
          <nevai@...-state.edu> wrote:

          [Paolo Amoroso:]
          > # My wishes have already been expressed by other peditors in this thread. I
          > # only add that it would be useful for the sorting algorithm to be stable.
          >
          > Gimme any program or algorithm and I will break it...

          Maybe I was not clear enough. I referred to a mathematical property, not to
          the ability of a piece of software not to crash. A sorting algorithm is
          stable if it preserves the relative order in the input file of records with
          equal keys. Suppose you have the following unsorted input:

          Emacs Lisp
          MACLISP
          Zetalisp
          *LISP
          Franz Lisp
          Lisp
          Maclisp
          Interlisp
          Common Lisp
          LISP

          and you perform an ascending, case-insensitive sort. The algorithm is
          stable if it keeps MACLISP before Maclisp and Lisp before LISP. Anyway, if
          stability gets in the way of performance or ease of implementation, then
          it's not worth the effort.


          Paolo
          --
          EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
          http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
        • Peter R. Grierson
          Sorting in pedit In a message dated 3/1/01 4:45:07 PM Central Standard Time, ... ===== I am presuming there will be ... ===== ... -Ascending / descending
          Message 4 of 19 , Mar 2, 2001
          • 0 Attachment
            Sorting in pedit

            In a message dated 3/1/01 4:45:07 PM Central Standard Time,
            nevai@...-state.edu writes:

            > Just a short brain-storming session. I figured out how to sort lines in
            > memos. Please feel free to post your wishes.
            >

            =====
            I am presuming there will be
            >A "Sort Popup" screen and that
            >The strings to be sorted will be defined by linefeed(s).
            =====

            Select/Exclude:

            >Choice to select/exclude text "vrom" ___ to ____ [as with Select]

            >If text is highlighted restrict sort to highlighted text.

            >Choice to include/exclude columns sorted.

            >Order:
            -Ascending / descending
            -Alphanumeric
            -ASCII

            Preferences/parameters:

            >Because the first line is in effect the title
            - A preference that defaults to ignoring the first line
            >Because to some a segment is a chapter while to others a segment is merely
            the continuation of the previous segment.
            - A choice of including or ignoring the first line in segment 2 and beyond.

            >Ability to save named sort definitions.
            -So that it would be easy to jump between sorting on columns 1-10 and
            then 11-20 then back to 1-10.
            -Or, it would be easy to sort memos with different structures without
            having to reset the parameters each time.
          • jesk50@aol.com
            Paul, Is it feasible to specify columns? That would be cool but it might really slow things down? Jerry
            Message 5 of 19 , Mar 3, 2001
            • 0 Attachment
              Paul,

              Is it feasible to specify columns? That would be cool but it might really
              slow things down?

              Jerry
            • Paul Nevai
              Hi Guys: So I decided that the line sorting in pedit will be according to the criteria // LWS = LeadingWhiteSpace typedef enum {
              Message 6 of 19 , Mar 30, 2001
              • 0 Attachment
                Hi Guys:

                So I decided that the line sorting in pedit will be according to the criteria

                // LWS = LeadingWhiteSpace
                typedef enum {
                ignoreCase_ignoreLWS_normal_Sort,
                ignoreCase_ignoreLWS_reverse_Sort,
                ignoreCase_noIgnoreLWS_normal_Sort,
                ignoreCase_noIgnoreLWS_reverse_Sort,
                noIgnoreCase_ignoreLWS_normal_Sort,
                noIgnoreCase_ignoreLWS_reverse_Sort,
                noIgnoreCase_noIgnoreLWS_normal_Sort,
                noIgnoreCase_noIgnoreLWS_reverse_Sort,
                numerical_normal_Sort, // automatically ignores LeadingWhiteSpace
                numerical_reverse_Sort // automatically ignores LeadingWhiteSpace
                } sortEnumType;

                [I hope this needs no explanation]

                plus, additionally, one can start sorting at any column, i.e., at any preset
                position starting from the beginnig of the line. I hope that this choice will
                be more than satisfactory. I will not make the sorting anymore sophisticated
                unless you guys can convince me that we need more depth.

                In addition, one can sort the selected text OR the entire memo.

                Any comments? Best regards, Paul
              • Paolo Amoroso
                ... [...] ... The criteria look adequate for several of potential uses. Paolo -- EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
                Message 7 of 19 , Mar 31, 2001
                • 0 Attachment
                  On Fri, 30 Mar 2001 21:29:58 -0500 (EST), you wrote:

                  > So I decided that the line sorting in pedit will be according to the criteria
                  [...]
                  > Any comments? Best regards, Paul

                  The criteria look adequate for several of potential uses.


                  Paolo
                  --
                  EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
                  http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
                • jesk50@aol.com
                  Fabulous!!! One extra possiblity comes to mind. Blank lines between data lines would normally sort out, either disappearing or sorting to the head of the
                  Message 8 of 19 , Mar 31, 2001
                  • 0 Attachment
                    Fabulous!!!

                    One extra possiblity comes to mind. Blank lines between data lines would
                    normally sort out, either disappearing or sorting to the head of the
                    alphabet. But the user could be inserting blank lines after some data lines
                    to improve visibility. Could one sort option be to consider a trailing blank
                    line as part of the data line?

                    Example (before sort, spaces separating the lines of text):
                    Apples are best when fresh...(word-wrapped paragraph)

                    Peach cobbler can be made substituting a variety of fruits plus the following
                    ingredients....(word-wrapped paragraph)

                    Bannana nut bread is best served warm with butter and plenty of...(word
                    wrapped paragraph)


                    After sort (blank lines lost)
                    Apples are best when fresh...(word-wrapped paragraph)
                    Bannana nut bread is best served warm with butter and plenty of...(word
                    wrapped paragraph)
                    Peach cobbler can be made substituting a variety of fruits plus the following
                    ingredients....(word-wrapped paragraph)

                    After sort (blank lines remain associated with prior line)
                    Apples are best when fresh...(word-wrapped paragraph)

                    Bannana nut bread is best served warm with butter and plenty of...(word
                    wrapped paragraph)

                    Peach cobbler can be made substituting a variety of fruits plus the following
                    ingredients....(word-wrapped paragraph)


                    I can hardly wait to see this!!!
                    Jerry
                  • Paul Nevai
                    jesk50@aol.com wrote to Paul Nevai: # # Fabulous!!! # One extra possiblity comes to mind. Blank lines between data lines would # normally sort out, either
                    Message 9 of 19 , Mar 31, 2001
                    • 0 Attachment
                      jesk50@... wrote to Paul Nevai:
                      #
                      # Fabulous!!!

                      # One extra possiblity comes to mind. Blank lines between data lines would
                      # normally sort out, either disappearing or sorting to the head of the
                      # alphabet. But the user could be inserting blank lines after some data
                      # lines to improve visibility. Could one sort option be to consider a
                      # trailing blank line as part of the data line?

                      Jerry:

                      This is called paragraph sorting as opposed to line sorting. Eventually, I
                      may consider it [it is already on my to-do list]. Best regards, Paul
                    • Roy van der Woning
                      ... Indeed more than adequate. For more sophisticated sorting, I d turn to a spreadsheet/database application anyway. Roy.
                      Message 10 of 19 , Mar 31, 2001
                      • 0 Attachment
                        > I hope that this choice will be more than satisfactory.

                        Indeed more than adequate. For more sophisticated sorting, I'd turn
                        to a spreadsheet/database application anyway.

                        Roy.
                      • jesk50@aol.com
                        In a message dated 3/31/2001 11:56:15 AM Eastern Standard Time, ... I have a nice Palm spreadsheet (name withheld to avoid sidetracking the issue) and it s
                        Message 11 of 19 , Mar 31, 2001
                        • 0 Attachment
                          In a message dated 3/31/2001 11:56:15 AM Eastern Standard Time,
                          rvdw98@... writes:

                          > Indeed more than adequate. For more sophisticated sorting, I'd turn
                          > to a spreadsheet/database application anyway.
                          >

                          I have a nice Palm spreadsheet (name withheld to avoid sidetracking the
                          issue) and it's great but it's SLOW because has to check for cell references
                          all the time. I'll bet Paul can do better quite easily.

                          Jerry
                        • Paul Nevai
                          Hi Guys: I am basically done with sorting. Please check out the line mover dialog in http://www.math.ohio-state.edu/~nevai/palm/pedit_man.html#SORTINGTEXT I
                          Message 12 of 19 , Apr 1, 2001
                          • 0 Attachment
                            Hi Guys:

                            I am basically done with sorting. Please check out the "line mover" dialog in

                            http://www.math.ohio-state.edu/~nevai/palm/pedit_man.html#SORTINGTEXT

                            I am working on the manual and testing the stuff. Best regards, Paul
                          Your message has been successfully submitted and would be delivered to recipients shortly.