Re: [Haskell-cafe] Iteratee, ghc 6.12/7.0 strange behaviour -epollControl: permission denied (Operation not permitted)

2011-03-28 Thread Michael A Baikov
I tried with both 7.0.2 and 7.0.3 -Original Message- > On Mon, Mar 28, 2011 at 7:31 PM, Michael A Baikov wrote: > > > > > > I am still playing with lastest iteratee and i think i found something > > strange. > > > > > > let's suppose we have a file test.hs like this: > > > > import Dat

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread Michael Snoyman
On Tue, Mar 29, 2011 at 7:50 AM, John Millikin wrote: > Since the release, a couple people have sent in feature requests, so I'm > going to put out 0.4.9 in a day or so. > > New features will be: > > - tryIO: runs an IO computation, and converts any exceptions into > ``throwError`` calls (requeste

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread John Millikin
Since the release, a couple people have sent in feature requests, so I'm going to put out 0.4.9 in a day or so. New features will be: - tryIO: runs an IO computation, and converts any exceptions into ``throwError`` calls (requested by Kazu Yamamoto) - checkContinue: encapsulates a common patte

[Haskell-cafe] object oriented technique

2011-03-28 Thread Tad Doxsee
I've been trying to learn Haskell for a while now, and recently wanted to do something that's very common in the object oriented world, subtype polymorphism with a heterogeneous collection. It took me a while, but I found a solution that meets my needs. It's a combination of solutions that I saw on

Re: [Haskell-cafe] How to best deal with nullPtr from alloca and friends?

2011-03-28 Thread Jason Dagit
On Mon, Mar 28, 2011 at 9:43 PM, Jason Dagit wrote: > I'm on a 64bit version of windows here with more than 4GB of memory to spare > for the GHC process. Unfortunately, allocaBytes takes an Int so I can't test > it with a request larger than the amount of physical ram I have. > It would seem th

[Haskell-cafe] How to best deal with nullPtr from alloca and friends?

2011-03-28 Thread Jason Dagit
I was reading up on the documentation for alloca and friends[1], which says, "If any of the allocation functions fails, a value of nullPtr is produced." It seems like every example of FFI code that I find

Re: [Haskell-cafe] working off a Yesod example file, need help lifting values from one monad into another. (and probably other things too).

2011-03-28 Thread Michael Litchard
I just noticed those. I think that came from hpaste. The first mail was a cut and paste from a post I made there. When I went to look at your reply, I had the very same question as you. On Mon, Mar 28, 2011 at 7:51 PM, Luke Palmer wrote: > On Mon, Mar 28, 2011 at 6:28 PM, Michael Litchard > wrot

Re: [Haskell-cafe] working off a Yesod example file, need help lifting values from one monad into another. (and probably other things too).

2011-03-28 Thread Luke Palmer
On Mon, Mar 28, 2011 at 6:28 PM, Michael Litchard wrote: > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > 11 > 12 > 13 > 14 > 15 > 16 > 17 > 18 > 19 > 20 > 21 > 22 > 23 > 24 > 25 > 26 > 27 > 28 > 29 > 30 > 31 > 32 > 33 > 34 > 35 > 36 > 37 > 38 > 39 > 40 > 41 > 42 > 43 > 44 > 45 > 46 > 47 > 48 > 49 > 50

[Haskell-cafe] working off a Yesod example file, need help lifting values from one monad into another. (and probably other things too).

2011-03-28 Thread Michael Litchard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102

Re: [Haskell-cafe] CURL and upload a file

2011-03-28 Thread Evgeny Dzhurinsky
I found the solution - the header "expect" is not processed by the server well, so I have had to explicitly set it to empty value - and then it worked! -- regards Eugene Dzhurinsky ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haske

[Haskell-cafe] HsOpenSSL package fails to install

2011-03-28 Thread Rob Nikander
Hi all, I tried `cabal install HsOpenSSL` and it died with some errors about 'i2d_of_void'. I'm on Mac OS X, gcc 4.2. The symbol 'i2d_of_void' is defined by a macro in the openssl/asn1.h header, which is indirectly included, so I don't see the problem. Any ideas? If this is a bug, is there a

Re: [Haskell-cafe] Saving changes to cabal config in cabal-dev

2011-03-28 Thread Rogan Creswick
On Sat, Mar 26, 2011 at 2:28 PM, Yitzchak Gale wrote: > Thanks for the fantastic cabal-dev tool! You're welcome! > Is there any convenient way to save changes to the > package-specific cabal config file in cabal-dev? > The only solution I have found so far is to run > cabal-dev install once

Re: [Haskell-cafe] Iteratee, ghc 6.12/7.0 strange behaviour - epollControl: permission denied (Operation not permitted)

2011-03-28 Thread Johan Tibell
On Mon, Mar 28, 2011 at 7:31 PM, Michael A Baikov wrote: > > > I am still playing with lastest iteratee and i think i found something > strange. > > > let's suppose we have a file test.hs like this: > > import Data.Iteratee > import Data.Iteratee.IO > import Data.Iteratee.Char > > main = fileDriv

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread Thomas Davie
On 28 Mar 2011, at 17:20, malcolm.wallace wrote: >> Consider an HTML page with that "sentence" displayed on it. If you ask the >> viewer of the page how many words are in the sentence, then surely you will >> get the answer 3? > > > But what about the author? Surely there is no reason to us

[Haskell-cafe] Iteratee, ghc 6.12/7.0 strange behaviour - epollControl: permission denied (Operation not permitted)

2011-03-28 Thread Michael A Baikov
I am still playing with lastest iteratee and i think i found something strange. let's suppose we have a file test.hs like this: import Data.Iteratee import Data.Iteratee.IO import Data.Iteratee.Char main = fileDriver printLines "/etc/passwd" It works fine when executed via runhaskell / ghci

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread John A. De Goes
This isn't quite what I'm after. I want to pull chunks on demand (i.e. have control over both the input and the output). Enumeratees don't allow me to do that. Regards, John A. De Goes Twitter: @jdegoes LinkedIn: http://linkedin.com/in/jdegoes On Mar 27, 2011, at 7:58 PM, John Millikin wrote

[Haskell-cafe] Dynamically linked executables

2011-03-28 Thread Anakim Border
Hi, I'm trying to understand if it's possible to build dynamically linked executables under Mac OS X (10.6) with GHC 7. Looking here: http://hackage.haskell.org/trac/ghc/wiki/SharedLibraries/PlatformSupport it seems like the support is already present. Inside ghc-7.1.20110325 sources (the late

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread John A. De Goes
Now THAT"s what I'm talking about. Augment such a solution with interruptible & resumable data producers, and I'd have everything I need. Regards, John A. De Goes Twitter: @jdegoes LinkedIn: http://linkedin.com/in/jdegoes On Mar 27, 2011, at 10:54 PM, wren ng thornton wrote: > In an ideal fr

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread Nick Bowler
On 2011-03-28 16:20 +, malcolm.wallace wrote: > But what about the author?  Surely there is no reason to use a > non-breaking space unless they intend it to mean that the characters > before and after it belong to the same logical unit-of-comprehension? The "non-breaking" part of non-breaking

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread malcolm.wallace
I think it's predictable, isSpace (which words is based on) is based on generalCategory, which returns the proper Unicode category:λ> generalCategory '\xa0' SpaceI agree, and I also agree that it would make sense the other way (not breaking on non-breaking spaces).  Perhaps it would be a good idea

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread James Cook
On Mar 28, 2011, at 12:05 PM, Christopher Done wrote: On 28 March 2011 17:55, malcolm.wallace wrote: Does anyone else think it odd that Prelude.words will break a string at a non-breaking space? Prelude> words "abc def\xA0ghi" ["abc","def","ghi"] I think it's predictable, isSpace (which w

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread James Cook
On Mar 28, 2011, at 12:54 AM, wren ng thornton wrote: On 3/27/11 9:58 PM, John Millikin wrote: Resending is slightly more complex -- if the other end can say "resend that last chunk", then it should be easy enough, but "resend the last 2 bytes of that chunk you sent 5 minutes ago" would be m

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread malcolm.wallace
Consider an HTML page with that "sentence" displayed on it. If you ask the viewer of the page how many words are in the sentence, then surely you will get the answer 3? But what about the author?  Surely there is no reason to use a non-breaking space unless they intend it to mean that the character

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread Christopher Done
On 28 March 2011 17:55, malcolm.wallace wrote: > Does anyone else think it odd that Prelude.words will break a string at a > non-breaking space? > > Prelude> words "abc def\xA0ghi" > ["abc","def","ghi"] > I think it's predictable, isSpace (which words is based on) is based on generalCategory, wh

Re: [Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread Colin Adams
It doesn't seem odd to me. Consider an HTML page with that "sentence" displayed on it. If you ask the viewer of the page how many words are in the sentence, then surely you will get the answer 3? On 28 March 2011 16:55, malcolm.wallace wrote: > Does anyone else think it odd that Prelude.words w

[Haskell-cafe] bug in Prelude.words?

2011-03-28 Thread malcolm.wallace
Does anyone else think it odd that Prelude.words will break a string at a non-breaking space?Prelude> words "abc def\xA0ghi"["abc","def","ghi"]I would have expected this to be the obvious behaviour: Prelude> words "abc def\xA0ghi"["abc","def\160ghi"]Regards,Malcolm _

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread David Leimbach
On Mon, Mar 28, 2011 at 8:06 AM, John Millikin wrote: > On Sunday, March 27, 2011 9:45:23 PM UTC-7, Ertugrul Soeylemez wrote: >> >> > For setting a global timeout on an entire session, it's better to wrap >> > the ``run_`` call with ``System.Timeout.timeout`` -- this is more >> > efficient than t

Re: [Haskell-cafe] ANNOUNCE: enumerator 0.4.8

2011-03-28 Thread John Millikin
On Sunday, March 27, 2011 9:45:23 PM UTC-7, Ertugrul Soeylemez wrote: > > > For setting a global timeout on an entire session, it's better to wrap > > the ``run_`` call with ``System.Timeout.timeout`` -- this is more > > efficient than testing the time on every chunk, and does not require a > > spe

[Haskell-cafe] ANN: Google Summer of Code student application period opens today

2011-03-28 Thread Johan Tibell
Hi, The Google Summer of Code student application period starts today at 19:00 UTC. If you're a student and like to get paid to work on a Haskell project this summer I recommend you go find an interesting project [1] and start working on your application. You can find more information on the wiki

Re: [Haskell-cafe] ANNOUNCEMENT: nehe-tuts 0.2.0, new release

2011-03-28 Thread Vo Minh Thu
2011/3/28 Jason Dagit : > ... > The tutorials are still written using OpenGL's immediate > mode, but that was deprecated in OpenGL 3.x so it's possible that in the > future these examples won't be supported by your graphics card. > ... Hi, I wouldn't worry about the older API to be unsupported in