Dylan Thurston [EMAIL PROTECTED] writes:
Thanks for pointing this out; this seems to be another bug in ghc
5.02.2. According to the report, it seems unambiguous that, e.g.,
-5`div`2 should be -2, not -3.
Yes,-5`div`2 == -(5`div`2) == -2
but (-5)`div`2 == -3
Ghc 5.02.2 has the
Ketil Z. Malde [EMAIL PROTECTED] writes
I'll hereby argue for using a quicksort implementation akin to
sortBy' _ [] = []
sortBy' pc (x:xs) = let (l,e,g) = part3 (`pc` x) xs
in sortBy' pc l ++ (x:e) ++ sortBy' pc g
where
part3 comp xs = p3 [] [] [] comp xs
Serge D. Mechveliani [EMAIL PROTECTED] writes:
ButsortBy' (compare) [1 .. n]
costs too much, even for n = 11000.
It costs (on worst data) many times more than mergeSort.
Yes, but why do you want to sort sorted data?
I think the multiple value cost, i.e. that
sortBy
There seems to be a renewed interest in sorting and in adaptive
sorting. A while ago (pre Haskell 98) I compiled a rather extensive
library of sorting routines you may want to look at
http://www.informatik.uni-bonn.de/~ralf/software.html#sort
This includes different versions of
On Fri, Jun 28, 2002 at 09:44:11AM +0200, Ketil Z. Malde wrote:
Serge D. Mechveliani [EMAIL PROTECTED] writes:
ButsortBy' (compare) [1 .. n]
costs too much, even for n = 11000.
It costs (on worst data) many times more than mergeSort.
Yes, but why do you want to sort
G'day all.
On Fri, Jun 28, 2002 at 09:44:11AM +0200, Ketil Z. Malde wrote:
I, for one, am sorting expected, not worst-case, data :-)
gripe
What's this obsession with worst-case behaviour anyway?
The best algorithm to use is the one which exploits known facts about
the data. The converse
Ralf Hinze [EMAIL PROTECTED] writes:
The haskell mailing list is getting an increasing amount of
spam, viruses, and virus warnings. Would it be possible
to change the list policy to only allow submissions from
subscribed members? Please?
I'd like to second this. The amount of spam etc is
Ralf Hinze [EMAIL PROTECTED] writes:
The haskell mailing list is getting an increasing amount of
spam, viruses, and virus warnings. Would it be possible
to change the list policy to only allow submissions from
subscribed members? Please?
I'd like to second this. The amount of
At 2002-06-28 03:14, Simon Marlow wrote:
The problem with this (and the reason it hasn't been done before) is that
several people subscribe to the list under a different address than the
one they use to post - for example, some institutions gateway the list to
a local newsgroup. We could