Re: [Haskell-cafe] Newbie Q: Overloading and type classes

2008-06-08 Thread Luke Palmer
On Sat, Jun 7, 2008 at 5:07 PM, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: {-- And what does the word newbie imply to you when answering my question? In what case using 'fundeps' and 'associated types' will make sence for this example? --} Well, functional dependencies (fundeps) and

[Haskell-cafe] Re: Mersenne Build Problem

2008-06-08 Thread Dominic Steinitz
Bertram Felgenhauer bertram.felgenhauer at googlemail.com writes: The missing symbols are inlined functions. ghc 6.9 doesn't include the header files anymore when compiling via C. (The solution is to create C wrappers around those functions. I guess I'll whip up a patch.) Bertram,

Re: [Haskell-cafe] Design your modules for qualified import

2008-06-08 Thread Johan Tibell
On Sat, Jun 7, 2008 at 3:03 PM, Dan Doel [EMAIL PROTECTED] wrote: On Friday 06 June 2008, Andrew Coppin wrote: It's really quite frustrating that it is 100% impossible to write a single function that will process lists, arrays, sets, maps, byte strings, etc. You have to write several different

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Tomas Andersson
Den Sunday 08 June 2008 00.45.01 skrev Xiao-Yong Jin: Any delightful idea to convert my mind from a C shaped one to a Haskell shaped one? You can never go wrong with a good old fashioned hand written tail recursion when you're in doubt, they are pretty much the closest thing to for-loops

Re: [Haskell-cafe] Data.Map traversal.

2008-06-08 Thread Ian Lynagh
Hi Serguey, On Sat, Jun 07, 2008 at 05:32:46PM +0400, Serguey Zefirov wrote: So I propose to include those operations into next version of Data.Map. If anyone could point me in the right direction I could do any necessary modifications myself (just because I need it). Please see

Re: [Haskell-cafe] Issues of the mailto link on the list archive page

2008-06-08 Thread Ian Lynagh
On Sat, Jun 07, 2008 at 10:21:13AM -0400, Xiao-Yong Jin wrote: I had private conversation with Andrzej Jaworski about the fact that his reply to Alberto Ruiz's post is off thread. What he did was clicking on the mailto link beside the author's name on the list archive web page [1]. [1]

[Haskell-cafe] Re: Quick question for a slow program

2008-06-08 Thread apfelmus
Lanny Ripple wrote: The second prime generator on this page http://www.haskell.org/haskellwiki/Prime_numbers is quick and easy. I keep it nearby for all those sudden attacks of needing to solve yet another projecteuler problem. The second prime sieve did not create an implicit heap as

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Xiao-Yong Jin
Tomas Andersson [EMAIL PROTECTED] writes: You can never go wrong with a good old fashioned hand written tail recursion when you're in doubt, they are pretty much the closest thing to for-loops there is in haskell and should be easy to grok for Imperative programmers and usually produce

Re: [Haskell-cafe] Re: Patrick Perry's BLAS package

2008-06-08 Thread Judah Jacobson
2008/6/6 Patrick Perry [EMAIL PROTECTED]: Apart from some warnings, the library compiles fine in my system. But there is a minor issue about the library it links against when `./Setup test'. I need to use `-lcblas' instead of `-lblas' to get it to link to correct libraries. I don't know

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Don Stewart
xj2106: Tomas Andersson [EMAIL PROTECTED] writes: You can never go wrong with a good old fashioned hand written tail recursion when you're in doubt, they are pretty much the closest thing to for-loops there is in haskell and should be easy to grok for Imperative programmers and

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Alberto Ruiz
Xiao-Yong Jin wrote: Tomas Andersson [EMAIL PROTECTED] writes: You can never go wrong with a good old fashioned hand written tail recursion when you're in doubt, they are pretty much the closest thing to for-loops there is in haskell and should be easy to grok for Imperative programmers and

Re: [Haskell-cafe] Re: Quick question for a slow program

2008-06-08 Thread Lanny Ripple
At least when I teased apart why the first one worked it looked heap-like. Each step of the foldr pulled off the smallest nonprime and merged the next two lists guaranteeing that the next smallest nonprime would be at the head of the next step. Can't argue with results though. The version you

[Haskell-cafe] Printing a random list

2008-06-08 Thread Bryan Catanzaro
I'm just starting out with Haskell, and I could use some help. I'm trying to create a random list and print it out, which seems simple enough, but has been giving me problems. Here's what I have: module Main where import IO import Random randomList :: Random a = a -

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Don Stewart
catanzar: I'm just starting out with Haskell, and I could use some help. I'm trying to create a random list and print it out, which seems simple enough, but has been giving me problems. Here's what I have: module Main where import IO import Random randomList

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Xiao-Yong Jin
Alberto Ruiz [EMAIL PROTECTED] writes: My experience is that Haskell allocation time is very fast and usually negligible in most non trivial matrix computations. A good thing about sum v = constant 1 (dim v) . v is that a constant vector is efficiently created internally (not from an

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Bryan Catanzaro
Thanks for the response, it does compile after I juggled some parentheses around. And also I appreciate the pointer to the better way of making a random list. So that problem is solved. However, when I ran my random list generator, the interpreter had a stack overflow. Here's my code

Re: [Haskell-cafe] Re: Patrick Perry's BLAS package

2008-06-08 Thread Bryan O'Sullivan
Judah Jacobson wrote: My preference is to use an autoconf script to solve that problem. (build-type: Configure in the cabal file.) That approach would not work well for BLAS. The various BLAS libraries have profoundly different performance characteristics, and you wouldn't want to get the

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Don Stewart
Below are some notes on this for Simon PJ and Alberto. In general, GHC is doing very well here, with only one small wibble preventing the recursive version running as fast as the C version. xj2106: Alberto Ruiz [EMAIL PROTECTED] writes: My experience is that Haskell allocation time is

Re: [Haskell-cafe] Re: Patrick Perry's BLAS package

2008-06-08 Thread Xiao-Yong Jin
Bryan O'Sullivan [EMAIL PROTECTED] writes: Judah Jacobson wrote: My preference is to use an autoconf script to solve that problem. (build-type: Configure in the cabal file.) That approach would not work well for BLAS. The various BLAS libraries have profoundly different performance

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Ronald Guida
Bryan Catanzaro wrote: However, when I ran my random list generator, the interpreter had a stack overflow. Here's my code again: --- module Main where import IO import Random randomList :: Random a = a - a- [IO a] randomList lbound ubound = randomRIO(lbound,

Re: [Haskell-cafe] sum in hmatrix and blas?

2008-06-08 Thread Don Stewart
Problem solved. The Haskell loop now wins. After reading don's blog, I tried to make a test with both methods. The code is very simple, as following module Main where import System import Numeric.LinearAlgebra vsum1 :: Vector Double - Double vsum1 v = constant 1 (dim v) . v

Re: [Haskell-cafe] Vancouver Haskell users meeting

2008-06-08 Thread Ryan Dickie
Same deal but i'm in Ottawa for the summer. I'll be back around september. --ryan 2008/6/6 Asumu Takikawa [EMAIL PROTECTED]: Hi. I'd be interested in a meeting like this, but unfortunately since UBC is done for winter term I'm out of Canada for the summer. If anyone organizes a meet-up come

[Haskell-cafe] FunPtr error?

2008-06-08 Thread Galchin, Vasili
Hello, I am getting what is to me a mysterious error in a test case that I am writing: [EMAIL PROTECTED]:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell Setup.lhs build Preprocessing executables for Test-1.0... Building Test-1.0... [1 of 1] Compiling Main ( ./timer.hs,

Re: [Haskell-cafe] FunPtr error?

2008-06-08 Thread Luke Palmer
2008/6/8 Galchin, Vasili [EMAIL PROTECTED]: Hello, I am getting what is to me a mysterious error in a test case that I am writing: [EMAIL PROTECTED]:~/FTP/Haskell/unix-2.2.0.0/tests/timer$ runhaskell Setup.lhs build Preprocessing executables for Test-1.0... Building Test-1.0... [1 of

Re: [Haskell-cafe] FunPtr error?

2008-06-08 Thread Galchin, Vasili
ah ..,. right ,. my bad. Vasili On Sun, Jun 8, 2008 at 10:01 PM, Luke Palmer [EMAIL PROTECTED] wrote: 2008/6/8 Galchin, Vasili [EMAIL PROTECTED]: Hello, I am getting what is to me a mysterious error in a test case that I am writing: [EMAIL

Re: [Haskell-cafe] Package updates on haskell.org

2008-06-08 Thread Brent Yorgey
On Thu, Jun 5, 2008 at 6:47 PM, Don Stewart [EMAIL PROTECTED] wrote: The HWN, which I'm sadly too busy to maintain now, Does this imply that you're looking for someone to take over the HWN? I'd be willing. -Brent ___ Haskell-Cafe mailing list

Fwd: [Haskell-cafe] FunPtr error?

2008-06-08 Thread Galchin, Vasili
So Luke .. how do I go from (Sigval - ()), i..e notifyFunc, to FunPtr using the suggested data constructors? On Sun, Jun 8, 2008 at 10:01 PM, Luke Palmer [EMAIL PROTECTED] wrote: 2008/6/8 Galchin, Vasili [EMAIL PROTECTED]: Hello, I am getting what is to me a mysterious error in a

Re: [Haskell-cafe] FunPtr error?

2008-06-08 Thread Bulat Ziganshin
Hello Vasili, Monday, June 9, 2008, 6:17:14 AM, you wrote: 1. standard place to import FunPtr from is Foreign.Ptr, not System.Posix 2. FunPtr is exported as abstract type, without constructors. you can't construct values of this type directly. instead you should use wrapper generators as in the

Re[2]: [Haskell-cafe] Package updates on haskell.org

2008-06-08 Thread Bulat Ziganshin
Hello Brent, Monday, June 9, 2008, 7:43:58 AM, you wrote: The HWN, which I'm sadly too busy to maintain now, Does this imply that you're looking for someone to take over the HWN?  I'd be willing. it will be cool! -- Best regards, Bulatmailto:[EMAIL