[Haskell-cafe] Network.Browser and Network.TLS

2012-01-16 Thread Myles C. Maxfield
community regarding Network.Browser and Network.TLS. Perhaps I should just use the Network.HTTP.Enumerator module and not deal with Network.Browser? Maybe I'm going about this in entirely the wrong way. Thanks, Myles C. Maxfield ___ Haskell-Cafe mailing list

[Haskell-cafe] Contributing to http-conduit

2012-01-20 Thread Myles C. Maxfield
be happy to do both of these things, but I'm hoping for your input on how to go about this endeavor. Are these features even good to be pursuing? Should I be going about this entirely differently? Thanks, Myles C. Maxfield P.S. I'm curious about the lack of Network.URI throughout

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-22 Thread Myles C. Maxfield
, Myles C. Maxfield myles.maxfi...@gmail.com wrote: To: Michael Snoyman, author and maintainer of http-conduit CC: haskell-cafe Hello! I am interested in contributing to the http-conduit library. I've been using it for a little while and reading through its source, but have felt

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-22 Thread Myles C. Maxfield
about this? Thanks for helping me out with this, Myles C. Maxfield On Sun, Jan 22, 2012 at 9:56 PM, Michael Snoyman mich...@snoyman.comwrote: On Sun, Jan 22, 2012 at 11:07 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Replies are inline. Thanks for the quick and thoughtful response

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-22 Thread Myles C. Maxfield
Alright, that sounds good to me. I'll get started on it (the IORef idea). Thanks for the insight! --Myles On Sun, Jan 22, 2012 at 10:42 PM, Michael Snoyman mich...@snoyman.comwrote: On Mon, Jan 23, 2012 at 8:31 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: 1. Oops - I overlooked

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-22 Thread Myles C. Maxfield
. Aristid Am 23.01.2012 07:44 schrieb Michael Snoyman mich...@snoyman.com: On Mon, Jan 23, 2012 at 8:31 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: 1. Oops - I overlooked the fact that the redirectCount attribute of a Request is exported (it isn't listed on the documentation

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-23 Thread Myles C. Maxfield
have cookie handling. I'd be interested to hear of a use case where you would want to avoid passing cookies after a redirect. Michael From d60bc1adf4af5a038432c35cde222654dfabf6dd Mon Sep 17 00:00:00 2001 From: Myles C. Maxfield lithe...@gmail.com Date: Mon, 23 Jan 2012 21:44:12 -0800 Subject

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-24 Thread Myles C. Maxfield
On Mon, Jan 23, 2012 at 10:43 PM, Michael Snoyman mich...@snoyman.comwrote: On Tue, Jan 24, 2012 at 8:37 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: I have attached a patch to add a redirect chain to the Response datatype. Comments on this patch are very welcome. I thought

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-24 Thread Myles C. Maxfield
Sorry, I don't think I'm following. What would the meaning of the value returned from checkRedirect be? --Myles On Tue, Jan 24, 2012 at 10:47 AM, Michael Snoyman mich...@snoyman.comwrote: On Tue, Jan 24, 2012 at 6:57 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: On Mon, Jan 23

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-24 Thread Myles C. Maxfield
out with this, Myles C. Maxfield On Tue, Jan 24, 2012 at 8:05 PM, Michael Snoyman mich...@snoyman.comwrote: It would be the new request indicated by the server response, if the server gave a redirect response. On Tue, Jan 24, 2012 at 9:05 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-25 Thread Myles C. Maxfield
does this sound to you? Thanks, Myles C. Maxfield On Wed, Jan 25, 2012 at 5:10 AM, Aristid Breitkreuz arist...@googlemail.com wrote: The nice thing is that this way, nobody can force me to handle cookies. ;-) Might be that usage patterns emerge, which we can then codify into functions later

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-25 Thread Myles C. Maxfield
between caller's requests? I don't really think so. --Myles On Wed, Jan 25, 2012 at 9:28 PM, Michael Snoyman mich...@snoyman.comwrote: On Wed, Jan 25, 2012 at 8:18 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Alright, that's fine. I just wanted to be explicit about the interface we'd

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-26 Thread Myles C. Maxfield
Here is a patch regarding getRedirectedRequest. Comments are very welcome. --Myles C. Maxfield On Wed, Jan 25, 2012 at 10:21 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: I was planning on making the caller deal with keeping track of cookies between requests. My cookie idea only

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-27 Thread Myles C. Maxfield
mutable references. Michael On Thu, Jan 26, 2012 at 10:29 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Here is a patch regarding getRedirectedRequest. Comments are very welcome. --Myles C. Maxfield On Wed, Jan 25, 2012 at 10:21 PM, Myles C. Maxfield myles.maxfi...@gmail.com

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-28 Thread Myles C. Maxfield
, Jan 28, 2012 at 1:20 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: the fromJust should never fail, beceause of the guard statement: | 300 = code code 400 isJust l'' isJust l' = Just $ req Because of the order of the operators, it will only evaluate fromJust after

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-31 Thread Myles C. Maxfield
off into the weeds on this project. Thanks, Myles C. Maxfield On Sat, Jan 28, 2012 at 8:17 PM, Michael Snoyman mich...@snoyman.comwrote: Thanks, looks great! I've merged it into the Github tree. On Sat, Jan 28, 2012 at 8:36 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Ah, yes

Re: [Haskell-cafe] Contributing to http-conduit

2012-01-31 Thread Myles C. Maxfield
Well, this is embarrassing. Please disregard my previous email. I should learn to read the RFC *before* submitting proposals. --Myles On Tue, Jan 31, 2012 at 6:37 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Here are my initial ideas about supporting cookies. Note that I'm using

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-01 Thread Myles C. Maxfield
, 2012 at 7:30 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Well, this is embarrassing. Please disregard my previous email. I should learn to read the RFC *before* submitting proposals. --Myles On Tue, Jan 31, 2012 at 6:37 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-02 Thread Myles C. Maxfield
-implement the redirection-following logic. Any thoughts on any of this? Thanks, Myles On Wed, Feb 1, 2012 at 5:19 PM, Myles C. Maxfield myles.maxfi...@gmail.comwrote: Nope. I'm not. The RFC is very explicit about how to handle cookies. As soon as I'm finished making sense of it (in terms of Haskell

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-02 Thread Myles C. Maxfield
other settings, it doesn't break the API. Chris: I would recommend compiling it into the module. Best bet would likely being converting the source file to Haskell source. Michael On Fri, Feb 3, 2012 at 6:32 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Alright. After reading

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-03 Thread Myles C. Maxfield
that if in the future we realize we need to add some other settings, it doesn't break the API. Chris: I would recommend compiling it into the module. Best bet would likely being converting the source file to Haskell source. Michael On Fri, Feb 3, 2012 at 6:32 AM, Myles C. Maxfield

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-04 Thread Myles C. Maxfield
and a Max-age? If not, maybe you should make a type like data Expiry = NeverExpires | ExpiresAt UTCTime | ExpiresIn DiffTime 2012/2/4 Myles C. Maxfield myles.maxfi...@gmail.com: Here is the patch to Web.Cookie. I didn't modify the tests at all because they were already broken - they looked like

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-04 Thread Myles C. Maxfield
easier to track that way. Michael On Sat, Feb 4, 2012 at 1:21 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Here is the patch to Web.Cookie. I didn't modify the tests at all because they were already broken - they looked like they hadn't been updated since SetCookie only had 5

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-06 Thread Myles C. Maxfield
at 12:15 AM, Michael Snoyman mich...@snoyman.comwrote: Just an FYI for everyone: Myles sent an (incredibly thorough) pull request to handle cookies: https://github.com/snoyberg/http-conduit/pull/13 Thanks! On Sun, Feb 5, 2012 at 8:20 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: 1

[Haskell-cafe] Streaming to JuicyPixels

2012-02-20 Thread Myles C. Maxfield
anyway. Thanks, Myles C. Maxfield ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Streaming to JuicyPixels

2012-02-20 Thread Myles C. Maxfield
have any ideas? I think that having 2 native jpeg decoders (Actually 3, because of this package http://hackage.haskell.org/package/jpeg) is detrimental to the Haskell community, and I would really like to use JuicyPixels :D Thanks, Myles C. Maxfield On Mon, Feb 20, 2012 at 3:01 PM, Vincent Berthoux

Re: [Haskell-cafe] Streaming to JuicyPixels

2012-02-22 Thread Myles C. Maxfield
don't think a package make much sense, if you want to use it, just grab it and customize the interface to your needs :). Regards Vincent Berthoux Le 21 février 2012 06:16, Myles C. Maxfield myles.maxfi...@gmail.com a écrit : Hello, and thanks for the quick reply. You're right

Re: [Haskell-cafe] Streaming to JuicyPixels

2012-02-23 Thread Myles C. Maxfield
, Myles C. Maxfield myles.maxfi...@gmail.com a écrit : Let's put aside the issue of getting access to the pixels before the stream is complete. How would you feel if I implemented use of the STT monad transformer on top of Get in JuicyPixels, in order to get rid of the (remaining getBytes

[Haskell-cafe] Mixing Unboxed Mutable Vectors and Parsers

2012-04-07 Thread Myles C. Maxfield
have to do, then so be it. Thanks, Myles C. Maxfield ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Mixing Unboxed Mutable Vectors and Parsers

2012-04-08 Thread Myles C. Maxfield
It's a JPEG parser. Progressive JPEG is set up where there's a vector Word8s, and some of the entries in the vector may be 0. The JPEG has a stream of bits, and the decoder is supposed to shift in one bit to each successive element in the vector, skipping over 0s, and stop when it reaches some

[Haskell-cafe] Conduit Best Practices for leftover data

2012-04-12 Thread Myles C. Maxfield
Hello, I am interested in the argument to Done, namely, leftover data. More specifically, when implementing a conduit/sink, what should the conduit specify for the (Maybe i) argument to Done in the following scenarios (Please note that these scenarios only make sense if the type of 'i' is

Re: [Haskell-cafe] Conduit Best Practices for leftover data

2012-04-15 Thread Myles C. Maxfield
Thanks for responding to this. Some responses are inline. On Sat, Apr 14, 2012 at 8:30 PM, Michael Snoyman mich...@snoyman.com wrote: On Thu, Apr 12, 2012 at 9:25 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Hello, I am interested in the argument to Done, namely, leftover data. More

Re: [Haskell-cafe] Conduit Best Practices for leftover data

2012-04-15 Thread Myles C. Maxfield
]], [[t]]) partial = do (source, output) - CL.sourceList [[1..8]] C.$$+ (takeConduit 5 C.=$ CL.consume) output' - source C.$$ CL.consume return (output, output') On Sun, Apr 15, 2012 at 2:12 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Thanks for responding to this. Some responses

Re: [Haskell-cafe] Conduit Best Practices for leftover data

2012-04-15 Thread Myles C. Maxfield
.=$ CL.take 1 output' - CL.consume return (output, output') partial2 :: (Num t, Monad m, Enum t) = m ([[t]], [[t]]) partial2 = CL.sourceList [[1..8]] C.$$ monadSink Thanks, Myles On Sun, Apr 15, 2012 at 4:53 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: 2. If you use connect-and-resume

[Haskell-cafe] Re-exports of resourcet in conduit

2012-06-02 Thread Myles C. Maxfield
To: Michael Snoyman CC: haskell-cafe Hello, I'm having a problem working with the conduit library, and was hoping you could help me out. Data.Conduit re-exports ResourceT, MonadResource, and MonadThrow (but not ExceptionT) from Control.Monad.Trans.Resource. I have a conduit which operates on a

Re: [Haskell-cafe] Re-exports of resourcet in conduit

2012-06-02 Thread Myles C. Maxfield
are trying. On Jun 2, 2012 6:35 PM, Myles C. Maxfield myles.maxfi...@gmail.comjavascript:_e({}, 'cvml', 'myles.maxfi...@gmail.com'); wrote: To: Michael Snoyman CC: haskell-cafe Hello, I'm having a problem working with the conduit library, and was hoping you could help me out. Data.Conduit

Re: [Haskell-cafe] Re-exports of resourcet in conduit

2012-06-03 Thread Myles C. Maxfield
of dependencies, try `ghc-pkg describe conduit`. Michael [1] http://stackoverflow.com/questions/10729291/lifting-trouble-with-resourcet/10730909#10730909 [2] http://stackoverflow.com/questions/10843547/snap-monad-liftio-and-ghc-7-4-1/10847401#10847401 On Sun, Jun 3, 2012 at 3:01 AM, Myles C. Maxfield

[Haskell-cafe] Dynamic Programming with Data.Vector

2012-09-16 Thread Myles C. Maxfield
Hello, I've been writing dynamic programming (dp) algorithms in imperative languages for years, and I was thinking recently about how to use it in a Haskell context. In particular, I want to write a function that takes an ordered collection of items and produces a new item to insert into the

Re: [Haskell-cafe] Dynamic Programming with Data.Vector

2012-09-16 Thread Myles C. Maxfield
Someone replied saying that I could use a HashMap and a fold to do this, and that solution should work quite well. Bonus points if there's a solution without the space overhead of a hashmap :-) I'm hoping for an unboxed vector. --Myles On Sun, Sep 16, 2012 at 12:40 PM, Myles C. Maxfield

Re: [Haskell-cafe] Dynamic Programming with Data.Vector

2012-09-17 Thread Myles C. Maxfield
Aha there it is! Thanks so much. I didn't see it because it's under the Unfolding section instead of the Construction section. --Myles On Mon, Sep 17, 2012 at 6:07 AM, Roman Leshchinskiy r...@cse.unsw.edu.auwrote: Myles C. Maxfield wrote: Overall, I'm looking for a function, similar

[Haskell-cafe] Hackage Package Discoverability

2012-10-22 Thread Myles C. Maxfield
Hello, I am the author/maintainer of the 'punycode' hackage package. After 4 months, I just found that punycode conversion already exists in the Data.Encoding.BootString package inside the 'encoding' package. I'd like to deprecate my package in favor of the 'encoding' package. However, I would

Re: [Haskell-cafe] Hackage Package Discoverability

2012-10-23 Thread Myles C. Maxfield
. On Mon, Oct 22, 2012 at 11:14 PM, Bryan O'Sullivan b...@serpentine.com wrote: On Tue, Oct 23, 2012 at 5:53 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: I am the author/maintainer of the 'punycode' hackage package. After 4 months, I just found that punycode conversion already exists

[Haskell-cafe] Auto-termination and leftovers in Conduits

2012-10-27 Thread Myles C. Maxfield
Hey, Say I have a stream of Data.Text.Text objects flowing through a conduit, where the divisions between successive Data.Text.Text items occur at arbitrary boundaries (maybe the source is sourceFile $= decode utf8). I'd like to create a Sink that returns a tuple of (the first line, the rest of

Re: [Haskell-cafe] Auto-termination and leftovers in Conduits

2012-10-28 Thread Myles C. Maxfield
) Or: sink = CT.lines C.=$ do out1 - CL.head out2 - CL.consume return (out1, T.unlines out2) Michael On Sat, Oct 27, 2012 at 9:20 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Hey, Say I have a stream of Data.Text.Text objects flowing through a conduit, where

[Haskell-cafe] Does anyone know where George Pollard is?

2012-11-07 Thread Myles C. Maxfield
Hello, I sent a message to George Pollard (por...@porg.es) about his 'idna' package [1] a couple days ago, but he hasn't responded. I'd like to depend on his package for something that I'm working on, but his package fails to build (The email I sent him includes a patch that should fix up the

Re: [Haskell-cafe] Does anyone know where George Pollard is?

2012-11-14 Thread Myles C. Maxfield
False alarm. He got back to me. Thanks, Myles On Thu, Nov 8, 2012 at 12:20 AM, Ketil Malde ke...@malde.org wrote: Myles C. Maxfield myles.maxfi...@gmail.com writes: Does anyone know where he is? On GitHub? https://github.com/Porges One of the repos was apparently updated less than a week

[Haskell-cafe] Safe 'chr' function?

2013-01-02 Thread Myles C. Maxfield
(such as 1208914), which causes it to throw an exception. Is there a version of that function that is safe? (I'm hoping for something like Int - Maybe Char). Alternatively, is there a way to know ahead of time whether or not an Int will cause 'chr' to throw an exception? Thanks, Myles C. Maxfield [1] http

Re: [Haskell-cafe] Safe 'chr' function?

2013-01-03 Thread Myles C. Maxfield
/archive/spoon/0.3/doc/html/Control-Spoon.html#v:spoon On Thu, Jan 3, 2013 at 9:50 AM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: Hello, I'm working on a general text-processing library [1] and one of my quickcheck tests is designed to make sure that my library doesn't throw exceptions

[Haskell-cafe] Parallel Data.Vector.generate?

2013-03-28 Thread Myles C. Maxfield
parMap. Does something like this exist? Thanks, Myles C. Maxfield ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Parallel Data.Vector.generate?

2013-03-28 Thread Myles C. Maxfield
Thanks for this! I didn't know about Repa, and it sounds like it's exactly what the doctor ordered. I think I'll port me entire program to it! --Myles On Thursday, March 28, 2013, Dmitry Dzhus wrote: 28.03.2013, 10:38, Myles C. Maxfield myles.maxfi...@gmail.comjavascript:; : Hello all. I'm