Re: [Haskell-cafe] reverse with foldl

2007-09-21 Thread Miguel Mitrofanov
reverse = foldl (\x - \xs - xs:x) [] Doesn't typecheck. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: interaction between OS processes

2007-09-21 Thread Andrea Rossato
On Fri, Sep 14, 2007 at 01:55:32AM +, Aaron Denney wrote: On 2007-08-31, Andrea Rossato [EMAIL PROTECTED] wrote: Thanks for your kind attention, but I don't think it's a matter of buffering (I indeed tried playing with hSetBuffering with no results). I'd like to convince you otherwise:

[Haskell-cafe] bindings to the xmms_remote API, GList and something more

2007-09-21 Thread Andrea Rossato
Hi, I think there's a huge flaw in the Haskell design: if you conceive such a powerful and expressive programming language, one that empowers even the most ignorant computer user to write complex applications, instead of sticking to basic shell scripting - the only domain graspable by such stupid

RE: [Haskell-cafe] How can I stop GHCi from calling show for IOactions?

2007-09-21 Thread Simon Peyton-Jones
| I think a more consistent behavior would be to not print the LHS at | all. If you wanted to print the result of the computation you could | just do: | | Prelude bar 5 | | or, if you also wanted bound variables afterwards: | | Prelude (x, Just y) - bar 5 | Prelude (x, Just y) I've

Re: [Haskell-cafe] bindings to the xmms_remote API, GList and something more

2007-09-21 Thread Andrea Rossato
On Fri, Sep 21, 2007 at 09:08:13AM +0200, Andrea Rossato wrote: Hi, I think there's a huge flaw in the Haskell design: I don't know if this is a feature, the fact that most of the times you can find a solution to your problems by yourself, but only after polluting the haskell-cafe mailing list

Re: [Haskell-cafe] Accumulator value for and and or

2007-09-21 Thread Twan van Laarhoven
PR Stanley wrote: Hi or = foldl (||) False and = foldl () True I can understand the rationale for the accumulator value - True [] where [] = True and True || [] where [] = False Other than the practical convenience is there a reason for having the empty list in and and or equating to True and

[Haskell-cafe] Slightly Off-topic

2007-09-21 Thread PR Stanley
Hi Does anyone know of a good active list for students and experts in discrete mathematics, in particular, logic? Thanks, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Interesting folds over bytestring lists?

2007-09-21 Thread Duncan Coutts
In message [EMAIL PROTECTED] Justin Bailey [EMAIL PROTECTED] writes: On 9/20/07, Duncan Coutts [EMAIL PROTECTED] wrote: A lazy bytestring is a list of strict bytestring which externally looks like one big string. Could you not just use a lazy bytestring and it's take and drop functions?

[Haskell-cafe] Graphics.SOE

2007-09-21 Thread Peter Padawitz
Can scrollbars be attached to windows created with openWindow? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Interesting folds over bytestring lists?

2007-09-21 Thread Johan Tibell
On 9/21/07, Duncan Coutts [EMAIL PROTECTED] wrote: I should point out that other people who did this year's ICFP contest have also looked at structures like this (though mostly after the contest finished), so you might want to talk or collaborate with them. I used exactly this structure

[Haskell-cafe] Re: Sequencing Operations in a Monad

2007-09-21 Thread Al Falloon
SevenThunders wrote: Well it certainly requires some thought here. As I see it, I now have two reasonable choices. Either I pull all my matrix operations back inside the IO monad and avoid the matrix action as a matrix variable paradigm (due to the loss of referential transparency) or I

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

2007-09-21 Thread Claus Reinke
http://www.haskell.org/HOpenGL/ First, the bad news: The HOpenGL site is outdated. Look at [1] and note the date of the most recent release: September 9, *2003*. [1] http://www.haskell.org/HOpenGL/releases.html try http://www.haskell.org/haskellwiki/Opengl ? [Sven: could there please be a

Re: [Haskell-cafe] reverse with foldl

2007-09-21 Thread Rodrigo Queiro
Prelude :t foldl (\x - \xs - xs:x) [] foldl (\x - \xs - xs:x) [] :: [b] - [b] Strange choice of names, though, since x is a list, and xs is an element. I would have gone for: foldl (\xs x - x:xs) [] although the library opts for: foldl (flip (:)) [] On 21/09/2007, Miguel Mitrofanov [EMAIL

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

2007-09-21 Thread Malcolm Wallace
http://www.haskell.org/HOpenGL/ try http://www.haskell.org/haskellwiki/Opengl ? [Sven: could there please be a link from the old home page to the wiki page, with a recommendation to improve the latter?] Since this kind of confusion over the HOpenGL documentation is becoming

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

2007-09-21 Thread Ronald Guida
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. RANT Just a little warning: my instructions could be wrong in some places. Normally, in order to verify my

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

2007-09-21 Thread Ronald Guida
Oops, one slight omission: 4. Download this custom makefile and put in in the ./src directory. http://hpaste.org/2841 ** Call this file Makefile, with no extension. 5. Download this custom def file and put in in the ./src directory. http://hpaste.org/2842 ** Call this file

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Peter Verswyvelen
Thanks for the info, very interesting. Yes, I'm using GHCi, and I'm using forkOS, and I'm using OpenGL... Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and those black holes...

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Peter Verswyvelen
All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. That's a petty. I really would like to experiment with the debugger :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

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

2007-09-21 Thread Peter Verswyvelen
Oh yes, it's really confusing, this HOpenGL web-page is completely obsolete :-) It confused me so much I stopped looking at Haskell initially. Luckily this mailing list exists, and the other members of this group already gave you adequate instructions how to get started :-) Some other things

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Felipe Almeida Lessa
On 9/21/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and those black holes... Understanding the low-level details helps a lot for me.

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Neil Mitchell
All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. That's a petty. I really would like to experiment with the debugger :-) Me too! A proper release of GHC 6.8 is very nearby, so you should get your wish then. Thanks Neil

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Stefan O'Rear
On Fri, Sep 21, 2007 at 05:40:59PM -0300, Felipe Almeida Lessa wrote: On 9/21/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and

Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?

2007-09-21 Thread Peter Verswyvelen
STG is a very pretty island, but it's just that - an island. If you want to see the Big Picture, I can only recommend SPJ's 1987 (except for the optimization section, almost everything is still true) book: http://research.microsoft.com/~simonpj/papers/slpj-book-1987/slpj-book-1987.djvu

[Haskell-cafe] Composition Operator

2007-09-21 Thread PR Stanley
Hi (.) :: (b - c) - (a - b) - (a - c) While I understand the purpose and the semantics of the (.) operator I'm not sure about the above definition. Is the definition interpreted sequentially - (.) is a fun taht takes a fun of type (b - c) and returns another fun of type (a - b) etc? Any ideas?

Re: [Haskell-cafe] Composition Operator

2007-09-21 Thread jeff p
Hello, It's probably easiest to think of composition as a function which takes two arguments (both functions), (g :: b - c) and (f :: a - b), and returns a new function of type a - c. We could write this explicitly as composition :: (b - c, a - b) - a - c composition (g,f) = \x - g (f x)

Re: [Haskell-cafe] Composition Operator

2007-09-21 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Apply parentheses from the right. So: (.) :: (b - c) - (a - b) - a - c is the same as: (.) :: (b - c) - (a - b) - (a - c) is the same as: (.) :: (b - c) - ((a - b) - (a - c)) How you read that is up to you, but here is one way of reading it: