Re: [Haskell-cafe] How to do the permutation and combination thing?

2010-03-12 Thread Ketil Malde
Casey Hawthorne cas...@istar.ca writes: For example, I have this: list1 = [a, b, c] list2 = [d, e, f] list3 = [g, h, i] Think in abstract terms what you want to accomplish. A bit more specifically, let's say the input is a list of lists, and you want to produce all combinations of drawing

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-12 Thread Wolfgang Jeltsch
Am Donnerstag, 11. März 2010 00:37:18 schrieb wren ng thornton: Wolfgang Jeltsch wrote: Hello, some time ago, it was pointed out that generalized newtype deriving could be used to circumvent module borders. Now, I found out that generalized newtype deriving can even be used to define

[Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Johannes Waldmann
Note that foldl' has a ' to indicate that it's not the same as foldl exactly. I would propose that sum' exist as well as sum, and that sum be lazy. Well, meaningful identifier names is nice, but I think here we have a case of the code smell type info embedded in the name. Strictness of a

Re: [Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread David Virebayre
On Fri, Mar 12, 2010 at 10:29 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Well, meaningful identifier names is nice, but I think here we have a case of the code smell type info embedded in the name. Strictness of a function should be expressed in the function's type instead. But

[Haskell-cafe] Hackaton: A roof to stay

2010-03-12 Thread Hugo Gomes
Hello, im planing on going to the hackaton, but the prices in Zurich are unusually high for my tight budget, so i was wondering if there is anyone here that lives there and would allow me to sleep on their couch or on the floor during the hackaton. Is there ? Thanks.

Re: [Haskell-cafe] Hackaton: A roof to stay

2010-03-12 Thread Johan Tibell
Forwarding this to the hackathon mailing list as most people going to ZuriHac (including some locals) are on that list. On Fri, Mar 12, 2010 at 11:09 AM, Hugo Gomes mr.hugo.go...@gmail.comwrote: Hello, im planing on going to the hackaton, but the prices in Zurich are unusually high for my

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Ketil Malde
Johannes Waldmann waldm...@imn.htwk-leipzig.de writes: Well, meaningful identifier names is nice, but I think here we have a case of the code smell type info embedded in the name. Strictness of a function should be expressed in the function's type instead. I've stumbled into this sentiment

[Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Johannes Waldmann
David Virebayre dav.vire+haskell at gmail.com writes: Even if we had a syntax to express that the function is strict, wouldn't we still need two distinct function names for the strict and lazy case ? OK, I'd like to register a code smell for: hierarchical/systematic structure inside

[Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Johannes Waldmann
Ketil Malde ketil at malde.org writes: Prelude Data.List :t foldl foldl :: (a - b - a) - a - [b] - a What should the type look like? Good question - and in my posting I tried to avoid the impression that I have an answer, because I really haven't. My suggestion was that some of the

[Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Paul R
wren I wish Haskell allowed ! to occur (non-initially) in alphanum_' wren identifiers as well as in symbolic ones. Then we could be more wren consistent about having ! mean strictness BTW, does something in haskell syntax prevent '?' from appearing at the end of identifiers ? It is a nice way to

Re: [Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Daniel Fischer
Am Freitag 12 März 2010 12:14:06 schrieb Paul R: wren I wish Haskell allowed ! to occur (non-initially) in alphanum_' wren identifiers as well as in symbolic ones. Then we could be more wren consistent about having ! mean strictness BTW, does something in haskell syntax prevent '?' from

Re: [Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread David Virebayre
On Fri, Mar 12, 2010 at 12:01 PM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: David Virebayre dav.vire+haskell at gmail.com writes: in this case, something like:  Data.List.Strict.fold, Data.List.Lazy.fold But then if you need both version, you will have to import them qualified,

Re: [Haskell-cafe] Cabal and LLVM bindings

2010-03-12 Thread Ville Tirronen
Do you happen to use template haskell?  It looks like the interpreter is trying to load llvm, which is currently not supported.  That doesn't explain why it works with ghc --make though.  Do you do anything special in your .cabal file? I do use template haskell for deriving binary instances

[Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Johannes Waldmann
David Virebayre dav.vire+haskell at gmail.com writes: But then if you need both version, you will have to import them qualified, which I don't like much. solution: type directed name resolution: * either in the language,

Re: [Haskell-cafe] How to do the permutation and combination thing?

2010-03-12 Thread Victor Mateus Oliveira
Hi, Give a try to this library: http://hackage.haskell.org/package/permutation You can construct the combinations with list of indices and then apply it to your sets. []s Victor On Fri, Mar 12, 2010 at 5:16 AM, Ketil Malde ke...@malde.org wrote: Casey Hawthorne cas...@istar.ca writes:  For

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Henning Thielemann
On Fri, 12 Mar 2010, Johannes Waldmann wrote: Ketil Malde ketil at malde.org writes: Prelude Data.List :t foldl foldl :: (a - b - a) - a - [b] - a What should the type look like? Good question - and in my posting I tried to avoid the impression that I have an answer, because I really

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread Max Bolingbroke
On 12 March 2010 10:38, Ketil Malde ke...@malde.org wrote: What should the type look like?  If memory serves, Clean allows bangs in type signatures, something like:  foldl' :: (a - b - a) - !a - [b] - a but I thought it just added a seq under the hood, Thats my understanding too. I did

Re: [Haskell-cafe] Re: Cabal dependency hell

2010-03-12 Thread Lars Viklund
On Thu, Mar 11, 2010 at 08:54:15AM -0800, Rogan Creswick wrote: (c) fix the unpacked version, and increment the version number by adding a new level of detail (so, 3.1.0 becomes 3.1.0.1). This version number never leaves my system -- it only exists to keep my cabal/ghc-pkg consistent! A

Re: [Haskell-cafe] Re: If wishes were horses... (was: Re: definition of sum)

2010-03-12 Thread Brandon S. Allbery KF8NH
On Mar 12, 2010, at 06:01 , Johannes Waldmann wrote: in this case, something like: Data.List.Strict.fold, Data.List.Lazy.fold Or - if we had static overloading, and strictness info in the type, then we wouldn't need different names. Can of worms ... Doesn't help if strictness needs to be

[Haskell-cafe] Google Summer of Code 2010.

2010-03-12 Thread Edward Kmett
It is that time of year again; the Google Summer of Code is upon us! *Sign Up Information* If you are a student and want to sign up to make $4,500 for hacking on the code you love over the summer or are willing to help out as a mentor, now is the time to act. Please sign up by adding your name

[Haskell-cafe] [Haskell.org Google Summer of Code] trac signup issues

2010-03-12 Thread Edward Kmett
It has come to my attention that there is an issue with creating accounts on the summer-of-code trac at the moment. We're diligently working on getting the right people involved to get this fixed. In the meantime, if you want to sign up as a student or mentor for this year's summer of code,

Re: [Haskell-cafe] Hackaton: A roof to stay

2010-03-12 Thread Matthias Görgens
im planing on going to the hackaton, but the prices in Zurich are unusually high for my tight budget, so i was wondering if there is anyone here that lives there and would allow me to sleep on their couch or on the floor during the hackaton. Is there ? Just a suggestion: Have you tried one

Re: [Haskell-cafe] Upgrading to Haskell Platform

2010-03-12 Thread Thomas Hartman
It should not be necessary to uninstall ghc, as hask plat and ghc are orthogonal by design. r Unless there is some gotcha I am unaware of, not being a mac user. You are aware that hask plat is beta though, right? You might be better served simply upgrading your cabal, and waiting for the

Re: [Haskell-cafe] Upgrading to Haskell Platform

2010-03-12 Thread Thomas Hartman
grab cabal here I mean: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall 2010/3/12 Thomas Hartman tphya...@gmail.com: It should not be necessary to uninstall ghc, as hask plat and ghc are orthogonal by design. r Unless there is some gotcha I am unaware of, not being a mac user.

Re: [Haskell-cafe] How to do the permutation and combination thing?

2010-03-12 Thread Thomas Hartman
There is also polyomino.f2s: http://www.polyomino.f2s.com/david/haskell/combinatorics.html Iirc correctly there is some stuff here that is not on hackage but probably could/should be. 2010/3/12 Victor Mateus Oliveira rhapso...@gmail.com: Hi, Give a try to this library:

[Haskell-cafe] Can't cabal install darcs because hashed-storage needs 'System'

2010-03-12 Thread Daniel McAllansmith
Hello. Short story: $ cabal install --global --constraint=old-time=1.0.0.3.1 --reinstall -v darcs /tmp/hashed-storage-0.4.71127/hashed-storage-0.4.7/Setup.hs:13:7: Could not find module `System': Use -v to see a list of the files searched for. This is using GHC 6.12.1,

[Haskell-cafe] ANNOUNCE: attoparsec-iteratee v0.1

2010-03-12 Thread Gregory Collins
Hi all, I've just uploaded the first version of the attoparsec-iteratee library to Hackage: http://hackage.haskell.org/package/attoparsec-iteratee It takes applicative parsers written using attoparsec and automagically converts them to iteratees that can parse things from streams in O(1)

Re: [Haskell-cafe] generalized newtype deriving allows the definition of otherwise undefinable functions

2010-03-12 Thread wren ng thornton
Wolfgang Jeltsch wrote: Am Donnerstag, 11. März 2010 00:37:18 schrieb wren ng thornton: Wolfgang Jeltsch wrote: Hello, some time ago, it was pointed out that generalized newtype deriving could be used to circumvent module borders. Now, I found out that generalized newtype deriving can even be

[Haskell-cafe] mirroring patch tag

2010-03-12 Thread Thomas Hartman
http://blog.patch-tag.com/2010/03/13/mirroring-patch-tag/ cheers, thomas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: If wishes were horses...

2010-03-12 Thread wren ng thornton
Ketil Malde wrote: What should the type look like? If memory serves, Clean allows bangs in type signatures, something like: foldl' :: (a - b - a) - !a - [b] - a but I thought it just added a seq under the hood, much like bang patterns like foldl' f !z xs = ... do in Haskell, so it's

[Haskell-cafe] ANNOUNCE: direct-plugins-1.0

2010-03-12 Thread Dan Knapp
For some time I have relied on Dons's Plugins package, which was perhaps something of a mistake as it's kind of messy inside and I don't think it's maintained. With the upgrade to GHC 6.12, it broke for me, and I wasn't able to get it fixed. But I was able to write my own subset of its

Re: [Haskell-cafe] ANNOUNCE: direct-plugins-1.0

2010-03-12 Thread Don Stewart
dankna: For some time I have relied on Dons's Plugins package, which was perhaps something of a mistake as it's kind of messy inside and I don't think it's maintained. With the upgrade to GHC 6.12, it broke for me, and I wasn't able to get it fixed. But I was able to write my own subset of