Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Duncan Coutts
On Sun, 2009-07-19 at 23:07 +0100, Thomas Schilling wrote: 2009/7/19 Max Bolingbroke batterseapo...@hotmail.com Dear Cafe, For fun, I spent a few hours yesterday implement support for this syntax in GHC, originally propsed by Koen Claessen: [k, =, v, | (k, v) - [(foo, 1), (bar,

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Neil Mitchell
Except that it's ugly compared to the proposed extension. With the extension you can put things in the same, right place: renderGhcOptions opts =     ghcOptExtraPre opts  -- source search path  ++ [ -i      | not (null (ghcOptSearchPath opts)) ]  ++ [ -i, dir | dir - ghcOptSearchPath opts

Re[2]: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Bulat Ziganshin
Hello Neil, Tuesday, July 21, 2009, 1:26:55 PM, you wrote:  ++ [ -i      | not (null (ghcOptSearchPath opts)) ]  ++ [ -i, dir | dir - ghcOptSearchPath opts ] Following the discussions, I now support this extension too - I keep seeing more and more places in my code where it would be very

[Haskell-cafe] Re[2]: [Haskell] TABI 0.1: a typeful tagged cross-language calling convention

2009-07-21 Thread Bulat Ziganshin
Hello Felipe, Tuesday, July 21, 2009, 7:38:44 PM, you wrote: * passing complex datastructures between various languages forth and back, providing faster alternative to serialization approach I've read the code and I don't see how tabi manages to do this. it's not yet implemented

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Thomas Schilling
I'm not convinced ugly is a good reason to add more complexity to the language syntax. I am not aware of a good metric to measure the costs/beneficts of new syntactic constructs. Part of the costs are the number of tools that need to be adapted and the extend of their loss of utility if they are

[Haskell-cafe] Re: [Haskell] TABI 0.1: a typeful tagged cross-language calling convention

2009-07-21 Thread Felipe Lessa
On Tue, Jul 21, 2009 at 08:11:47PM +0400, Bulat Ziganshin wrote: if you have any specific needs, we can discuss it. my own needs is mainly combination of first and third clauses of quoted list, so second claim is somewhat artificial :) it is possible but only partially implemented I was just

Re: [Haskell-cafe] Re: [Haskell] TABI 0.1: a typeful tagged cross-language calling convention

2009-07-21 Thread John Melesky
On Jul 21, 2009, at 10:37 AM, Felipe Lessa wrote: it seems to me that the only way of avoiding serialization costs would be having the same representation in memory for all languages and just passing pointers around instead of peek'ing and poke'ing everytime. Alternately, a whole slew of

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Dan Weston
Bulat Ziganshin wrote: Hello Neil, Tuesday, July 21, 2009, 1:26:55 PM, you wrote: ++ [ -i | not (null (ghcOptSearchPath opts)) ] ++ [ -i, dir | dir - ghcOptSearchPath opts ] Following the discussions, I now support this extension too - I keep seeing more and more places in my code

[Haskell-cafe] cheap in-repo local branches (just needs implementation)

2009-07-21 Thread Eric Kow
Hi everyone, Max Battcher had an idea that I thought I should post on the mailing list. The idea is about making branches in darcs. Right now, we take the view that a darcs branch is a darcs repository plain and simple. If you want to create a branch, all you have to do is darcs get (darcs get

Re: [Haskell-cafe] cheap in-repo local branches (just needs implementation)

2009-07-21 Thread Justin Bailey
I like it. git branches are nice to work with, and they don't the conceptual pain of creating an new repository. Things that make them nice: * When switching branches, all your files magically update (if they have not been modified). * Easy to maintain multiple branches, say stable and

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Felipe Lessa
On Tue, Jul 21, 2009 at 12:29:18PM -0700, Dan Weston wrote: This would mean that [ | c ] = concat $ do { c; return [] } The right is legal Haskell and gives []. The left is (not yet) legal. Should it be? Please, please, do not allow that. People wanting [] should write []. Thanks! --

[Haskell-cafe] System.Mem.performGC leaks?

2009-07-21 Thread Neal Alexander
main = forever performGC The OS reported memory usage skyrockets. If i enable +RTS -S the GC statistics show the heap live bytes being constant. Is it accumulating statistics even when profiling is disabled (and can you turn that off), or is there something going on with the FFI call to

[Haskell-cafe] Re: System.Mem.performGC leaks?

2009-07-21 Thread Neal Alexander
Neal Alexander wrote: Compiled with ghc -O2 -fvia-C -optc-O2 -funbox-strict-fields -threaded btw. GHC 6.10.3 on 64bit windows7. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Simple quirk in behavior of `mod`

2009-07-21 Thread Nathan Bloomfield
Hello haskell-cafe; I'm fiddling with thishttp://cdsmith.wordpress.com/2009/07/20/calculating-multiplicative-inverses-in-modular-arithmetic/blog post about inverting elements of Z/(p), trying to write the inversion function in pointfree style. This led me to try executing statements like n

[Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-21 Thread Trent W. Buck
Eric Kow ko...@darcs.net writes: [...] a branch switching tool, utilizing darcs' existing repository data stores, could be built [...] today [...] as a second/third-party tool to darcs. I heartily approve of this approach. In-repo branches are occasionally useful to me, but the pollution of