Re: [Haskell-cafe] [OT] Install ghc6-doc fails [SOLVED}

2007-07-22 Thread J. Pablo Fernández
It seems the problem was that those haddock files where generated by a previous version of haddock, ocmpiled with a previous version of ghc6. Now that I had a current ghc6, and a current haddock compiled with the current ghc6, I recompiled ghc6 and that worked :) On Sunday 22 July 2007

Re[2]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-22 Thread Bulat Ziganshin
Hello Neil, Saturday, July 21, 2007, 11:46:59 PM, you wrote: can anyone provide wxHaskell already compiled/compilable with ghc 6.6.1 on Windows? This is precisely the reason I switched to Gtk2Hs - Duncan provides Windows installers as each new GHC release comes out. If wxHaskell wants to

Re[2]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-22 Thread Bulat Ziganshin
Hello Eric, Saturday, July 21, 2007, 9:29:30 AM, you wrote: can anyone provide wxHaskell already compiled/compilable with ghc 6.6.1 on Windows? Please try the darcs version darcs get http://darcs.haskell.org/wxhaskell thanks. should i follow building instructions from homepage/ directory

Re: Re[2]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-22 Thread Eric Kow
Please try the darcs version darcs get http://darcs.haskell.org/wxhaskell thanks. should i follow building instructions from homepage/ directory or there are another one? I don't remember if this is documented anywhere, sadly: It's ./configure make make install make wx make wx-install

Re: [Haskell-cafe] Newbie question about tuples

2007-07-22 Thread Andrew Coppin
Donald Bruce Stewart wrote: Yeah, there's some known low level issues in the code generator regarding heap and stack checks inside loops, and the use of registers on x86. But note this updated paper, http://www.cse.unsw.edu.au/~chak/papers/CLPKM07.html Add another core to your machine and

Re: [Haskell-cafe] Ray tracer

2007-07-22 Thread Andrew Coppin
Dan Piponi wrote: On 7/14/07, Andrew Coppin [EMAIL PROTECTED] wrote: The Haskell ray tracer seems to be a pretty standard and widely-used example program. But has anybody ever seriously tried to make a production-grade implementation? (I.e., one that is user-friendly, efficient, and with lots

[Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Neil Mitchell
Hi Haskell is known for its power at equational reasoning - being able to treat a program like a set of theorems. For example: break g = span (not . g) Which means we can replace: f = span (not . g) with: f = break g by doing the opposite of inlining, and we still have a valid program.

[Haskell-cafe] Re: Equational Reasoning goes wrong

2007-07-22 Thread apfelmus
Neil Mitchell wrote: Haskell is known for its power at equational reasoning - being able to treat a program like a set of theorems. For example: break g = span (not . g) Which means we can replace: f = span (not . g) with: f = break g by doing the opposite of inlining, and we

Re: [Haskell-cafe] Minim interpreter

2007-07-22 Thread Jon Harrop
On Saturday 21 July 2007 01:41:58 Hugh Perkins wrote: Ok, that got the variables working. ... Don't fizzle out on me now: this was just getting interesting! :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Paul Johnson
Neil Mitchell wrote: Hi Haskell is known for its power at equational reasoning - being able to treat a program like a set of theorems. For example: break g = span (not . g) Which means we can replace: f = span (not . g) with: f = break g by doing the opposite of inlining, and we still

[Haskell-cafe] Re: Help with IO and randomR

2007-07-22 Thread Benjamin Franksen
Niko Korhonen wrote: Bryan Burgers wrote: tpdfs range = do g - newStdGen -- get a random generator (g1, g2) - return $ split g -- make two random generators out of it return $ zipWith combine (randomRs range g1) (randomRs range g2) -- get two streams of random numbers, and combine

[Haskell-cafe] RE: Speedy parsing

2007-07-22 Thread Benjamin Franksen
Re, Joseph (IT) wrote: Ah, I thought I might have to resort to one of the ByteStrings modules. I've heard of them but was more or less avoiding them due to some complexities with installing extra libraries in my current dev environment. I'll try to work that out with the sysadmins and try it

Re: [Haskell-cafe] Minim interpreter

2007-07-22 Thread Hugh Perkins
heh! well everyone was busy working on icfp or something, so the newsgroup was pretty dead :-) And I played with opengl a little, which gave better results than I thought, but not good enough to pursue, and the whole program was in imperative dos anyway, so I couldnt quite see what was the point

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Conor McBride
Hi Neil You'll be pleased to know that lots of people have been banging their heads off this one. On 22 Jul 2007, at 15:53, Neil Mitchell wrote: [..] break g = span (not . g) [..] However, if we use the rule that anywhere we encounter span (not . g) we can replace it with break g then

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Hugh Perkins
On 7/22/07, Neil Mitchell [EMAIL PROTECTED] wrote: However, if we use the rule that anywhere we encounter span (not . g) we can replace it with break g then we can redefine break as: break g = break g For some reason this reminds me of the paradoxes of being able to go back in time. What I

Re: [Haskell-cafe] RE: Speedy parsing

2007-07-22 Thread Thomas Schilling
On 22 jul 2007, at 23.46, Benjamin Franksen wrote: On a different note: I've been wondering how difficult it would be to re-write Parsec so that it doesn't act on a /list/ of tokens but on a Sequence (defined in Data.Collections from collections package). Because this would mean one could

Re: [Haskell-cafe] Ray tracer

2007-07-22 Thread Dan Piponi
On 7/22/07, Andrew Coppin [EMAIL PROTECTED] wrote: It seems everybody misunderstands what I mean by production-grade. Not at all. It's just that some of us are interested to know what part Haskell might play in a production-grade renderer, where we mean *production*-grade renderer. -- Dan

[Haskell-cafe] Re: RE: Speedy parsing

2007-07-22 Thread Benjamin Franksen
Thomas Schilling wrote: On 22 jul 2007, at 23.46, Benjamin Franksen wrote: On a different note: I've been wondering how difficult it would be to re-write Parsec so that it doesn't act on a /list/ of tokens but on a Sequence (defined in Data.Collections from collections package). Because

[Haskell-cafe] Re: Code and Perf. Data for Prime Finders (was: Genuine Eratosthenes sieve)

2007-07-22 Thread Dave Bayer
Here is another prime sieve. It is about half the length of the fastest contributed code (ONeillPrimes) and nearly as fast until it blows up on garbage collection: % cat ONeillPrimes.hs | grep -v ^-- | wc 18511056306 % cat BayerPrimes.hs | grep -v ^-- | wc 85 566

Re: Re[2]: [Haskell-cafe] i need wxHaskell compiled for ghc 6.6.1 on Windows

2007-07-22 Thread Duncan Coutts
On Sun, 2007-07-22 at 18:02 +0400, Bulat Ziganshin wrote: Hello Neil, Saturday, July 21, 2007, 11:46:59 PM, you wrote: can anyone provide wxHaskell already compiled/compilable with ghc 6.6.1 on Windows? This is precisely the reason I switched to Gtk2Hs - Duncan provides Windows

Re: [Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-22 Thread Duncan Coutts
On Fri, 2007-07-20 at 13:47 +0400, Dmitri O.Kondratiev wrote: Oliver, thanks! I tried that, yet have some problems. Questions: 1) Should I ignore autoreconf errors? I've never managed to get autoconf working on windows. I always generate a tarball under linux and build that on Windows.

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Paul Hudak
Note that you can take any closed term e and do the following equational reasoning: e == let x = e in x == let x = x in x == _|_ Technically, though, this is not wrong, in that it is still consistent, where consistency is defined using the usual information ordering on domains. Conventional

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Claus Reinke
Haskell is known for its power at equational reasoning - being able to treat a program like a set of theorems. when you're trying to do equational reasoning, you better make sure that you're reasoning with equations. as others have pointed out some of the more interesting relations between

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Jonathan Cast
It seems to me that the best answer, rather than constraining equational reasoning, is to recognize what we're doing. We start out with a specification for the program we're writing (this could be a Haskell script for a previous version of the program, or just a set of equations (or other

Re: [Haskell-cafe] Application Level server state in Haskell Web server

2007-07-22 Thread Pieter Laeremans
Thanks for your response. There 's one thing I don't understand however: the countRef function returns the same MVar all the time. What 's the reason for that ?I would expect that every time that function is invoked, it returns a new MVar, but clearly it does not. From the

Re: [Haskell-cafe] Matrices in Haskell

2007-07-22 Thread Ivan Lazar Miljenovic
On Tue, 2007-03-20 at 15:09 +1000, Matthew Brecknell wrote: I'm not sure I see the problem, since any operation that touches all the elements of a n-by-n matrix will be at least O(n^2). For such an operation, a transposition should just add a constant factor. What I was hoping for was a data

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-07-22 Thread Alistair Bayley
Hello cafe, (Following up on my own optimisation question, and Duncan's advice to look at http://darcs.haskell.org/ghc/compiler/utils/Encoding.hs) If you want to look at some existing optimised UTF8 encoding/decoding code then take a look at the code used in GHC:

Re: [Haskell-cafe] Practical Haskell question.

2007-07-22 Thread Josef Svenningsson
Michael, I think what you're trying to do is perfectly doable in Haskell and I think the right tool for it is arrows, as Tomasz Zielonka mentioned before. I suggest you take a look at the following paper which uses arrows to enforce security levels in the code:

RE: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-22 Thread Re, Joseph (IT)
If you meant just non-graphic uses of a gpu, I don't know much in that area, but I do know of a very neat graphics related (but irregular on standard gpus) topic; ray tracing. First off, a basic idea of what ray tracing is: http://en.wikipedia.org/wiki/Ray_tracing Second, for great reasons why

[Haskell-cafe] Haskell Weekly News: July 23, 2007

2007-07-22 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070723 Issue 63 - July 23, 2007 --- Welcome to issue 63 of HWN, a weekly newsletter

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-07-22 Thread Stefan O'Rear
On Mon, Jun 04, 2007 at 09:43:32AM +0100, Alistair Bayley wrote: (The docs tell me that using GHC.Exts is the approved way of accessing GHC-specific extensions, but all of the useful stuff seems to be in GHC.Prim.) All of the useful stuff *is* exported from GHC.Exts, it even says so in the

Re: [Haskell-cafe] Re: Practise fingerspelling with Haskell! (Code cleanup request)

2007-07-22 Thread Mirko Rahn
apfelmus wrote: Note that using Peano-numbers can achieve the same effect of stopping the length calculation as soon as more than one character is different. data Nat = Zero | Succ Nat deriving (Eq, Ord) instance Num Nat where (Succ x) + y = Succ (x+y) Zero+ y = y Very