|
|
last edited 6 years ago by test1 |
1 2 3 | ||
Editor:
Time: 2007/11/17 22:29:01 GMT-8 |
||
Note: Cleaning issues |
changed: - the following commands: \begin{axiom} bb:=[1,1,2,2,2,2,1,1,1,3,1] sort! bb bb \end{axiom} return:: bb = [1,1,2,2,2,2,3] is sort! only intended for lists without repetition? \begin{axiom} bb:=[1,1,2,2,2,2,1,1,1,3,1] bb := sort! bb bb \end{axiom} All ! functions destroy their arguement - this is as intended. From oklhazi Fri Feb 9 02:11:40 -0600 2007 From: oklhazi Date: Fri, 09 Feb 2007 02:11:40 -0600 Subject: destroy or modify? Message-ID: <20070209021140-0600@wiki.axiom-developer.org> Thanks for clarification. The manual says that all ! functions modify their arguments and concluded that sort! sorts the list "in place", as stated on p.716 of the Axiom book, i.e., leaving the argument in a sorted state. I realize that "modify" does have different interpretations indeed, including "destroy". From kratt6 Sat Feb 10 08:22:23 -0600 2007 From: kratt6 Date: Sat, 10 Feb 2007 08:22:23 -0600 Subject: rather a documentation bug Message-ID: <20070210082223-0600@wiki.axiom-developer.org> Category: Axiom on Linux => Axiom Documentation Severity: serious => normal From billpage Sun Feb 11 14:48:24 -0600 2007 From: billpage Date: Sun, 11 Feb 2007 14:48:24 -0600 Subject: why not work as documented? Message-ID: <20070211144824-0600@wiki.axiom-developer.org> It seems to me that the original expectation of the user who submitted this bug and the Axiom Book are both very reasonable. What is the purpose of the modifications that 'sort!' makes to it's argument? To "sort in place" is very reasonable. Why not return this sorted result in the argument as one would expect? From Waldek Sat May 26 22:11:00 -0500 2007 From: Waldek Date: May 26, 2007 22:11:00 -0500 2007 Subject: Cleaning issues Message-ID: <20050612121753-0500@page.axiom-developer.org> I have looked at older issues in Issue Tracker and it seems that there are significant number of issues which are just users not understanding what Axiom is doing and expecting different result. For example 335 sort! drops list elements is just example of linked list. Something like:: (1) -> bb := [3, 4, 1, 2] (1) [3,4,1,2] Type: List PositiveInteger (2) -> bs := sort! bb (2) [1,2,3,4] Type: List PositiveInteger (3) -> bb (3) [3,4] Type: List PositiveInteger (4) -> bs (4) [1,2,3,4] Type: List PositiveInteger (5) -> bb.1 := 7 (5) 7 Type: PositiveInteger (6) -> bs (6) [1,2,7,4] Type: List PositiveInteger (7) -> should be, or maybe already is in the tutorial, as an illustration that what was a first element of the list after reorganization may point inside.
the following commands:
bb:=[1,1, 2, 2, 2, 2, 1, 1, 1, 3, 1]
(1) |
sort! bb
(2) |
bb
(3) |
return:
bb = [1,1,2,2,2,2,3]
is sort! only intended for lists without repetition?
bb:=[1,1, 2, 2, 2, 2, 1, 1, 1, 3, 1]
(4) |
bb := sort! bb
(5) |
bb
(6) |
All ! functions destroy their arguement - this is as intended.
sort!
makes to
it's argument? To "sort in place" is very reasonable. Why not
return this sorted result in the argument as one would expect?
I have looked at older issues in Issue Tracker and it seems that
there are significant number of issues which are just users not
understanding what Axiom is doing and expecting different result.
For example 335 sort! drops list elements is just example of linked list. Something like:
(1) -> bb := [3, 4, 1, 2] (1) [3,4,1,2] Type: List PositiveInteger (2) -> bs := sort! bb (2) [1,2,3,4] Type: List PositiveInteger (3) -> bb (3) [3,4] Type: List PositiveInteger (4) -> bs (4) [1,2,3,4] Type: List PositiveInteger (5) -> bb.1 := 7 (5) 7 Type: PositiveInteger (6) -> bs (6) [1,2,7,4] Type: List PositiveInteger (7) ->
should be, or maybe already is in the tutorial, as an illustration that what was a first element of the list after reorganization may point inside.