Re: [Haskell-cafe] [Haskell] ANNOUNCE: time-recurrence-0.1

2011-05-23 Thread Yitzchak Gale
Moving the discussion from haskell to haskell-cafe. Chris Heller wrote: http://github.com/hellertime/time-recurrence A library for generating and inspecting recurring times. Very nice. Please put it up on hackage so we can see the haddocks, try it out easily, etc. hoping to solicit some

Re: [Haskell-cafe] SIGSEGV in yieldCapability ()

2011-05-23 Thread Erik Hesselink
On Sun, May 22, 2011 at 15:03, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote:  I think you should file a bug report with a test case on GHC. I am willing to work on this, but I thought I'd go fishing for some advice first. My program uses: forkIO, STM, and FFI. I've seen something

Re: [Haskell-cafe] Handling a large database (of ngrams)

2011-05-23 Thread wren ng thornton
On 5/22/11 8:40 AM, Aleksandar Dimitrov wrote: If you have too much trouble trying to get SRILM to work, there's also the Berkeley LM which is easier to install. I'm not familiar with its inner workings, but it should offer pretty much the same sorts of operations. Do you know how BerkeleyLM

[Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
[TL;DR: there's a concrete question at the bottom.] Once again I find myself in the pleasant situation where the slings and arrows of life in general are slightly less intense, and I manage to find a few spare minutes and some free brain cycles to dedicate to Haskell. Why not try GHC

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs graphics

2011-05-23 Thread John Lato
Message: 17 Date: Fri, 20 May 2011 15:59:51 -0700 From: Evan Laforge qdun...@gmail.com Subject: Re: [Haskell-cafe] Status of Haskell + Mac + GUIs graphics To: Erik Hesselink hessel...@gmail.com Cc: haskell-cafe@haskell.org Message-ID: BANLkTi=74mm6ortu2e192jtoot9g49f...@mail.gmail.com

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-05-23 Thread Simon Marlow
On 18/05/2011 19:22, Jason Dagit wrote: On Wed, May 18, 2011 at 2:50 AM, John Sneerjohnsn...@operamail.com wrote: Hello all, I know it is not probably good question to this list, but anyway, could anyone point me to some more detailed how to where is described building of Haskell

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Anthony Cowley
On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz jacek.generow...@cern.ch wrote: So, after this tale of agony, here are two concrete questions: a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 (without unreasonable effort)? This is a frustrating situation. Note that there

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 13:45, Anthony Cowley wrote: On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz jacek.generow...@cern.ch wrote: a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 (without unreasonable effort)? This is a frustrating situation. Note that there is a binary

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Anthony Cowley
On Mon, May 23, 2011 at 8:16 AM, Jacek Generowicz jacek.generow...@cern.ch wrote: On 2011 May 23, at 13:45, Anthony Cowley wrote: As for the platform, if it is giving you trouble, don't shy away from just using GHC and cabal as normal! After you've cabal installed a few big packages, you will

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:29, Anthony Cowley wrote: On Mon, May 23, 2011 at 8:16 AM, Jacek Generowicz jacek.generow...@cern.ch wrote: On 2011 May 23, at 13:45, Anthony Cowley wrote: As for the platform, if it is giving you trouble, don't shy away from just using GHC and cabal as normal! After

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:16, Jacek Generowicz wrote: On 2011 May 23, at 13:45, Anthony Cowley wrote: On Mon, May 23, 2011 at 5:17 AM, Jacek Generowicz jacek.generow...@cern.ch wrote: I think your strategy of nuking everything Haskell through your package manager (if available), then

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Daniel Fischer
On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: From this, you should be able to build 7.0.3 yourself. That's interesting. I won't try that *right* now. It's easy, assuming you have installed alex and happy (and preferably hscolour), just download and unpack the source bundle,

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Brandon Moore
From: Jacek Generowicz jacek.generow...@cern.ch Sent: Monday, May 23, 2011 4:17 AM [TL;DR: there's a concrete question at the bottom.] Once again I find myself in the pleasant situation where the slings and arrows of life in general are slightly less intense, and I manage to find a few

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 14:42, Daniel Fischer wrote: On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: If by cabal install you mean use the command cabal ... yeah, that would be great, if only I could install cabal-install, which fails. With what error? Downloading and unpacking the

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread Henning Thielemann
On Thu, 19 May 2011, Andrew Coppin wrote: To all the people who look at Hackage, see that there are 6 different libraries for processing Unicode text files, and claim that this is somehow a *good* thing, I offer the above essay as a counter-example. Recently I searched for an advanced way

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Daniel Fischer
On Monday 23 May 2011 15:08:41, Jacek Generowicz wrote: On 2011 May 23, at 14:42, Daniel Fischer wrote: On Monday 23 May 2011 14:16:43, Jacek Generowicz wrote: If by cabal install you mean use the command cabal ... yeah, that would be great, if only I could install cabal-install, which

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 15:08, Jacek Generowicz wrote: On 2011 May 23, at 14:42, Daniel Fischer wrote: $ ./bootstrap.sh in that directory should work. Configuring Cabal-1.8.0.2... Setup: At least the following dependencies are missing: base =4 3 =1 5, filepath =1 1.2 How am I

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 15:22, Daniel Fischer wrote: On Monday 23 May 2011 15:08:41, Jacek Generowicz wrote: Cabal-1.8.0.2 will be downloaded and installed. That's a bad sign. Have you downoaded the bundle from the cabal-install page? Ermmm, ys [sudden pangs of guilt] was that not the

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Johannes Waldmann
b) On Ubuntu Natty I installed the generic linux GHC 7.0.3 binary. Downloaded Haskell Platform 2011.2.0.1 source distribution. ./ I just did this (in a pristine virtual machine): * install ubuntu-11.04-desktop-amd64.iso * sudo apt-get install libgmp3-dev zlib1g-dev libglut3-dev * install

Re: [Haskell-cafe] [Haskell] ANNOUNCE: time-recurrence-0.1

2011-05-23 Thread Chris Heller
Thanks for the feed back. Very nice. Please put it up on hackage so we can see the haddocks, try it out easily, etc. I've registered for an account, and will have it up on Hackage just as soon as I can. For now you can see the Haddock docs for the library at:

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Johannes Waldmann
The thing that's usually failing is cabal install unix-compat, which requires sudo apt-get install libbsd-dev. - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Jacek Generowicz
Summarizing, by answering my own question on the basis of the help I have received elsewhere in the thread. On 2011 May 23, at 11:17, Jacek Generowicz wrote: a) Am I right in concluding that GHC 7.0.3 will not run on OS X 10.5 (without unreasonable effort)? It takes little effort on the

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread KC
Librarians have been struggling for years with classifying topics; I don't imagine classifying coding libraries as any easier. :) -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] blaze-builder and FlexibleInstances in code that aims to become part of the Haskell platform

2011-05-23 Thread Johan Tibell
On Fri, May 20, 2011 at 11:12 PM, Simon Meier iridc...@gmail.com wrote: There, seems to be a historical artefact here. The new Write abstraction in system-io-write is different from the one used in blaze-builder. It's type is  data Write a = Write Int (a - Ptr Word8 - IO (Ptr Word8)) This

[Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread michael rice
What's the best way to end up with a list composed of only the Just values,no Nothings? Michael ==  import Control.Monad.Stateimport Data.Maybe type GeneratorState = State Int tick :: GeneratorState (Maybe Int)tick = do n - get          if ((n `mod` 7) == 0)           

Re: [Haskell-cafe] GHC 7, Platform 2011.2 vs OS X 10.5, Ubuntu 11.04

2011-05-23 Thread Evan Laforge
Cabal-1.8.0.2 will be downloaded and installed. That's a bad sign. Have you downoaded the bundle from the cabal-install page? Ermmm, ys [sudden pangs of guilt] was that not the right thing to do? That's not the right thing to do Darn! (yeah, somebody should tell unsuspecting

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Malcolm Wallace
On 23 May 2011, at 17:20, michael rice wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Go to haskell.org/hoogle Type in [Maybe a] - [a] Click on first result. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 5/23/11 9:20 AM, michael rice wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Try catMaybes in Data.Maybe. Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Max Bolingbroke
On 23 May 2011 17:20, michael rice nowg...@yahoo.com wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? http://haskell.org/hoogle/?hoogle=%3A%3A+%5BMaybe+a%5D+-%3E+%5Ba%5D Data.Maybe.catMaybes is what you want :-) Cheers, Max

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Malcolm Wallace
On 23 May 2011, at 17:20, michael rice wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Alternatively, [ x | Just x - originals ] It also occurs to me that perhaps you still want the Just constructors. [ Just x | Just x -

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 5/23/11 9:29 AM, Max Bolingbroke wrote: On 23 May 2011 17:20, michael rice nowg...@yahoo.com mailto:nowg...@yahoo.com wrote: What's the best way to end up with a list composed of only the Just values, no Nothings?

Re: [Haskell-cafe] The Lisp Curse

2011-05-23 Thread Eric Rasmussen
In terms of making the interface more friendly to beginners, I wonder if this is partially an issue of how to search and how to format the results. I just searched several places for xml rpc and found: Hackage: the first few links from the google search are different versions of haxr Hayoo: 0

[Haskell-cafe] Further installation adventures

2011-05-23 Thread Jacek Generowicz
I'm trying to cabal install lambdabot. This depends on a squillion other libraries, which cabal tries to install, among which is readline, which fails to configure as follows. Configuring readline-1.0.1.0... checking for gcc... gcc checking for C compiler default output file name... a.out

Re: [Haskell-cafe] Further installation adventures

2011-05-23 Thread Marc Weber
Excerpts from Jacek Generowicz's message of Mon May 23 19:15:53 +0200 2011: Where should I be looking for the relevant config.log? Maybe you're missing header files? is there a readline-dev package for your distro? also open the cabal file and watch for include or library directorie settings.

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Alexander Solla
On Mon, May 23, 2011 at 9:20 AM, michael rice nowg...@yahoo.com wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Michael == import Control.Monad.State import Data.Maybe type GeneratorState = State Int tick ::

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread michael rice
Thanks, all. Earlier, I was going to ask how to break out of a sequence op prematurely, i.e., you give it some replication number but want to break early if you get an end-flag value. While I was composing the post I thought of using Maybe for the good values and Nothing for the end value.

Re: [Haskell-cafe] Further installation adventures

2011-05-23 Thread Jacek Generowicz
On 2011 May 23, at 19:31, Marc Weber wrote: Excerpts from Jacek Generowicz's message of Mon May 23 19:15:53 +0200 2011: Where should I be looking for the relevant config.log? Maybe you're missing header files? I checked whether the -dev packages were installed, and they were present

Re: [Haskell-cafe] Building Haskell Platform natively for 64bit Windows

2011-05-23 Thread Jason Dagit
On Mon, May 23, 2011 at 4:32 AM, Simon Marlow marlo...@gmail.com wrote: On 18/05/2011 19:22, Jason Dagit wrote: On Wed, May 18, 2011 at 2:50 AM, John Sneerjohnsn...@operamail.com  wrote: Hello all,  I know it is not probably good question to this list, but anyway,  could anyone point me

Re: [Haskell-cafe] code review?

2011-05-23 Thread Neil Mitchell
'if all == False then return False else return True' is a pretty confusing way to say 'return all'.  In fact, any time you see 'x == True' you can just remove the '== True'.  The whole postAll thing would be clearer as Before doing a code review I always demand that the author runs over the

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Brent Yorgey
On Mon, May 23, 2011 at 10:49:55AM -0700, Alexander Solla wrote: On Mon, May 23, 2011 at 9:20 AM, michael rice nowg...@yahoo.com wrote: What's the best way to end up with a list composed of only the Just values, no Nothings? Michael == import

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Gregory Crosswhite
On 05/23/2011 12:08 PM, Brent Yorgey wrote: Just a minor quibble: note that filter (not . isNothing) is slightly preferable since it does not introduce a frivolous equality constraint on the type wrapped by the Maybe. Or even better, filter isJust :-) Cheers, Greg

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Henning Thielemann
Brent Yorgey schrieb: On Mon, May 23, 2011 at 10:49:55AM -0700, Alexander Solla wrote: There's a library function for it, but also: filter ((/=) Nothing) is readable enough. Just a minor quibble: note that filter (not . isNothing) is slightly preferable since it does not introduce a

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Ertugrul Soeylemez
Gregory Crosswhite gcr...@phys.washington.edu wrote: Or even better, filter isJust To make it worse again the original function can be generalized in a few ways. Here is a generalization from the inner Maybe type: import Data.Foldable as F catFoldables :: Foldable t = [t a] -

[Haskell-cafe] Imports in complex Setup.hs -- should we encourage/require PackageImports?

2011-05-23 Thread John Millikin
Several libraries (notably Pandoc and Gtk2hs) have very complex Setup.hs scripts, which import several external libraries. In my experience, these imports are very fragile, because Cabal does not enforce package visibility in Setup.hs. For example, a Setup.hs that imports Control.Monad.Trans

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Richard O'Keefe
On 24/05/2011, at 5:49 AM, Alexander Solla wrote: There's a library function for it, but also: filter ((/=) Nothing) The problem with that in general is that it only applies to [Maybe t] if Eq t, but you don't actually _need_ t to support equality. filter isJust will do the job, where

[Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread max ulidtko
Hi haskell-cafe. I have a package which builds with cabal pretty fine, but there is namespace issue which disturbs me. The problem is that the package exports (to the toplevel namespace!) some modules with fairly general names, like Tests, Basics, Applications. This is probably an oversight of

Re: [Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread Ivan Lazar Miljenovic
On 24 May 2011 14:38, max ulidtko ulid...@gmail.com wrote: Hi haskell-cafe. I have a package which builds with cabal pretty fine, but there is namespace issue which disturbs me. The problem is that the package exports (to the toplevel namespace!) some modules with fairly general names, like

Re: [Haskell-cafe] Cabal: wrapping namespace of a package into top-level module

2011-05-23 Thread Brandon Allbery
On Tue, May 24, 2011 at 00:38, max ulidtko ulid...@gmail.com wrote: I have a package which builds with cabal pretty fine, but there is namespace issue which disturbs me. The problem is that the package exports (to the toplevel namespace!) some modules with fairly general names, like Tests,

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs graphics

2011-05-23 Thread Conal Elliott
Last I tried, there wasn't native support for OpenGL with gtk, and I need OpenGL. Then more recently, I heard of some progress in that area, but requiring lots of hacking to get it all compiling. Any recent news? - Conal On Mon, May 23, 2011 at 2:33 AM, John Lato jwl...@gmail.com wrote:

[Haskell-cafe] *GROUP HUG*

2011-05-23 Thread Gregory Crosswhite
Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala

Re: [Haskell-cafe] *GROUP HUG*

2011-05-23 Thread Michael Litchard
The community plays a large part of why I am using Haskell professionally. The Haskell ecosystem is first-rate all by itself, but I would have been dead in the water months ago without the community. On Mon, May 23, 2011 at 10:10 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Hey

Re: [Haskell-cafe] *GROUP HUG*

2011-05-23 Thread max ulidtko
2011-05-23 22:10 -0700, Gregory Crosswhite: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility.