Re: [Haskell-cafe] System.Posix, forked processes and psuedo terminals on Linux

2010-08-21 Thread Donn Cave
Quoth Erik de Castro Lopo mle...@mega-nerd.com, ... The code below *almost* works. Its currently printing out: parent : Forked child was here! parent : Message from parent. Read 21 bytes while I think it should print: parent : Forked child was here! parent : Read 21

[Haskell-cafe] Re: Equality constraints and RankNTypes - how do I assist type inference

2010-08-21 Thread DavidA
Brandon S Allbery KF8NH allbery at ece.cmu.edu writes: type Tensor u v = (u ~ Vect k a, v ~ Vect k b) = Vect k (TensorBasis a b) -- ** IIRC this actually substitutes as (forall k a b. (u ~ Vect k a, v ~ Vect k b) = Vect k (TensorBasis a b)) and the implicit forall will

Re: [Haskell-cafe] System.Posix, forked processes and psuedo terminals on Linux

2010-08-21 Thread Erik de Castro Lopo
Donn Cave wrote: My guess is that the default tty attributes include ECHO. So the data you write to the master fd is echoed back, as though by the fork process but actually by the terminal driver. You can turn ECHO off. Thanks very much Donn, that was an excellent guess. Adding:

Re: [Haskell-cafe] Code that writes code

2010-08-21 Thread Erik de Castro Lopo
Andrew Coppin wrote: Well, yeah, if you've got so much boiler plate that you have to automate generating the boilerplate, you're probably doing it wrong. ;-) All I'm actually using it to do is generate a set of fixed-size containers (each of which has a bazillion class instances). I've

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Magnus Therning
On 20/08/10 23:12, John Millikin wrote: On Fri, Aug 20, 2010 at 14:58, Magnus Therning mag...@therning.org wrote: Indeed. In many protocols it would force the attacker to send well-formed requests though. I think this is true for many text-based protocols like HTTP. The looping can be

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Andrew Coppin
Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: (Unless you're suggesting that I should try to actually *fix* these things. The way I figure it, if an army of developers who are already experts on the subject haven't been able to fix it yet, it must be

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Ivan Lazar Miljenovic
Andrew Coppin andrewcop...@btinternet.com writes: Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: (Unless you're suggesting that I should try to actually *fix* these things. The way I figure it, if an army of developers who are already experts on the

Re: [Haskell-cafe] Re: Equality constraints and RankNTypes - how do I assist type inference

2010-08-21 Thread Sjoerd Visscher
This works: -- Tensor product of two vector spaces type family Tensor u v :: * type instance Tensor (Vect k a) (Vect k b) = Vect k (TensorBasis a b) On Aug 21, 2010, at 9:15 AM, DavidA wrote: Brandon S Allbery KF8NH allbery at ece.cmu.edu writes: type Tensor u v = (u ~ Vect k a, v ~

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Felipe Lessa
On Sat, Aug 21, 2010 at 5:40 AM, Magnus Therning mag...@therning.org wrote: It changes the timing.  The iteratee will receive the data sooner (when it's available rather than when the buffer is full).  This means it can fail *sooner*, in wall-clock time. I still fail to see how this works. So

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Andrew Coppin
Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: So now I wonder about Darcs, Cabal, Haddock, Hackage, and all those other big projects. Do they really have a bazillion people working on them? Or is it just two blokes in their spare time? (And, more

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Daniel Fischer
On Saturday 21 August 2010 14:57:26, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: So now I wonder about Darcs, Cabal, Haddock, Hackage, and all those other big projects. Do they really have a bazillion people working on them? Or is it

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Ivan Lazar Miljenovic
Daniel Fischer daniel.is.fisc...@web.de writes: On Saturday 21 August 2010 14:57:26, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: So now I wonder about Darcs, Cabal, Haddock, Hackage, and all those other big projects. Do they really

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Daniel Fischer
On Saturday 21 August 2010 15:35:08, Ivan Lazar Miljenovic wrote: A Bazillion is an imaginary number meant to indicate something extremely large: http://en.wikipedia.org/wiki/Bazillion#-illion Yes, but 'extremely large' numbers mean different things, depending on whether we talk about for

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Andrew Coppin
Ivan Lazar Miljenovic wrote: Since the population of the planet is roughly 6 Billion, I would guess that Andrew is under the miscomprehension that aliens make up the vast majority of Haskell users. Let's face it, Haskell *does* look like a technology invented by an alien intelligence

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct. Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send it data. The behavior is as Magnus describes: bytes from

[Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
When trying to load Haskore in Hugs Sept 2006 (say by :l), it does not work because it is in a subdirectory Haskore/Src/, despite that the Hugs searchpath includes /usr/local/lib/hugs/packages/* I could of course change this searchpath, but I'm curios about how to fix it without it - it

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Henning Thielemann
On Sat, 21 Aug 2010, Hans Aberg wrote: When trying to load Haskore in Hugs Sept 2006 (say by :l), it does not work because it is in a subdirectory Haskore/Src/, despite that the Hugs searchpath includes /usr/local/lib/hugs/packages/* I could of course change this searchpath, but I'm curios

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
On 21 Aug 2010, at 20:24, Henning Thielemann wrote: When trying to load Haskore in Hugs Sept 2006 (say by :l), it does not work because it is in a subdirectory Haskore/Src/, despite that the Hugs searchpath includes /usr/local/lib/hugs/packages/* I could of course change this searchpath,

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Gregory Collins
John Millikin jmilli...@gmail.com writes: I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct. Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send it data. The

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
On 21 Aug 2010, at 20:24, Henning Thielemann wrote: When trying to load Haskore in Hugs Sept 2006 (say by :l), it does not work because it is in a subdirectory Haskore/Src/, despite that the Hugs searchpath includes /usr/local/lib/hugs/packages/* I could of course change this searchpath,

Re: [Haskell-cafe] lazy skip list?

2010-08-21 Thread Michael D. Adams
Could you be more specific about what operations you want and their properties (e.g. performance laziness, etc.)? For example, do you need to be able to cons onto the front or is the list generated once and never consed onto? Do you need to be able to insert/remove elements from the middle? Do

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Henning Thielemann
On Sat, 21 Aug 2010, Hans Aberg wrote: On 21 Aug 2010, at 20:24, Henning Thielemann wrote: Did you install Haskore with Cabal or is it a version of Haskore that is shipped with Hugs? It is the version that comes with Hugs. It is the same as listed on http://haskell.org/haskore/. What

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Judah Jacobson
On Sat, Aug 21, 2010 at 10:58 AM, John Millikin jmilli...@gmail.com wrote: I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct. Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001 (non-blocking). You can use netcat, telnet,

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 11:35, Gregory Collins g...@gregorycollins.net wrote: John Millikin jmilli...@gmail.com writes: I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct. Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread Evan Laforge
I wonder... How many people are actually working on Cabal? When I first started using Haskell, I got the impression that there were hundreds, maybe even thousands, of developers working on GHC. (After all, how else could you write such a huge codebase in less than two centuries?) But now it

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 11:58, Judah Jacobson judah.jacob...@gmail.com wrote: You should note that in ghc=6.12, hWaitForInput tries to decode the next character of input based on to the Handle's encoding.  As a result, it will block if the next multibyte sequence is incomplete, and it will

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
On 21 Aug 2010, at 20:57, Henning Thielemann wrote: Did you install Haskore with Cabal or is it a version of Haskore that is shipped with Hugs? It is the version that comes with Hugs. It is the same as listed on http://haskell.org/haskore/ . What other version do you have in mind. There

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Magnus Therning
On 21/08/10 18:58, John Millikin wrote: I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct. Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send it data. The behavior

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
On 21 Aug 2010, at 20:57, Henning Thielemann wrote: Did you install Haskore with Cabal or is it a version of Haskore that is shipped with Hugs? It is the version that comes with Hugs. It is the same as listed on http://haskell.org/haskore/ . What other version do you have in mind. There

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Henning Thielemann
On Sat, 21 Aug 2010, Hans Aberg wrote: On 21 Aug 2010, at 20:57, Henning Thielemann wrote: and one that I have messed http://hackage.haskell.org/package/haskore What changes have you made? - perhaps the packages should be unified. I changed almost everything: Divided modules, designed a

Re: [Haskell-cafe] Unix emulation [ANNOUNCE: Sifflet visual programming language, release 1.0!]

2010-08-21 Thread gdweber
Thanks to both Stephen Tetley and Henk-Jan van Tuyl for pointing them out those pages on installing curl and, in general, Unixy software, on Windows. Both looked rather cryptic to me also, although I did not try them out. I will try my hand at building a Windows binary for Sifflet and making it

Re: [Haskell-cafe] Hugs Haskore loading

2010-08-21 Thread Hans Aberg
On 21 Aug 2010, at 21:51, Henning Thielemann wrote: and one that I have messed http://hackage.haskell.org/package/haskore What changes have you made? - perhaps the packages should be unified. I changed almost everything: Divided modules, designed a hierarchy for module names, generalized

Re: [Haskell-cafe] Slightly humorous: Headhunters toolbox (example for Germany)

2010-08-21 Thread gdweber
For what it's worth (which judging from later posts may be nothing), the link Sachsen-Anhalt goes to a page with a section Regionales Interesse with a nice blue bar line for Magdeburg, and no mention of Halle. On 2010-Aug-17, Henning Thielemann wrote: Daniel Kahlenberg schrieb: Hi list,

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 12:44, Magnus Therning mag...@therning.org wrote: As an aside, has anyone written the code necessary to convert a parser, such as e.g.  attoparsec, into an enumerator-iteratee[1]? This sort of conversion is trivial. For an example, I've uploaded the attoparsec-enumerator

Re: [Haskell-cafe] lazy skip list?

2010-08-21 Thread Evan Laforge
On Sat, Aug 21, 2010 at 6:52 PM, Michael D. Adams mdmko...@gmail.com wrote: Could you be more specific about what operations you want and their properties (e.g. performance laziness, etc.)?  For example, do you need to be able to cons onto the front or is the list generated once and never

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Paulo Tanimoto
On Sat, Aug 21, 2010 at 3:36 PM, John Millikin jmilli...@gmail.com wrote: This sort of conversion is trivial. For an example, I've uploaded the attoparsec-enumerator package at http://hackage.haskell.org/package/attoparsec-enumerator -- iterParser is about 20 lines, excluding the module

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 14:17, Paulo Tanimoto ptanim...@gmail.com wrote: Cool, but is there a reason it won't work with version 0.2 you just released?  build-depends:    [...]    , enumerator = 0.1 0.2 I noticed that when installing it. Hah ... forgot to save the vim buffer. Corrected

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 14:41, Michael Snoyman mich...@snoyman.com wrote: Hey John, As I mentioned, I'm considering having persistent depend upon enumerator. Do you think it's too early in enumerator's life to do so and I should wait till the API stabilizes a bit more? Also, two other packages

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread Paulo Tanimoto
John, On Sat, Aug 21, 2010 at 5:06 PM, John Millikin jmilli...@gmail.com wrote: I think the API is pretty stable. Most of the significant research into iteratee-based APIs has already been performed by users of the iteratee library, and by Oleg. There might be a few backwards-compatible

Re: [Haskell] Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package

2010-08-21 Thread John Millikin
On Sat, Aug 21, 2010 at 15:35, Paulo Tanimoto ptanim...@gmail.com wrote: Apologies if I'm asking you to repeat yourself, but I couldn't find the explanation.  What was the reason why you went with IterateeM instead of IterateeMCPS?  Simplicity? Iteratees are difficult enough to understand

Re: [Haskell-cafe] Code that writes code

2010-08-21 Thread Bill Atkins
Have you looked at creating Template Haskell splices to generate this for you? On Friday Aug 20, 2010, at 2:21 PM, Andrew Coppin wrote: All I'm actually using it to do is generate a set of fixed-size containers (each of which has a bazillion class instances). I've got a variable-sized

Re: [Haskell-cafe] feasability of implementing an awk interpreter.

2010-08-21 Thread Bill Atkins
I don't think Template Haskell will be essential for this - you will probably need a parser (probably written with Parsec), an eval function, and a state monad to represent imperative changes made by the language you're evaluating. Template Haskell is more for the elimination of boilerplate

Re: [Haskell-cafe] feasability of implementing an awk interpreter.

2010-08-21 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/21/2010 11:22 PM, Bill Atkins wrote: I don't think Template Haskell will be essential for this - you will probably need a parser (probably written with Parsec), an eval function, and a state monad to represent imperative changes made by the

Re: [Haskell-cafe] A cabal odyssey

2010-08-21 Thread wren ng thornton
Daniel Fischer wrote: On Saturday 21 August 2010 15:35:08, Ivan Lazar Miljenovic wrote: A Bazillion is an imaginary number meant to indicate something extremely large: http://en.wikipedia.org/wiki/Bazillion#-illion Yes, but 'extremely large' numbers mean different things, depending on