RE: Finding primes using a primes map with Haskell and Hugs98

2000-12-20 Thread Shlomi Fish
On Tue, 19 Dec 2000, Simon Peyton-Jones wrote: | Another way to do this is to compute the final array directly, | instead of computing successive versions of the array: | | import Array | primes n = [ i | i - [2 ..n], not (primesMap ! i)] where | primesMap = accumArray (||)

Re: Finding primes using a primes map with Haskell and Hugs98

2000-12-20 Thread George Russell
There are numerous ways of optimising sieving for primes, none of which have much to do with this list. For example, two suggestions: (1) for each k modulo 2*3*5*7, if k is divisible by 2/3/5 or 7, ignore, otherwise sieve separately for this k on higher primes. (Or you might use products of

Re: Finding primes using a primes map with Haskell and Hugs98

2000-12-20 Thread Colin . Runciman
There are numerous ways of optimising sieving for primes, none of which have much to do with this list. For example, two suggestions: (1) for each k modulo 2*3*5*7, if k is divisible by 2/3/5 or 7, ignore, otherwise sieve separately for this k on higher primes. (Or you might use

Haskell Productivity

2000-12-20 Thread Steinitz, Dominic J
The Haskell website claims that "Ericsson measured an improvement factor of between 9 and 25 in one set of experiments on telephony software". Presumably this is with Erlang not with Haskell. I have searched for the reference that substantiates this claim but I've only been able to find:

RE: Problem with functional dependencies

2000-12-20 Thread Simon Peyton-Jones
I think you can simplify the example. Given class HasFoo a b | a - b where foo :: a - b instance HasFoo Int Bool where ... Is this legal? f :: HasFoo Int b = Int - b f x = foo x You might think so, since HasFoo Int b = Int - b is a

Re: Haskell Productivity

2000-12-20 Thread Paul Hudak
Can someone point me at some more references? See http://haskell.org/papers/NSWC/jfp.ps. -Paul ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: Haskell Productivity

2000-12-20 Thread Peter Douglass
There is a thread on comp.lang.functional which may be of interest. Here is a link that might work for you. http://www.deja.com/dnquery.xp?search=threadsvcclass=dnserverrecnum=%3c8lh 8ss$6le$[EMAIL PROTECTED]%3e%231/1 -Original Message- From: Steinitz, Dominic J [mailto:[EMAIL

RE: Haskell Productivity

2000-12-20 Thread Peter Douglass
Hello all, You will need to manually reconnect the link I sent into a single line for it to work. There is a thread on comp.lang.functional which may be of interest. Here is a link that might work for you. http://www.deja.com/dnquery.xp?search=threadsvcclass=dnserverrecnum=%3c8lh

GHC for Darwin?

2000-12-20 Thread Ashley Yakeley
Are there any plans to port GHC to Darwin? Darwin is a FreeBSD-variant that runs on the PowerPC processor. http://www.opensource.apple.com/projects/darwin/. I was going to compile it myself before I remembered that compilers do platform-specific code-generation. Duh. -- Ashley Yakeley,

ANNOUNCE: Happy version 1.9

2000-12-20 Thread Simon Marlow
ANNOUNCING Happy 1.9 - The LALR(1) Parser Generator for Haskell - I'm pleased to announce version 1.9 of Happy, the parser generator system for Haskell. Changes in this version, relative to version 1.8 (the previous full

finding primes

2000-12-20 Thread S.D.Mechveliani
Hello, I wrote recently on generating prime numbers [..] The DoCon program written in Haskell (again, no arrays) gives [..] take 5 $ filter isPrime [(10^9 ::Integer) ..] -- [17,19,100021,100033,100087] This takes 0.05 sec. [..] But it is better to

Re: finding primes

2000-12-20 Thread Shlomi Fish
On Thu, 21 Dec 2000, S.D.Mechveliani wrote: Hello, On generating prime numbers, people wrote ... | import Array | primes n = [ i | i - [2 ..n], not (primesMap ! i)] where | primesMap = accumArray (||) False (2,n) multList | [..] I think that it is good for