Re: [Haskell-cafe] HUnit and table-driven tests

2012-08-05 Thread Henk-Jan van Tuyl
On Sun, 05 Aug 2012 03:21:39 +0200, Matthew wonderzom...@gmail.com wrote: I've got a function which takes in two chars, describing a playing card and a suit. An example would be 4C or TH for a 4 of Clubs or a Ten of Hearts. I need to be able to compare the ranks of a card (e.g. a King is 13),

Re: [Haskell-cafe] Sorting efficiency

2012-08-05 Thread Heinrich Hördegen
Hi David, can this help you? http://www.scribd.com/doc/81029312/5/Sorting-pairwise-sums Heinrich Am 04.08.2012 20:47, schrieb David Feuer: I realized my algorithm is insane. The correct way to sort [a*b|a-A, b-B] is clearly to sort A and B, then for each a in A construct either map (a*) B

Re: [Haskell-cafe] Sorting efficiency

2012-08-05 Thread David Feuer
Unfortunately, I doubt it can. That algorithm reduces the number of comparisons a good bit, but the asymptotic complexity of its other operations remains the same, with apparently bad constant factors (according to the article). Also, that article describes the algorithm in terms of sorting [a+b|

Re: [Haskell-cafe] Sorting efficiency

2012-08-05 Thread David Feuer
Where by nearly double, of course, I really mean nearly triple. I'm a little tired. David On Sun, Aug 5, 2012 at 5:37 AM, David Feuer david.fe...@gmail.com wrote: Unfortunately, I doubt it can. That algorithm reduces the number of comparisons a good bit, but the asymptotic complexity of its

Re: [Haskell-cafe] Knight Capital debacle and software correctness

2012-08-05 Thread Jon Fairbairn
Jay Sulzberger j...@panix.com writes: On Sat, 4 Aug 2012, Clark Gaebel cgae...@uwaterloo.ca wrote: As far as I know, you can't check equivalence of _|_. Since Haskell uses _|_ to represent a nonterminating computation, this would be synonymouswith solving the halting problem. Ah, thanks.

[Haskell-cafe] Benchmark of DFT libraries in Haskell

2012-08-05 Thread Takayuki Muranushi
Dear everyone, I'm always grateful to your help. I have been assigned a complicated and growing task in which I'll perform a lot of discrete Fourier transforms, so I have measured performance of several DFT libraries in Haskell:

Re: [Haskell-cafe] Talk about Haskell at Ubucon in Berlin

2012-08-05 Thread Joachim Breitner
Hi, Am Samstag, den 04.08.2012, 23:56 +0200 schrieb Robert Clausecker: I'm going to give a talk on Haskell at Ubucon 2012 in Berlin (In German). I want to give an introduction about the concept of functional programming and the special language concepts of Haskell. Any ideas what to focus

Re: [Haskell-cafe] HUnit and table-driven tests

2012-08-05 Thread Matthew
On Sun, Aug 5, 2012 at 12:32 AM, Henk-Jan van Tuyl hjgt...@chello.nl wrote: On Sun, 05 Aug 2012 03:21:39 +0200, Matthew wonderzom...@gmail.com wrote: I've got a function which takes in two chars, describing a playing card and a suit. An example would be 4C or TH for a 4 of Clubs or a Ten of

Re: [Haskell-cafe] Knight Capital debacle and software correctness

2012-08-05 Thread Scott Michel
From some of the reports in the press, the problem was that the trades were supposed to be spread out over several days or weeks, but were spread over hours instead. So, if that were true, no type system would be of any help. The US Navy had a similar problem on a propulsion control system back

Re: [Haskell-cafe] Benchmark of DFT libraries in Haskell

2012-08-05 Thread Ertugrul Söylemez
Takayuki Muranushi muranu...@gmail.com wrote: * vector-fftw with wisdom was more than 1/2 times faster than fftw in C with wisdom (and with communication overhead.) * vector-fftw without wisdom was significantly _faster_ than fftw in C without wisdom. I wonder why. * vector-fftw over vector

Re: [Haskell-cafe] Benchmark of DFT libraries in Haskell

2012-08-05 Thread Scott Michel
Ertugrul: I might be missing something in translation, but if I understand Takayuki's message's intent, everything needs to be calculated because the C-based FFTW library is called (eventually). Laziness doesn't really have an impact. The choice of underlying data structure and whether FFTW