Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Casey McCann
On Fri, Apr 29, 2011 at 12:42 AM, Gregg Reynolds d...@mobileink.com wrote: On Thu, Apr 28, 2011 at 11:38 PM, Ben Lippmeier b...@ouroborus.net wrote: Laziness at the value level causes space leaks, and laziness at the type level causes mind leaks. Neither are much fun. If the designers could

Re: [Haskell-cafe] Iteratee: manyToOne

2011-04-29 Thread Dmitry Olshansky
Thank you! Working implementation is even more than I've expected. 2011/4/28 Felipe Almeida Lessa felipe.le...@gmail.com On Thu, Apr 28, 2011 at 1:10 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:09 PM, Felipe Almeida Lessa felipe.le...@gmail.com

Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-29 Thread Michael Snoyman
On Fri, Apr 29, 2011 at 2:49 AM, Erik de Castro Lopo mle...@mega-nerd.com wrote: Antoine Latter wrote: None of the lbs functions in http-enumerator can operate in constant space - they are all built on top of the utility function lbsIter which provides a warning: Convert the HTTP response

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Malcolm Wallace
On 29 Apr 2011, at 05:38, Ben Lippmeier b...@ouroborus.net wrote: Laziness at the value level causes space leaks, This is well-worn folklore, but a bit misleading. Most of my recent space leaks have been caused by excessive strictness. Space leaks occur in all kinds of programs and

Re: [Haskell-cafe] Binary and Serialize classes

2011-04-29 Thread Evan Laforge
When I need to comply with a specific binary format, I never rely on Binary/Serialize class instances - I always fall back on the primitive operations on Words of varying sizes (perhaps defining my own type classes for convenience). The 'Builder' type makes this pretty easy. If I were

Re: [Haskell-cafe] How often is the planet updated?

2011-04-29 Thread Magnus Therning
On Thu, Apr 28, 2011 at 11:27:49PM -0600, Luke Palmer wrote: On Thu, Apr 28, 2011 at 4:26 AM, Magnus Therning mag...@therning.orgwrote: I see that Planet Haskell hasn't been updated since April 26. Is something wrong with it, or does it really not update more often than that? In the

Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Edward Z. Yang
Others have answered your real question (I think) adequately, but if I'm pedantic and answer precisely what you ask: You can compile GHC with llvm by adding -fllvm to your build.mk file: GhcHcOpts += -fllvm Cheers, Edward Excerpts from Magicloud Magiclouds's message of Thu Apr 28 21:49:11

Re: [Haskell-cafe] Iteratee: manyToOne

2011-04-29 Thread John Lato
From: Felipe Almeida Lessa felipe.le...@gmail.com On Thu, Apr 28, 2011 at 1:10 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Thu, Apr 28, 2011 at 12:09 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: I foresee one problem: what is the leftover of 'manyToOne xs' if

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Ben Lippmeier
On 29/04/2011, at 6:08 PM, Malcolm Wallace wrote: On 29 Apr 2011, at 05:38, Ben Lippmeier b...@ouroborus.net wrote: Laziness at the value level causes space leaks, This is well-worn folklore, but a bit misleading. :-) Like permanent markers in the hands of children causes suffering.

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Thomas Davie
On 29 Apr 2011, at 10:42, Ben Lippmeier wrote: On 29/04/2011, at 6:08 PM, Malcolm Wallace wrote: On 29 Apr 2011, at 05:38, Ben Lippmeier b...@ouroborus.net wrote: Laziness at the value level causes space leaks, This is well-worn folklore, but a bit misleading. :-) Like

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-29 Thread Ertugrul Soeylemez
Chris Smith cdsm...@gmail.com wrote: Sometimes I wish for a -fphp flag that would turn some type errors into warnings. Example: v.hs:8:6: Couldn't match expected type `[a]' against inferred type `()' In the first argument of `a', namely `y' In the expression: a y

Re: [Haskell-cafe] Iteratee: manyToOne

2011-04-29 Thread Felipe Almeida Lessa
On Fri, Apr 29, 2011 at 6:32 AM, John Lato jwl...@gmail.com wrote: If you do this, the user needs to take care to order the iteratees so that the last iteratee has small leftovers.  Consider: manyToOne [consumeALot, return ()] In this case, the entire stream consumed by the first iteratee

Re: [Haskell-cafe] Iteratee: manyToOne

2011-04-29 Thread John Lato
On Fri, Apr 29, 2011 at 12:20 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Fri, Apr 29, 2011 at 6:32 AM, John Lato jwl...@gmail.com wrote: If you do this, the user needs to take care to order the iteratees so that the last iteratee has small leftovers. Consider: manyToOne

Re: [Haskell-cafe] Inputs to classic FRP: unsafeInterleaveIO/unsafePerformIO

2011-04-29 Thread Heinrich Apfelmus
Ryan Ingram wrote: Heinrich Apfelmus wrote: However, even in a demand-driven implementation, there is one optimization that I would like make: when there are multiple external events, say e1 and e2, the network splits into subnetworks that react only to one of the inputs. For instance, your

Re: [Haskell-cafe] A small Darcs anomoly

2011-04-29 Thread Andrew Coppin
On 28/04/2011 03:21 PM, Chris Smith wrote: On Thu, 2011-04-28 at 08:04 +0200, Bardur Arantsson wrote: There's also the fact that using in-repo branches means that all the tooling doesn't have to rely on any (fs-specific) conventions for finding branches. As someone who has admin'd a reasonably

Re: [Haskell-cafe] Iteratee: manyToOne

2011-04-29 Thread Dmitry Olshansky
In my case leftover is not important. But in common case... Just an idea... What if we provide iterWhile :: Iteratee a m () - Iteratee a m b - Iteratee a m b The first Iteratee only control when the result should be yeilded and feed an input to second Iteratee. Then we can change manyToOne to

Re: [Haskell-cafe] ANN: Leksah 0.10.0

2011-04-29 Thread Thomas Schilling
My guess is that you're doing all indexing work inside a single GHC API session. When loading external packages GHC caches all .hi files in memory -- and never unloads them. Therefore, if you have a large package DB, that'll consume a lot of memory. For similar reasons you can also run into

Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Henning Thielemann
On Fri, 29 Apr 2011, Erik de Castro Lopo wrote: Magicloud Magiclouds wrote: Then when I install other packages, they may complain that the binary format is not llvm, so they install some libraries again. You seem to think there is a problem where this is no problem :-). Nontheless it

[Haskell-cafe] versioning of Haskell packages

2011-04-29 Thread Daniil Elovkov
Hello list I have an idea on versioning of Haskell packages and a small question about release model of Haskell Platform. Since the latter is shorter let's start with it. So, what is the release model of Haskell Platform? Is it released every N months and frozen at that point? Or some

Re: [Haskell-cafe] versioning of Haskell packages

2011-04-29 Thread Magnus Therning
On Sat, Apr 30, 2011 at 02:05:39AM +0400, Daniil Elovkov wrote: Hello list I have an idea on versioning of Haskell packages and a small question about release model of Haskell Platform. Since the latter is shorter let's start with it. So, what is the release model of Haskell Platform? Is

Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Mikhail Glushenkov
Hi, Henning Thielemann lemming at henning-thielemann.de writes: Nontheless it might be interesting to let GHC emit LLVM bitcode. As far as I understand, this would enable LLVM's Link Time Optimizations. You can already emit .ll code with -ddump-llvm. All LLVM tools that take .bc files as

Re: [Haskell-cafe] How to make ghc 7 with llvm?

2011-04-29 Thread Mikhail Glushenkov
Henning Thielemann lemming at henning-thielemann.de writes: Nontheless it might be interesting to let GHC emit LLVM bitcode. As far as I understand, this would enable LLVM's Link Time Optimizations. And if you really need .bc, there is always llvm-as.

Re: [Haskell-cafe] versioning of Haskell packages

2011-04-29 Thread Rogan Creswick
On Fri, Apr 29, 2011 at 3:05 PM, Daniil Elovkov daniil.elov...@gmail.com wrote: Hello list I have an idea on versioning of Haskell packages and a small question about release model of Haskell Platform. Since the latter is shorter let's start with it. So, what is the release model of Haskell