Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Web frameworks (Mats Rauhala)
   2. Re:  Still wrestling with lazy IO (Chadda? Fouch?)
   3. Re:  Still wrestling with lazy IO (Raphael P?bst)
   4. Re:  Still wrestling with lazy IO (Sean Perry)
   5. Re:  Still wrestling with lazy IO (Raphael P?bst)


----------------------------------------------------------------------

Message: 1
Date: Sun, 19 Jun 2011 13:06:00 +0300
From: Mats Rauhala <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Don't get me wrong. I respect you work, and I believe Yesod is awesome.
Actually for the project I'm working on, I seem to try to emulate Yesod
with happstack. I even tried to switch to Yesod midway, but as soon as I
tried to reimplement authentication I hit a brick wall. I checked [1]
and [2] and even checked the haskellers source. [3] has a bit better
documentation, and if only had checked the github site, I might have
chosen otherwise. Compared to [4] and [5] where I could easily see
examples with documentation.

Keep up the good work. I know I will keep checking the book frequently
:).

1.  http://hackage.haskell.org/package/authenticate-0.9.1.3
2.  http://www.yesodweb.com/book/auth
3. http://hackage.haskell.org/package/yesod-auth-0.5.0
4. http://hackage.haskell.org/package/happstack-auth
5. https://github.com/mcmaniac/happstack-auth/tree/master/demo

-- 
Mats Rauhala
MasseR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110619/9c7fb634/attachment-0001.pgp>

------------------------------

Message: 2
Date: Sun, 19 Jun 2011 15:15:42 +0200
From: Chadda? Fouch? <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Raphael P?bst <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

On Sat, Jun 18, 2011 at 10:26 PM, Raphael P?bst
<[email protected]> wrote:
> Mainly I'd say it's that I want to send the answer back via the same
> handle. That's where the problem comes from, I suspect. Since it is
> lazy IO, it only evaluates, once the handle gets closed from the
> client side. And then it is too late to send something back. At least
> that's how I understand it.
>

No it don't work like that, what's more probably happening is that
your program is structured so that the answer can't be created until
the "end" of the "request" is read and this "end" won't appear until
eof has been received. You should make it explicit in your request
that it is finished (send two empy lines at the end of the request for
instance). If you don't manage to do that, show us your code so that
we could point out your mistake.

-- 
Jeda?



------------------------------

Message: 3
Date: Sun, 19 Jun 2011 16:53:03 +0200
From: Raphael P?bst <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Chadda? Fouch? <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

I think, you're right. I read the ByteString from the handle using
hGetContents, which then waits for eof, which I don't send apparently.
Is there a way to do this explicitely?

Raf

On 6/19/11, Chadda? Fouch? <[email protected]> wrote:
> On Sat, Jun 18, 2011 at 10:26 PM, Raphael P?bst
> <[email protected]> wrote:
>> Mainly I'd say it's that I want to send the answer back via the same
>> handle. That's where the problem comes from, I suspect. Since it is
>> lazy IO, it only evaluates, once the handle gets closed from the
>> client side. And then it is too late to send something back. At least
>> that's how I understand it.
>>
>
> No it don't work like that, what's more probably happening is that
> your program is structured so that the answer can't be created until
> the "end" of the "request" is read and this "end" won't appear until
> eof has been received. You should make it explicit in your request
> that it is finished (send two empy lines at the end of the request for
> instance). If you don't manage to do that, show us your code so that
> we could point out your mistake.
>
> --
> Jeda?
>



------------------------------

Message: 4
Date: Sun, 19 Jun 2011 08:56:53 -0700
From: Sean Perry <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1

Yes, close the socket (-:

On Jun 19, 2011, at 7:53 AM, Raphael P?bst wrote:

> I think, you're right. I read the ByteString from the handle using
> hGetContents, which then waits for eof, which I don't send apparently.
> Is there a way to do this explicitely?
> 
> Raf
> 
> On 6/19/11, Chadda? Fouch? <[email protected]> wrote:
>> On Sat, Jun 18, 2011 at 10:26 PM, Raphael P?bst
>> <[email protected]> wrote:
>>> Mainly I'd say it's that I want to send the answer back via the same
>>> handle. That's where the problem comes from, I suspect. Since it is
>>> lazy IO, it only evaluates, once the handle gets closed from the
>>> client side. And then it is too late to send something back. At least
>>> that's how I understand it.
>>> 
>> 
>> No it don't work like that, what's more probably happening is that
>> your program is structured so that the answer can't be created until
>> the "end" of the "request" is read and this "end" won't appear until
>> eof has been received. You should make it explicit in your request
>> that it is finished (send two empy lines at the end of the request for
>> instance). If you don't manage to do that, show us your code so that
>> we could point out your mistake.
>> 
>> --
>> Jeda?
>> 
> 
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners




------------------------------

Message: 5
Date: Sun, 19 Jun 2011 18:05:56 +0200
From: Raphael P?bst <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Sean Perry <[email protected]>
Cc: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Won't that make it impossible to send stuff back to the original sender?

On 6/19/11, Sean Perry <[email protected]> wrote:
> Yes, close the socket (-:
>
> On Jun 19, 2011, at 7:53 AM, Raphael P?bst wrote:
>
>> I think, you're right. I read the ByteString from the handle using
>> hGetContents, which then waits for eof, which I don't send apparently.
>> Is there a way to do this explicitely?
>>
>> Raf
>>
>> On 6/19/11, Chadda? Fouch? <[email protected]> wrote:
>>> On Sat, Jun 18, 2011 at 10:26 PM, Raphael P?bst
>>> <[email protected]> wrote:
>>>> Mainly I'd say it's that I want to send the answer back via the same
>>>> handle. That's where the problem comes from, I suspect. Since it is
>>>> lazy IO, it only evaluates, once the handle gets closed from the
>>>> client side. And then it is too late to send something back. At least
>>>> that's how I understand it.
>>>>
>>>
>>> No it don't work like that, what's more probably happening is that
>>> your program is structured so that the answer can't be created until
>>> the "end" of the "request" is read and this "end" won't appear until
>>> eof has been received. You should make it explicit in your request
>>> that it is finished (send two empy lines at the end of the request for
>>> instance). If you don't manage to do that, show us your code so that
>>> we could point out your mistake.
>>>
>>> --
>>> Jeda?
>>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 36, Issue 50
*****************************************

Reply via email to