[Haskell-cafe] what's the definition of satisfy and ? ?

2009-05-21 Thread z_a...@163.com
I cannot understand the following code very well as i donot know the definition of satisfy and ?. -- | Case-insensitive variant of Parsec's 'char' function. caseChar:: Char - GenParser Char a Char caseChar c = satisfy (\x - toUpper x == toUpper c) -- | Case-insensitive variant of

Re: [Haskell-cafe] what's the definition of satisfy and ? ?

2009-05-21 Thread Lee Duhem
On Thu, May 21, 2009 at 2:10 PM, z_a...@163.com z_a...@163.com wrote: I cannot understand the following code very well as i donot know the definition of satisfy and ?. Did you check out the document of parsec? You can find definitions for 'satisty' and '?' in Text.ParserCombinators.Parsec.Char

[Haskell-cafe] Re: what's the definition of satisfy and ? ?

2009-05-21 Thread Ertugrul Soeylemez
z_a...@163.com z_a...@163.com wrote: I cannot understand the following code very well as i donot know the definition of satisfy and ?. Yes. Just look at the Parsec documentation, preferably Parsec 3, because Parsec versions prior to 3 were not well documented. -- | Case-insensitive variant

Re: [Haskell-cafe] Haskell philosophy question

2009-05-21 Thread Yaakov Nemoy
2009/5/17 Vasili I. Galchin vigalc...@gmail.com: Hello, I am confused between Haskell as delineated in the Haskell Report VS ghc pragmas which extend Haskell beyond the Haskell Report. I am sure I am not the first to ask. Caveat: on my part, I am not against innovation/extensions, but I

Re: [Haskell-cafe] Haskell in 3 Slides

2009-05-21 Thread Kalman Noel
Joe Fredette schrieb: 3-4 slides imply 3-4 topics, so the question is what are the 3-4 biggest topics in haskell? I would think they would be: * Purity/Referential Transparency * Lazy Evaluation * Strong Typing + Type Classes * Monads If the goal is to be able to talk about different

Re: [Haskell-cafe] Haskell in 3 Slides

2009-05-21 Thread Lionel Barret de Nazaris
On 21/05/2009 09:40, Kalman Noel wrote: Joe Fredette schrieb: 3-4 slides imply 3-4 topics, so the question is what are the 3-4 biggest topics in haskell? I would think they would be: * Purity/Referential Transparency * Lazy Evaluation * Strong Typing + Type Classes * Monads If the

Re: [Haskell-cafe] the problem of design by negation

2009-05-21 Thread Thomas ten Cate
On Thu, May 21, 2009 at 00:54, Michael Mossey m...@alumni.caltech.edu wrote: I call it design by negation. When asked to justify his design, the lead software architect explains everything that *wouldn't* work. We couldn't have a unique key for every entry because blah blah blah. We couldn't

[Haskell-cafe] ANN: EsotericBot 0.0.1

2009-05-21 Thread spoon
Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/esotericbot See the homepage for online copy of README and example configuration file: http://www.killersmurf.com/projects/esotericbot Esotericbot is a sophisticated, lightweight IRC bot, written in Haskell. Esotericbot

Re: [Haskell-cafe] ANN: EsotericBot 0.0.1

2009-05-21 Thread Gwern Branwen
On Thu, May 21, 2009 at 5:36 AM, sp...@killersmurf.com wrote: Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/esotericbot See the homepage for online copy of README and example configuration file: http://www.killersmurf.com/projects/esotericbot Esotericbot is a

Re: Re: [Haskell-cafe] what's the definition of satisfy and ? ?

2009-05-21 Thread Lee Duhem
On Thu, May 21, 2009 at 6:48 PM, z_axis z_a...@163.com wrote: Sorry! I am a haskell newbie.   then i will have a look at Text.ParserCombinators.Parsec.Char Don't forget to CC your reply to the list, so other people on the thread will see your reply. lee

Re: [Haskell-cafe] Haskell in 3 Slides

2009-05-21 Thread Brandon S. Allbery KF8NH
On May 21, 2009, at 03:40 , Kalman Noel wrote: If the goal is to be able to talk about different examples of Haskell code in the rest of the presentation, the big topic I'd choose would be called »How function definitions look like in Haskell«. That would be (or lead directly to)

Re: [Haskell-cafe] Haskell philosophy question

2009-05-21 Thread Brandon S. Allbery KF8NH
On May 21, 2009, at 03:13 , Yaakov Nemoy wrote: you would still be using KR C to get your work done, because you were afraid of bloat. Actually you'd still be using BCPL. :) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too

[Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread Tom Lokhorst
To all the cool kids using the Twitter (and to anyone else): I'm happy to announce the first release of feed2twitter. Build on top of the excellent feed and hs-twitter packages, feed2twitter sends posts from a news feed to Twitter. The hackage2twitter executable is build on top of the

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread John Van Enk
A bit off topic, but what's the chance we can get the Hackage RSS feed to include some more information about the package? I'd like to see at least the description, but it might be nice to see things like dependencies and home pages. /jve On Thu, May 21, 2009 at 2:55 PM, Tom Lokhorst

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Thu, May 21, 2009 at 2:59 PM, John Van Enk wrote: A bit off topic, but what's the chance we can get the Hackage RSS feed to include some more information about the package? I'd like to see at least the description, but it might be nice to see

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread Tom Lokhorst
Oh, and while we're talking off topic. I don't know who's in charge of this, but I think it would be nice to have urls like: http://hackage.haskell.org/feed2twitter It would allow me to type in a url from memory instead of having to copy-paste it. As well as not requiring a url-shortener on

[Haskell-cafe] Function Returning Type?

2009-05-21 Thread jrw4
I wrote this function as I am just learning Haskell. What it does is it generates a list of all rational numbers between 0 and 1, but I only have it show the first 20. rationals n :: Integer - String rationals n = (putStr . unlines . map show) (take n (nub [x % y | y - [1..], x - [1..y], x

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread John Van Enk
Hmm, or even: http://hackage.haskell.org/?p=feed2twitter On Thu, May 21, 2009 at 3:10 PM, Tom Lokhorst t...@lokhorst.eu wrote: Oh, and while we're talking off topic. I don't know who's in charge of this, but I think it would be nice to have urls like: http://hackage.haskell.org/feed2twitter

[Haskell-cafe] The Computer Language Benchmarks Game: pidigits

2009-05-21 Thread Arnaud Payement
Hi all, I recently decided to rewrite the pidigits benchmark of the debian shootout (shootout.alioth.debian.org) as toy project. However, it seems that on my machine, the code seems to be more performant than both the current entry and the proposed replacement (see

Re: [Haskell-cafe] Function Returning Type?

2009-05-21 Thread Jochem Berndsen
jrw4 wrote: I wrote this function as I am just learning Haskell. What it does is it generates a list of all rational numbers between 0 and 1, but I only have it show the first 20. rationals n :: Integer - String rationals n = (putStr . unlines . map show) (take n (nub [x % y | y - [1..],

Re: [Haskell-cafe] Function Returning Type?

2009-05-21 Thread Jochem Berndsen
Jochem Berndsen wrote: This makes sense, since rationals has type Integer I meant Integer - String obviously. Regards, -- Jochem Berndsen | joc...@functor.nl GPG: 0xE6FABFAB ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread John Goerzen
On Thu, May 21, 2009 at 09:10:23PM +0200, Tom Lokhorst wrote: Oh, and while we're talking off topic. I don't know who's in charge of this, but I think it would be nice to have urls like: http://hackage.haskell.org/feed2twitter YES! Also a /package/doc link. So we could have a static link

Re: [Haskell-cafe] ANN: feed2twitter 0.2 hackage2twitter 0.2.1

2009-05-21 Thread Don Stewart
vanenkj: A bit off topic, but what's the chance we can get the Hackage RSS feed to include some more information about the package? I'd like to see at least the description, but it might be nice to see things like dependencies and home pages. what you really want is a way to query hackage

Re: [Haskell-cafe] The Computer Language Benchmarks Game: pidigits

2009-05-21 Thread Don Stewart
arnaud.payement: Hi all, I recently decided to rewrite the pidigits benchmark of the debian shootout (shootout.alioth.debian.org) as toy project. However, it seems that on my machine, the code seems to be more performant than both the current entry and the proposed replacement (see

Re: [Haskell-cafe] Function Returning Type?

2009-05-21 Thread Stefan Holdermans
Jochem, rationals n = (putStr . unlines . map show) (take n (nub [x % y | y - [1..], x - [1..y], x y])) rationals n :: Integer - [Ratio] I meant Integer - String obviously. Er... what about rationals :: Int - IO () ? ;-) To the original poster: next time, just leave the function

Re: [Haskell-cafe] Function Returning Type?

2009-05-21 Thread Thomas Davie
Op 21 May 2009, om 21:52 heeft Stefan Holdermans het volgende geschreven: Jochem, rationals n = (putStr . unlines . map show) (take n (nub [x % y | y - [1..], x - [1..y], x y])) rationals n :: Integer - [Ratio] I meant Integer - String obviously. Er... what about rationals ::

Re: [Haskell-cafe] Function Returning Type?

2009-05-21 Thread Mark Wassell
To the original poster: next time, just leave the function definition without the signature and query GHCi for the correct type: Remember that the type checker is your friend; let it work for you :) Mark ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Haskell programmers in São Carlo s - SP - Brazil?

2009-05-21 Thread Fernando Henrique Sanches
São Caetano, SP, Brazil - right next to São Paulo. UFABC Student. Fernando Henrique Sanches 2009/5/19 Maurí­cio briqueabra...@yahoo.com Anybody else around here? Best, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] ANN: Haskell Hackathon in Philadelphia

2009-05-21 Thread Brent Yorgey
Hi all! We are in the early stages of planning a Haskell hackathon/get together, Hac φ, to be held this summer at the University of Pennsylvania, in Philadelphia. Right now we're looking at two possible dates: June 19-21or July 24-26 If you might be interested in attending, please add

[Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread John Goerzen
So this is annoying (CCing -cafe) I need NominalDiffTime and UTCTime to have Typeable instances. In 6.10.1, they didn't ship with them out of the box, so I added them. Apparently, in 6.10.3, they DO ship with those instances out of the box. Annoyingly, that means that my code breaks on 6.10.3.

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread Alexander Dunlap
Since those types come out of the time library, and that library's version *has* been bumped (I assume), couldn't you use Cabal to condition on the version of the time library to determine whether or not to have CPP set a -DTYPEABLE_IN_TIME flag, and then #ifdef out your versions of the instances?

Re: [Haskell-cafe] ghc ./configure stalls on docbook DTD

2009-05-21 Thread Duncan Coutts
On Mon, 2009-05-18 at 12:09 +0100, Simon Marlow wrote: I have the following complaint from Roman in my inbox, which I think is about the same thing: one big nuisance when building ghc is that configure tries to connect to the internet. The culprit is the FP_GEN_DOCBOOK_XML macro in

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread Duncan Coutts
On Thu, 2009-05-21 at 15:22 -0700, Alexander Dunlap wrote: Since those types come out of the time library, and that library's version *has* been bumped (I assume), couldn't you use Cabal to condition on the version of the time library to determine whether or not to have CPP set a

[Haskell-cafe] HUnit

2009-05-21 Thread Vasili I. Galchin
Hello, I have some code with several test cases that use HUnit. I added hunit as one of my cabal dependencies but cabal complained with: Setup: At least the following dependencies are missing: hutil -any What am I doing incorrectly? Thanks, Vasili

Re: [Haskell-cafe] HUnit

2009-05-21 Thread Don Stewart
vigalchin: Hello, I have some code with several test cases that use HUnit. I added hunit as one of my cabal dependencies but cabal complained with: Setup: At least the following dependencies are missing: hutil -any ^ Typo. -- Don ___

[Haskell-cafe] generic filter through MonadPlus

2009-05-21 Thread Jason Dusek
It seems reasonable that filter should be generic. The underlying container need only support some kind of traversal, a zero element and a concatenation that eliminates zeroes. A `Monad` provides traversal via `join` and `fmap`; the remaining qualities are satisfied by `MonadPlus`. I've

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread John Goerzen
Duncan Coutts wrote: On Thu, 2009-05-21 at 15:22 -0700, Alexander Dunlap wrote: Since those types come out of the time library, and that library's version *has* been bumped (I assume), couldn't you use Cabal to condition on the version of the time library to determine whether or not to have

Re: [Haskell-cafe] Introducing Instances in GHC point releases

2009-05-21 Thread Don Stewart
I guess my larger point is just a plea to the community: please be really careful about what you do to GHC in point releases. This is not the first issue that has screwed me in the GHC 6.10.x point releases. I hope that the Haskell Platform will solve a lot of these issues. Clear, planned

[Haskell-cafe] A problem with par and modules boundaries...

2009-05-21 Thread Mario Blažević
I'll cut to the chase. The short program below works perfectly: when I compile it with -O2 -threaded and run with +RTS -N2 command-line options, I get a nearly 50% real-time improvement: $ time ./primes-test +RTS -N2 5001 real0m9.307s user0m16.581s sys 0m0.200s However, if I move

Re: [Haskell-cafe] HUnit

2009-05-21 Thread Vasili I. Galchin
my bad ... what about: vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal configure Configuring swish-0.2.1... cabal: At least the following dependencies are missing: hunit -any On Thu, May 21, 2009 at 6:20 PM, Don Stewart d...@galois.com wrote: vigalchin: Hello, I have some code

[Haskell-cafe] Re: ANN: TxtSushi 0.1

2009-05-21 Thread Keith Sheppard
Hello, I just released TxtSushi 0.2 with the following updates: 1) Improved type coercion. Some of the rules I was using before did not make sense. At some point I will document what the rules are. 2) Added some extra functions/operators including a regex matcher. Here is the full list:

Re: [Haskell-cafe] HUnit

2009-05-21 Thread Alexander Dunlap
I believe you need to capitalize it correctly: HUnit. Alex On Thu, May 21, 2009 at 8:52 PM, Vasili I. Galchin vigalc...@gmail.com wrote: my bad ... what about: vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal configure Configuring swish-0.2.1... cabal: At least the following dependencies

Re: [Haskell-cafe] the problem of design by negation

2009-05-21 Thread Conal Elliott
Hi Michael, I'm going to hazard a guess. Please let me know how accurate it is. When asked to justify his design, the lead software architect explains everything that *wouldn't* work. We couldn't have a unique key for every entry because blah blah blah. We couldn't use a garbage collector