[Haskell-cafe] Re: generalized list comprehensions

2008-11-10 Thread Johannes Waldmann
Well, my original post wasn't that negative ... Indeed then f [by e] seems a nice idea *but* the point was that I'd like to have this in any monad. The type of f in then f should be m a - m b, not just m a - m a, because then you don't need special syntax for group, which is somewhat like [a]

[Haskell-cafe] announcing darcs 2.1.1rc2

2008-11-10 Thread Eric Kow
Hi everybody, The release candidate for darcs 2.1.1 is now available at http://darcs.net/darcs-2.1.1rc2.tar.gz This release is very much intended to be darcs 2.1.0 plus GHC 6.10.1 support. We have also thrown in some simplifications to the regression testing suite and a Windows bugfix (which

Re: [Haskell-cafe] A video of Frag

2008-11-10 Thread Jake Mcarthur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 10, 2008, at 3:15 AM, Hugo Pacheco wrote: Perhaps this effort could be targeted at creating a cabal package in Hackage It's already there. :) http://hackage.haskell.org/cgi-bin/hackage-scripts/package/frag - - Jake -BEGIN PGP

[Haskell-cafe] Trouble installing ghc-6.10.1 on linux

2008-11-10 Thread Bit Connor
I'm trying to install ghc 6.10.1 on a machine with the crux distro. libc version 2.3.6 gcc 4.0.3 linux version 2.6.15.6 First I tried the binary version ghc-6.10.1-i386-unknown-linux.tar.bz2 and I very quickly get this error: $ ./configure checking build system type... i686-pc-linux-gnu

[Haskell-cafe] Histogram creation

2008-11-10 Thread Alexey Khudyakov
Hello! I'm tryig to write efficient code for creating histograms. I have following requirements for it: 1. O(1) element insertion 2. No reallocations. Thus in place updates are needed. accumArray won't go because I need to fill a lot of histograms (hundrends) from vely long list of data

Re: [Haskell-cafe] A video of Frag

2008-11-10 Thread Hugo Pacheco
Yes, I installed it via cabal-install.I am using GHC 6.10.1 now, but it had the same results in 6.6 (if I remember well) before. It may be a Mac issue. On Mon, Nov 10, 2008 at 1:39 PM, Korcan Hussein [EMAIL PROTECTED]wrote: Sorry I have no idea, which version of GHC are you using? did you

RE: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Mitchell, Neil
Generalised? Heck, I don't use list comprehension at all! :-P Perhaps you should! :-) You definitely should! Take a look at the Uniplate paper for some wonderful concise uses of list comprehensions for abstract syntax tree traversals. If you use a language like F# they become even more

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Duncan Coutts
On Sun, 2008-11-09 at 19:18 +, Andrew Coppin wrote: Derek Elkins wrote: As far as I can tell, no one actually uses parallel list comprehensions. With any luck, the same will be true for generalized list comprehensions. Generalised? Heck, I don't use list comprehension at all!

[Haskell-cafe] Re: FFI documentation?

2008-11-10 Thread Mauricio
Where do I find the documentation for the FFI for GHC? I've read the FFI report, the GHC user guide and scoured haskell.org but they all gloss over what commands you actually need to give GHC and how to give them. foreign import blah blah just gives me undefined references. One well

Re: [Haskell-cafe] Histogram creation

2008-11-10 Thread Bertram Felgenhauer
Alexey Khudyakov wrote: Hello! I'm tryig to write efficient code for creating histograms. I have following requirements for it: 1. O(1) element insertion 2. No reallocations. Thus in place updates are needed. accumArray won't go because I need to fill a lot of histograms (hundrends)

Re: [Haskell-cafe] A video of Frag

2008-11-10 Thread Hugo Pacheco
I read on your youtube post that you are planning to write a build-it-yourself tutorial.Perhaps this effort could be targeted at creating a cabal package in Hackage (I do not know the implications of that, just speaking out loud). Cheers, hugo 2008/11/10 Korcan Hussein [EMAIL PROTECTED] I

Re: [Haskell-cafe] Histogram creation

2008-11-10 Thread Ryan Ingram
On Mon, Nov 10, 2008 at 9:05 AM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: 2) runST $ foo bar doesn't work. You have to write runST (foo bar) Isn't that fixed in GHC6.10? That was the impression I got from the FPH talk at ICFP. -- ryan ___

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Andrew Coppin
Duncan Coutts wrote: On Sun, 2008-11-09 at 19:18 +, Andrew Coppin wrote: Generalised? Heck, I don't use list comprehension at all! :-P Perhaps you should! :-) When I first started with Haskell I kind of had the idea that list comprehensions were just for beginners and that

[Haskell-cafe] download haskell?

2008-11-10 Thread Johannes Waldmann
This is nit-picking, but ... when I go to haskell.org, there is a link (top in the left menu) Download Haskell. Is this for readers who don't know the meaning of the word implementation (a few lines below)? Ah, it must be modelled after the perl.org start page... - J.W. signature.asc

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Andrew Coppin
Mitchell, Neil wrote: In general: if boolean then [value] else [] Can be written as: [value | boolean] Is there any specific reason why this is valid? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Announce: FieldTrip library (functional 3D) and mailing list

2008-11-10 Thread Andrew Coppin
Conal Elliott wrote: FieldTrip [1] is a library for functional 3D graphics. It is intended for building static, animated, and interactive 3D geometry, efficient enough for real-time synthesis and display. Since FieldTrip is functional, one describes what models are, not how to render them

Re: [Haskell-cafe] download haskell?

2008-11-10 Thread Luke Palmer
2008/11/10 Johannes Waldmann [EMAIL PROTECTED]: This is nit-picking, but ... when I go to haskell.org, there is a link (top in the left menu) Download Haskell. I think it's missing the words to your brain. And the link goes to the wrong place. Luke

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Luke Palmer
Because expressions are treated as guards in list comprehensions. I.e.: [ foo | x - a, b, y - c, d ] Is interpreted as: do x - a guard b y - c guard d return foo Luke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Jonathan Cast
On Mon, 2008-11-10 at 18:20 +, Andrew Coppin wrote: Mitchell, Neil wrote: In general: if boolean then [value] else [] Can be written as: [value | boolean] Is there any specific reason why this is valid? Is there any specific reason to dis-allow it? The grammar here

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Jonathan Cast
On Mon, 2008-11-10 at 18:19 +, Andrew Coppin wrote: Duncan Coutts wrote: On Sun, 2008-11-09 at 19:18 +, Andrew Coppin wrote: Generalised? Heck, I don't use list comprehension at all! :-P Perhaps you should! :-) When I first started with Haskell I kind of had the

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Andrew Coppin
Jonathan Cast wrote: On Mon, 2008-11-10 at 18:20 +, Andrew Coppin wrote: Mitchell, Neil wrote: In general: if boolean then [value] else [] Can be written as: [value | boolean] Is there any specific reason why this is valid? Is there any specific reason to

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Duncan Coutts
On Mon, 2008-11-10 at 18:20 +, Andrew Coppin wrote: Mitchell, Neil wrote: In general: if boolean then [value] else [] Can be written as: [value | boolean] Is there any specific reason why this is valid? It is due to the rules for the translation of list comprehensions:

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Duncan Coutts
On Mon, 2008-11-10 at 18:19 +, Andrew Coppin wrote: I don't actually use *lists* all that much - or at least not list transformations. And if I'm going to do something complicated, I'll usually write it as a do-expression rather than a comprehension. Just a random example out of

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Jonathan Cast
On Mon, 2008-11-10 at 18:48 +, Andrew Coppin wrote: Jonathan Cast wrote: On Mon, 2008-11-10 at 18:20 +, Andrew Coppin wrote: Mitchell, Neil wrote: In general: if boolean then [value] else [] Can be written as: [value | boolean] Is there any

Re: [Haskell-cafe] Histogram creation

2008-11-10 Thread Duncan Coutts
On Mon, 2008-11-10 at 18:05 +0100, Bertram Felgenhauer wrote: Alexey Khudyakov wrote: Hello! I'm tryig to write efficient code for creating histograms. I have following requirements for it: 1. O(1) element insertion 2. No reallocations. Thus in place updates are needed.

Re: [Haskell-cafe] download haskell?

2008-11-10 Thread Don Stewart
waldmann: This is nit-picking, but ... when I go to haskell.org, there is a link (top in the left menu) Download Haskell. Is this for readers who don't know the meaning of the word implementation (a few lines below)? Ah, it must be modelled after the perl.org start page... - J.W. Exactly.

Re: [Haskell-cafe] Announce: FieldTrip library (functional 3D) and mailing list

2008-11-10 Thread Conal Elliott
Thanks for the prod, Andrew. (And thanks to Don S for prodding yesterday.) Now there's a picture on the FieldTrip page [1]. The shading is done using normals generated via derivatives from the vector-space package [2]. [1] http://haskell.org/haskellwiki/FieldTrip [2]

Re: [Haskell-cafe] Announce: FieldTrip library (functional 3D) and mailing list

2008-11-10 Thread Andrew Coppin
Conal Elliott wrote: Thanks for the prod, Andrew. (And thanks to Don S for prodding yesterday.) Now there's a picture on the FieldTrip page [1]. The shading is done using normals generated via derivatives from the vector-space package [2]. Mmm, nice. :-) (Actually... I just like shiny

Re: [Haskell-cafe] Re: generalized list comprehensions

2008-11-10 Thread Max Bolingbroke
2008/11/10 Johannes Waldmann [EMAIL PROTECTED]: Well, my original post wasn't that negative ... Indeed then f [by e] seems a nice idea *but* the point was that I'd like to have this in any monad. The type of f in then f should be m a - m b, not just m a - m a, because then you don't need

Re: [Haskell-cafe] Haskell Weekly News: Issue 92 - November 8, 2008

2008-11-10 Thread Andrew Coppin
Brent Yorgey wrote: --- Haskell Weekly News http://sequence.complete.org/hwn/20081108 Issue 92 - November 08, 2008 --- GHC version 6.10.1. Ian

Re: [Haskell-cafe] Announce: FieldTrip library (functional 3D) and mailing list

2008-11-10 Thread Conal Elliott
We're using OpenGL as a rendering back-end. I've now added some sample code to the wiki page (http://haskell.org/haskellwiki/FieldTrip). It's very fast on my two-year-old machine. More examples are in src/Test.hs in the reactive-fieldtrip package. - Conal On Mon, Nov 10, 2008 at 11:32 AM,

Re: [Haskell-cafe] Histogram creation

2008-11-10 Thread Bertram Felgenhauer
Alexey Khudyakov wrote: Hello! I'm tryig to write efficient code for creating histograms. I have following requirements for it: 1. O(1) element insertion 2. No reallocations. Thus in place updates are needed. accumArray won't go because I need to fill a lot of histograms (hundrends)

[Haskell-cafe] ANN (sorta): OpenGL with extra type safety

2008-11-10 Thread Neal Alexander
I recently modified the hOpenGL (and GLFW) source tree to force extra type checking on its various IO actions using the -XGeneralizedNewtypeDeriving extension (see http://hackage.haskell.org/trac/ghc/ticket/736). The main motivation was for writing concurrent OpenGL applications. Here its

Re: [Haskell-cafe] ANN (sorta): OpenGL with extra type safety

2008-11-10 Thread Don Stewart
wqeqweuqy: I recently modified the hOpenGL (and GLFW) source tree to force extra type checking on its various IO actions using the -XGeneralizedNewtypeDeriving extension (see http://hackage.haskell.org/trac/ghc/ticket/736). The main motivation was for writing concurrent OpenGL

[Haskell-cafe] Exporting a Type Class for Type Signatures

2008-11-10 Thread Dominic Steinitz
In the crypto package, I have two functions encrypt :: AESKey a = a - Word128 - Word128 decrypt :: AESKey a = a - Word128 - Word128 which are exported. I also have class (Bits a, Integral a) = AESKey a instance AESKey Word128 instance AESKey Word192 instance AESKey Word256 unexported

Re: [Haskell-cafe] Exporting a Type Class for Type Signatures

2008-11-10 Thread Bulat Ziganshin
Hello Dominic, Monday, November 10, 2008, 10:56:37 PM, you wrote: but this generates an error. Is there a way of allowing someone to use AESKey in a type signature but not allow them to declare new instances? afaik module AES (class AESKey,...) -- Best regards, Bulat

[Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Jason Dusek
I've put together a simple test case for a rather annoying problem. I've got a program that drives other programs. For example, it can drive `cat`: :; Simple cat a-file When the file is a little bit greater than 135060 bytes, this program fails to produce any output at all -- I need

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Brandon S. Allbery KF8NH
On 2008 Nov 10, at 16:29, Jason Dusek wrote: I've put together a simple test case for a rather annoying problem. I've got a program that drives other programs. For example, it can drive `cat`: :; Simple cat a-file When the file is a little bit greater than 135060 bytes, this program fails

Re: [Haskell-cafe] download haskell?

2008-11-10 Thread Johannes Waldmann
Keep things simple. well I get the drift but for me, download haskell is a type error. you cannot download a programming language (imagine download C). anyway, I actually downloaded haskell today and built the shiny new ghc-6.10.1. best regards - J.W. signature.asc Description: OpenPGP

[Haskell-cafe] GHC 6.10 / Mac OS X / Library problem

2008-11-10 Thread Pieter Laeremans
Hello, I've got a problem when I want to install pcre-light on OS X, with the latest version of GHC (binary package from haskell.org). It is not clear to me which flags to pass to ghc, to tell it to look at /opt/local/include for the pcre-light.h header. Any suggestions ? thanks, Pieter

Re: [Haskell-cafe] Are arbitrary rank types and existentials equivalent?

2008-11-10 Thread Henning Thielemann
Ryan Ingram schrieb: There's a natural relation between higher rank types and existentials; one way to think about it is this: if you have some existential type t (subject to some constraints), you cannot operate on it except with some function that accepts any type t subject to those

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Derek Elkins
On Mon, 2008-11-10 at 18:50 +, Duncan Coutts wrote: [...] If you meant, why is it allowed rather than banned then I guess the answer is because it is orthogonal. The rules naturally handle that case and there was no particular reason to ban it, even if it is somewhat unusual. Unusual?

Re: [Haskell-cafe] Exporting a Type Class for Type Signatures

2008-11-10 Thread wren ng thornton
Bulat Ziganshin wrote: Hello Dominic, Monday, November 10, 2008, 10:56:37 PM, you wrote: but this generates an error. Is there a way of allowing someone to use AESKey in a type signature but not allow them to declare new instances? afaik module AES (class AESKey,...) This seems not to

Re: [Haskell-cafe] GHC 6.10 / Mac OS X / Library problem

2008-11-10 Thread Hugo Pacheco
it is however. the same happened to me.you just need to run cabal install pcre-light --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib My location is /opt/local, since I installed pcre via macports sudo port install pcre Bue I think pcre is installed by default in

[Haskell-cafe] GHC 6.10, strange behaviour when profiling?

2008-11-10 Thread Aleš Bizjak
Hello, I'm experiencing some strange behaviour with GHC 6.10 and would like an explanation why. Here's the problem. With GHC 6.8.[23] memory usage of a program was about 250mb (computing pi to 10^6 decimals). Now I tried recompiling and running with GHC 6.10 and I got more than 1.4gb

Re: [Haskell-cafe] GHC 6.10, strange behaviour when profiling?

2008-11-10 Thread Don Stewart
Could you please file this as a bug at this address, http://hackage.haskell.org/trac/ghc/newticket?type=bug Cheers, Don ales.bizjak0: Hello, I'm experiencing some strange behaviour with GHC 6.10 and would like an explanation why. Here's the problem. With GHC 6.8.[23] memory

Re: [Haskell-cafe] Haskell Weekly News: Issue 92 - November 8, 2008

2008-11-10 Thread Austin Seipp
Anyway, I don't see it anywhere in the release notes, but I get the vibe that type families are supposed to be fully working now. Is that correct? If so, why no mention anywhere? Type families have been completely reimplemented and should be stable now, but there are some bugs - notably

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Krzysztof Skrzętnicki
Yep, that's your problem. forkIO the hPut. I can see the that thing biting a lot of people. Maybe there should be a warning in docs that this particular combination: feed input read output waitForProcess is just likely to produce deadlocks? All best Christopher

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Jason Dusek
simple exe bytes args= do (i, o, e, p)- runInteractiveProcess exe args Nothing Nothing hPut i bytes s - hGetContents o hClose i return s Yep, that's your problem. forkIO the hPut. Maybe I didn't do enough here -- just

RE: [Haskell-cafe] A video of Frag

2008-11-10 Thread Korcan Hussein
Okay so i've written a blog on how to build and run frag on windows @ http://monadickid.blogspot.com/2008/11/haskell-eye-for-windows-guy.html CC: [EMAIL PROTECTED]; haskell-cafe@haskell.org From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [Haskell-cafe] A video of Frag Date: Mon,

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Jason Dusek
This does not work either. It should cover all the bases, right? Fork off input, pull things from ouput as they are ready, stop when we reach end of file. If you remove the line `print partial`, the program loops forever; if you keep it, the program stops right there. -- _jsn import

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Brandon S. Allbery KF8NH
On 2008 Nov 10, at 19:04, Jason Dusek wrote: simple exe bytes args= do (i, o, e, p)- runInteractiveProcess exe args Nothing Nothing hPut i bytes s - hGetContents o hClose i return s Yep, that's your problem. forkIO the hPut. Maybe I

[Haskell-cafe] Re: download haskell?

2008-11-10 Thread Benjamin L . Russell
On Mon, 10 Nov 2008 19:20:09 +0100, Johannes Waldmann [EMAIL PROTECTED] wrote: This is nit-picking, but ... when I go to haskell.org, there is a link (top in the left menu) Download Haskell. Is this for readers who don't know the meaning of the word implementation (a few lines below)? Ah, it must

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Jason Dusek
That was just me being absent-minded -- I have threaded in my Cabal file but was not using it on the command line for my little test script. Thank you for calling it to my attention. -- _jsn ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Daniel Franke
Jason Dusek [EMAIL PROTECTED] writes: simple exe bytes args= do (i, o, e, p)- runInteractiveProcess exe args Nothing Nothing hPut i bytes s - hGetContents o hClose i return s Yep, that's your problem. forkIO the hPut.

Re: [Haskell-cafe] catting to cat gets stuck at 135K

2008-11-10 Thread Jason Dusek
I am using 6.8.3 -- it is almost exciting to realize how close I came to 'impossible' instead of 'annoying'. Living on the edge with UNIX IO! -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Closed type classes [was: Exporting a Type Class for Type Signatures]

2008-11-10 Thread oleg
Dominic Steinitz wrote: In the crypto package, I have two functions encrypt :: AESKey a = a - Word128 - Word128 decrypt :: AESKey a = a - Word128 - Word128 but the class AESKey is not exported, to prevent the user from adding more instances to it. Since AESKey is not exported, the users

[Haskell-cafe] reliable (bi)directional pipe to a process

2008-11-10 Thread oleg
I'd like to point out a reliable, proven and simple way of interacting with another process, via unidirectional or bidirectional pipes. The method supports Unix sockets, pipes, and TCP sockets. I too have noticed insidious bugs in GHC run-time when communicating with another process via a pipe.

Re: [Haskell-cafe] reliable (bi)directional pipe to a process

2008-11-10 Thread Don Stewart
oleg: I'd like to point out a reliable, proven and simple way of interacting with another process, via unidirectional or bidirectional pipes. The method supports Unix sockets, pipes, and TCP sockets. I too have noticed insidious bugs in GHC run-time when communicating with another process