Re: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread Ketil Malde
On Sun, 2007-09-23 at 21:17 -0400, David Menendez wrote: > My point was that I'm not aware of any packaging systems that don't > have a global "installed"/"not installed" bit for each package, which > isn't suited to handling Haskell libraries. I don't agree - you are assuming there is a one to o

Re: [Haskell-cafe] Noob question and sequence of operations (print then do something else)

2007-09-23 Thread Sam Hughes
John Wicket wrote: On 9/24/07, Sam Hughes <[EMAIL PROTECTED]> wrote: John Wicket wrote: I am still in an imperative way of thinking. In this example here; how would I call "putStrLn" and then set the function with a value. Eg: aa :: String -> IO () aa instr = do putStrLn "abc" putStrLn

Re: [Haskell-cafe] Noob question and sequence of operations (print then do something else)

2007-09-23 Thread John Wicket
Sorry, I was actually trying to use this as an example for something more complicated I am trying to do. In this example, why would the inferred type be "IO ()" aa :: String -> String aa instr = do putStrLn "abc" putStrLn "abc" return "Az" Couldn't match expected type `[t]' against infer

Re: [Haskell-cafe] Noob question and sequence of operations (print then do something else)

2007-09-23 Thread Sam Hughes
John Wicket wrote: I am still in an imperative way of thinking. In this example here; how would I call "putStrLn" and then set the function with a value. Eg: aa :: String -> IO () aa instr = do putStrLn "abc" putStrLn "abc" return "123" --- The error I am getting. Couldn't match ex

[Haskell-cafe] Noob question and sequence of operations (print then do something else)

2007-09-23 Thread John Wicket
I am still in an imperative way of thinking. In this example here; how would I call "putStrLn" and then set the function with a value. Eg: aa :: String -> IO () aa instr = do putStrLn "abc" putStrLn "abc" return "123" --- The error I am getting. Couldn't match expected type `()' agai

Re: [Haskell-cafe] Win32 Open GL / Glut Applications

2007-09-23 Thread John Wicket
Wow, what an interesting bunch of reads. I still haven't tried the options yet as I dont work with windows too much. What was the consensus? on the steps to follow. I will try finding a freeglut dll and then changing the name to opengl32.dll and see if that works. On 9/23/07, Ronald Guida <[EMA

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

2007-09-23 Thread Don Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070923 Issue 65 - September 23, 2007 --- Welcome to issue 65 of HWN, a newsletter covering

Re: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread David Menendez
On 9/23/07, Isaac Dupree <[EMAIL PROTECTED]> wrote: > Bulat Ziganshin wrote: > > Hello David, > > > > Sunday, September 23, 2007, 10:28:41 PM, you wrote: > > > >> Let's say I have more than one Haskell implementation on my computer, > >> e.g. GHC 6.6, GHC 6.7, and Hugs. (In MacPorts, these are the

Re: [Haskell-cafe] Re: [Haskell] Math behind Haskell

2007-09-23 Thread Derek Elkins
On Sun, 2007-09-23 at 20:03 -0400, Cale Gibbard wrote: > On 23/09/2007, Neil Mitchell <[EMAIL PROTECTED]> wrote: > > Hi > > > > The haskell-cafe@ mailing list is more appropriate for messages such > > as this. haskell@ is just for announcements (it should be called > > haskell-annouce@ !) > > > > >

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Ronald Guida
Miguel Mitrofanov wrote: >> A deadlock happens whenever two (or more) threads are blocked on each >> other. Deadlocks can be extremely hard to detect, especially if they >> occur intermittently. > > Isn't that so much different from garbage collection? Replace > "thread" with "chunk of data", and

Re: [Haskell-cafe] Re: [Haskell] Math behind Haskell

2007-09-23 Thread Cale Gibbard
On 23/09/2007, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Hi > > The haskell-cafe@ mailing list is more appropriate for messages such > as this. haskell@ is just for announcements (it should be called > haskell-annouce@ !) > > > * Lambda calculus - the basis of functional languages > > > > * Cate

Re: [Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-23 Thread Neil Mitchell
Hi > I agree. Unless... do some people subscribe to haskell@ (not > haskell-cafe@) and like the existing stuff that's sent there (not all > announcements... I'm not sure if I'd call e.g. Oleg's occasional > demonstrations "announcements" even)? There are four things sent to the haskell list@ 1)

Re: [Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-23 Thread Isaac Dupree
Neil Mitchell wrote: * Rename haskell@ to haskell-announce@, and redirect mails from haskell@ to haskell-announce@ for some period. I agree. Unless... do some people subscribe to haskell@ (not haskell-cafe@) and like the existing stuff that's sent there (not all announcements... I'm not sur

Re: [Haskell-cafe] Win32 Open GL / Glut Applications

2007-09-23 Thread Ronald Guida
Sven Panne wrote: > On Friday 21 September 2007 20:19, Ronald Guida wrote: >> John Wicket wrote: >> > yea, that is probably what I need. Can you post in a step-by-step way. >> >> Here is a set of instructions for what I had to do to get FreeGLUT >> working with GHCi [...]. > > Oh dear, a long

[Haskell-cafe] PROPOSAL: Rename haskell@ to haskell-announce@

2007-09-23 Thread Neil Mitchell
Hi I've just replied to another first poster with "wrong list". Its entirely not their fault, but its also probably a bit off-putting that your very first post gets a (very polite) "you got it wrong" message. To steal the reasons and explanations from Ian: - pretty much what

[Haskell-cafe] Re: [Haskell] Math behind Haskell

2007-09-23 Thread Neil Mitchell
Hi The haskell-cafe@ mailing list is more appropriate for messages such as this. haskell@ is just for announcements (it should be called haskell-annouce@ !) > * Lambda calculus - the basis of functional languages > > * Category theory - where all these mysterious things like monads, > arrows, a

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Ronald Guida
Peter Verswyvelen wrote: > I though it was impossible to detect a deadlock (and a black hole is > something like a deadlock no?) *before* it occurred, but in this > case, we're talking about detecting it *when* it occurs, no? And > then raising an error instead of just blocking? Generally, it's n

[Haskell-cafe] Re: [Haskell] simple function: stack overflow in hugs vs none in ghc

2007-09-23 Thread Isaac Dupree
(redirecting to haskell-cafe) Tom Pledger wrote: | > sqnc p ts = let ( r, ts' ) = p ts in case r of | > Nothing -> ([],ts') | > Just x -> let (r',ts'') = (sqnc p ts') in (x:r', ts'' ) : I don't know how ghc is avoiding the stack over

Re: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread Isaac Dupree
Bulat Ziganshin wrote: Hello David, Sunday, September 23, 2007, 10:28:41 PM, you wrote: Let's say I have more than one Haskell implementation on my computer, e.g. GHC 6.6, GHC 6.7, and Hugs. (In MacPorts, these are the ghc, ghc-devel, and hugs packages, respectively.) Let's further say that

Re[2]: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread Bulat Ziganshin
Hello David, Sunday, September 23, 2007, 10:28:41 PM, you wrote: > Let's say I have more than one Haskell implementation on my computer, > e.g. GHC 6.6, GHC 6.7, and Hugs. (In MacPorts, these are the ghc, > ghc-devel, and hugs packages, respectively.) > Let's further say that I want to install t

Re: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread David Menendez
On 9/23/07, Sven Panne <[EMAIL PROTECTED]> wrote: > On Thursday 20 September 2007 16:33, David Menendez wrote: > > Does RPM, etc., deal with the fact that Haskell library installations > > are specific to a particular platform? > > It depends what you mean with "deal": If it is only making sure tha

Re: [Haskell-cafe] are some of these "reverse" algos better than others? is there a quick and dirty way to reveal this fact?

2007-09-23 Thread Lennart Augustsson
Well, my goal when I first wrote it was to see if I could write reverse without calling any other functions. I did realize that it was really bad. :) -- Lennart On 9/23/07, Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote: > > On 9/23/07, Lennart Augustsson <[EMAIL PROTECTED]> wrote: > > If we're

Re[4]: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Bulat Ziganshin
Hello Lennart, Sunday, September 23, 2007, 8:30:43 PM, you wrote: and GHC stops executing this thread - wise solution. but it can't decide whether some signal handlers/backcalls are established and so whther are program definitely will never finish or not > But this was a very particular case wh

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Peter Verswyvelen
Neil Mitchell wrote: I think your intuition is off. This isn't the problem of detecting Oh well, that happens when I try to help people when I don't really know what I'm talking about ;-) I though it was impossible to detect a deadlock (and a blackhole is something like a deadlock no?) *befor

Re: Re[2]: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Lennart Augustsson
But this was a very particular case when a thread starts evaluating a node and then comes back to the same node again. The general case is (of course) undecidable. On 9/23/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > > Hello Lennart, > > Sunday, September 23, 2007, 2:05:46 PM, you wrote: > > i

Re: [Haskell-cafe] are some of these "reverse" algos better than others? is there a quick and dirty way to reveal this fact?

2007-09-23 Thread Felipe Almeida Lessa
On 9/23/07, Lennart Augustsson <[EMAIL PROTECTED]> wrote: > If we're discussing bad versions of reverse, don't forget this one: > > rev [] = [] > rev (x:xs) = > case rev xs of > [] -> [x] > y:ys -> y : rev (x : rev ys) > > It's different from most versions of reverse because it doesn't

Re: [Haskell-cafe] Library Process (was Building "production stable" software in Haskell)

2007-09-23 Thread Sven Panne
On Thursday 20 September 2007 16:33, David Menendez wrote: > Does RPM, etc., deal with the fact that Haskell library installations > are specific to a particular platform? It depends what you mean with "deal": If it is only making sure that a given binary library RPM matches the installed Haskell

Re[2]: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Bulat Ziganshin
Hello Lennart, Sunday, September 23, 2007, 2:05:46 PM, you wrote: i bet that general case contains too much conditions to check. program may be unblocked by other thread, by OS signal, by I/O operation completion, by C thread. how for example RTS can check that we have started I/O operation with

Re: [Haskell-cafe] Win32 Open GL / Glut Applications

2007-09-23 Thread Sven Panne
On Friday 21 September 2007 20:19, Ronald Guida wrote: > John Wicket wrote: > > yea, that is probably what I need. Can you post in a step-by-step way. > > Here is a set of instructions for what I had to do to get FreeGLUT > working with GHCi [...]. Oh dear, a long a sad story... :-( > [...] Al

Re: [Haskell-cafe] C's fmod in Haskell

2007-09-23 Thread Thomas Conway
On 9/17/07, Peter Verswyvelen <[EMAIL PROTECTED]> wrote: > > Maybe this is a stupid question, but I don't find something similar in > Haskell. > > I find mod and rem, which work on integers. But I'm looking for a function > similar to C's fmod. > > Of course I can write it myself, but I guess it

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Lennart Augustsson
I agree. This situation is totally detectable. On 9/23/07, Neil Mitchell <[EMAIL PROTECTED]> wrote: > > Hi > > > I'm not sure, but since it would require the detection of an evaluation > > that does not terminate, it comes down to the halting problem, which is > > not generally solvable. Maybe t

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Neil Mitchell
Hi > I'm not sure, but since it would require the detection of an evaluation > that does not terminate, it comes down to the halting problem, which is > not generally solvable. Maybe the experts can confirm my intuition? I think your intuition is off. This isn't the problem of detecting that a c

Re: [Haskell-cafe] are some of these "reverse" algos better than others? is there a quick and dirty way to reveal this fact?

2007-09-23 Thread Lennart Augustsson
If we're discussing bad versions of reverse, don't forget this one: rev [] = [] rev (x:xs) = case rev xs of [] -> [x] y:ys -> y : rev (x : rev ys) It's different from most versions of reverse because it doesn't use any auxiliarry functions. It's also extremely inefficient. -- Lenna

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Peter Verswyvelen
I'm not sure, but since it would require the detection of an evaluation that does not terminate, it comes down to the halting problem, which is not generally solvable. Maybe the experts can confirm my intuition? Andrew Coppin wrote: Peter Verswyvelen wrote: http://www.haskell.org/ghc/docs/

Re: [Haskell-cafe] what is f=f (not) doing ?

2007-09-23 Thread Andrew Coppin
Peter Verswyvelen wrote: http://www.haskell.org/ghc/docs/2.10/users_guide/user_146.html seems to confirm that? Ouch. Would it be possible to somehow prevent this behavious? (E.g., by somehow annotating each black hole with *whic