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 p

[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. I

[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

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 http://www.haskell.org/mailman/listinfo/has

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 Haskell-Cafe@haskell.org

[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

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 prob

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 didn

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] 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:

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 h

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 S

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] 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

[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 befo

[Haskell-cafe] Haskell source packages in Hackage

2008-11-10 Thread Hugo Pacheco
Hi guys, I am having an hard time installing the haskell-src and haskell-src-exts packages, since both seem to have problems with happy. I have installed happy 1.18.2 successfully, but it does not seem to be visible (although the happy executable is in my path). I get the errors: $ cabal install

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 /Develo

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

2008-11-10 Thread Antoine Latter
On Mon, Nov 10, 2008 at 1:56 PM, Dominic Steinitz <[EMAIL PROTECTED]> wrote: > 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) =>

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

2008-11-10 Thread Don Stewart
pieter: > 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. > Looks like pcre.

Re: [Haskell-cafe] generalized list comprehensions

2008-11-10 Thread Jonathan Cast
On Mon, 2008-11-10 at 16:06 -0600, Derek Elkins wrote: > 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 particul

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 wor

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] 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 cons

[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 :caba

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: Open

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

[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 to

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] 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

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 appli

[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 imp

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 (hu

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, Andrew

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 Lynagh

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 thi

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] http://haskell.org/haskellw

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. > Ex

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 need

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 | bo

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 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 lis

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 dis-al

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 Haske

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? Th

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] 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] 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 (b

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 http://www.haskell.org/mailman/listinf

[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 Descrip

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 'real'

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] 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 (hundr

[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 w

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

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 co

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

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 SIGNATU

[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 checking

[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 (possib

[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 w

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 yo

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 d

[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 l